hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Wilfong" <kevinwilf...@fb.com>
Subject Re: Review Request: Add whitelist for hosts used in table/partition locations
Date Fri, 14 Oct 2011 01:27:18 GMT

-----------------------------------------------------------
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message