thrift

Cassandra Upgrade 0.8.2->0.8.4 get error “failed connecting to all endpoints”

天涯浪子 提交于 2020-01-05 04:54:09
问题 After upgrade of cassandra from 0.8.2 to 0.8.4, got this error I have restarted cassandra, removed data, etc. nothing helps I have 6 identical machines in the cloud, before it was working fine. If I make netstat then it shows port 9160 listening nodetool ... ring - responces with 6 machines UP. what could be the problem? : ( Exception in thread "main" java.io.IOException: Could not get input splits at org.apache.cassandra.hadoop.ColumnFamilyInputFormat.getSplits(ColumnFamilyInputFormat.java

Windows and Apache Thrift Executable

☆樱花仙子☆ 提交于 2020-01-05 04:50:11
问题 I am testing out how simple Apache Thrift is to learn and it looks promising. One major problem: the first tutorial doesn't work... I have Windows 7, Python 2.7, and got the Thrift .exe for Windows v.0.9.1. I'd rather not compile from source as I don't use Cygwin etc. The exe gave the problems described below. So I moved on and tried using Chocolatey to install Thrift using cinst Thrift which worked fine and gave me Thrift v0.9.0. But this version results in the same behavior as the exe,

Apache Thrift not loading PHP definition

你说的曾经没有我的故事 提交于 2020-01-05 04:12:05
问题 I have the following codes. I have checked the files and they exist. require_once "/usr/lib/php/Thrift/ClassLoader/ThriftClassLoader.php"; use Thrift\ClassLoader\ThriftClassLoader; $GEN_PHP = __DIR__ . "/gen-php/"; $loader = new ThriftClassLoader(); $loader->registerNamespace("Thrift", "/usr/lib/php/"); $loader->registerDefinition("hello", $GEN_PHP); $loader->register(); use Thrift\Protocol\TBinaryProtocol; use Thrift\Transport\TPhpStream; use Thrift\Transport\TBufferedTransport; class

How to programatically add index to Cassandra 0.7

核能气质少年 提交于 2020-01-04 02:27:26
问题 I tried to run the demo on http://www.riptano.com/blog/whats-new-cassandra-07-secondary-indexes programatically, but the results are different from running it in CLI. It seems like Cassandra can only index columns after index is added. All previous data are left unindexed. Full source code are as below:- public static void main(String[] args) { try { try { transport.open(); } catch (TTransportException ex) { Logger.getLogger(IndexLaterTest.class.getName()).log(Level.SEVERE, null, ex); System

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

梦想的初衷 提交于 2020-01-03 18:59:35
问题 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 "/home/qunzi/Downloads/thrift-0.9.2/lib/py/build/lib.linux-x86_64-3.4/thrift/transport/TTransport.py", line 163, in write self.__wbuf.write(buf) TypeError: string argument expected, got 'bytes' Anybody knows what's going on, and possibly with a solution? Here below is the relevant code socket = TSocket

How to load files in sparksql through remote hive storage ( s3 orc) using spark/scala + code + configuration

混江龙づ霸主 提交于 2020-01-02 11:47:06
问题 intellij(spark)--->Hive(Remote)---storage on S3(orc format) Not able to read remote Hive table through spark/scala. was able to read table schema but not able to read table. Error -Exception in thread "main" java.lang.IllegalArgumentException: AWS Access Key ID and Secret Access Key must be specified as the username or password (respectively) of a s3 URL, or by setting the fs.s3.awsAccessKeyId or fs.s3.awsSecretAccessKey properties (respectively). import org.apache.spark.SparkConf import org

How do I make an async call to Hive in Java?

只愿长相守 提交于 2020-01-02 07:19:06
问题 I would like to execute a Hive query on the server in an asynchronous manner. The Hive query will likely take a long time to complete, so I would prefer not to block on the call. I am currently using Thirft to make a blocking call (blocks on client.execute()), but I have not seen an example of how to make a non-blocking call. Here is the blocking code: TSocket transport = new TSocket("hive.example.com", 10000); transport.setTimeout(999999999); TBinaryProtocol protocol = new TBinaryProtocol

Thrift for Bidirectional Messaging

只愿长相守 提交于 2020-01-02 06:50:08
问题 I am curious if Thrift is a good fit for my use case? I am making yet another messaging system, where there is a client and server, but both client and server and initiate a request message to the other, and not all messages may be request, just notifications. Go back 10 years ago I did this with a hand-rolled binary based codec. Go back 5 years and I did it again using Google Protocol buffers. But I'm hearing more about Thrift now. Can Thrift be used simply as a codec, or is it really built

Cloudera/CDH v6.1.x + Python HappyBase v1.1.0: TTransportException(type=4, message='TSocket read 0 bytes')

烈酒焚心 提交于 2020-01-02 00:15:24
问题 EDIT: This question and answer applies to anyone who is experiencing the exception stated in the subject line: TTransportException(type=4, message='TSocket read 0 bytes') ; whether or not Cloudera and/or HappyBase is involved. The root issue (as it turned out) stems from mismatching protocol and/or transport formats on the client-side with what the server-side is implementing, and this can happen with any client/server paring. Mine just happened to be Cloudera and HappyBase, but yours needn't

Thrift Server与Client

泪湿孤枕 提交于 2020-01-01 20:12:29
thrift教程 中提供了客户端和服务端的简单实现。 Client TTransport transport; if (args[0].contains("simple")) { //socket通信 transport = new TSocket("localhost", 9090); transport.open(); } else { TSSLTransportParameters params = new TSSLTransportParameters(); params.setTrustStore("../../lib/java/test/.truststore", "thrift", "SunX509", "JKS"); //加密的通信方式 transport = TSSLTransportFactory.getClientSocket("localhost", 9091, 0, params); } //定义数据传输协议并绑定transport TProtocol protocol = new TBinaryProtocol(transport); //使用transport创建客户端 Calculator.Client client = new Calculator.Client(protocol); //使用生成的client进行调用 perform(client