http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index eb7235c..33f209d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ itests/hive-blobstore/src/test/resources/blobstore-conf.xml .DS_Store patchprocess standalone-metastore/src/gen/version +standalone-metastore/metastore-common/src/gen/version
http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/hcatalog/core/pom.xml ---------------------------------------------------------------------- diff --git a/hcatalog/core/pom.xml b/hcatalog/core/pom.xml index 4315527..06e83e1 100644 --- a/hcatalog/core/pom.xml +++ b/hcatalog/core/pom.xml @@ -69,7 +69,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/hcatalog/webhcat/java-client/pom.xml ---------------------------------------------------------------------- diff --git a/hcatalog/webhcat/java-client/pom.xml b/hcatalog/webhcat/java-client/pom.xml index 56b6d53..185c785 100644 --- a/hcatalog/webhcat/java-client/pom.xml +++ b/hcatalog/webhcat/java-client/pom.xml @@ -76,7 +76,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/hcatalog/webhcat/svr/pom.xml ---------------------------------------------------------------------- diff --git a/hcatalog/webhcat/svr/pom.xml b/hcatalog/webhcat/svr/pom.xml index 5c093b0..8e4bc70 100644 --- a/hcatalog/webhcat/svr/pom.xml +++ b/hcatalog/webhcat/svr/pom.xml @@ -202,7 +202,7 @@ <!-- test inter-project --> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/hcatalog-unit/pom.xml ---------------------------------------------------------------------- diff --git a/itests/hcatalog-unit/pom.xml b/itests/hcatalog-unit/pom.xml index a1d2149..0568cf6 100644 --- a/itests/hcatalog-unit/pom.xml +++ b/itests/hcatalog-unit/pom.xml @@ -98,7 +98,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/hive-blobstore/pom.xml ---------------------------------------------------------------------- diff --git a/itests/hive-blobstore/pom.xml b/itests/hive-blobstore/pom.xml index 9466af2..b8d5f0d 100644 --- a/itests/hive-blobstore/pom.xml +++ b/itests/hive-blobstore/pom.xml @@ -55,13 +55,13 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/hive-minikdc/pom.xml ---------------------------------------------------------------------- diff --git a/itests/hive-minikdc/pom.xml b/itests/hive-minikdc/pom.xml index 4d6e8a8..406c407 100644 --- a/itests/hive-minikdc/pom.xml +++ b/itests/hive-minikdc/pom.xml @@ -74,13 +74,13 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> <classifier>tests</classifier> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/hive-unit-hadoop2/pom.xml ---------------------------------------------------------------------- diff --git a/itests/hive-unit-hadoop2/pom.xml b/itests/hive-unit-hadoop2/pom.xml index 04e39b5..3288659 100644 --- a/itests/hive-unit-hadoop2/pom.xml +++ b/itests/hive-unit-hadoop2/pom.xml @@ -101,7 +101,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> </dependency> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/hive-unit/pom.xml ---------------------------------------------------------------------- diff --git a/itests/hive-unit/pom.xml b/itests/hive-unit/pom.xml index 5264617..6081884 100644 --- a/itests/hive-unit/pom.xml +++ b/itests/hive-unit/pom.xml @@ -177,7 +177,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> </dependency> @@ -568,7 +568,7 @@ <fileset dir="${basedir}/${hive.path.to.root}/metastore/scripts/"/> </copy> <copy todir="${test.tmp.dir}/scripts/metastore/upgrade" overwrite="true"> - <fileset dir="${basedir}/${hive.path.to.root}/standalone-metastore/src/main/sql/"/> + <fileset dir="${basedir}/${hive.path.to.root}/standalone-metastore/metastore-common/src/main/sql/"/> </copy> </target> </configuration> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/qtest-accumulo/pom.xml ---------------------------------------------------------------------- diff --git a/itests/qtest-accumulo/pom.xml b/itests/qtest-accumulo/pom.xml index 1a1100c..e0c31e4 100644 --- a/itests/qtest-accumulo/pom.xml +++ b/itests/qtest-accumulo/pom.xml @@ -67,13 +67,13 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/qtest-spark/pom.xml ---------------------------------------------------------------------- diff --git a/itests/qtest-spark/pom.xml b/itests/qtest-spark/pom.xml index 8ed3171..c33aa90 100644 --- a/itests/qtest-spark/pom.xml +++ b/itests/qtest-spark/pom.xml @@ -127,13 +127,13 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/qtest/pom.xml ---------------------------------------------------------------------- diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml index a1400fd..8020743 100644 --- a/itests/qtest/pom.xml +++ b/itests/qtest/pom.xml @@ -58,13 +58,13 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/itests/util/pom.xml ---------------------------------------------------------------------- diff --git a/itests/util/pom.xml b/itests/util/pom.xml index 9334f90..e1aece6 100644 --- a/itests/util/pom.xml +++ b/itests/util/pom.xml @@ -113,7 +113,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> </dependency> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/llap-server/pom.xml ---------------------------------------------------------------------- diff --git a/llap-server/pom.xml b/llap-server/pom.xml index 978d797..6b52d5d 100644 --- a/llap-server/pom.xml +++ b/llap-server/pom.xml @@ -242,7 +242,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/metastore/pom.xml ---------------------------------------------------------------------- diff --git a/metastore/pom.xml b/metastore/pom.xml index dc1b4e8..a75ab97 100644 --- a/metastore/pom.xml +++ b/metastore/pom.xml @@ -46,7 +46,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/packaging/src/main/assembly/bin.xml ---------------------------------------------------------------------- diff --git a/packaging/src/main/assembly/bin.xml b/packaging/src/main/assembly/bin.xml index 2dd9260..373ed99 100644 --- a/packaging/src/main/assembly/bin.xml +++ b/packaging/src/main/assembly/bin.xml @@ -222,7 +222,7 @@ </fileSet> <fileSet> - <directory>${project.parent.basedir}/standalone-metastore/src/main/sql</directory> + <directory>${project.parent.basedir}/standalone-metastore/metastore-common/src/main/sql</directory> <includes> <include>**/*</include> </includes> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/packaging/src/main/assembly/src.xml ---------------------------------------------------------------------- diff --git a/packaging/src/main/assembly/src.xml b/packaging/src/main/assembly/src.xml index c9aed3b..d9db67d 100644 --- a/packaging/src/main/assembly/src.xml +++ b/packaging/src/main/assembly/src.xml @@ -96,7 +96,7 @@ <include>shims/**/*</include> <include>spark-client/**/*</include> <include>storage-api/**/*</include> - <include>standalone-metastore/**/*</include> + <include>standalone-metastore/metastore-common/**/*</include> <include>streaming/**/*</include> <include>testutils/**/*</include> <include>upgrade-acid/**/*</include> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/ql/pom.xml ---------------------------------------------------------------------- diff --git a/ql/pom.xml b/ql/pom.xml index 0c181e5..fe11d06 100644 --- a/ql/pom.xml +++ b/ql/pom.xml @@ -458,7 +458,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> @@ -915,7 +915,7 @@ <include>org.apache.hive:hive-llap-common</include> <include>org.apache.hive:hive-llap-client</include> <include>org.apache.hive:hive-metastore</include> - <include>org.apache.hive:hive-standalone-metastore</include> + <include>org.apache.hive:hive-standalone-metastore-common</include> <include>org.apache.hive:hive-service-rpc</include> <include>com.esotericsoftware:kryo-shaded</include> <include>com.esotericsoftware:minlog</include> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/service/pom.xml ---------------------------------------------------------------------- diff --git a/service/pom.xml b/service/pom.xml index ebe7863..7023472 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -230,7 +230,7 @@ </dependency> <dependency> <groupId>org.apache.hive</groupId> - <artifactId>hive-standalone-metastore</artifactId> + <artifactId>hive-standalone-metastore-common</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/DEV-README ---------------------------------------------------------------------- diff --git a/standalone-metastore/DEV-README b/standalone-metastore/DEV-README index 7b65e92..9c26117 100644 --- a/standalone-metastore/DEV-README +++ b/standalone-metastore/DEV-README @@ -49,7 +49,7 @@ You can download the Oracle driver at http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html You should download Oracle 11g Release 1, ojdbc6.jar -Logs for tests are located under standalone-metastore/target/failsafe-reports +Logs for tests are located under standalone-metastore/metastore-common/target/failsafe-reports If you wish to use one of these containers to run your own tests against a non-Derby version of the metastore, you can do that as well. You must specify http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/findbugs/findbugs-exclude.xml ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/findbugs/findbugs-exclude.xml b/standalone-metastore/metastore-common/findbugs/findbugs-exclude.xml new file mode 100644 index 0000000..e2c76d0 --- /dev/null +++ b/standalone-metastore/metastore-common/findbugs/findbugs-exclude.xml @@ -0,0 +1,24 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<FindBugsFilter> + <Match> + <Class name="~org.apache.hadoop.hive.metastore.parser.*" /> + </Match> + <Match> + <Class name="~org.apache.hadoop.hive.metastore.api.*" /> + </Match> +</FindBugsFilter> http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/pom.xml ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/pom.xml b/standalone-metastore/metastore-common/pom.xml new file mode 100644 index 0000000..d6df15f --- /dev/null +++ b/standalone-metastore/metastore-common/pom.xml @@ -0,0 +1,754 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>hive-standalone-metastore</artifactId> + <groupId>org.apache.hive</groupId> + <version>4.0.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>hive-standalone-metastore-common</artifactId> + <name>Hive Standalone Metastore Common Code</name> + + <dependencies> + <dependency> + <groupId>org.apache.orc</groupId> + <artifactId>orc-core</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.hive</groupId> + <artifactId>hive-storage-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </dependency> + <dependency> + <groupId>com.github.joshelser</groupId> + <artifactId>dropwizard-metrics-hadoop-metrics2-reporter</artifactId> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + <dependency> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java</artifactId> + </dependency> + <dependency> + <groupId>com.jolbox</groupId> + <artifactId>bonecp</artifactId> + </dependency> + <dependency> + <groupId>com.zaxxer</groupId> + <artifactId>HikariCP</artifactId> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-jvm</artifactId> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-json</artifactId> + </dependency> + <dependency> + <groupId>javolution</groupId> + <artifactId>javolution</artifactId> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr-runtime</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-distcp</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-hdfs</artifactId> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-hdfs-client</artifactId> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-mapreduce-client-core</artifactId> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <!-- This is our one and only Hive dependency.--> + <dependency> + <groupId>org.apache.hive</groupId> + <artifactId>hive-storage-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-1.2-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.thrift</groupId> + <artifactId>libfb303</artifactId> + </dependency> + <dependency> + <groupId>org.apache.thrift</groupId> + <artifactId>libthrift</artifactId> + </dependency> + <dependency> + <groupId>org.datanucleus</groupId> + <artifactId>datanucleus-api-jdo</artifactId> + </dependency> + <dependency> + <groupId>org.datanucleus</groupId> + <artifactId>datanucleus-core</artifactId> + </dependency> + <dependency> + <groupId>org.datanucleus</groupId> + <artifactId>datanucleus-rdbms</artifactId> + </dependency> + <dependency> + <groupId>org.datanucleus</groupId> + <artifactId>javax.jdo</artifactId> + </dependency> + <dependency> + <groupId>org.skyscreamer</groupId> + <artifactId>jsonassert</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>sqlline</groupId> + <artifactId>sqlline</artifactId> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <!-- test scope dependencies --> + + <dependency> + <groupId>com.microsoft.sqlserver</groupId> + <artifactId>mssql-jdbc</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <!-- Note, this is LGPL. But we're only using it in a test and not changing it, so I + believe we are fine. --> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <profiles> + <profile> + <id>thriftif</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>generate-thrift-sources</id> + <phase>generate-sources</phase> + <configuration> + <target> + <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask" + classpathref="maven.plugin.classpath" /> + <property name="thrift.args" value="${thrift.args}"/> + <property name="thrift.gen.dir" value="${thrift.gen.dir}"/> + <delete dir="${thrift.gen.dir}"/> + <mkdir dir="${thrift.gen.dir}"/> + <for param="thrift.file"> + <path> + <fileset dir="." includes="src/main/thrift/*.thrift" /> + </path> + <sequential> + <echo message="Generating Thrift code for @{thrift.file}"/> + <exec executable="${thrift.home}/bin/thrift" failonerror="true" dir="."> + <arg line="${thrift.args} -I ${basedir}/include -I ${basedir}/.. -o ${thrift.gen.dir} @{thrift.file} " /> + </exec> + </sequential> + </for> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>com.google.code.maven-replacer-plugin</groupId> + <artifactId>replacer</artifactId> + <version>1.5.3</version> + <executions> + <execution> + <id>process-thrift-sources-string-intern</id> + <phase>process-sources</phase> + <goals> + <goal>replace</goal> + </goals> + <configuration> + <basedir>${basedir}/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/</basedir> + <includes> + <include>FieldSchema.java</include> + <include>Partition.java</include> + <include>SerDeInfo.java</include> + <include>StorageDescriptor.java</include> + <include>ColumnStatisticsDesc.java</include> + <include>ColumnStatisticsObj.java</include> + </includes> + <tokenValueMap>${basedir}/src/main/resources/thrift-replacements.txt</tokenValueMap> + <regex>true</regex> + <quiet>false</quiet> + </configuration> + </execution> + <execution> + <id>process-thrift-sources-interface-annotations</id> + <phase>process-sources</phase> + <goals> + <goal>replace</goal> + </goals> + <configuration> + <basedir>${basedir}/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/</basedir> + <filesToInclude>*.java</filesToInclude> + <replacements> + <replacement> + <token>public class</token> + <value>@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class</value> + <unescape>true</unescape> + </replacement> + <replacement> + <token>public static class</token> + <value>@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class</value> + <unescape>true</unescape> + </replacement> + <replacement> + <token>public interface</token> + <value>@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public interface</value> + <unescape>true</unescape> + </replacement> + </replacements> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>findbugs</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>3.0.0</version> + <configuration> + <fork>true</fork> + <maxHeap>2048</maxHeap> + <jvmArgs>-Djava.awt.headless=true -Xmx2048m -Xms512m</jvmArgs> + <excludeFilterFile>${basedir}/findbugs/findbugs-exclude.xml</excludeFilterFile> + </configuration> + </plugin> + </plugins> + </build> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>3.0.0</version> + <configuration> + <fork>true</fork> + <maxHeap>2048</maxHeap> + <jvmArgs>-Djava.awt.headless=true -Xmx2048m -Xms512m</jvmArgs> + <excludeFilterFile>${basedir}/findbugs/findbugs-exclude.xml</excludeFilterFile> + </configuration> + </plugin> + </plugins> + </reporting> + </profile> + <!-- + <profile> + <id>checkin</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${maven.surefire.version}</version> + <configuration> + <includes> + <include>**/Test*</include> + </includes> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + <reuseForks>false</reuseForks> + <forkCount>${test.forkcount}</forkCount> + <argLine>-Xmx2048m</argLine> + <failIfNoTests>false</failIfNoTests> + <systemPropertyVariables> + <build.dir>${project.build.directory}</build.dir> + <datanucleus.schema.autoCreateAll>true</datanucleus.schema.autoCreateAll> + <derby.version>${derby.version}</derby.version> + <derby.stream.error.file>${test.tmp.dir}/derby.log</derby.stream.error.file> + <log4j.debug>true</log4j.debug> + <java.io.tmpdir>${test.tmp.dir}</java.io.tmpdir> + <javax.jdo.option.ConnectionURL>jdbc:derby:memory:${test.tmp.dir}/junit_metastore_db;create=true</javax.jdo.option.ConnectionURL> + <metastore.schema.verification>false</metastore.schema.verification> + <test.tmp.dir>${test.tmp.dir}</test.tmp.dir> + <metastore.warehouse.dir>${test.warehouse.scheme}${test.warehouse.dir}</metastore.warehouse.dir> + </systemPropertyVariables> + <additionalClasspathElements> + <additionalClasspathElement>${log4j.conf.dir}</additionalClasspathElement> + </additionalClasspathElements> + </configuration> + + </plugin> + + + </plugins> + </build> + </profile> + --> + </profiles> + + <build> + <resources> + <resource> + <directory>${basedir}/src/main/resources</directory> + <includes> + <include>package.jdo</include> + </includes> + </resource> + </resources> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>${maven.antrun.plugin.version}</version> + <dependencies> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>${ant.contrib.version}</version> + <exclusions> + <exclusion> + <groupId>ant</groupId> + <artifactId>ant</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${maven.checkstyle.plugin.version}</version> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>${maven.exec.plugin.version}</version> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <!-- plugins are always listed in sorted order by groupId, artifectId --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>setup-test-dirs</id> + <phase>process-test-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <delete dir="${test.tmp.dir}" /> + <delete dir="${test.warehouse.dir}" /> + <mkdir dir="${test.tmp.dir}" /> + <mkdir dir="${test.warehouse.dir}" /> + </target> + </configuration> + </execution> + <execution> + <id>generate-version-annotation</id> + <phase>generate-sources</phase> + <configuration> + <target> + <exec executable="bash" failonerror="true"> + <arg value="${basedir}/src/main/resources/saveVersion.sh"/> + <arg value="${project.version}"/> + <arg value="${hive.version.shortname}"/> + <arg value="${basedir}/src"/> + </exec> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> + <id>setup-metastore-scripts</id> + <phase>process-test-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <mkdir dir="${test.tmp.dir}/scripts/metastore/upgrade" /> + <copy todir="${test.tmp.dir}/scripts/metastore/upgrade"> + <fileset dir="${basedir}/src/main/sql/"/> + </copy> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <configLocation>${checkstyle.conf.dir}/checkstyle.xml</configLocation> + <propertyExpansion>config_loc=${checkstyle.conf.dir}</propertyExpansion> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + </configuration> + </plugin> + <plugin> + <groupId>com.github.os72</groupId> + <artifactId>protoc-jar-maven-plugin</artifactId> + <version>3.5.1.1</version> + <executions> + <execution> + <phase>generate-sources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <protocArtifact>com.google.protobuf:protoc:2.5.0</protocArtifact> + <addSources>none</addSources> + <inputDirectories> + <include>${basedir}/src/main/protobuf/org/apache/hadoop/hive/metastore</include> + </inputDirectories> + </configuration> + </execution> + </executions> + </plugin> + <!-- TODO MS-SPLIT javadoc plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>${maven.assembly.plugin.version}</version> + <executions> + <execution> + <id>assemble</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>apache-hive-metastore-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + <tarLongFileMode>gnu</tarLongFileMode> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-banned-dependencies</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <bannedDependencies> + <excludes> + <!--LGPL licenced library--> + <exclude>com.google.code.findbugs:annotations</exclude> + </excludes> + </bannedDependencies> + </rules> + <fail>true</fail> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.20.1</version> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + <configuration> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + <reuseForks>false</reuseForks> + <argLine>-Xmx2048m</argLine> + <failIfNoTests>false</failIfNoTests> + <systemPropertyVariables> + <log4j.debug>true</log4j.debug> + <java.io.tmpdir>${test.tmp.dir}</java.io.tmpdir> + <test.tmp.dir>${test.tmp.dir}</test.tmp.dir> + <hive.in.test>true</hive.in.test> + </systemPropertyVariables> + <additionalClasspathElements> + <additionalClasspathElement>${log4j.conf.dir}</additionalClasspathElement> + <additionalClasspathElement>${itest.jdbc.jars}</additionalClasspathElement> + </additionalClasspathElements> + <skipITs>${skipITests}</skipITs> <!-- set this to false to run these tests --> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${maven.surefire.version}</version> + <configuration> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + <reuseForks>false</reuseForks> + <forkCount>${test.forkcount}</forkCount> + <argLine>-Xmx2048m</argLine> + <failIfNoTests>false</failIfNoTests> + <systemPropertyVariables> + <build.dir>${project.build.directory}</build.dir> + <datanucleus.schema.autoCreateAll>true</datanucleus.schema.autoCreateAll> + <derby.version>${derby.version}</derby.version> + <derby.stream.error.file>${test.tmp.dir}/derby.log</derby.stream.error.file> + <log4j.debug>true</log4j.debug> + <java.io.tmpdir>${test.tmp.dir}</java.io.tmpdir> + <javax.jdo.option.ConnectionURL>jdbc:derby:memory:${test.tmp.dir}/junit_metastore_db;create=true</javax.jdo.option.ConnectionURL> + <metastore.schema.verification>false</metastore.schema.verification> + <test.tmp.dir>${test.tmp.dir}</test.tmp.dir> + <metastore.warehouse.dir>${test.warehouse.scheme}${test.warehouse.dir}</metastore.warehouse.dir> + </systemPropertyVariables> + <additionalClasspathElements> + <additionalClasspathElement>${log4j.conf.dir}</additionalClasspathElement> + </additionalClasspathElements> + <groups>${test.groups}</groups> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>0.10</version> + <configuration> + <excludes> + <exclude>binary-package-licenses/**</exclude> + <exclude>DEV-README</exclude> + <exclude>**/src/main/sql/**</exclude> + <exclude>**/README.md</exclude> + <exclude>**/*.iml</exclude> + <exclude>**/*.txt</exclude> + <exclude>**/*.log</exclude> + <exclude>**/*.arcconfig</exclude> + <exclude>**/package-info.java</exclude> + <exclude>**/*.properties</exclude> + <exclude>**/*.q</exclude> + <exclude>**/*.q.out</exclude> + <exclude>**/*.xml</exclude> + <exclude>**/gen/**</exclude> + <exclude>**/patchprocess/**</exclude> + <exclude>**/metastore_db/**</exclude> + </excludes> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>src/gen/thrift/gen-javabean</source> + <source>${project.build.directory}/generated-sources</source> + <source>src/gen/version</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <phase>prepare-package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>java</executable> + <arguments> + <argument>-classpath</argument> + <classpath/> + <argument>org.apache.hadoop.hive.metastore.conf.ConfTemplatePrinter</argument> + <argument>${project.build.directory}/generated-sources/conf/metastore-site.xml.template</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.datanucleus</groupId> + <artifactId>datanucleus-maven-plugin</artifactId> + <version>4.0.5</version> + <configuration> + <api>JDO</api> + <verbose>false</verbose> + <log4jConfiguration>${basedir}/src/main/resources/datanucleus-log4j.properties</log4jConfiguration> + <metadataIncludes>**/*.jdo</metadataIncludes> + <fork>false</fork> + </configuration> + <executions> + <execution> + <phase>process-classes</phase> + <goals> + <goal>enhance</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.antlr</groupId> + <artifactId>antlr3-maven-plugin</artifactId> + <version>${antlr.version}</version> + <executions> + <execution> + <goals> + <goal>antlr</goal> + </goals> + </execution> + </executions> + <configuration> + <outputDirectory>${project.build.directory}/generated-sources</outputDirectory> + <sourceDirectory>${basedir}/src/main/java</sourceDirectory> + </configuration> + </plugin> + </plugins> + </build> + +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/assembly/bin.xml ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/assembly/bin.xml b/standalone-metastore/metastore-common/src/assembly/bin.xml new file mode 100644 index 0000000..81912d7 --- /dev/null +++ b/standalone-metastore/metastore-common/src/assembly/bin.xml @@ -0,0 +1,136 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + + <id>bin</id> + + <formats> + <format>dir</format> + <format>tar.gz</format> + </formats> + + <baseDirectory>apache-hive-metastore-${project.version}-bin</baseDirectory> + + <dependencySets> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <unpack>false</unpack> + <useProjectArtifact>true</useProjectArtifact> + <useStrictFiltering>true</useStrictFiltering> + <useTransitiveFiltering>true</useTransitiveFiltering> + <excludes> + <exclude>org.apache.hadoop:*</exclude> + <exclude>org.slf4j:*</exclude> + <exclude>log4j:*</exclude> + </excludes> + </dependencySet> + </dependencySets> + + <fileSets> + <fileSet> + <directory>${project.basedir}</directory> + <excludes> + <exclude>target/**</exclude> + <exclude>.classpath</exclude> + <exclude>.project</exclude> + <exclude>.settings/**</exclude> + <exclude>lib/**</exclude> + </excludes> + + <includes> + <include>README.txt</include> + <include>LICENSE</include> + <include>NOTICE</include> + </includes> + <outputDirectory>/</outputDirectory> + </fileSet> + + <fileSet> + <directory>${project.basedir}/binary-package-licenses</directory> + <includes> + <include>/*</include> + </includes> + <excludes> + <exclude>/README</exclude> + </excludes> + <outputDirectory>binary-package-licenses</outputDirectory> + </fileSet> + + <fileSet> + <fileMode>755</fileMode> + <directory>${project.basedir}/src/main/scripts</directory> + <includes> + <include>base</include> + <include>schematool</include> + <include>start-metastore</include> + <include>metastore-config.sh</include> + <include>ext/**/*</include> + </includes> + <outputDirectory>bin</outputDirectory> + </fileSet> + + <fileSet> + <directory>${project.basedir}/src/main/sql</directory> + <includes> + <include>**/*</include> + </includes> + <outputDirectory>scripts/metastore/upgrade</outputDirectory> + </fileSet> + + <fileSet> + <directory>${project.basedir}/src/gen/thrift/gen-php</directory> + <includes> + <include>**/*</include> + </includes> + <outputDirectory>lib/php/packages/hive_metastore</outputDirectory> + </fileSet> + + <fileSet> + <directory>${project.basedir}/src/gen/thrift/gen-py/hive_metastore</directory> + <fileMode>755</fileMode> + <includes> + <include>**/*</include> + </includes> + <outputDirectory>lib/py/hive_metastore</outputDirectory> + </fileSet> + + <fileSet> + <directory>${project.basedir}/src/main/resources/</directory> + <fileMode>644</fileMode> + <includes> + <include>metastore-site.xml</include> + <include>metastore-log4j2.properties</include> + </includes> + <outputDirectory>conf</outputDirectory> + </fileSet> + </fileSets> + + <files> + <file> + <source>${project.build.directory}/generated-sources/conf/metastore-site.xml.template</source> + <outputDirectory>conf</outputDirectory> + </file> + </files> + +</assembly> + http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/assembly/src.xml ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/assembly/src.xml b/standalone-metastore/metastore-common/src/assembly/src.xml new file mode 100644 index 0000000..a240544 --- /dev/null +++ b/standalone-metastore/metastore-common/src/assembly/src.xml @@ -0,0 +1,53 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + + <id>src</id> + + <formats> + <format>tar.gz</format> + </formats> + + <baseDirectory>apache-hive-metastore-${project.version}-src</baseDirectory> + + <fileSets> + <fileSet> + <directory>${project.basedir}</directory> + + <excludes> + <exclude>target/**</exclude> + </excludes> + + <includes> + <include>.checkstyle</include> + <include>.gitattributes</include> + <include>.gitignore</include> + <include>LICENSE</include> + <include>NOTICE</include> + <include>pom.xml</include> + <include>src/**/*</include> + </includes> + <outputDirectory>/</outputDirectory> + </fileSet> + </fileSets> +</assembly>