Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FD7718ADE for ; Thu, 12 Nov 2015 03:44:15 +0000 (UTC) Received: (qmail 64545 invoked by uid 500); 12 Nov 2015 03:44:15 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 64482 invoked by uid 500); 12 Nov 2015 03:44:15 -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 64471 invoked by uid 99); 12 Nov 2015 03:44:15 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2015 03:44:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C4B2318022F for ; Thu, 12 Nov 2015 03:44:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zMqGk-EAh688 for ; Thu, 12 Nov 2015 03:44:13 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 77B2620D14 for ; Thu, 12 Nov 2015 03:44:12 +0000 (UTC) Received: (qmail 64155 invoked by uid 99); 12 Nov 2015 03:44:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2015 03:44:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EA5412C14F8 for ; Thu, 12 Nov 2015 03:44:10 +0000 (UTC) Date: Thu, 12 Nov 2015 03:44:10 +0000 (UTC) From: "Don Brinn (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2381) Inner Join with any table or view with Multi_Tenant=true causes "could not find hash cache for joinId" error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2381?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15= 001652#comment-15001652 ]=20 Don Brinn commented on PHOENIX-2381: ------------------------------------ I'm glad that was helpful and it's good to see the problem has been identif= ied. Thank you for your work to investigate and analyze the problem, [~mar= yannxue]. > Inner Join with any table or view with Multi_Tenant=3Dtrue causes "could = not find hash cache for joinId" error > -------------------------------------------------------------------------= ----------------------------------- > > Key: PHOENIX-2381 > URL: https://issues.apache.org/jira/browse/PHOENIX-2381 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.6.0 > Environment: This is with Phoenix version 4.6.0 and HBase version= 0.98.4.2.2.6.0-2800-hadoop2. > Reporter: Don Brinn > Assignee: Maryann Xue > Labels: join, joins, multi-tenant > Attachments: Inner_Join_Cache-Tables_and_Views_and_Data.zip, PHOE= NIX-2381.patch, tmp-2381.patch > > > I am seeing the following error when doing an INNER JOIN of a view with M= ULTI_TENANT=3Dtrue with any other table or view: > java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixIOExcepti= on: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbas= e.DoNotRetryIOException: Could not find hash cache for joinId: Ys=EF=BF=BD0= =EF=BF=BD=EF=BF=BD%=EF=BF=BD. The cache might have expired and have been re= moved. > at org.apache.phoenix.coprocessor.HashJoinRegionScanner.(Ha= shJoinRegionScanner.java:95) > at org.apache.phoenix.coprocessor.ScanRegionObserver.doPostScanne= rOpen(ScanRegionObserver.java:212) > at org.apache.phoenix.coprocessor.BaseScannerRegionObserver.postS= cannerOpen(BaseScannerRegionObserver.java:178) > at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.pos= tScannerOpen(RegionCoprocessorHost.java:1931) > at org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegio= nServer.java:3178) > at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$Client= Service$2.callBlockingMethod(ClientProtos.java:29994) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2078= ) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108= ) > at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecut= or.java:114) > at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java= :94) > at java.lang.Thread.run(Thread.java:745) > =20 > at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73) > at sqlline.TableOutputFormat.print(TableOutputFormat.java:33) > at sqlline.SqlLine.print(SqlLine.java:1653) > at sqlline.Commands.execute(Commands.java:833) > at sqlline.Commands.sql(Commands.java:732) > at sqlline.SqlLine.dispatch(SqlLine.java:808) > at sqlline.SqlLine.begin(SqlLine.java:681) > at sqlline.SqlLine.start(SqlLine.java:398) > at sqlline.SqlLine.main(SqlLine.java:292) > =20 > This is with Phoenix version 4.6.0 and HBase version 0.98.4.2.2.6.0-2800-= hadoop2. > =20 > This seems very strongly related to the MULTI_TENANT=3Dtrue property on a= view or table. I see the error whenever the view has MULTI_TENANT=3Dtrue = and I have a tenant-specific connection to Phoenix. I do not see the probl= em if the MULTI_TENANT=3Dtrue property is not set on the view or if I do no= t have a tenant-specific connection to Phoenix. > =20 > Here is an example SQL statement that has this error when the view INVENT= ORY has the MULTI_TENANT=3Dtrue property and I have a tenant-specific conne= ction, but that succeeds in other cases. (The view PRODUCT_IDS is not Multi= -Tenant.) > SELECT * FROM INVENTORY INNER JOIN PRODUCT_IDS ON (PRODUCT_ID =3D INVENTO= RY.ID) > =20 > Note: "INNER JOIN" fails under these conditions, as does "LEFT OUTER JOI= N". However, "RIGHT OUTER JOIN" and "FULL OUTER JOIN" do work. Also, if I= tell Phoenix to use a Sort Join for the Inner Join or Left Outer Join then= it does work, e.g. SELECT /\*+ USE_SORT_MERGE_JOIN\*/ * FROM INVENTORY IN= NER JOIN PRODUCT_IDS ON (PRODUCT_ID =3D INVENTORY.ID); works. > =20 > This seems to be the same problem that was discussed previously in this m= ailing list: https://mail-archives.apache.org/mod_mbox/phoenix-user/201507= .mbox/%3CCAOtKWX5XFbwkJF--0k-zj91TfdqWFq6RmuQW0R_LoJCNj1aMhg@mail.gmail.com= %3E=20 -- This message was sent by Atlassian JIRA (v6.3.4#6332)