You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by tr...@apache.org on 2012/07/09 15:38:25 UTC
svn commit: r1359223 - in /incubator/hcatalog/trunk: ./
hcatalog-pig-adapter/ hcatalog-pig-adapter/src/
hcatalog-pig-adapter/src/main/ hcatalog-pig-adapter/src/main/java/
hcatalog-pig-adapter/src/main/java/org/
hcatalog-pig-adapter/src/main/java/org/ap...
Author: travis
Date: Mon Jul 9 15:38:24 2012
New Revision: 1359223
URL: http://svn.apache.org/viewvc?rev=1359223&view=rev
Log:
HCATALOG-434 : Package HCatalog pig support as a separate jar
Added:
incubator/hcatalog/trunk/build-common-new.xml
incubator/hcatalog/trunk/hcatalog-pig-adapter/
incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
incubator/hcatalog/trunk/hcatalog-pig-adapter/ivy.xml
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/
- copied from r1358780, incubator/hcatalog/trunk/src/java/org/apache/hcatalog/pig/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/java/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/java/org/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/java/org/apache/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/
incubator/hcatalog/trunk/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/
- copied from r1358780, incubator/hcatalog/trunk/src/test/org/apache/hcatalog/pig/
Removed:
incubator/hcatalog/trunk/src/java/org/apache/hcatalog/pig/
incubator/hcatalog/trunk/src/test/org/apache/hcatalog/pig/
Modified:
incubator/hcatalog/trunk/CHANGES.txt
incubator/hcatalog/trunk/build.xml
incubator/hcatalog/trunk/ivy.xml
Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1359223&r1=1359222&r2=1359223&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Mon Jul 9 15:38:24 2012
@@ -26,6 +26,8 @@ Trunk (unreleased changes)
HCAT-328 HCatLoader should report its input size so pig can estimate the number of reducers (traviscrawford via gates)
IMPROVEMENTS
+ HCAT-434 Package HCatalog pig support as a separate jar (traviscrawford)
+
HCAT-341 InitializeInput improvements (traviscrawford)
HCAT-439 Unit test failures in trunk build - Jenkins build 1516 (avandana)
Added: incubator/hcatalog/trunk/build-common-new.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-common-new.xml?rev=1359223&view=auto
==============================================================================
--- incubator/hcatalog/trunk/build-common-new.xml (added)
+++ incubator/hcatalog/trunk/build-common-new.xml Mon Jul 9 15:38:24 2012
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+-->
+
+<project name="build-common-new" default="jar" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <loadproperties srcfile="${basedir}/../ivy/libraries.properties"/>
+
+ <property name="hcatalog.version" value="0.5.0-dev"/>
+ <property name="jar.name" value="${ant.project.name}-${hcatalog.version}.jar"/>
+ <property name="build.dir" location="${basedir}/build"/>
+ <property name="build.classes" location="${build.dir}/classes"/>
+ <property name="test.dir" location="${build.dir}/test"/>
+ <property name="test.classes" location="${test.dir}/classes"/>
+ <property name="test.logs" location="${test.dir}/logs"/>
+ <property name="test.warehouse.dir" location="${test.dir}/hcat_junit_warehouse"/>
+ <property name="mvnrepo" value="http://repo2.maven.org/maven2"/>
+
+ <macrodef name="_javac">
+ <attribute name="srcDir"/>
+ <attribute name="destDir"/>
+ <attribute name="classPathRef"/>
+ <sequential>
+ <mkdir dir="@{destDir}"/>
+ <javac
+ fork="true"
+ deprecation="false"
+ sourcepath=""
+ includes="**/*.java"
+ encoding="utf-8"
+ srcdir="@{srcDir}"
+ destdir="@{destDir}"
+ classpathref="@{classPathRef}"
+ includeantruntime="false"/>
+ </sequential>
+ </macrodef>
+
+ <!-- By default all tests are run. To run one test define -Dtestcase=X on the command line -->
+ <macrodef name="_junit">
+ <sequential>
+ <mkdir dir="${test.logs}"/>
+ <junit printsummary="true"
+ fork="true"
+ forkmode="perBatch"
+ dir="${test.dir}"
+ failureProperty="tests.failed">
+ <sysproperty key="hive.metastore.warehouse.dir" value="${test.warehouse.dir}"/>
+ <classpath refid="test.class.path"/>
+ <formatter type="plain"/>
+ <batchtest todir="${test.logs}" unless="testcase">
+ <fileset dir="${basedir}/src/test/java" includes="**/Test*.java"/>
+ </batchtest>
+ <batchtest todir="${test.logs}" if="testcase">
+ <fileset dir="${basedir}/src/test/java" includes="**/${testcase}.java"/>
+ </batchtest>
+ </junit>
+ <fail if="tests.failed" message="Tests failed!"/>
+ </sequential>
+ </macrodef>
+
+ <target name="clean">
+ <echo message="${ant.project.name}"/>
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <target name="ivy-init">
+ <echo message="${ant.project.name}"/>
+ <ivy:configure file="../ivy/ivysettings.xml"/>
+ </target>
+
+ <target name="ivy-retrieve" depends="ivy-init">
+ <echo message="${ant.project.name}"/>
+ <ivy:retrieve sync="true"
+ pattern="${build.dir}/ivy/[conf]/[organization]-[artifact]-[revision](-[classifier]).[ext]"/>
+ </target>
+
+ <target name="ivy-publish">
+ <ivy:publish
+ resolver="local"
+ organisation="org.apache.hcatalog"
+ module="${ant.project.name}"
+ revision="${hcatalog.version}"
+ overwrite="true">
+ <artifacts pattern="${build.dir}/[artifact]-[revision](-[classifier]).[ext]"/>
+ </ivy:publish>
+ </target>
+
+ <target name="compile" depends="ivy-retrieve">
+ <echo message="${ant.project.name}"/>
+ <_javac srcDir="${basedir}/src/main/java"
+ destDir="${build.classes}"
+ classPathRef="compile.class.path"/>
+ </target>
+
+ <target name="test" depends="jar">
+ <echo message="${ant.project.name}"/>
+ <_javac srcDir="${basedir}/src/test/java"
+ destDir="${test.classes}"
+ classPathRef="test.class.path"/>
+ <_junit/>
+ </target>
+
+ <target name="jar" depends="compile">
+ <echo message="${ant.project.name}"/>
+ <jar jarfile="${build.dir}/${jar.name}" basedir="${build.classes}"/>
+ <antcall target="ivy-publish"/>
+ </target>
+</project>
Modified: incubator/hcatalog/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1359223&r1=1359222&r2=1359223&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Mon Jul 9 15:38:24 2012
@@ -35,6 +35,7 @@
<property name="_vtype" value="-dev"/>
<property name="hcatalog.version" value="${_version}${_vtype}"/>
<property name="hcatalog.jar" value="${ant.project.name}-${hcatalog.version}.jar"/>
+ <property name="hcatalog.core.jar" value="${ant.project.name}-core-${hcatalog.version}.jar"/>
<property name="final.name" value="${ant.project.name}-${hcatalog.version}" />
<property name="package.release" value="1"/>
@@ -293,8 +294,8 @@
<!-- Build the hcatalog client jar -->
<target name="clientjar" depends="compile-src">
- <jar jarfile="${build.dir}/${ant.project.name}/${hcatalog.jar}" basedir="${build.classes}">
- </jar>
+ <jar jarfile="${build.dir}/${ant.project.name}/${hcatalog.core.jar}"
+ basedir="${build.classes}"/>
</target>
<!--
@@ -314,7 +315,14 @@
Build both clientjar and server-extensions
================================================================================
-->
- <target name="jar" depends="clientjar,server-extensions,jar-storage-handlers"/>
+ <target name="jar" depends="clientjar,server-extensions,jar-storage-handlers">
+ <ant target="jar" dir="hcatalog-pig-adapter" inheritAll="false"/>
+
+ <jar jarfile="${build.dir}/${ant.project.name}/${hcatalog.jar}">
+ <zipfileset src="${build.dir}/${ant.project.name}/${hcatalog.core.jar}"/>
+ <zipfileset src="hcatalog-pig-adapter/build/hcatalog-pig-adapter-${hcatalog.version}.jar"/>
+ </jar>
+ </target>
<!--
================================================================================
@@ -339,7 +347,10 @@
source="${javac.version}" deprecation="${javac.deprecation}"
includeantruntime="false">
<compilerarg line="${javac.args}"/>
- <classpath refid="test.classpath" />
+ <classpath>
+ <path refid="test.classpath"/>
+ <pathelement path="hcatalog-pig-adapter/build/hcatalog-pig-adapter-${hcatalog.version}.jar"/>
+ </classpath>
</javac>
</target>
@@ -366,6 +377,7 @@
<pathelement location="." />
<pathelement path="${clover.jar}"/>
<path refid="test.classpath"/>
+ <pathelement path="hcatalog-pig-adapter/build/hcatalog-pig-adapter-${hcatalog.version}.jar"/>
</classpath>
<formatter type="${test.junit.output.format}" />
<!-- If the user has not defined a particular test to run, run them all -->
@@ -389,7 +401,7 @@
</junit>
<fail if="tests.failed">Tests failed!</fail>
</sequential>
- <!-- test storage handlers -->
+ <ant target="test" dir="hcatalog-pig-adapter" inheritAll="false"/>
<antcall target="test-storage-handlers"/>
</target>
@@ -494,6 +506,7 @@
<target name="clean" description="Cleanup all build artifacts">
<delete dir="${build.dir}" />
<delete dir="${test.warehouse.dir}"/>
+ <ant target="clean" dir="hcatalog-pig-adapter" inheritAll="false"/>
<ant target="clean" dir="storage-handlers" inheritAll="false" useNativeBasedir="true"/>
</target>
@@ -570,6 +583,9 @@
<fileset dir="${build.dir}/${ant.project.name}/">
<include name="hcatalog-*.jar"/>
</fileset>
+ <fileset dir="hcatalog-pig-adapter/build">
+ <include name="hcatalog-*.jar"/>
+ </fileset>
</copy>
<copy todir="${dist.dir}/bin">
@@ -649,6 +665,7 @@
<tar compression="gzip" longfile="gnu" destfile="${build.dir}/${ant.project.name}-src-${hcatalog.version}.tar.gz">
<tarfileset dir="${basedir}" mode="644" prefix="${ant.project.name}-src-${hcatalog.version}">
<include name="conf/**"/>
+ <include name="hcatalog-pig-adapter"/>
<include name="ivy/**"/>
<exclude name="ivy/*.jar"/>
<include name="license/**"/>
Added: incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml?rev=1359223&view=auto
==============================================================================
--- incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml (added)
+++ incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml Mon Jul 9 15:38:24 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+-->
+
+<project name="hcatalog-pig-adapter">
+ <import file="../build-common-new.xml"/>
+
+ <path id="compile.class.path">
+ <fileset dir="${build.dir}/ivy/default"/>
+ <dirset dir="../build/classes"/>
+ <fileset dir="../build/ivy/lib/hcatalog"/>
+ </path>
+
+ <path id="test.class.path">
+ <path refid="compile.class.path"/>
+ <fileset dir="${build.dir}/ivy/test"/>
+ <dirset dir="${basedir}/../build/test/classes"/>
+ <dirset dir="${basedir}/build/classes"/>
+ <dirset dir="${basedir}/build/test/classes"/>
+ </path>
+</project>
Added: incubator/hcatalog/trunk/hcatalog-pig-adapter/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/hcatalog-pig-adapter/ivy.xml?rev=1359223&view=auto
==============================================================================
--- incubator/hcatalog/trunk/hcatalog-pig-adapter/ivy.xml (added)
+++ incubator/hcatalog/trunk/hcatalog-pig-adapter/ivy.xml Mon Jul 9 15:38:24 2012
@@ -0,0 +1,43 @@
+<!--
+ 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.
+-->
+
+<ivy-module version="2.0">
+ <info organisation="org.apache.hcatalog"
+ module="${ant.project.name}"
+ revision="${hcatalog.version}">
+ <license name="Apache 2.0"/>
+ <ivyauthor name="Apache HCatalog Team" url="http://incubator.apache.org/hcatalog"/>
+ <description>Apache HCatalog</description>
+ </info>
+
+ <configurations defaultconfmapping="default">
+ <conf name="default"/>
+ <conf name="test" visibility="private"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="org.apache.pig" name="pig" rev="${pig.version}"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="${slf4j.version}"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="${slf4j.version}"/>
+
+ <!-- Test dependencies -->
+ <dependency org="org.apache.hive" name="hive-cli"
+ rev="${hive.version}" conf="test->default"/>
+ <dependency org="org.apache.hive" name="hive-exec"
+ rev="${hive.version}" conf="test->default"/>
+ </dependencies>
+</ivy-module>
Modified: incubator/hcatalog/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ivy.xml?rev=1359223&r1=1359222&r2=1359223&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ivy.xml (original)
+++ incubator/hcatalog/trunk/ivy.xml Mon Jul 9 15:38:24 2012
@@ -36,6 +36,13 @@
<conf name="package" visibility="private" extends="master"/>
<conf name="releaseaudit" visibility="private"/>
</configurations>
+
+ <publications>
+ <artifact name="hcatalog"/>
+ <artifact name="hcatalog-core"/>
+ <artifact name="hcatalog-server-extensions"/>
+ </publications>
+
<dependencies>
<!-- needed to compile -->
<dependency org="org.antlr" name="antlr" rev="${antlr.version}"