sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arv...@apache.org
Subject svn commit: r1213964 - in /incubator/sqoop/trunk: build.xml ivy.xml ivy/libraries.properties src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java
Date Tue, 13 Dec 2011 22:34:32 GMT
Author: arvind
Date: Tue Dec 13 22:34:32 2011
New Revision: 1213964

URL: http://svn.apache.org/viewvc?rev=1213964&view=rev
Log:
SQOOP-405. Enable TestDataDrivenDBInputFormat for Hadoop 0.23

(Bilung Lee via Arvind Prabhakar)

Modified:
    incubator/sqoop/trunk/build.xml
    incubator/sqoop/trunk/ivy.xml
    incubator/sqoop/trunk/ivy/libraries.properties
    incubator/sqoop/trunk/src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java

Modified: incubator/sqoop/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/build.xml?rev=1213964&r1=1213963&r2=1213964&view=diff
==============================================================================
--- incubator/sqoop/trunk/build.xml (original)
+++ incubator/sqoop/trunk/build.xml Tue Dec 13 22:34:32 2011
@@ -169,9 +169,32 @@
     </else>
   </if>
 
-  <!-- Ivy-based dependency resolution -->
+  <!-- Ivy library properties -->
   <property name="ivy.dir" location="${basedir}/ivy" />
   <loadproperties srcfile="${ivy.dir}/libraries.properties"/>
+  <if>
+    <equals arg1="${hadoopversion}" arg2="20" />
+    <then>
+      <property name="hadoop.version" value="0.20.2-cdh3u1" />
+      <property name="hbase.version" value="0.90.3-cdh3u1" />
+      <property name="zookeeper.version" value="3.3.3-cdh3u1" />
+    </then>
+
+    <elseif>
+      <equals arg1="${hadoopversion}" arg2="23" />
+      <then>
+        <property name="hadoop.version" value="0.23.1-SNAPSHOT" />
+        <property name="hbase.version" value="0.92.0-SNAPSHOT" />
+        <property name="zookeeper.version" value="3.4.0-SNAPSHOT" />
+      </then>
+    </elseif>
+
+    <else>
+      <fail message="Unrecognized hadoopversion. Can only be 20 or 23." />
+    </else>
+  </if>
+
+  <!-- Ivy-based dependency resolution -->
   <property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml"/>
   <property name="ivy.jar" location="${lib.dir}/ivy-${ivy.version}.jar"/>
   <property name="ivy_repo_url"

Modified: incubator/sqoop/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/ivy.xml?rev=1213964&r1=1213963&r2=1213964&view=diff
==============================================================================
--- incubator/sqoop/trunk/ivy.xml (original)
+++ incubator/sqoop/trunk/ivy.xml Tue Dec 13 22:34:32 2011
@@ -69,25 +69,25 @@ under the License.
 
     <!-- Dependencies for Hadoop 0.23 -->
     <dependency org="org.apache.hadoop" name="hadoop-common"
-      rev="${hadoop-common.version}" conf="hadoop23->default">
+      rev="${hadoop.version}" conf="hadoop23->default">
       <artifact name="hadoop-common" type="jar" />
       <artifact name="hadoop-common" type="jar" m:classifier="tests"/>
     </dependency>
     <dependency org="org.apache.hadoop" name="hadoop-hdfs"
-      rev="${hadoop-common.version}" conf="hadoop23->default">
+      rev="${hadoop.version}" conf="hadoop23->default">
       <artifact name="hadoop-hdfs" type="jar" />
       <artifact name="hadoop-hdfs" type="jar" m:classifier="tests"/>
     </dependency>
     <dependency org="org.apache.hadoop" name="hadoop-mapreduce-client-common"
-      rev="${hadoop-common.version}" conf="hadoop23->default"/>
+      rev="${hadoop.version}" conf="hadoop23->default"/>
     <dependency org="org.apache.hadoop" name="hadoop-mapreduce-client-core"
-      rev="${hadoop-common.version}" conf="hadoop23->default"/>
+      rev="${hadoop.version}" conf="hadoop23->default"/>
 
     <!-- Dependencies for Hadoop 0.20 -->
     <dependency org="org.apache.hadoop" name="hadoop-core"
-      rev="${hadoop-core.version}" conf="hadoop20->default"/>
+      rev="${hadoop.version}" conf="hadoop20->default"/>
     <dependency org="org.apache.hadoop" name="hadoop-test"
-      rev="${hadoop-core.version}" conf="hadoop20test->default"/>
+      rev="${hadoop.version}" conf="hadoop20test->default"/>
 
     <!-- Common dependencies for Sqoop -->
     <dependency org="commons-cli" name="commons-cli"

Modified: incubator/sqoop/trunk/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/ivy/libraries.properties?rev=1213964&r1=1213963&r2=1213964&view=diff
==============================================================================
--- incubator/sqoop/trunk/ivy/libraries.properties (original)
+++ incubator/sqoop/trunk/ivy/libraries.properties Tue Dec 13 22:34:32 2011
@@ -28,11 +28,6 @@ commons-io.version=1.4
 commons-lang.version=2.4
 commons-logging.version=1.0.4
 
-hadoop-core.version=0.20.2-cdh3u1
-hadoop-common.version=0.23.0-SNAPSHOT
-hbase.version=0.90.3-cdh3u1
-zookeeper.version=3.3.3-cdh3u1
-
 hsqldb.version=1.8.0.10
 
 ivy.version=2.1.0

Modified: incubator/sqoop/trunk/src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java?rev=1213964&r1=1213963&r2=1213964&view=diff
==============================================================================
--- incubator/sqoop/trunk/src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java
(original)
+++ incubator/sqoop/trunk/src/test/com/cloudera/sqoop/mapreduce/db/TestDataDrivenDBInputFormat.java
Tue Dec 13 22:34:32 2011
@@ -35,7 +35,6 @@ import org.apache.hadoop.mapreduce.*;
 import org.apache.hadoop.mapreduce.lib.db.*;
 import org.apache.hadoop.mapreduce.lib.output.*;
 import org.apache.hadoop.util.StringUtils;
-import org.apache.hadoop.util.VersionInfo;
 
 /**
  * Test aspects of DataDrivenDBInputFormat.
@@ -83,17 +82,11 @@ public class TestDataDrivenDBInputFormat
   }
 
   public void setUp() throws Exception {
-    if (!isHadoop20()) {
-      return;
-    }
     initialize(DRIVER_CLASS, DB_URL);
     super.setUp();
   }
 
   public void tearDown() throws Exception {
-    if (!isHadoop20()) {
-      return;
-    }
     super.tearDown();
     shutdown();
   }
@@ -172,9 +165,6 @@ public class TestDataDrivenDBInputFormat
   }
 
   public void testDateSplits() throws Exception {
-    if (!isHadoop20()) {
-      return;
-    }
     Statement s = connection.createStatement();
     final String DATE_TABLE = "datetable";
     final String COL = "foo";
@@ -230,7 +220,4 @@ public class TestDataDrivenDBInputFormat
     }
   }
 
-  protected boolean isHadoop20() {
-    return VersionInfo.getVersion().startsWith("0.20");
-  }
 }



Mime
View raw message