How to obtain Phoenix table data via HBase REST service

后端 未结 2 1709
耶瑟儿~
耶瑟儿~ 2021-01-23 03:19

I created a HBase table using the Phoenix JDBC Driver in the following code snippet:

    Class.forName(\"org.apache.phoenix.jdbc.PhoenixDriver\");
    Connection         


        
2条回答
  •  后悔当初
    2021-01-23 04:00

    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.

提交回复
热议问题