Support Questions
Find answers, ask questions, and share your expertise

hbase integration with python thrift

Explorer

We have an HBASE installation and after working with both Java and the REST API successfully, I need to create a way for others to link to HBASE with other applications, one being in python.

I found the cloudera tutorial and was not sure about the requirements of having separate thrift installations on the client machine running the python scripts. I was able to start thrift as it must have been installed with the HBASE installation.

Do I really need to have a second instance running?

'For both Thrift and REST to work, another HBase daemon needs to be running to handle these requests. These daemons can be installed with the hbase-thrift and hbase-rest packages. The diagram below shows how Thrift and REST are placed in the cluster.'

4 REPLIES 4

"I need to create a way for others to link to HBASE with other applications, one being in python." -- You realize that clients in Python can also interact with HBase via the REST server, right?

"was not sure about the requirements of having separate thrift installations on the client machine running the python scripts" -- Can't really say why there was such a recommendation without any context. You do need to make sure that the version of Thrift that was used to generate the Python language bindings is the same that is used by the client. I do not believe HDP automates the generation of the language bindings.

"Do I really need to have a second instance running?" I don't understand this question, but you can run the HBase Thrift server on the same node that the REST server is running.

Explorer

Yes, I know that the REST API can be used. But the team are convinced that they would get better response using THRIFT. REST and THRIFT are both running on the same server with the HBASE installation. Just wanted to make sure that this setup is fine. Thanks

Yes. You can co-locate the two services.

Explorer

I'm sorry to keep on persisting with this; but need to get clear confirmation; I need to do the language bindings for the installed thrift on the hbase server if it is not already done and then have a separate installation of thrift on the client server as well? I had an error trying to run the thrift command on the hbase server which was -bash command thrift not found. Then searched on this and found I need to install a compiler for thrift.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.