How to obtain Phoenix table data via HBase REST service

不羁岁月 提交于 2019-12-02 01:38:11

You probably have an issue with how Phoenix encodes data it stores in an HBase table, vs how the native REST API will try and find a key.

Looking at the Phoenix documentation on data types for BIGINT it says:

The binary representation is an 8 byte long with the sign bit flipped (so that negative values sorts before positive values).

So you should probably take a look at what has actually been inserted into your table. The HBase REST API is probably looking for a key using a different encoding and thus can't find it.

You really should get your data from phoenix table using phoenix not HBase. Phoenix use is custom encoding for it's Integer and BigInt also salting (if you use one).

Phoenix also mostly use byte for storing data and StringBinary for encoding it. So, lot of chance that your key is not 5 but \x80\x00\x00\x05(Integer)

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