Hbase Thrift in CDH 5

孤人 提交于 2019-12-04 17:22:35

There are two Thrift IDL files that come with HBase:

Both have a get() method, but only one of them has a put() method, which is exactly what your error messages above are telling us.

Cited from the package summary page:

There are currently 2 thrift server implementations in HBase, the packages:

  • org.apache.hadoop.hbase.thrift: This may one day be marked as depreceated.

  • org.apache.hadoop.hbase.thrift2: i.e. this package. This is intended to closely match to the HTable interface and to one day supercede the older thrift (the old thrift mimics an API HBase no longer has).

Also the install guides have a separate section for that scenario:

CDH 5 HBase Compatibility

CDH 5 HBase is [...] not wire compatible with CDH 4 [...]. Consequently, rolling upgrades from CDH 4 to CDH 5 are not possible because existing CDH 4 HBase clients cannot make requests to CDH 5 servers and CDH 5 HBase clients cannot make requests to CDH 4 servers. Clients of the Thrift and REST proxy servers, however, retain wire compatibility between CDH 4 and CDH 5. [...]

The HBase User API (Get, Put, Result, Scanner etc; see Apache HBase API documentation) has evolved and attempts have been made to make sure the HBase Clients are source code compatible and thus should recompile without needing any source code modifications. This cannot be guaranteed however, since with the conversion to ProtoBufs, some relatively obscure APIs have been removed. Rudimentary efforts have also been made to preserve recompile compatibility with advanced APIs such as Filters and Coprocessors. These advanced APIs are still evolving and our guarantees for API compatibility are weaker here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!