phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Ivanov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-3546) NPE at SequenceManager
Date Fri, 23 Dec 2016 13:08:58 GMT
Alexey Ivanov created PHOENIX-3546:
--------------------------------------

             Summary: NPE at SequenceManager
                 Key: PHOENIX-3546
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3546
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.8.0
            Reporter: Alexey Ivanov


I have following schema:
{noformat}
create table "ns:mi"(id varchar not null primary key);
create table "ns:oldmi"(id varchar not null primary key, content_id varchar);
create table "ns:cmi"(id varchar not null primary key, contenturl varchar);
create table "ns:c"(id varchar not null primary key, file_url varchar);

create sequence ns.artifact_seq start with 1 increment by 1 cache 100;
{noformat}

And execute statement:
{noformat}
upsert into "ns:mi"(id) select (c.id || '|' || TO_CHAR(next value for ns.artifact_seq)) AS
id FROM "ns:oldmi" a JOIN "ns:cmi" ec ON a.content_id=ec.id JOIN "ns:c" c ON ec.contenturl=c.file_url;
{noformat}
It fails with exception:
{noformat}
java.sql.SQLException: Encountered exception in sub plan [1] execution.
        at org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:198)
        at org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:143)
        at org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:138)
        at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:803)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:329)
        at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:807)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: java.lang.NullPointerException
        at org.apache.phoenix.compile.SequenceManager$SequenceTuple.<init>(SequenceManager.java:97)
        at org.apache.phoenix.compile.SequenceManager.newSequenceTuple(SequenceManager.java:85)
        at org.apache.phoenix.iterate.SequenceResultIterator.next(SequenceResultIterator.java:47)
        at org.apache.phoenix.join.HashCacheClient.serialize(HashCacheClient.java:107)
        at org.apache.phoenix.join.HashCacheClient.addHashCache(HashCacheClient.java:83)
        at org.apache.phoenix.execute.HashJoinPlan$HashSubPlan.execute(HashJoinPlan.java:385)
        at org.apache.phoenix.execute.HashJoinPlan$1.call(HashJoinPlan.java:167)
        at org.apache.phoenix.execute.HashJoinPlan$1.call(HashJoinPlan.java:163)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.apache.phoenix.job.JobManager$InstrumentedJobFutureTask.run(JobManager.java:183)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message