Thrift RPC failing from a thrift client in c# to a thrift server spinned over HBase server

StackOverflow https://stackoverflow.com/questions/20951577

  •  24-09-2022
  •  | 
  •  

سؤال

I am working on a project in which I am trying to communicate to the HBase Server via thrift server from a C# client.

I have HBase server set up. I am able to open the socket.

When calling the API: _hbase.getTableNames(), it throws an exception; I stepped into this function , it is internally calling - send_getTableNames(); and recv_getTableNames();.

The first function passes (internally they are writing to the socket) but in the second function they are trying to read from the socket and the client thrift code is receiving zero bytes, hence it's throwing an exception.

What could be reason for this?

NOTE: the server has HBase 0.92.0 installed on it and using HBase.thrift that comes with it on the thrift server side. But on the client side we are using the HBase.thrift file that comes with the HBase 0.94.0. I am guessing this could be the reason( though I may not be correct).

Following is the code snippet on the client side which fails:

transport.Open();                 
var names = _hbase.getTableNames();
هل كانت مفيدة؟

المحلول

I was using AWS HBase over EMR and then thrift server spinned over the HBase server. while setting up the thrift server, there is an option in AWS Management console to set the allowed IP addresses and the port numbers. I was allowing the port number as 9000 , but the thrift server listens at port number 9090. Once I added the port number 9090 to the allowed port number list I was able to connect to it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top