Skip to content

Commit

Permalink
HIVE-1609. Support partition filtering in metastore
Browse files Browse the repository at this point in the history
(Ajay Kidave via jvs)



git-svn-id: https://svn.apache.org/repos/asf/hadoop/hive/trunk@999644 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
John Sichi committed Sep 21, 2010
1 parent 0645936 commit 0c2c8a7
Show file tree
Hide file tree
Showing 21 changed files with 3,000 additions and 263 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Trunk - Unreleased
HIVE-1616. Add ProtocolsBufferStructObjectInspector
(Johan Oskarsson via namit)

HIVE-1609. Support partition filtering in metastore
(Ajay Kidave via jvs)

IMPROVEMENTS

HIVE-1394. Do not update transient_lastDdlTime if the partition is modified by a housekeeping
Expand Down
22 changes: 20 additions & 2 deletions metastore/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,29 @@
</exec>
</target>

<target name="core-compile" depends="init, model-compile,ivy-retrieve">
<uptodate property="grammarBuild.notRequired">
<srcfiles dir= "${src.dir}/java/org/apache/hadoop/hive/metastore/parser" includes="**/*.g"/>
<mapper type="merge" to="${build.dir}/gen-java/org/apache/hadoop/hive/metastore/parser/FilterParser.java"/>
</uptodate>

<target name="build-grammar" unless="grammarBuild.notRequired">
<echo>Building Grammar ${src.dir}/java/org/apache/hadoop/hive/metastore/parser/Filter.g ....</echo>
<java classname="org.antlr.Tool" classpathref="classpath" fork="false">
<arg value="-fo" />
<arg value="${build.dir.hive}/metastore/gen-java/org/apache/hadoop/hive/metastore/parser" />
<arg value="${src.dir}/java/org/apache/hadoop/hive/metastore/parser/Filter.g" />
</java>
</target>

<target name="metastore-init">
<mkdir dir="${build.dir}/gen-java/org/apache/hadoop/hive/metastore/parser"/>
</target>

<target name="core-compile" depends="init,metastore-init,build-grammar,model-compile,ivy-retrieve">
<echo message="Compiling: "/>
<javac
encoding="${build.encoding}"
srcdir="${src.dir}/java:${src.dir}/gen-javabean"
srcdir="${src.dir}/java:${src.dir}/gen-javabean:${build.dir}/gen-java"
includes="**/*.java"
destdir="${build.classes}"
debug="${javac.debug}"
Expand Down
5 changes: 5 additions & 0 deletions metastore/if/hive_metastore.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ service ThriftHiveMetastore extends fb303.FacebookService
2:string tbl_name, 3:list<string> part_vals, 4:i16 max_parts=-1)
throws(1:MetaException o1)

// get the partitions matching the given partition filter
list<Partition> get_partitions_by_filter(1:string db_name 2:string tbl_name
3:string filter, 4:i16 max_parts=-1)
throws(1:MetaException o1, 2:NoSuchObjectException o2)

// changes the partition to the new partition object. partition is identified from the part values
// in the new_part
void alter_partition(1:string db_name, 2:string tbl_name, 3:Partition new_part)
Expand Down
11 changes: 6 additions & 5 deletions metastore/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
</dependency>
<dependency org="commons-pool" name="commons-pool" rev="1.5.4"/>
<dependency org="org.datanucleus" name="datanucleus-connectionpool" rev="2.0.1">
<dependency org="org.datanucleus" name="datanucleus-connectionpool" rev="2.0.3">
<exclude module="proxool" />
<exclude module="c3p0" />
<exclude module="datanucleus-core" />
<exclude module="datanucleus-rdbms" />
<exclude module="commons-collections" />
<exclude module="commons-pool" />
<exclude module="commons-dbcp" />
<exclude org="com.jolbox" module="bonecp"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-core" rev="2.0.3">
<dependency org="org.datanucleus" name="datanucleus-core" rev="2.1.1">
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.eclipse.equinox" module="org.eclipse.equinox.registry"/>
Expand All @@ -27,21 +28,21 @@
<exclude org="org.eclipse.osgi" module="org.eclipse.osgi"/>
<exclude org="log4j" module="log4j"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-enhancer" rev="2.0.3">
<dependency org="org.datanucleus" name="datanucleus-enhancer" rev="2.1.0-release">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="asm" module="asm"/>
<exclude org="org.apache.ant" module="ant"/>
</dependency>
<dependency org="org.datanucleus" name="datanucleus-rdbms" rev="2.0.3">
<dependency org="org.datanucleus" name="datanucleus-rdbms" rev="2.1.1">
<exclude org="org.datanucleus" module="datanucleus-core"/>
<exclude org="javax.jdo" module="jdo2-api"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jta_1.1_spec"/>
<exclude org="org.datanucleus" module="datanucleus-thirdparty"/>
<exclude org="org.apache.ant" module="ant"/>
<exclude org="oracle" module="ojdbc14_g"/>
</dependency>
<dependency org="javax.jdo" name="jdo2-api" rev="2.3-ec">
<dependency org="javax.jdo" name="jdo-api" rev="3.0">
<exclude org="javax.transaction" module="jta"/>
<exclude org="org.apache.ant" module="ant"/>
<exclude org="org.apache.geronimo.specs" module="geronimo-jpa_3.0_spec"/>
Expand Down
Loading

0 comments on commit 0c2c8a7

Please sign in to comment.