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 06478200B78 for ; Fri, 2 Sep 2016 08:30:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 04C9D160AAC; Fri, 2 Sep 2016 06:30:54 +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 4CC7C160AAB for ; Fri, 2 Sep 2016 08:30:53 +0200 (CEST) Received: (qmail 14582 invoked by uid 500); 2 Sep 2016 06:30:52 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 14566 invoked by uid 99); 2 Sep 2016 06:30:52 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 06:30:52 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 6562C2CB62E; Fri, 2 Sep 2016 06:30:51 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3011812845640462593==" MIME-Version: 1.0 Subject: Review Request 51593: HIVE-14063 : Add beeline connection configuration file to automatically connect to HS2 using beeline From: Vihang Karajgaonkar To: Sergio Pena , Szehon Ho , Mohit Sabharwal Cc: Vihang Karajgaonkar , hive Date: Fri, 02 Sep 2016 06:30:51 -0000 Message-ID: <20160902063051.12124.50497@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Vihang Karajgaonkar X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/51593/ X-Sender: Vihang Karajgaonkar X-ReviewBoard-Diff-For: beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java X-ReviewBoard-Diff-For: beeline/src/test/org/apache/hive/beeline/TestUserHS2ConnectionFileParser.java X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-connection-zookeeper-config.xml X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-connection-conf-list.xml X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-connection-multi-conf-list.xml X-ReviewBoard-Diff-For: beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java X-ReviewBoard-Diff-For: itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineWithHS2ConnectionFile.java X-ReviewBoard-Diff-For: beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-conn-conf-kerberos-ssl.xml X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-connection-config-noauth.xml X-ReviewBoard-Diff-For: beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java X-ReviewBoard-Diff-For: itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineWithUserHs2ConnectionFile.java X-ReviewBoard-Diff-For: itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineConnectionUsingHiveSite.java X-ReviewBoard-Diff-For: beeline/src/java/org/apache/hive/beeline/hs2connection/HiveSiteHS2ConnectionFileParser.java X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-conn-conf-kerberos-nossl.xml X-ReviewBoard-Diff-For: beeline/src/test/resources/test-hs2-conn-conf-kerberos-http.xml Reply-To: Vihang Karajgaonkar X-ReviewRequest-Repository: hive-git archived-at: Fri, 02 Sep 2016 06:30:54 -0000 --===============3011812845640462593== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51593/ ----------------------------------------------------------- Review request for hive, Mohit Sabharwal, Sergio Pena, and Szehon Ho. Bugs: HIVE-14063 https://issues.apache.org/jira/browse/HIVE-14063 Repository: hive-git Description ------- This change adds a new optional configuration file for Beeline. If this file is present at predefined locations, Beeline will attempt to create the connection url using the hive-site.xml found in classpath and another user-specific configuration file. Beeline then connects automatically using the url generated based on these configuration files. The main objective of the change is to provide user another way to connect to the HiveServer2 without providing the connection url everytime. The configuration file uses hadoop xml format so that we can support encryption/obfuscation using hadoop credential manager API in the future. Properties in the user-specific configuration file override the properties derived from hive-site.xml. Tested using newly added unit tests and itests in various Hiveserver2 configurations. Diffs ----- beeline/src/java/org/apache/hive/beeline/BeeLine.java 8e65e3987398531cce5c65c383762cf49a52c578 beeline/src/java/org/apache/hive/beeline/Commands.java 2f3ec134098dfa3767bab9545438d1f38f11697c beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java PRE-CREATION beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java PRE-CREATION beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java PRE-CREATION beeline/src/java/org/apache/hive/beeline/hs2connection/HiveSiteHS2ConnectionFileParser.java PRE-CREATION beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java PRE-CREATION beeline/src/test/org/apache/hive/beeline/TestUserHS2ConnectionFileParser.java PRE-CREATION beeline/src/test/resources/hive-site.xml 5f310d68245275ac9dc24df45579784019eea332 beeline/src/test/resources/test-hs2-conn-conf-kerberos-http.xml PRE-CREATION beeline/src/test/resources/test-hs2-conn-conf-kerberos-nossl.xml PRE-CREATION beeline/src/test/resources/test-hs2-conn-conf-kerberos-ssl.xml PRE-CREATION beeline/src/test/resources/test-hs2-connection-conf-list.xml PRE-CREATION beeline/src/test/resources/test-hs2-connection-config-noauth.xml PRE-CREATION beeline/src/test/resources/test-hs2-connection-multi-conf-list.xml PRE-CREATION beeline/src/test/resources/test-hs2-connection-zookeeper-config.xml PRE-CREATION itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineConnectionUsingHiveSite.java PRE-CREATION itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineWithHS2ConnectionFile.java PRE-CREATION itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connectionfile/TestBeelineWithUserHs2ConnectionFile.java PRE-CREATION Diff: https://reviews.apache.org/r/51593/diff/ Testing ------- Thanks, Vihang Karajgaonkar --===============3011812845640462593==--