From dev-return-49408-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Feb 13 23:36:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 72B28180656 for ; Tue, 13 Feb 2018 23:36:04 +0100 (CET) Received: (qmail 16864 invoked by uid 500); 13 Feb 2018 22:36:03 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 16853 invoked by uid 99); 13 Feb 2018 22:36:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2018 22:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 01013C1BFC for ; Tue, 13 Feb 2018 22:36:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pPX_SwFTB8bG for ; Tue, 13 Feb 2018 22:36:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 428655F180 for ; Tue, 13 Feb 2018 22:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 71076E00C9 for ; Tue, 13 Feb 2018 22:36:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0E5C221E84 for ; Tue, 13 Feb 2018 22:36:00 +0000 (UTC) Date: Tue, 13 Feb 2018 22:36:00 +0000 (UTC) From: "Thomas D'Silva (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4592) BaseResultIterators.getStatsForParallelizationProp() should use retry looking up the table without tenantId if cannot find the table using the tenantId MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-4592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363163#comment-16363163 ] Thomas D'Silva commented on PHOENIX-4592: ----------------------------------------- [~jamestaylor] Can you please review? I also changed USE_STATS_FOR_PARALLELIZATION isMutableOnView property to be false. > 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 > Attachments: PHOENIX-4592-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.(BaseResultIterators.java:500) > at org.apache.phoenix.iterate.SerialIterators.(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)