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 8A930200B65 for ; Tue, 2 Aug 2016 08:49:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8929E160A76; Tue, 2 Aug 2016 06:49:22 +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 CFB9F160A8C for ; Tue, 2 Aug 2016 08:49:21 +0200 (CEST) Received: (qmail 821 invoked by uid 500); 2 Aug 2016 06:49:20 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 723 invoked by uid 99); 2 Aug 2016 06:49:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 06:49:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C311A2C0D60 for ; Tue, 2 Aug 2016 06:49:20 +0000 (UTC) Date: Tue, 2 Aug 2016 06:49:20 +0000 (UTC) From: "Mithun Radhakrishnan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-14380) Queries on tables with remote HDFS paths fail in "encryption" checks. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 02 Aug 2016 06:49:22 -0000 [ https://issues.apache.org/jira/browse/HIVE-14380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403482#comment-15403482 ] Mithun Radhakrishnan commented on HIVE-14380: --------------------------------------------- Yeah, looks like these tests are busted on master. :/ Just checked on a fresh checkout. All except {{TestHiveMetaStoreTxns}}. That test seems to run for me (even with my patch applied). > Queries on tables with remote HDFS paths fail in "encryption" checks. > --------------------------------------------------------------------- > > Key: HIVE-14380 > URL: https://issues.apache.org/jira/browse/HIVE-14380 > Project: Hive > Issue Type: Bug > Components: Encryption > Reporter: Mithun Radhakrishnan > Assignee: Mithun Radhakrishnan > Attachments: HIVE-14380.1.patch > > > If a table has table/partition locations set to remote HDFS paths, querying them will cause the following IAException: > {noformat} > 2016-07-26 01:16:27,471 ERROR parse.CalcitePlanner (SemanticAnalyzer.java:getMetaData(1867)) - org.apache.hadoop.hive.ql.metadata.HiveException: Unable to determine if hdfs://foo.ygrid.yahoo.com:8020/projects/my_db/my_table is encrypted: java.lang.IllegalArgumentException: Wrong FS: hdfs://foo.ygrid.yahoo.com:8020/projects/my_db/my_table, expected: hdfs://bar.ygrid.yahoo.com:8020 > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.isPathEncrypted(SemanticAnalyzer.java:2204) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getStrongestEncryptedTablePath(SemanticAnalyzer.java:2274) > ... > {noformat} > This is because of the following code in {{SessionState}}: > {code:title=SessionState.java|borderStyle=solid} > public HadoopShims.HdfsEncryptionShim getHdfsEncryptionShim() throws HiveException { > if (hdfsEncryptionShim == null) { > try { > FileSystem fs = FileSystem.get(sessionConf); > if ("hdfs".equals(fs.getUri().getScheme())) { > hdfsEncryptionShim = ShimLoader.getHadoopShims().createHdfsEncryptionShim(fs, sessionConf); > } else { > LOG.debug("Could not get hdfsEncryptionShim, it is only applicable to hdfs filesystem."); > } > } catch (Exception e) { > throw new HiveException(e); > } > } > return hdfsEncryptionShim; > } > {code} > When the {{FileSystem}} instance is created, using the {{sessionConf}} implies that the current HDFS is going to be used. This call should instead fetch the {{FileSystem}} instance corresponding to the path being checked. > A fix is forthcoming... -- This message was sent by Atlassian JIRA (v6.3.4#6332)