Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 457B9200BD4 for ; Wed, 26 Oct 2016 04:03:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 44466160AD8; Wed, 26 Oct 2016 02:03:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 64F9A160B03 for ; Wed, 26 Oct 2016 04:02:59 +0200 (CEST) Received: (qmail 62815 invoked by uid 500); 26 Oct 2016 02:02:58 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 62803 invoked by uid 99); 26 Oct 2016 02:02:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2016 02:02:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 65EC62C1F5A for ; Wed, 26 Oct 2016 02:02:58 +0000 (UTC) Date: Wed, 26 Oct 2016 02:02:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4964) Drill fails to connect to hive metastore after hive metastore is restarted unless drillbits are restarted also MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 26 Oct 2016 02:03:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-4964?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1560= 7092#comment-15607092 ]=20 ASF GitHub Bot commented on DRILL-4964: --------------------------------------- GitHub user sohami reopened a pull request: https://github.com/apache/drill/pull/628 DRILL-4964: Drill fails to connect to hive metastore after hive metas= =E2=80=A6 =E2=80=A6tore is restarted unless drillbits are restarted also =20 Changes: For certain methods in DrillHiveMetaStoreClient li= ke getAllDatabases and getAllTables the HiveMetaStoreClient wraps the exception of type MetaException and TExc= eption both into MetaException. So in case of connection failure which is thrown as TException it is diffic= ult to categorize at DrillClient level. Hence the fix is to close older connection and reconnect in case= of these 2 api's. In all other cases proper set of exceptions are thrown where we can handle each one individual= ly. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sohami/drill DRILL-4964 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/628.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #628 =20 ---- commit 95477151e9a5b28a121ffe6a879006e4333039c4 Author: Sorabh Hamirwasia Date: 2016-10-26T01:52:01Z DRILL-4964: Drill fails to connect to hive metastore after hive metasto= re is restarted unless drillbits are restarted also Changes: For certain methods in DrillHiveMetaStoreClient li= ke getAllDatabases and getAllTables the HiveMetaStoreClient wraps the exception of type MetaException and TExc= eption both into MetaException. So in case of connection failure which is thrown as TException it is diffic= ult to categorize at DrillClient level. Hence the fix is to close older connection and reconnect in case= of these 2 api's. In all other cases proper set of exceptions are thrown where we can handle each one individual= ly. ---- > Drill fails to connect to hive metastore after hive metastore is restarte= d unless drillbits are restarted also > -------------------------------------------------------------------------= ------------------------------------- > > Key: DRILL-4964 > URL: https://issues.apache.org/jira/browse/DRILL-4964 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.8.0, 1.9.0 > Reporter: Sorabh Hamirwasia > Assignee: Sorabh Hamirwasia > > It is found that if Hive Metastore is restarted then Drillbit also needs = to be restarted to further query and connect to hive metastore.=20 > Repro Steps: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1) Start HiveMetastore and drillbit. > 2) Start Drillbit client with Scheman as hive and run a simple query like= "show databases" > Command to start client: sqlline -u "jdbc:drill:schema=3Dhive;drillbit= =3D" > 3) restart hive metastore > 4) Execute same query "show databases" on existing drillclient or new one= . You will see that hive default database is not listed. If you query any h= ive data then it will fail. > Log snippet from drillbit.log: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 2016-10-25 18:32:00,561 [27eff86e-e8fb-3d91-eb88-4af75ff6d174:foreman] IN= FO o.a.drill.exec.work.foreman.Foreman - Query text for query id 27eff86e-= e8fb-3d91-eb88-4af75ff6d174: show databases > 2016-10-25 18:32:00,563 [27eff86e-e8fb-3d91-eb88-4af75ff6d174:foreman] DE= BUG o.a.d.e.s.h.HBaseStoragePluginConfig - Initializing HBase StoragePlugin= configuration with zookeeper quorum 'localhost', port '2181'. > 2016-10-25 18:32:00,595 [27eff86e-e8fb-3d91-eb88-4af75ff6d174:foreman] WA= RN o.a.d.e.s.h.schema.HiveSchemaFactory - Failure while attempting to acce= ss HiveDatabase 'default'. > java.util.concurrent.ExecutionException: MetaException(message:Got except= ion: org.apache.thrift.transport.TTransportException null) > at com.google.common.util.concurrent.AbstractFuture$Sync.getValue= (AbstractFuture.java:299) ~[guava-18.0.jar:na] > at com.google.common.util.concurrent.AbstractFuture$Sync.get(Abst= ractFuture.java:286) ~[guava-18.0.jar:na] > at com.google.common.util.concurrent.AbstractFuture.get(AbstractF= uture.java:116) ~[guava-18.0.jar:na] > at com.google.common.util.concurrent.Uninterruptibles.getUninterr= uptibly(Uninterruptibles.java:137) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache$Segment.getAndRecordStats(L= ocalCache.java:2348) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache= .java:2320) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(Loc= alCache.java:2282) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache$Segment.get(LocalCache.java= :2197) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache.get(LocalCache.java:3937) ~= [guava-18.0.jar:na] > at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3= 941) ~[guava-18.0.jar:na] > at com.google.common.cache.LocalCache$LocalLoadingCache.get(Local= Cache.java:4824) ~[guava-18.0.jar:na] > at org.apache.drill.exec.store.hive.DrillHiveMetaStoreClient$Hive= ClientWithCaching.getDatabases(DrillHiveMetaStoreClient.java:415) ~[drill-s= torage-hive-core-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.hive.schema.HiveSchemaFactory$Hive= Schema.getSubSchema(HiveSchemaFactory.java:139) [drill-storage-hive-core-1.= 9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.hive.schema.HiveSchemaFactory$Hive= Schema.(HiveSchemaFactory.java:133) [drill-storage-hive-core-1.9.0-SN= APSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.hive.schema.HiveSchemaFactory.regi= sterSchemas(HiveSchemaFactory.java:118) [drill-storage-hive-core-1.9.0-SNAP= SHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.hive.HiveStoragePlugin.registerSch= emas(HiveStoragePlugin.java:100) [drill-storage-hive-core-1.9.0-SNAPSHOT.ja= r:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.StoragePluginRegistryImpl$DrillSch= emaFactory.registerSchemas(StoragePluginRegistryImpl.java:365) [drill-java-= exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.store.SchemaTreeProvider.createRootSchem= a(SchemaTreeProvider.java:72) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNA= PSHOT] > at org.apache.drill.exec.store.SchemaTreeProvider.createRootSchem= a(SchemaTreeProvider.java:61) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNA= PSHOT] > at org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryCont= ext.java:147) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryCont= ext.java:137) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.ops.QueryContext.getNewDefaultSchema(Que= ryContext.java:123) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(Drill= SqlWorker.java:62) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java= :1008) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:26= 4) [drill-java-exec-1.9.0-SNAPSHOT.jar:1.9.0-SNAPSHOT] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolEx= ecutor.java:1145) [na:1.7.0_111] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE= xecutor.java:615) [na:1.7.0_111] > at java.lang.Thread.run(Thread.java:745) [na:1.7.0_111] > Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Got except= ion: org.apache.thrift.transport.TTransportException null > at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMet= aException(MetaStoreUtils.java:1213) ~[hive-metastore-1.2.0-mapr-1608.jar:1= .2.0-mapr-1608] -- This message was sent by Atlassian JIRA (v6.3.4#6332)