Ver código fonte

HADOOP-7615. Fixes to have contrib jars in the HADOOP_CLASSPATH for the binary layout case. Contributed by Eric Yang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1172192 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 13 anos atrás
pai
commit
969e07a995

+ 3 - 0
CHANGES.txt

@@ -190,6 +190,9 @@ Release 0.20.205.0 - unreleased
     HADOOP-7630. Fixes hadoop-metrics2.properties to have a property
     *.period set to a default value. (Eric Yang via ddas)
 
+    HADOOP-7615. Fixes to have contrib jars in the HADOOP_CLASSPATH
+    for the binary layout case. (Eric Yang via ddas) 
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

+ 11 - 0
src/contrib/capacity-scheduler/build.xml

@@ -25,4 +25,15 @@ to call at top-level: ant deploy-contrib compile-core-test
 
   <import file="../build-contrib.xml"/>
 
+  <!-- ====================================================== -->
+  <!-- Package a Hadoop contrib                               -->
+  <!-- ====================================================== -->
+  <target name="package" depends="jar, jar-examples" unless="skip.contrib">
+    <copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
+      <fileset dir="${build.dir}">
+        <include name="hadoop-${name}-${version}.jar" />
+      </fileset>
+    </copy>
+  </target>
+
 </project>

+ 11 - 0
src/contrib/fairscheduler/build.xml

@@ -25,4 +25,15 @@ to call at top-level: ant deploy-contrib compile-core-test
 
   <import file="../build-contrib.xml"/>
 
+  <!-- ====================================================== -->
+  <!-- Package a Hadoop contrib                               -->
+  <!-- ====================================================== -->
+  <target name="package" depends="jar, jar-examples" unless="skip.contrib">
+    <copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
+      <fileset dir="${build.dir}">
+        <include name="hadoop-${name}-${version}.jar" />
+      </fileset>
+    </copy>
+  </target>
+
 </project>

+ 10 - 0
src/contrib/thriftfs/build.xml

@@ -60,5 +60,15 @@ to call at top-level: ant deploy-contrib compile-core-test
    </antcall>
  </target>  
 
+  <!-- ====================================================== -->
+  <!-- Package a Hadoop contrib                               -->
+  <!-- ====================================================== -->
+  <target name="package" depends="jar, jar-examples" unless="skip.contrib">
+    <copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
+      <fileset dir="${build.dir}">
+        <include name="hadoop-${name}-${version}.jar" />
+      </fileset>
+    </copy>
+  </target>
 
 </project>

+ 0 - 9
src/packages/templates/conf/hadoop-env.sh

@@ -9,15 +9,6 @@
 export JAVA_HOME=${JAVA_HOME}
 export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"}
 
-# Extra Java CLASSPATH elements.  Automatically insert capacity-scheduler.
-for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do
-  if [ "$HADOOP_CLASSPATH" ]; then
-    export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f
-  else
-    export HADOOP_CLASSPATH=$f
-  fi
-done
-
 # The maximum amount of heap to use, in MB. Default is 1000.
 #export HADOOP_HEAPSIZE=
 #export HADOOP_NAMENODE_INIT_HEAPSIZE=""