Anoop Sam John created PHOENIX-6355:
---------------------------------------
Summary: Index rebuild command prints wrong warning
TableNotFoundException for parent table when command used for first time on a
new client session
Key: PHOENIX-6355
URL: https://issues.apache.org/jira/browse/PHOENIX-6355
Project: Phoenix
Issue Type: Bug
Affects Versions: 5.0.0
Reporter: Anoop Sam John
sqlline version 1.2.0
0: jdbc:phoenix:> ALTER INDEX IF EXISTS <index name> on <table name> REBUILD;
21/02/01 08:56:56 WARN iterate.BaseResultIterators: Unable to find parent table
"<table name>" of table "<index name>" to determine
USE_STATS_FOR_PARALLELIZATION
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table
undefined. tableName=<table name>
at
org.apache.phoenix.schema.PMetaDataImpl.getTableRef(PMetaDataImpl.java:71)
at
org.apache.phoenix.jdbc.PhoenixConnection.getTable(PhoenixConnection.java:583)
at
org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil.getStatsForParallelizationProp(PhoenixConfigurationUtil.java:648)
at
org.apache.phoenix.iterate.BaseResultIterators.<init>(BaseResultIterators.java:504)
at
org.apache.phoenix.iterate.ParallelIterators.<init>(ParallelIterators.java:62)
at
org.apache.phoenix.iterate.ParallelIterators.<init>(ParallelIterators.java:69)
at
org.apache.phoenix.execute.AggregatePlan.newIterator(AggregatePlan.java:273)
at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:364)
at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:217)
at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:212)
at
org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:207)
at
org.apache.phoenix.compile.PostDDLCompiler$2.execute(PostDDLCompiler.java:288)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.updateData(ConnectionQueryServicesImpl.java:3721)
at
org.apache.phoenix.schema.MetaDataClient.alterIndex(MetaDataClient.java:4011)
at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAlterIndexStatement$1.execute(PhoenixStatement.java:1259)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1825)
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)
The parent table exists actually. The issue is at client end PMetaDataImpl's
cache is not having the PTable ref for parent table. In code we just log this
as warn and go ahead with decisio of using state based parallelization based on
the cluster level setting.
So for 1st time, even if table level setting is tuned for this, we will end up
not using it.
Also this warn log about TableNotFoundException is bit scary. If we are ok not
use to check table level setting when the client end cache is not having parent
table ref, then we should avoid log as WARN. Instead a debug level may be good
enough.
I would like to solve it for 1st time usage itself so that we can leave this
log as warn itself.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)