java.sql.SQLException:ERROR 201(22000):非法数据。 ERROR 201(22000):非法数据。预计长度至少为64字节,但有25

时间:2016-07-01 01:12:44

标签: hbase phoenix bigdata

我正在使用hbase和phoenix我可能在我的数据中有一些非ascii字符,但是现在他们已经在我的hbase中了,当我试图从phoenix查询数据时:

select a.col1, a.col2, a.col3, a.col4, b.col5
from "ns:table1" as a
inner join table2 "ns:table2" as b
    on a.col1 = b.col1;

但每次我在phoenix shell上运行此查询时都会弹出这个错误:

Error: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data. Expected length of at least 64 bytes, but had 25 (state=22000,code=201)
java.sql.SQLException: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data. Expected length of at least 64 bytes, but had 25
        at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:386)
        at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
        at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:131)
        at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:115)
        at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:104)
        at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:538)
        at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:510)
        at org.apache.phoenix.iterate.RoundRobinResultIterator.getIterators(RoundRobinResultIterator.java:176)
        at org.apache.phoenix.iterate.RoundRobinResultIterator.next(RoundRobinResultIterator.java:91)
        at org.apache.phoenix.iterate.DelegateResultIterator.next(DelegateResultIterator.java:44)
        at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:680)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:305)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295)
        at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1255)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:808)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)

我认为这可能是因为我的数据中存在非ascii字符,因此我尝试将varchar分配给每个字段但仍然是相同的错误。是否有任何方法,以便我可以摆脱这个错误或至少在此查询期间,我可能会忽略导致错误的数据?

table1的表架构: 'TABLE_CAT', 'TABLE_SCHEM', 'TABLE_NAME', 'COLUMN_NAME', 'DATA_TYPE', 'TYPE_NAME', 'COLUMN_SIZE', 'BUFFER_LENGTH', 'DECIMAL_DIGITS', 'NUM_PREC_RADIX', 'NULLABLE', '备注','COLUMN_DEF ”, 'SQL_DATA_TYPE', 'SQL_DATETIME_SUB', 'CHAR_OCTET_LENGTH', 'ORDINAL_POSITION', 'IS_NULLABLE', 'SCOPE_CATALOG', 'SCOPE_SCHEMA', 'SCOPE_TABLE', 'SOURCE_DATA_TYPE', 'IS_AUTOINCREMENT', 'ARRAY_SIZE', 'COLUMN_FAMILY', 'TYPE_ID', 'VIEW_CONSTANT', 'MULTI_TENANT', 'KEY_SEQ' '', '', 'NS:表1', 'SNO', '12', 'VARCHAR', '空', '空', '空', '空', '0', '', '', '空', '空', '空', '1', '假', '', '', '', '空', '', '空', '', '12', '', '', '1' '', '', 'NS:表1', 'COL1', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '2', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表1', 'COL2', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '3', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表1', 'COL3', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '4', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表1', 'COL4', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '5', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表1', 'COL5', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '6', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表1', 'COL6', '12', 'VARCHAR', '空', '空', '空', '空', '1', '', '', '空', '空', '空', '7', '真', '', '', '', '空', '', '空', 'PC', '12', '' , '', '空' **

table2的表模式: 'TABLE_CAT', 'TABLE_SCHEM', 'TABLE_NAME', 'COLUMN_NAME', 'DATA_TYPE', 'TYPE_NAME', 'COLUMN_SIZE', 'BUFFER_LENGTH', 'DECIMAL_DIGITS', 'NUM_PREC_RADIX', 'NULLABLE', '备注','COLUMN_DEF ”, 'SQL_DATA_TYPE', 'SQL_DATETIME_SUB', 'CHAR_OCTET_LENGTH', 'ORDINAL_POSITION', 'IS_NULLABLE', 'SCOPE_CATALOG', 'SCOPE_SCHEMA', 'SCOPE_TABLE', 'SOURCE_DATA_TYPE', 'IS_AUTOINCREMENT', 'ARRAY_SIZE', 'COLUMN_FAMILY', 'TYPE_ID', 'VIEW_CONSTANT', 'MULTI_TENANT', 'KEY_SEQ' '', '', 'NS:表2', 'SNO', '12', 'VARCHAR', '250', '空', '空', '空', '0', '', '', '空', '空', '空', '1', '假', '', '', '', '空', '', '空', '', '12', '', '', '1' '', '', 'NS:表2', 'COL1', '12', 'VARCHAR', '250', '空', '空', '空', '1', '', '', '空', '空', '空', '2', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表2', 'COL5', '12', 'VARCHAR', '250', '空', '空', '空', '1', '', '', '空', '空', '空', '3', '真', '', '', '', '空', '', '空', 'PC', '12', '' ,'','空值' '', '', 'NS:表2', 'COL6', '12', 'VARCHAR', '250', '空', '空', '空', '1', '', '', '空', '空', '空', '4', '真', '', '', '', '空', '', '空', 'PC', '12', '' , '', '空' **

0 个答案:

没有答案