thrift

Hbase client ConnectionLoss for /hbase error

一曲冷凌霜 提交于 2019-12-03 07:28:28
问题 I'm going completely crazy: Installed Hadoop/Hbase, all is running; /opt/jdk1.6.0_24/bin/jps 23261 ThriftServer 22582 QuorumPeerMain 21969 NameNode 23500 Jps 23021 HRegionServer 22211 TaskTracker 22891 HMaster 22117 SecondaryNameNode 21779 DataNode 22370 Main 22704 JobTracker Pseudo distributed environment. hbase shell is working and coming up with correct results running 'list' and; hbase shell HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the

比较跨语言通讯框架:Apache Thrift和Google Protobuf

倾然丶 夕夏残阳落幕 提交于 2019-12-03 06:06:56
前两天想在微博上发表一个观点:在现在的技术体系中,能用于描述通讯协议的方式很多,xml,json,protobuf,thrift,如果在有如此众多选择的基础上,在设计系统时,还自造协议,自己设计协议类型和解析方式,那么我只能说,您真的落后了,不是技术上,而是思想上。对于xml,和json我们不做过多描述了,参考相关文档就可以了。特别是json,如今在 web系统,页游系统的前后台通讯中,应用非常广泛。 本文将重点介绍两种目前在大型系统中,应用比较普遍的两种通讯框架,thrift和Protobuf ,为什么叫通讯框架,而不叫通讯协议?因为这两种技术,如果仅仅当作协议解析用,对于其强大的功能,就大打了折扣。 对于 两种利器而言,首推的应该是thrift ,因为其不仅有对于协议封装和解析的处理,而且有完备的通讯框架的实现,完全封装了底层通讯 ,对于使用者,只要在框架的客户端和服务器接口回调中,处理逻辑就可以了 。对于其确切的描述,我们还是引用官方的说法吧,这样更准确些,以免由于我自己的想法,影响了大家的理解。 Thrift是一个跨语言的服务部署框架,最初由Facebook于2007年开发,2008年进入Apache开源项目。Thrift通过一个中间语言(IDL, 接口定义语言)来定义RPC的接口和数据类型,然后通过一个编译器生成不同语言的代码(目前支持C++,Java, Python,

How to handle authentication and authorization with thrift?

北慕城南 提交于 2019-12-03 05:04:42
问题 I'm developing a system which uses thrift. I'd like clients identity to be checked and operations to be ACLed. Does Thrift provide any support for those? 回答1: Not directly. The only way to do this is to have an authentication method which creates a (temporary) key on the server, and then change all your methods so that the first argument is this key and they all additionally raise an not-authenticated error. For instance: exception NotAuthorisedException { 1: string errorMessage, } exception

Integrate Hbase with PHP [closed]

﹥>﹥吖頭↗ 提交于 2019-12-03 03:37:07
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . I have installed the Hbase and now I am looking for some PHP library to integrate hbase with PHP I have tried 2 libraries one is I tried to connect with thrift but was unable to do so 2nd is I tried to connect it with popHbase but was unable to do so can somebody provide me if there is any other library available or if there is any working library available that uses thrift? please

TNonblockingServer in thrift crashes when TFramedTransport opens

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to implement a thrift server in C++ to communicate with a Python client. here is my code: C++ server: shared_ptr<ThriftHandler> _handler (new myHandler()); shared_ptr<TProcessor> _processor (new myService(_handler)); shared_ptr<TProtocolFactory> _protocolFactory (new TBinaryProtocolFactory()); shared_ptr<ThreadManager> _threadManager = ThreadManager::newSimpleThreadManager(15); shared_ptr<PosixThreadFactory> _threadFactory(new PosixThreadFactory()); _threadManager->threadFactory(_threadFactory); _threadManager->start();

HDFS thrift server returns content of local FS, not HDFS

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am accessing HDFS using thrift. This is the expected(and right) content on HDFS. [hadoop@hdp-namenode-01 ~]$ hadoop fs -ls / Found 3 items drwxr-xr-x - hadoop supergroup 0 2012-04-26 14:07 /home drwxr-xr-x - hadoop supergroup 0 2012-04-26 14:21 /tmp drwxr-xr-x - hadoop supergroup 0 2012-04-26 14:20 /user And then I start an HDFSThriftServer [hadoop@hdp-namenode-01 ~]$ jps 17290 JobTracker 16980 NameNode 27289 Jps 17190 SecondaryNameNode 17511 RunJar 25270 HadoopThriftServer Try to access content through thrift in PHP. $transport = new

Is there a Thrift or Cassandra client for Node.js/JavaScript

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to start using Cassandra with a node.js deployment, but I can't find a Thrift or Cassandra client for Node.js and/or JavaScript. Is there one? Is there a simple means of generating Thrift connections? Update: The short answer to this question turns out to be no, there is no JS client for Thrift that is compatible with Cassandra. Further Update: The next release of Cassandra (0.8 at time of writing) is going to have support for an Avro API. There is already node.js module for Avro support. 回答1: Someone made one now: https:/

Thrift python 3.4 TypeError: string argument expected, got &#039;bytes&#039;

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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.TSocket('localhost', 9090) transport = TTransport

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

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 be and you can run into this same issue. Has

python3.5 thrift cybin.ProtocolError: No protocol version header

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/hskj/anaconda3/lib/python3.5/site-packages/happybase/connection.py", line 242, in tables names = self.client.getTableNames() File "/hskj/anaconda3/lib/python3.5/site-packages/thriftpy/thrift.py", line 198, in _req return self._recv(_api) File "/hskj/anaconda3/lib/python3.5/site-packages/thriftpy/thrift.py", line 210, in _recv fname, mtype, rseqid = self._iprot.read_message_begin() File "thriftpy/protocol/cybin/cybin.pyx", line 439, in cybin.TCyBinaryProtocol.read