1
0
Kaynağa Gözat

HADOOP-2325. Require Java 6.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@674626 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 17 yıl önce
ebeveyn
işleme
41961f71c2

+ 2 - 0
CHANGES.txt

@@ -27,6 +27,8 @@ Trunk (unreleased changes)
     etc. DistributedFileSystem and DFSClient have moved and are now 
     considered package private. (Sanjay Radia via omalley)
 
+    HADOOP-2325.  Require Java 6. (cutting)
+
   NEW FEATURES
 
     HADOOP-3341. Allow streaming jobs to specify the field separator for map

+ 13 - 4
build.xml

@@ -108,7 +108,7 @@
   <property name="src.webapps" value="${basedir}/src/webapps"/>
 
   <property name="javadoc.link.java"
-	    value="http://java.sun.com/j2se/1.5/docs/api/"/>
+	    value="http://java.sun.com/javase/6/docs/api/"/>
   <property name="javadoc.packages" value="org.apache.hadoop.*"/>
 
   <property name="dist.dir" value="${build.dir}/${final.name}"/>
@@ -116,7 +116,7 @@
   <property name="javac.debug" value="on"/>
   <property name="javac.optimize" value="on"/>
   <property name="javac.deprecation" value="off"/>
-  <property name="javac.version" value="1.5"/>
+  <property name="javac.version" value="1.6"/>
   <property name="javac.args" value=""/>
   <property name="javac.args.warnings" value="-Xlint:unchecked"/>
 
@@ -758,7 +758,10 @@
   <!-- ================================================================== -->
   
   <target name="docs" depends="forrest.check" description="Generate forrest-based documentation. To use, specify -Dforrest.home=&lt;base of Apache Forrest installation&gt; on the command line." if="forrest.home">
-    <exec dir="${docs.src}" executable="${forrest.home}/bin/forrest" failonerror="true" />
+    <exec dir="${docs.src}" executable="${forrest.home}/bin/forrest"
+	  failonerror="true">
+      <env key="JAVA_HOME" value="${java5.home}"/>
+    </exec>
     <copy todir="${docs.dir}">
       <fileset dir="${docs.src}/build/site/" />
     </copy>
@@ -767,9 +770,13 @@
     <antcall target="changes-to-html"/>
   </target>
 
-  <target name="forrest.check" unless="forrest.home">
+  <target name="forrest.check" unless="forrest.home" depends="java5.check">
     <fail message="'forrest.home' is not defined. Please pass -Dforrest.home=&lt;base of Apache Forrest installation&gt; to Ant on the command-line." />
   </target>
+
+  <target name="java5.check" unless="java5.home">
+    <fail message="'java5.home' is not defined.  Forrest requires Java 5.  Please pass -Djava5.home=&lt;base of Java 5 distribution&gt; to Ant on the command-line." />
+  </target>
 	
   <target name="javadoc" description="Generate javadoc">
     <mkdir dir="${build.javadoc}"/>
@@ -1249,6 +1256,7 @@
     <arg value="${findbugs.home}"/>
     <arg value="${forrest.home}"/>
     <arg value="${basedir}"/>
+    <arg value="${java5.home}"/>
   </exec>
 </target>
 
@@ -1271,6 +1279,7 @@
     <arg value="${basedir}"/>
     <arg value="${trigger.url}"/>
     <arg value="${jira.passwd}"/>
+    <arg value="${java5.home}"/>
   </exec>
 </target>
 	

+ 2 - 2
src/core/overview.html

@@ -54,8 +54,8 @@ that process vast amounts of data. Here's what makes Hadoop especially useful:</
 
 <ol>
   <li>
-    Java 1.5.x, preferably from 
-    <a href="http://java.sun.com/j2se/downloads.html">Sun</a>. 
+    Java 1.6.x, preferably from 
+    <a href="http://java.sun.com/javase/downloads/">Sun</a>. 
     Set <tt>JAVA_HOME</tt> to the root of your Java installation.
   </li>
   <li>

+ 1 - 1
src/docs/src/documentation/content/xdocs/hod_admin_guide.xml

@@ -196,7 +196,7 @@ in the HOD Configuration Guide.</p>
 
   <ul>
    <li>${JAVA_HOME}: Location of Java for Hadoop. Hadoop supports Sun JDK
-    1.5.x and above.</li>
+    1.6.x and above.</li>
    <li>${CLUSTER_NAME}: Name of the cluster which is specified in the
     'node property' as mentioned in resource manager configuration.</li>
    <li>${HADOOP_HOME}: Location of Hadoop installation on the compute and

+ 2 - 2
src/docs/src/documentation/content/xdocs/mapred_tutorial.xml

@@ -1187,9 +1187,9 @@
         <em>current working directory</em> added to the
         <code>java.library.path</code> and <code>LD_LIBRARY_PATH</code>. 
         And hence the cached libraries can be loaded via 
-        <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#loadLibrary(java.lang.String)">
+        <a href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#loadLibrary(java.lang.String)">
         System.loadLibrary</a> or 
-        <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#load(java.lang.String)">
+        <a href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#load(java.lang.String)">
         System.load</a>. More details on how to load shared libraries through 
         distributed cache are documented at 
         <a href="native_libraries.html#Loading+native+libraries+through+DistributedCache">

+ 1 - 1
src/docs/src/documentation/content/xdocs/quickstart.xml

@@ -59,7 +59,7 @@
         
         <ol>
           <li>
-            Java<sup>TM</sup> 1.5.x, preferably from Sun, must be installed.
+            Java<sup>TM</sup> 1.6.x, preferably from Sun, must be installed.
           </li>
           <li>
             <strong>ssh</strong> must be installed and <strong>sshd</strong> must 

+ 7 - 5
src/test/bin/test-patch.sh

@@ -12,8 +12,8 @@ parseArgs() {
     HUDSON)
       ### Set HUDSON to true to indicate that this script is being run by Hudson
       HUDSON=true
-      if [[ $# != 16 ]] ; then
-        echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <TRIGGER_BUILD> <JIRA_PASSWD>"
+      if [[ $# != 17 ]] ; then
+        echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <TRIGGER_BUILD> <JIRA_PASSWD> <JAVA5_HOME> "
         cleanupAndExit 0
       fi
       PATCH_DIR=$2
@@ -31,6 +31,7 @@ parseArgs() {
       BASEDIR=${14}
       TRIGGER_BUILD_URL=${15}
       JIRA_PASSWD=${16}
+      JAVA5_HOME=${17}
       ### Retrieve the defect number
       if [ ! -e $PATCH_DIR/defectNum ] ; then
         echo "Could not determine the patch to test.  Exiting."
@@ -47,8 +48,8 @@ parseArgs() {
     DEVELOPER)
       ### Set HUDSON to false to indicate that this script is being run by a developer
       HUDSON=false
-      if [[ $# != 9 ]] ; then
-        echo "ERROR: usage $0 DEVELOPER <PATCH_FILE> <SCRATCH_DIR> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <WORKSPACE_BASEDIR>"
+      if [[ $# != 10 ]] ; then
+        echo "ERROR: usage $0 DEVELOPER <PATCH_FILE> <SCRATCH_DIR> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <WORKSPACE_BASEDIR> <JAVA5_HOME>"
         cleanupAndExit 0
       fi
       ### PATCH_FILE contains the location of the patchfile
@@ -74,6 +75,7 @@ parseArgs() {
       FINDBUGS_HOME=$7
       FORREST_HOME=$8
       BASEDIR=$9
+      JAVA5_HOME=$10
       ### Obtain the patch filename to append it to the version number
       defect=`basename $PATCH_FILE` 
       ;;
@@ -450,7 +452,7 @@ runCoreTests () {
   ### Kill any rogue build processes from the last attempt
   $PS -auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null
 
-  $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME create-c++-configure docs tar test-core
+  $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME create-c++-configure docs tar test-core
   if [[ $? != 0 ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT