sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject git commit: SQOOP-722 Improve Sqoop 2 packaging (Jarek Jarcec Cecho)
Date Wed, 05 Dec 2012 02:48:17 GMT
Updated Branches:
  refs/heads/sqoop2 a633fb0b3 -> e9868cb72


SQOOP-722 Improve Sqoop 2 packaging
(Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/e9868cb7
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/e9868cb7
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/e9868cb7

Branch: refs/heads/sqoop2
Commit: e9868cb72ee87f98837b15e9172da93d7f258c65
Parents: a633fb0
Author: Bilung Lee <blee@apache.org>
Authored: Tue Dec 4 18:43:15 2012 -0800
Committer: Bilung Lee <blee@apache.org>
Committed: Tue Dec 4 18:43:15 2012 -0800

----------------------------------------------------------------------
 dist/pom.xml                                       |   67 +++++++++++----
 .../sqoop/job/etl/HdfsExportPartitioner.java       |    2 +-
 2 files changed, 50 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/e9868cb7/dist/pom.xml
----------------------------------------------------------------------
diff --git a/dist/pom.xml b/dist/pom.xml
index 17098c3..f0c68ad 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -125,15 +125,15 @@ limitations under the License.
                 <configuration>
                   <target>
                     <!-- Clean up -->
-                    <delete dir="target/sqoop-${project.version}-bin"/>
-                    <delete file="target/sqoop-${project.version}-bin.tar.gz"/>
+                    <delete dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
+                    <delete file="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}.tar.gz"/>
 
                     <!-- Create dist dir -->
-                    <mkdir dir="target/sqoop-${project.version}-bin"/>
+                    <mkdir dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
 
 
                     <!-- Copy sources over -->
-                    <copy todir="target/sqoop-${project.version}-bin" includeEmptyDirs="false"
flatten="false">
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"
includeEmptyDirs="false" flatten="false">
                       <fileset dir="../">
                         <include name="**/*" />
                         <exclude name="build/**" />
@@ -149,38 +149,38 @@ limitations under the License.
                     <get src="http://archive.apache.org/dist/tomcat/tomcat-${tomcat.majorVersion}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz"
                          dest="target/apache-tomcat.tar.gz" verbose="true" skipexisting="true"/>
                     <untar src="target/apache-tomcat.tar.gz" dest="target" compression="gzip"/>
-                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}-bin/server"/>
-                    <copy todir="target/sqoop-${project.version}-bin/server/bin">
+                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server"/>
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/bin">
                       <fileset dir="src/main/server/bin"/>
                     </copy>
-                    <chmod dir="target/sqoop-${project.version}-bin/server/bin" perm="u+x"
includes="**/*.sh"/>
-                    <copy todir="target/sqoop-${project.version}-bin/server/conf">
+                    <chmod dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/bin"
perm="u+x" includes="**/*.sh"/>
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/conf">
                       <fileset dir="src/main/server/conf"/>
                     </copy>
-                    <delete dir="target/sqoop-${project.version}-bin/server/webapps"/>
-                    <mkdir dir="target/sqoop-${project.version}-bin/server/webapps"/>
-                    <copy todir="target/sqoop-${project.version}-bin/server/webapps">
+                    <delete dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
+                    <mkdir dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps">
                       <fileset dir="src/main/server/webapps"/>
                     </copy>
                     <copy file="../server/target/sqoop.war"
-                          toDir="target/sqoop-${project.version}-bin/server/webapps"/>
+                      toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/server/webapps"/>
 
                     <!-- Build client directory -->
-                    <copy todir="target/sqoop-${project.version}-bin/client/lib">
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/client/lib">
                       <fileset dir="../client/target/lib"/>
                     </copy>
                     <copy file="../client/target/sqoop-client-${project.version}.jar"
-                          toDir="target/sqoop-${project.version}-bin/client/lib"/>
+                      toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/client/lib"/>
 
                     <!-- Build "bin" directory -->
-                    <copy todir="target/sqoop-${project.version}-bin/bin">
+                    <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/bin">
                       <fileset dir="src/main/bin"/>
                     </copy>
-                    <chmod dir="target/sqoop-${project.version}-bin/bin" perm="u+x" includes="**/*.sh"/>
+                    <chmod dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}/bin"
perm="u+x" includes="**/*.sh"/>
 
                     <!-- Finally create distribution tar -->
-                    <tar destfile="target/sqoop-${project.version}-bin.tar.gz" compression="gzip">
-                      <tarfileset dir="target/sqoop-${project.version}-bin" prefix="sqoop-${project.version}"/>
+                    <tar destfile="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}.tar.gz"
compression="gzip">
+                      <tarfileset dir="target/sqoop-${project.version}-bin-hadoop${hadoop.profile}"
prefix="sqoop-${project.version}-bin-hadoop${hadoop.profile}"/>
                     </tar>
                   </target>
                 </configuration>
@@ -190,5 +190,36 @@ limitations under the License.
         </plugins>
       </build>
     </profile>
+
+    <!-- Hadoop 1.x -->
+    <profile>
+      <id>hadoop100</id>
+
+     <activation>
+        <property>
+          <name>hadoop.profile</name>
+          <value>100</value>
+        </property>
+      </activation>
+    </profile>
+
+    <!-- Hadoop 2.x (active by default) -->
+    <profile>
+      <id>hadoop200</id>
+
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>hadoop.profile</name>
+          <value>200</value>
+        </property>
+      </activation>
+
+      <properties>
+        <hadoop.profile>200</hadoop.profile>
+      </properties>
+    </profile>
+
   </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/sqoop/blob/e9868cb7/execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportPartitioner.java
----------------------------------------------------------------------
diff --git a/execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportPartitioner.java
b/execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportPartitioner.java
index abe986e..9e7ea4e 100644
--- a/execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportPartitioner.java
+++ b/execution/mapreduce/src/main/java/org/apache/sqoop/job/etl/HdfsExportPartitioner.java
@@ -68,7 +68,7 @@ public class HdfsExportPartitioner extends Partitioner {
 
   @Override
   public List<Partition> getPartitions(ImmutableContext context,
-      Object connectionConfiguration, Object jobConfiguration) {
+      long maxPartitions, Object connectionConfiguration, Object jobConfiguration) {
     Configuration conf = ((PrefixContext)context).getConfiguration();
 
     try {


Mime
View raw message