thrift

Installing Thrift on CentOS: can't find Boost 1.40 or higher

蹲街弑〆低调 提交于 2019-12-11 00:12:54
问题 I can't shake this error when trying to install Thrift: ./configure ... checking for boostlib >= 1.40.0... configure: WARNING: We could not detect the boost libraries (version 1.40 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more

Hive queries via Python client

与世无争的帅哥 提交于 2019-12-10 23:22:58
问题 I have hive 0.8 installed on a hadoop cluster running in AWS EMR. I am trying to do some data QA, which involves running a hive query and fetching the results into python where some more logic is contained. Currently, this is achieved by sending a hive query as a jobflow step, dumping those results to local storage on the master node, SCP-ing those results to my local machine, and then loading the file with python and parsing the results. All in all, not a very fun process. Ideally, I would

Integration testing: Start a blocking server during `unittest.setUp` before testing it?

孤街醉人 提交于 2019-12-10 23:07:02
问题 I'm writing a service using Thrift and need to apply some tests to ensure that it operates/responds as expected. To accomplish this, the most robust approach seems to be to use the unittest module. I'd like to start the service in "test" mode (starts on a specific "test" port, uses "test" data, etc) from directly within the unit test's setUp method, but calling serve() blocks at that point waiting for connections. What would be the best approach for starting the service so that the tests can

Handling Apache Thrift list/map Return Types in C++

泄露秘密 提交于 2019-12-10 22:51:10
问题 First off, I'll say I'm not the most competent C++ programmer, but I'm learning, and enjoying the power of Thrift. I've implemented a Thrift Service with some basic functions that return void, i32, and list. I'm using a Python client controlled by a Django web app to make RPC calls and it works pretty well. The generated code is pretty straight forward, except for list returns: .thrift description file: namespace cpp Remote enum N_PROTO { N_TCP, N_UDP, N_ANY } service Rcon { i32 ping() i32

NodeJS Hbase thrift weirdness

 ̄綄美尐妖づ 提交于 2019-12-10 20:11:47
问题 I'm running into a very odd situation. I've been trying to get a nodeJS client, using thrift, for Hbase running, and I have seemingly had success most of the way except getting any return data. I'm running hbase.0.94.8 (currently the stable version), and it is definitely running, I'm running thrift 0.9.0, it is built and running as well. With both of them running I'm able to query Hbase with the shell and also get to the thrift webpage, but when I run the following code, nothing happens: var

Stopping a Thrift server(TSimpleServer)

眉间皱痕 提交于 2019-12-10 19:05:03
问题 I have a simple use case for a Thrift Server( TSimpleServer ) wherein I have a couple of threads spawned(besides the main thread). One of the newly spawned threads enters the Thrift event loop (i.e server.serve() ). Upon receiving a signal in the main thread I invoke server.stop() which is causing the error posted below. At first I thought it was an uncaught exception. However wrapping both the invocations of server.serve() and server.stop() in try-catch 'es didn't help isolate the problem.

How can I compile an Apache Thrift definition file?

时光毁灭记忆、已成空白 提交于 2019-12-10 17:32:06
问题 I'm trying to compile an Apache Thrift definition file (on Ubuntu). I keep getting the error message: Could not open input file with realpath: Calculator.thrift whenever I enter thrift -r --gen java Calculator.thrift into the command line. I have already installed Thrift. Where should I save .thrift definition files so that it will be possible to compile them? 回答1: In the tutorial directory that comes with the thrift installation, you should see the following 2 *.thrift files: shared.thrift

Apache Thrift: Returning a list/container

牧云@^-^@ 提交于 2019-12-10 14:45:39
问题 I made a simple thrift file like this: thrifttest.thrift namespace cpp thrifttest namespace d thrifttest namespace java thrifttest namespace php thrifttest namespace perl thrifttest service Test { list<i64> ping(); } and in shell ran "thrift --gen cpp thrifttest.thrift" However, when I looked at gen-cpp/Test_server.skeleton.cpp it made the i64 list a parameter, not a return type: Test_server.skeleton.cpp (excerpt) void ping(std::vector<int64_t> & _return) { // Your implementation goes here

Thrift - different Handler instance for each Socket

感情迁移 提交于 2019-12-10 13:55:50
问题 Im developing a 'proxy' server in Thrift. My problem is, that each connection incomming to the proxy uses the same instance of the Handler. The client implementation of the proxy is in the Handler, so all the clients communicate throuh the same connection to the end server. I have : n clients -> n sockets -> 1 handler -> 1 socket -> 1 server What I want to implement : n clients -> n sockets -> n handlers -> n sockets -> 1 server Now the problem is that if a client changes a 'local' parameter

Connecting from C# to Accumulo

独自空忆成欢 提交于 2019-12-10 12:20:47
问题 I am new to working with Accumulo. I need to read/write data from a remote Accumulo through C#. The only code sample/documentation for C#, I have found is - Accumulo createBatchScanner range not working as expected I attempted to compile the code in Xamarin Studio, on a Mac. The issue I am encountering is with this line: AccumuloProxy.Client client = new AccumuloProxy.Client(protocol); Error CS0246: The type or namespace name AccumuloProxy' could not be found. Are you missing org.apache