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.

153 questions
5
votes
3 answers

Can generate .thrift files from existing java/scala interfaces and data types?

Is there an easy way to take existing Java/scala datatypes and API interfaces and produce corresponding .thrift files? Having Thrift generate server data structures is excessively invasive as it has the consequences: I cannot annotate my data…
user48956
  • 11,390
  • 14
  • 67
  • 125
5
votes
1 answer

Trying to get a Python client talk to a Java Server using thrift's TFileTransport and TFileProcessor

I am trying to wrap a Java class to be called from Python using thrift's TFileTransport. I tried using two protocols TJSON and TBinary but I keep getting this exception org.apache.thrift.transport.TTransportException: FileTransport error: bad event…
4
votes
1 answer

How to connect spark with hive using pyspark?

I am trying to read hive tables using pyspark, remotely. It states the error that it is unable to connect to Hive Metastore client. I have read multiple answers on SO and other sources, they were mostly configurations but none of them could address…
Aviral Srivastava
  • 2,262
  • 11
  • 31
4
votes
1 answer

Reference to Thrift not found when running nodejs Thrift example

I am trying to run the nodejs server/client thrift example but I cannot get it to run. Initially, I added thrift as a dependency in my package.json file. Then I did an npm install which installed thrift. Then I attempted to run the server using node…
chromozonex
  • 211
  • 2
  • 14
4
votes
2 answers

'TProtocol' does not contain a definition for 'IncrementRecursionDepth'

I've installed thrift for both my library and server; using NuGet. I have a very simple thrift file that I've compiled it using the following command: thrift.exe -r --gen csharp node.thrift the node.thrift has three lines: service Server { …
zero.zero.seven
  • 1,437
  • 1
  • 15
  • 31
4
votes
1 answer

Thrift python 3.4 TypeError: string argument expected, got 'bytes'

I am trying out Apache Thrift using python 3.4 which Thrift seems to have support, since it has lib.linux-x86_64-3.4 under build directory. But I am keeping getting this error message File…
Allanqunzi
  • 3,038
  • 1
  • 21
  • 49
4
votes
1 answer

How do exception messages in Thrift exceptions work?

I thrift IDL files you can define your own exception types that a service method may throw: exception SampleException { 1: list failed } Whats the contract for seeing a proper exception message in the logs? I have seen log messages…
reikje
  • 2,474
  • 2
  • 19
  • 35
4
votes
1 answer

Thrift large file in messages

I am using thrift for binary protocol over tcp, for sending and reading files (maximum size of 64MB). Is thrift is capable for this? I have thought using: struct SomeMessage { 1: byte data } How thrift is efficient about this?…
Yosi
  • 2,676
  • 5
  • 35
  • 60
4
votes
2 answers

Thrift RPC headers

Does Thrift have a mechanism for passing tokens (e.g. auth token strings) when making a remote call? The only option I can see is to include the auth token string in the method signature?
Myles McDonnell
  • 11,575
  • 14
  • 56
  • 96
4
votes
2 answers

Use your own communication protocol with apache thrift?

I was wondering if it's possible to just use the serialization portions of apache thrift. I basically have a custom communication protocol already created, and would like to pass a thrift object from my server (PHP) to the client (C#). My home-grown…
Geesu
  • 5,318
  • 9
  • 38
  • 69
3
votes
0 answers

Non-Blocking Thrift Server in C++ and Thrift Client in Python

I have a non-blocking multi-threaded thrift server written in C++ and a thrift client written in python. Below code snippets briefly shows how the thrift protocol and binding configurations are done in both C++ server and python client. My problem…
F. Aydemir
  • 2,555
  • 5
  • 34
  • 56
3
votes
0 answers

PHP 7 post_max_size ini setting work for limiting raw POST data?

I am using Apache Thrift to move small base64 encoded files to a PHP backend (with Apache web server). It is essentially just an HTTP POST request with large amounts of raw body data. I want to limit how much data can be POSTed so that I don't even…
Luke Cordingley
  • 631
  • 4
  • 11
3
votes
1 answer

python thrift union type can not be serialized?

I define a union type in topic.thrift file, and generate gen-py. like this: union Generic{ 1: string s, 2: bool b, 3: i64 i, 4: double d} struct Article{ 1: string title, 2: string content, 3: Generic test} and the serialize code like…
Nan
  • 31
  • 2
3
votes
1 answer

Thrift can use http, but it is a binary communication protocol?

I've seen several sources declare that Thrift is a binary communication protocol (the first line of its Wikipedia article, for instance). But, Thrift can make calls over http, which I believed was a text-based protocol and not a binary one. Maybe…
StackMonster
  • 31
  • 1
  • 2
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,799
  • 1
  • 13
  • 22
1
2
3
10 11