Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hbase 1.1.2 + Thrift 0.9.0 not generating python code on ubuntu 14

avatar
Explorer

In AWS/Ubuntu14 with Python 2.7.6, using Ambari 2.2.2.0 (HDP 2.4.2.0-258), which contains HBASE 1.1.2.2.4.2.0-258.

Updating a python client developed for an earlier version of HBase (0.94.6.1).

Trying to use Thrift 0.9.0 to gen py code -- neither hbase1.thrift or hbase2.thrift generate the expected 'gen-py' directories (or anything) for python:

hadoop1:/usr/hdp/2.4.2.0-258/hbase/include/thrift$ thrift -verbose --gen py /usr/hdp/2.4.2.0-258/hbase/include/thrift/hbase2.thrift Scanning /usr/hdp/2.4.2.0-258/hbase/include/thrift/hbase2.thrift for includes Parsing /usr/hdp/2.4.2.0-258/hbase/include/thrift/hbase2.thrift for types Program: /usr/hdp/2.4.2.0-258/hbase/include/thrift/hbase2.thrift Generating "py"

What am I doing wrong?

1 ACCEPTED SOLUTION

avatar
Super Guru

Does your "hadoop1" user have the permission to create a directory in "/usr/hdp/2.4.2.0-258/hbase/include/thrift"? Can you try switching to a directory which is writable by your user and re-run the command?

View solution in original post

6 REPLIES 6

avatar
Super Guru

Does your "hadoop1" user have the permission to create a directory in "/usr/hdp/2.4.2.0-258/hbase/include/thrift"? Can you try switching to a directory which is writable by your user and re-run the command?

avatar
Explorer

Thank you Josh! That was it.

avatar
Super Guru

This does sound like a bug in Apache Thrift, btw. I was able to reproduce this locally with a 0.9.0. I'm wondering if it also happens with the latest in the 0.9.x line.

avatar
Super Guru

I did some testing and was able to verify that this is broken in 0.9.0, 0.9.3, and the tip of the development branch. I filed https://issues.apache.org/jira/browse/THRIFT-3966 if you care to watch that.

avatar
Explorer

Thank you! Will watch.

avatar
Explorer

Yes, Apache Thrift really needs to emit a useful error msg in the above scenario.