phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tian.yang <tian.y...@chinacache.com>
Subject Atomic Upsert salted table ERROR
Date Fri, 04 Aug 2017 08:09:04 GMT
Hi,
       phoenix Atomic Upsert salted table ERROR

0: jdbc:phoenix:> drop table MY_TABLE;
No rows affected (4.635 seconds)
0: jdbc:phoenix:> create table my_table(id varchar not null,id1 varchar not null, counter1
bigint, counter2 bigint CONSTRAINT pk PRIMARY KEY (id,id1));
No rows affected (2.365 seconds)
0: jdbc:phoenix:> UPSERT INTO my_table(id,id1, counter1, counter2) VALUES ('abc','123',
0, 0) ON DUPLICATE KEY UPDATE counter1 = counter1 + 1, counter2 = counter2 + 1;
1 row affected (0.024 seconds)
0: jdbc:phoenix:> drop table MY_TABLE;
No rows affected (4.62 seconds)
0: jdbc:phoenix:> create table my_table(id varchar not null,id1 varchar not null, counter1
bigint, counter2 bigint CONSTRAINT pk PRIMARY KEY (id,id1))SALT_BUCKETS = 6;
No rows affected (4.378 seconds)
0: jdbc:phoenix:> UPSERT INTO my_table(id,id1, counter1, counter2) VALUES ('abc','123',
0, 0) ON DUPLICATE KEY UPDATE counter1 = counter1 + 1, counter2 = counter2 + 1;
java.lang.NullPointerException: at index 3
        at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:191)
        at com.google.common.collect.ImmutableList.construct(ImmutableList.java:320)
        at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:290)
        at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:534)
        at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:408)
        at org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:287)
        at org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:979)
        at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:611)
        at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:597)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:351)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:341)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:339)
        at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1511)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:813)
        at sqlline.SqlLine.begin(SqlLine.java:686)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:291)
0: jdbc:phoenix:>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message