Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-665

How to resolve the data type problem in phoenix?

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Resolution: Fixed
    • None
    • None
    • None
    • 534

    Description

      I have create a table via hive in hbase. When I insert integer data into the table, it can be retrieved by hive or hbase, but can not be retrieved correctly via phoenix, and the error is :
      java.lang.IllegalArgumentException: offset (715) + length (8) exceed the capacity of the array: 720
      at org.apache.hadoop.hbase.util.Bytes.explainWrongLengthOrOffset(Bytes.java:543)
      at org.apache.hadoop.hbase.util.Bytes.toLong(Bytes.java:521)
      at org.apache.hadoop.hbase.util.Bytes.toDouble(Bytes.java:620)
      at com.salesforce.phoenix.schema.PDataType$UnsignedDoubleCodec.decodeDouble(PDataType.java:4152)
      at com.salesforce.phoenix.schema.PDataType$18.toObject(PDataType.java:2756)
      at com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4585)
      at com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4564)
      at com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4573)
      at com.salesforce.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:85)
      at com.salesforce.phoenix.jdbc.PhoenixResultSet.getObject(PhoenixResultSet.java:476)
      at sqlline.SqlLine$Rows$Row.<init>(SqlLine.java:2314)
      at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2430)
      at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2074)
      at sqlline.SqlLine.print(SqlLine.java:1735)
      at sqlline.SqlLine$Commands.execute(SqlLine.java:3683)
      at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
      at sqlline.SqlLine.dispatch(SqlLine.java:821)
      at sqlline.SqlLine.begin(SqlLine.java:699)
      at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
      at sqlline.SqlLine.main(SqlLine.java:424)

      The data type in hive is integer and the data type in phoenix is unsigned_int.
      Also, if insert data by phoenix, it will be displayed correctly in phoenix but null in hive or hbase.
      How can I resolve this problem?
      Any help will be appreciated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            liuziliang liuziliang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: