thrift

Hbase Thrift in CDH 5

こ雲淡風輕ζ 提交于 2019-12-06 09:26:26
问题 I'm using Node.js Thrift API to connect to Hbase. Everything was working great until I upgraded CDH 4.6 to CDH 5. After upgrading I regenerated the Thrift API for Node.js with this script: thrift --gen js:node /opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hbase/include/thrift/hbase2.thrift After replacing the original Node.js script with the newly generated script, everything stopped working. You can view the new script and the basic methods in the demo that I'm trying to run on https:

Thrift client-server multiple roles

对着背影说爱祢 提交于 2019-12-06 06:33:50
问题 this is my first question, so sorry if the form is wrong! I'm trying to make thrift server (python) and client (c++). However I need to exchange messages in both direction. Client should register (call server's function and wait), and server should listen on same port for N (N-> 100k) incoming connections (clients). After some conditions are satisfied, server needs to call functions on each client and collect results and interpret them. I'm little confused, and first questions is "can this be

Cassandra + PHP + Thrift + retrieve multiple rows bad performance

♀尐吖头ヾ 提交于 2019-12-06 06:19:42
I'm new at Cassandra, and I'm trying to recover multiple rows using php, but the performance is really pour. Here is the code I'm using: * <?php $GLOBALS['THRIFT_ROOT'] = 'D:/cassandra/thrift/lib/php/src'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/cassandra_types.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'

Write a thrift server in scala using scrooge and client in python or ruby

冷暖自知 提交于 2019-12-06 04:54:24
问题 I want to write a thrift service implementation in Scala (using Scrooge) but without the use of Finagle, since I couldn't write a ruby/python client for Finagle servers. The problem is that with scrooge the service doesn't seem to implement "Processor" class. Assume I have a thrift definition like this: service TestService { void testFunction(1: string message); } and I generated the scala files using scrooge, when I tried to use the standard implementation of thrift for scala with that to

How do I insert a row with a TimeUUIDType column in Cassandra?

喜夏-厌秋 提交于 2019-12-06 03:26:19
问题 In Cassandra, I have the following Column Family: <ColumnFamily CompareWith="TimeUUIDType" Name="Posts"/> I'm trying to insert a record into it as follows using a C++ generated function generated by Thrift: ColumnPath new_col; new_col.__isset.column = true; /* this is required! */ new_col.column_family.assign("Posts"); new_col.super_column.assign(""); new_col.column.assign("1968ec4a-2a73-11df-9aca-00012e27a270"); client.insert("Keyspace1", "somekey", new_col, "Random Value", 1234, ONE);

Thrift Java server OutOfMemoryError with Javascript client

£可爱£侵袭症+ 提交于 2019-12-06 02:47:18
I started learning thrift yesterday. After a lot of effort, I successfully executed the Java tutorial. Java server and client are running perfectly. But now, I want a javascript client to communicate with Java Thrift server. For that, I moved all js files in js/ folder. And paste index.html code as below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Thrift Javascript Bindings -

thrift php服务器端开发

。_饼干妹妹 提交于 2019-12-06 02:21:15
在前文(Thrift的java和php数据交互 http://my.oschina.net/penngo/blog/489311 )中只介绍了java作服务器端,但是“php是最好的语言”,自然少了php开发的thrift服务器端。 使用的业务例子,还是以前文的登录和注册为例 服务器端由php代码编写,客户端由php和java编写。 PhpMulServer.php (注意需要使用apache或其它web服务器来运行,由于thrift自身没有提供负载均衡,可考虑用LVS、HAProxy、 Nginx等等对HTTP请求做负载均衡处理) <?php namespace com\penngo; error_reporting(E_ALL); require_once __DIR__.'/../lib/Thrift/ClassLoader/ThriftClassLoader.php'; use Thrift\ClassLoader\ThriftClassLoader; $GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php'; $loader = new ThriftClassLoader(); $loader->registerNamespace('Thrift', __DIR__ . '/../lib'); $loader-

Possible memory issue crashing Hbase Thrift Server

房东的猫 提交于 2019-12-06 01:26:04
I'm running Cloudera CDH4 with Hbase and Hbase Thrift Server. Several times a day, the Thrift Server crashes. In /var/log/hbase/hbase-hbase-thrift-myserver.out, there is this: # # java.lang.OutOfMemoryError: Java heap space # -XX:OnOutOfMemoryError="kill -9 %p" # Executing /bin/sh -c "kill -9 8151"... In /var/log/hbase/hbase-hbase-thrift-myserver.log, there are no error messages at the end of the file. There are only a lot of DEBUG messages stating that one of the nodes is caching a particular file. I can't figure out any configuration options for the Hbase Thrift Server. There are no obvious

thrift: changing from tSimpleServer to TNonblockingServer

流过昼夜 提交于 2019-12-05 23:27:11
I have a simple thrift server: shared_ptr<TProcessor> processor(new MyProcessor(handlerTrace)); shared_ptr<TServerTransport> serverTransport(new TServerSocket(port)); shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory()); shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory()); TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); and able to connect with the following lines: boost::shared_ptr<TSocket> socket(new TSocket("localhost", port)); boost::shared_ptr<TTransport> transport(new TBufferedTransport(socket)); boost

python thrift error ```TSocket read 0 bytes```

跟風遠走 提交于 2019-12-05 23:15:11
问题 My python version:2.7.8 thrift version:0.9.2 python-thrift version:0.9.2 OS: centOS 6.8 My test.thrift file: const string HELLO_IN_KOREAN = "an-nyoung-ha-se-yo" const string HELLO_IN_FRENCH = "bonjour!" const string HELLO_IN_JAPANESE = "konichiwa!" service HelloWorld { void ping(), string sayHello(), string sayMsg(1:string msg) } client.py # -*-coding:utf-8-*- from test import HelloWorld from test.constants import * from thrift import Thrift from thrift.transport import TSocket from thrift