Sfoglia il codice sorgente

MAPREDUCE-4498. Remove hsqldb jar from Hadoop runtime classpath. (rkanter via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1369906 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur 12 anni fa
parent
commit
117145f1ad

+ 11 - 3
hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml

@@ -153,10 +153,18 @@
       <excludes>
         <exclude>org.apache.hadoop:hadoop-common</exclude>
         <exclude>org.apache.hadoop:hadoop-hdfs</exclude>
-	<!-- use slf4j from common to avoid multiple binding warnings -->
-	<exclude>org.slf4j:slf4j-api</exclude>
-	<exclude>org.slf4j:slf4j-log4j12</exclude>
+        <!-- use slf4j from common to avoid multiple binding warnings -->
+        <exclude>org.slf4j:slf4j-api</exclude>
+        <exclude>org.slf4j:slf4j-log4j12</exclude>
+        <exclude>org.hsqldb:hsqldb</exclude>
       </excludes>
     </dependencySet>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>/share/hadoop/${hadoop.component}/lib-examples</outputDirectory>
+      <includes>
+        <include>org.hsqldb:hsqldb</include>
+      </includes>
+    </dependencySet>
   </dependencySets>
 </assembly>

+ 2 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -159,6 +159,8 @@ Branch-2 ( Unreleased changes )
     MAPREDUCE-4342. Distributed Cache gives inconsistent result if cache files 
     get deleted from tasktracker. (mayank_bansal via tucu)
 
+    MAPREDUCE-4498. Remove hsqldb jar from Hadoop runtime classpath. (rkanter via tucu)
+
 Release 2.1.0-alpha - Unreleased 
 
   INCOMPATIBLE CHANGES

+ 0 - 1
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/pom.xml

@@ -94,7 +94,6 @@
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
-      <version>2.0.0</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

+ 1 - 1
hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml

@@ -98,7 +98,7 @@
      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
-       <version>2.0.0</version>
+       <scope>provided</scope>
      </dependency>
   </dependencies>
   

+ 10 - 0
hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/DBCountPageView.java

@@ -65,6 +65,16 @@ import org.hsqldb.server.Server;
  * 
  * When called with no arguments the program starts a local HSQLDB server, and 
  * uses this database for storing/retrieving the data. 
+ * <br>
+ * This program requires some additional configuration relating to HSQLDB.  
+ * The the hsqldb jar should be added to the classpath:
+ * <br>
+ * <code>export HADOOP_CLASSPATH=share/hadoop/mapreduce/lib-examples/hsqldb-2.0.0.jar</code>
+ * <br>
+ * And the hsqldb jar should be included with the <code>-libjars</code> 
+ * argument when executing it with hadoop:
+ * <br>
+ * <code>-libjars share/hadoop/mapreduce/lib-examples/hsqldb-2.0.0.jar</code>
  */
 public class DBCountPageView extends Configured implements Tool {
 

+ 1 - 1
hadoop-mapreduce-project/pom.xml

@@ -162,7 +162,7 @@
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
-      <version>2.0.0</version>
+      <scope>compile</scope>
     </dependency>
 
   </dependencies>

+ 5 - 0
hadoop-project/pom.xml

@@ -655,6 +655,11 @@
         <!-- Use the version needed by maven-clover-plugin -->
         <version>3.0.2</version>
       </dependency>
+      <dependency>
+        <groupId>org.hsqldb</groupId>
+        <artifactId>hsqldb</artifactId>
+        <version>2.0.0</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>