hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sohan Jain" <sohanj...@fb.com>
Subject Review Request: HIVE-2261: Add API to metastore for table filtering based on table properties
Date Thu, 16 Jun 2011 03:13:24 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/910/
-----------------------------------------------------------

Review request for hive and Paul Yang.


Summary
-------

Create a function listTableNamesByFilter that returns a list of names for tables in a database
that match a certain filter. The syntax of the filter is similar to the one created by HIVE-1609.
You can filter the table list based on owner, retention, or table parameter key/values. The
filtering takes place at the JDO level for efficiency/speed.  Added a QueryFilterType enum
to easily add new filters and separate logic for filtering.  

Example filter statements include: 
filterType = QueryFilterType.OWNER; filter = "owner like ".*test_user.*"
filterType = QueryFilterType.RETENTION; filter = "retention < 90 and retention > 30"
filterType = QueryFilterType.PARAMS; filter = "numPartitions = \"2\" and  retention_days =
\"30\""

The filter can currently parse string or integer values, where values interpreted as strings
must be in quotes.


This addresses bug HIVE-2226.
    https://issues.apache.org/jira/browse/HIVE-2226


Diffs
-----

  trunk/metastore/if/hive_metastore.thrift 1135227 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1135227 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1135227

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1135227

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1135227 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1135227 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java 1135227

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g 1135227 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1135227


Diff: https://reviews.apache.org/r/910/diff


Testing
-------

Added test cases to TestHiveMetaStore


Thanks,

Sohan


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