thrift

Thrift - converting from simple JSON

六月ゝ 毕业季﹏ 提交于 2019-12-09 06:27:21
问题 I created the following Thrift Object: struct Student{ 1: string id; 2: string firstName; 3: string lastName } Now I would like to read this object from JSON. According to this post this is possible So I wrote the following code: String json = "{\"id\":\"aaa\",\"firstName\":\"Danny\",\"lastName\":\"Lesnik\"}"; StudentThriftObject s = new StudentThriftObject(); byte[] jsonAsByte = json.getBytes("UTF-8"); TMemoryBuffer memBuffer = new TMemoryBuffer(jsonAsByte.length); memBuffer.write(jsonAsByte

thrift installation error

喜夏-厌秋 提交于 2019-12-09 04:24:26
i am trying more than 2 hours to install thrift with cassandra but it is not even configured..when i am configure using command ./configure it show the error as: configure: error: Cannot find php-config. Please use --with-php-config=PATH configure: error: ./configure failed for lib/php/src/ext/thrift_protocol i cant fix this. can any one help me. make sure to install php-dev. it happened with me last weekend. good luck. Same thing with Ubuntu Lucid. Installed php5-dev via apt-get and it works. On CentOS 5.6, you're looking for php5-devel or php53-devel installed by "yum install ...." 来源: https

Cassandra CQL method for paging through all rows

笑着哭i 提交于 2019-12-09 01:50:34
问题 I want to programmatically examine all the rows in a large cassandra table, and was hoping to use CQL. I know I could do this with thrift, getting 10,000 (or so) rows at a time with multiget and handing the last retrieved key into to the next multiget call. But I have looked through all the documentation on CQL select, and there doesn't seem to be a way to do this. I have resorted to setting the select limit higher and higher, and setting the timeout higher and higher to match it. Is there an

Cassandra Read a negative frame size

China☆狼群 提交于 2019-12-08 19:26:35
问题 I'm experiencing this error while trying to query Cassandra using cassandra-jdbc(1.1.3) driver. Caused by: org.apache.thrift.transport.TTransportException: Read a negative frame size (-2147418110)! at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:133) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readStringBody

Thrift TSimpleServer becomes unresponsive after several successful requests

牧云@^-^@ 提交于 2019-12-08 19:23:11
问题 I have a Thrift API served from a Java application running on Linux. I'm using a .NET client to connect to the API and execute operations. The first few calls to the service work fine without errors, but then (seemingly at random) a call will "hang." If I force-quit my client and try to reconnect, the service either hangs again, or my client has the following error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net

How to change default settings of sbt-thrift plugin in SBT?

♀尐吖头ヾ 提交于 2019-12-08 11:50:07
问题 I am using sbt-thrift plugin 0.6 with SBT 0.12 and I need to change the resource directory, source directory, output directory and other settings in my build configuration. It doesn't seem to work as mentioned in README. Can someone tell me how to do this thing? 回答1: SBT 0.13 + sbt-thrift 0.7 NOTE Below is the same configuration for SBT 0.12 and sbt-thrift 0.6 I use SBT 0.13.1 and hence had to use sbt-thrift 0.7 from http://bigtoast.github.io/repo/com/github/bigtoast/sbt-thrift_2.10_0.13/0.7/

Does Apache Thrift allow foreign function calls between any two languages?

你说的曾经没有我的故事 提交于 2019-12-08 11:17:11
问题 I'm currently trying to develop (an API in multiple programming languages) that can be accessed from (various other programming languages). I've taken a look at Apache Thrift, and it appears that it might be possible to allow seamless foreign function calls between any two languages using Thrift. Is this correct? 回答1: Thrift is created to facilitate communication between different processes over the network, not in process FFI. It is probably possible to take some parts of Thrift (like IDL),

HBase Filter Language in PHP with Thrift

我们两清 提交于 2019-12-08 08:10:25
问题 I'm looking for a way to use the HBase Filter Language in PHP. The HBase Book's chapter on Thrift seems formal and provides some filters for user to access HBase in PHP. A sample PHP code are also provided in this page, but I can not find any APIs in thrift (such as $client->scannerOpenWithFilterString(...) ). I even checked the thrift definition file for HBase 0.92.0, but it has no interface for scannerOpenWithFilterString . Versions used: Hadoop 0.20.203.0 , Hbase 0.90.4 and thrift 0.8.0 .

C++ linker error after change in thrift file

我的未来我决定 提交于 2019-12-08 05:15:54
问题 I think this is related to C++ linker error than to thrift. I made a change to the thrift file and regenerated cpp & java classes. After this change, I started getting linker errors in cpp. Here is the error Undefined symbols: "com::XXXX::thrift::employee::SavingsInfo::operator<(com::XXXX::thrift::employee::SavingsInfo const&) const", referenced from: std::less::operator()(com::XXXX::thrift::employee::SavingsInfo const&, com::XXXX::thrift::employee::SavingsInfo const&) constin employee_types

Can Apache Thrift be used on Google App Engine?

China☆狼群 提交于 2019-12-08 02:53:19
问题 Can I use Apache Thrift on Google App Engine? Since Google App Engine does not support working with sockets what transport can be used? Is there any transport implementation to use on Google App Engine Channel API as transport layer? PS: Server is supposed to be Java-based (not Python) 回答1: Its is very possible to run Thrift on Google App Engine. Before its was not possible because App engine didn't support socket listening but now its very possible.All u need to do is. User google App engine