Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3FC2895A4 for ; Fri, 14 Oct 2011 01:28:35 +0000 (UTC) Received: (qmail 24856 invoked by uid 500); 14 Oct 2011 01:28:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 24832 invoked by uid 500); 14 Oct 2011 01:28:34 -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 24824 invoked by uid 500); 14 Oct 2011 01:28:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 24821 invoked by uid 99); 14 Oct 2011 01:28:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 01:28:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 01:28:33 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 62E69307C35 for ; Fri, 14 Oct 2011 01:28:13 +0000 (UTC) Date: Fri, 14 Oct 2011 01:28:13 +0000 (UTC) From: "jiraposter@reviews.apache.org (Commented) (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <185059597.12378.1318555693406.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1405985828.6896.1318456151931.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HIVE-2502) Add whitelist for hosts used in table/partition locations 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/HIVE-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127213#comment-13127213 ] jiraposter@reviews.apache.org commented on HIVE-2502: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2371/ ----------------------------------------------------------- (Updated 2011-10-14 01:27:18.448099) Review request for hive and Paul Yang. Changes ------- Thanks for the feedback Paul. I changed it to use host:port pairs instead of just hosts. Summary ------- I added a whitelist configuration variable, whose value should be a comma separated list of hosts. A set of strings is created based on this list and the host name in a location given to a create/alter table/partition command to the HiveMetastore is compared to the values in that set. If the list is nonempty, the table being altered/created or containing the partition is not external/non-native, and the location has an explicit host, the command is failed if the host is not in that set, otherwise the command continues as normal. This addresses bug HIVE-2502. https://issues.apache.org/jira/browse/HIVE-2502 Diffs (updated) ----- trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 1182505 trunk/conf/hive-default.xml 1182505 trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1182505 trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1182505 trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 1182505 Diff: https://reviews.apache.org/r/2371/diff Testing ------- I used Thrift calls to test the following for each of the 4 commands create/alter table/partition: Issuing the command with a location with a host that is not in the whitelist fails. Issuing the command with a location with a host in the whitelist does not fail. Thanks, Kevin > Add whitelist for hosts used in table/partition locations > --------------------------------------------------------- > > Key: HIVE-2502 > URL: https://issues.apache.org/jira/browse/HIVE-2502 > Project: Hive > Issue Type: Improvement > Reporter: Kevin Wilfong > Assignee: Kevin Wilfong > Attachments: HIVE-2502.1.patch.txt, HIVE-2502.2.patch.txt > > > Add a whitelist of host names that can be checked before creating/altering a table/partition to verify that the location is acceptable. The whitelist should be empty by default, and should be configurable. The check should default to pass if there is no host in the location, or the whitelist is empty. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira