phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radha krishna <grkmc...@gmail.com>
Subject Phoenix Upsert with SELECT behaving strange
Date Tue, 17 May 2016 12:19:34 GMT
Hi I am performing some join operation in phoenix console and storing the
result into another table but the same query some time showing below error
messages and some times it is inserting the result into the table.

Error Messages:

1)

Error: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data.
Expected length of at least 96 bytes, but had 15 (state=22000,code=201)
java.sql.SQLException: ERROR 201 (22000): Illegal data. ERROR 201 (22000):
Illegal data. Expected length of at least 96 bytes, but had 15
        at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:395)
        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:737)
        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)


2)
Error: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data.
Expected length of at least 48 bytes, but had 47 (state=22000,code=201)
java.sql.SQLException: ERROR 201 (22000): Illegal data. ERROR 201 (22000):
Illegal data. Expected length of at least 48 bytes, but had 47
        at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:395)
        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:737)
        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)
0: jdbc:phoenix:g4t7565.houston.hpecorp.net:2>


3)
Error: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data.
Expected length of at least 48 bytes, but had 47 (state=22000,code=201)
java.sql.SQLException: ERROR 201 (22000): Illegal data. ERROR 201 (22000):
Illegal data. Expected length of at least 48 bytes, but had 47
        at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:395)
        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:737)
        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)


Note : i am performing inner join, the join tables and the storing the
result table has the same structure( same column families , same
compression , same salt buckets )
why it is behaving inconsistently. can any one help in the issue

Environment:

Ø  Hadoop Distribution : Hortonworks

Ø  Spark Version : 1.6

Ø  HBASE Version: 1.1.2

Ø  Phoenix Version: 4.4.0

Join command
============

Sort Merge Join
--------------------
UPSERT INTO Target_Table SELECT /*+ USE_SORT_MERGE_JOIN*/
big.col1,big.col2...(102 columns) FROM BIG_TABLE as big JOIN SMALL_TABLE as
small ON big.col1=small.col1 where big.col2=small.col2;

Hash Join
------------
UPSERT INTO Target_Table SELECT big.col1,big.col2...(102 columns) FROM
BIG_TABLE as big JOIN SMALL_TABLE as small ON big.col1=small.col1 where
big.col2=small.col2;



Thanks & Regards
   Radha krishna

Mime
View raw message