Questions tagged [thrift-protocol]

The protocol family used by the cross-platform, crosss-language Apache Thrift RPC and serialization framework

Thrift combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, C, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, Delphi, Graphviz, Go and OCaml.

Thrift's primary goal is to enable efficient and reliable communication across platforms and programming languages by abstracting the portions of each language that tend to require the most customization into a common library that is implemented in each language.

Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift graduated from the Incubator in October, 2010.

169 questions
3
votes
0 answers

What is the syntax for HiveThriftContext's get_partitions_by_filter command?

Goal I'm trying to check if a partially-specified partition exists in a hive table. Details I have a table with two partition keys, source and date. Before a task can execute, I need to check and see if any partition exists for a certain date…
Noah
  • 495
  • 2
  • 7
  • 21
3
votes
1 answer

Can one thrift server/transport implement multiple services?

All tutorials and documentation suggest that each Thrift server can serve one service (1 handler 1 processor 1 server, all given in constructors etc). From my point of view (elegance of design) it would be better if many or all services definitions…
Jacek Cz
  • 1,872
  • 1
  • 15
  • 22
3
votes
1 answer

How to detect protocol mismatch while using Apache Thrift?

I am running a pair of client and server programs communicating using Apache Thrift on my Mac. In our production system we may end up in a situation where the client uses TJSONProtocol and the server uses TBinaryProtocol for serialization and…
CCoder
  • 2,305
  • 19
  • 41
3
votes
0 answers

Change opencart requests to thrift binaries

We are using opencart for our ecommerce framework.Lately we are being limited by the resources and features and opencart becoming a bottleneck for implementing those features.Now we are shifting to Ruby On Rails.How can we use thrift to make use of…
5ud0
  • 121
  • 1
  • 11
3
votes
2 answers

Apache thrift, struct contain itself

I am looking into thrift for serialization of data. But Document says cyclic structs - Structs can only contain structs that have been declared before it. A struct also cannot contain itself One of our requirement is Struct A List of Child…
mamu
  • 12,184
  • 19
  • 69
  • 92
3
votes
1 answer

Thrift (Apache) use multiple services under same thread pool or thread

We use Apache thrift (on Windows on our case) for defining multiple services exposed by one of our executable. We usually end up extending one service interface with new methods because otherwise we would have to create new threads (at lest one) to…
Ghita
  • 4,465
  • 4
  • 42
  • 69
3
votes
2 answers

Thrift is too slow compared to direct calling function

I try example from "http://thrift-tutorial.readthedocs.org/en/latest/usage-example.html". This example just calculate the product of two numbers. Server: Java, Client: Python. If I try to get product via thrift in 3000 times, elapsed time is…
William
  • 75
  • 1
  • 6
3
votes
2 answers

Connecting to Accumulo from NodeJS

I have been trying to connect to Accumulo from NodeJS through the Thrift proxy, but have been unsuccessful. var thrift = require("thrift"); var AccumuloClient = require("./AccumuloProxy"); var transport = thrift.TFramedTransport; var protocol =…
ryknow
  • 161
  • 1
  • 10
3
votes
1 answer

Is there Thrift marshaling / unmarshaling support for Spray?

My organization has chosen to adopt Thrift messaging as the lingua franca to integrate our clients and services. All our services are written (or will be written) in Scala while we have clients written in other languages. Currently (to my knowledge)…
Randall Schulz
  • 26,420
  • 4
  • 61
  • 81
3
votes
1 answer

What is the Thrift equivalent of an http 500 response?

I am experimenting with a Thrift service using C#. With REST services, an uncaught exception will be translated by web frameworks into an HTTP 500 response code. With thrift, as far as I can tell, I need to declare all possible exception types in…
captncraig
  • 22,118
  • 17
  • 108
  • 151
3
votes
1 answer

How to "include" Thrift files from different modules?

Scenario: One big project with multiple sub-projects, SBT build definition. rootproject/ api/ src/ main/ thrift/ SomeService.thrift core/ src/ main/ thrift/ SomeModel.thrift What is the…
flavian
  • 28,161
  • 11
  • 65
  • 105
3
votes
3 answers

org.apache.thrift7.TBase vs org.apache.thrift.TBase

I am not being able to find any jar which contain this kind of package. Can, anyone tell me in which libthrift Link jar i can find this class and package. I couldn't find any jar containing this package. Everytime i execute my java file it throw…
Naresh
  • 5,073
  • 12
  • 67
  • 124
3
votes
1 answer

Why is Thrift Binary protocol serialization so much slow?

I'm newbie on thrift. I wrote a thrift server in python, also client in python too. Here is my thrift defination: struct RatingByReport { 1: required string ticker, 2: required i32 cnt_institution, 3: optional list strong_buy, …
vincent wen
  • 413
  • 6
  • 9
2
votes
0 answers

How could an Avro parser distinguish the padding at the end from actual values?

I have a question on this example from Designing Data-Intensive Applications page 119. How could the parser possibly know that the 0 in the red rectangle is just padding to make the byte 8 bites? (I assume it's padding.) It might just be interpreted…
Zack Light
  • 167
  • 2
  • 11
2
votes
0 answers

Thrift binary protocol bug

I'm trying to use thrift for python / java interop. I decided to use the binary protocol as a default. When I'm calling a java service from python, everything works fine. However, if I call a python service from java, then there seems to be an…
Peeyush Kushwaha
  • 3,453
  • 8
  • 35
  • 69
1 2
3
11 12