[
https://issues.apache.org/jira/browse/PHOENIX-4592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16367888#comment-16367888
]
Hudson commented on PHOENIX-4592:
---------------------------------
FAILURE: Integrated in Jenkins build Phoenix-4.x-HBase-0.98 #1818 (See
[https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1818/])
PHOENIX-4592 BaseResultIterators.getStatsForParallelizationProp() should
(tdsilva: rev ac8c9ee970f8c776d3e8cd269e98d50c679e5c38)
* (edit)
phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java
* (edit)
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
* (edit)
phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
* (edit)
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
> BaseResultIterators.getStatsForParallelizationProp() should use retry looking
> up the table without tenantId if cannot find the table using the tenantId
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-4592
> URL: https://issues.apache.org/jira/browse/PHOENIX-4592
> Project: Phoenix
> Issue Type: Bug
> Reporter: Thomas D'Silva
> Assignee: Thomas D'Silva
> Priority: Major
> Fix For: 4.14.0
>
> Attachments: PHOENIX-4592-4.x-HBase-0.98.patch,
> PHOENIX-4592-v2-4.x-HBase-0.98.patch
>
>
> Running a query using a tenant specific connection logs the following warning
> :
> {code}
> 2018-02-09 17:41:45,497 WARN [main] iterate.BaseResultIterators - Unable to
> find parent table "X" of table "X" to determine USE_STATS_FOR_PARALLELIZATION
> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table
> undefined. tableName=X
> at
> org.apache.phoenix.schema.PMetaDataImpl.getTableRef(PMetaDataImpl.java:71)
> at
> org.apache.phoenix.jdbc.PhoenixConnection.getTable(PhoenixConnection.java:567)
> at
> org.apache.phoenix.iterate.BaseResultIterators.getStatsForParallelizationProp(BaseResultIterators.java:1282)
> at
> org.apache.phoenix.iterate.BaseResultIterators.<init>(BaseResultIterators.java:500)
> at
> org.apache.phoenix.iterate.SerialIterators.<init>(SerialIterators.java:67)
> at org.apache.phoenix.execute.ScanPlan.newIterator(ScanPlan.java:240)
> at
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:345)
> at
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:212)
> at
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:207)
> at
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:202)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:309)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:289)
> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:288)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:282)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1692)
> 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)
> {code}
> The following code needs to be modified
> {code}
> if (table.getType() == PTableType.INDEX && table.getParentName() != null) {
> PhoenixConnection conn = context.getConnection();
> String parentTableName = table.getParentName().getString();
> try {
> PTable parentTable =
> conn.getTable(new PTableKey(conn.getTenantId(),
> parentTableName));
> useStats = parentTable.useStatsForParallelization();
> if (useStats != null) {
> return useStats;
> }
> } catch (TableNotFoundException e) {
> logger.warn("Unable to find parent table \"" +
> parentTableName + "\" of table \""
> + table.getName().getString()
> + "\" to determine USE_STATS_FOR_PARALLELIZATION",
> e);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)