Author: omalley
Date: Fri Mar 4 03:49:59 2011
New Revision: 1077188
URL: http://svn.apache.org/viewvc?rev=1077188&view=rev
Log:
commit ccd02ac5f778e6ea3a420e96277d7acd445fa1d9
Author: Hemanth Yamijala <[email protected]>
Date: Mon Feb 22 14:24:21 2010 +0530
MAPREDUCE:670 from
https://issues.apache.org/jira/secure/attachment/12436553/mapreduce-670-y20.patch
+++ b/YAHOO-CHANGES.txt
+ MAPREDUCE-670. Creates ant target for 10 mins patch test build.
+ (Jothi Padmanabhan via gkesavan)
+
Added:
hadoop/common/branches/branch-0.20-security-patches/src/test/all-tests
hadoop/common/branches/branch-0.20-security-patches/src/test/commit-tests
Modified:
hadoop/common/branches/branch-0.20-security-patches/build.xml
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/Task.java
Modified: hadoop/common/branches/branch-0.20-security-patches/build.xml
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/build.xml?rev=1077188&r1=1077187&r2=1077188&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/build.xml (original)
+++ hadoop/common/branches/branch-0.20-security-patches/build.xml Fri Mar 4
03:49:59 2011
@@ -119,6 +119,9 @@
<property name="test.junit.haltonfailure" value="no" />
<property name="test.junit.maxmemory" value="512m" />
<property name="test.tools.input.dir"
value="${basedir}/src/test/tools/data"/>
+
+ <property name="test.commit.tests.file" value="${test.src.dir}/commit-tests"
/>
+ <property name="test.all.tests.file" value="${test.src.dir}/all-tests" />
<property name="test.libhdfs.conf.dir"
value="${c++.libhdfs.src}/tests/conf"/>
<property name="test.libhdfs.dir" value="${test.build.dir}/libhdfs"/>
@@ -851,104 +854,93 @@
<!-- ================================================================== -->
<!-- Run unit tests -->
<!-- ================================================================== -->
- <target name="test-core" depends="jar-test" description="Run core unit
tests">
- <macro-test-runner classpath="${test.classpath.id}"
- test.dir="${test.build.dir}"
- fileset.dir="${test.src.dir}"
- >
- </macro-test-runner>
- </target>
-
+
+ <!-- Define a macro that will be used for fast and all test runs -->
<macrodef name="macro-test-runner">
- <attribute name="classpath" />
- <attribute name="test.dir" />
- <attribute name="fileset.dir" />
- <attribute name="hadoop.home" default="" />
- <attribute name="hadoop.conf.dir" default="" />
- <attribute name="hadoop.conf.dir.deployed" default="" />
+ <attribute name="test.file" />
<sequential>
- <delete dir="@{test.dir}/data" />
- <mkdir dir="@{test.dir}/data" />
- <delete dir="@{test.dir}/logs" />
- <mkdir dir="@{test.dir}/logs" />
- <copy file="${test.src.dir}/hadoop-policy.xml"
- todir="@{test.dir}/extraconf" />
+ <delete file="${test.build.dir}/testsfailed"/>
+ <delete dir="${test.build.data}"/>
+ <mkdir dir="${test.build.data}"/>
+ <delete dir="${test.log.dir}"/>
+ <mkdir dir="${test.log.dir}"/>
+ <copy file="${test.src.dir}/hadoop-policy.xml"
+ todir="${test.build.extraconf}" />
<copy file="${test.src.dir}/fi-site.xml"
- todir="@{test.dir}/extraconf" />
+ todir="${test.build.extraconf}" />
<junit showoutput="${test.output}"
- printsummary="${test.junit.printsummary}"
- haltonfailure="${test.junit.haltonfailure}"
- fork="yes"
- forkmode="${test.junit.fork.mode}"
- maxmemory="${test.junit.maxmemory}"
- dir="${basedir}"
- timeout="${test.timeout}"
- errorProperty="tests.failed"
- failureProperty="tests.failed">
- <sysproperty key="test.build.data" value="${test.build.data}" />
- <sysproperty key="test.tools.input.dir"
- value="${test.tools.input.dir}" />
- <sysproperty key="test.cache.data" value="${test.cache.data}" />
- <sysproperty key="test.debug.data" value="${test.debug.data}" />
- <sysproperty key="hadoop.log.dir" value="${test.log.dir}" />
- <sysproperty key="test.src.dir" value="${test.src.dir}" />
- <sysproperty key="taskcontroller-path" value="${taskcontroller-path}"
/>
- <sysproperty key="taskcontroller-user" value="${taskcontroller-user}"
/>
- <sysproperty key="test.build.extraconf"
- value="@{test.dir}/extraconf" />
- <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml" />
+ printsummary="${test.junit.printsummary}"
+ haltonfailure="${test.junit.haltonfailure}"
+ fork="yes"
+ forkmode="${test.junit.fork.mode}"
+ maxmemory="${test.junit.maxmemory}"
+ dir="${basedir}" timeout="${test.timeout}"
+ errorProperty="tests.failed" failureProperty="tests.failed">
+ <sysproperty key="test.build.data" value="${test.build.data}"/>
+ <sysproperty key="test.tools.input.dir"
value="${test.tools.input.dir}"/>
+ <sysproperty key="test.cache.data" value="${test.cache.data}"/>
+ <sysproperty key="test.debug.data" value="${test.debug.data}"/>
+ <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
+ <sysproperty key="test.src.dir" value="${test.src.dir}"/>
+ <sysproperty key="taskcontroller-path" value="${taskcontroller-path}"/>
+ <sysproperty key="taskcontroller-ugi" value="${taskcontroller-ugi}"/>
+ <sysproperty key="test.build.extraconf"
value="${test.build.extraconf}" />
+ <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
<sysproperty key="java.library.path"
-
value="${build.native}/lib:${lib.dir}/native/${build.platform}" />
- <sysproperty key="install.c++.examples"
- value="${install.c++.examples}" />
- <sysproperty key="testjar"
- value="@{test.dir}/testjar" />
- <!-- System properties that are specifically set for system tests -->
- <sysproperty key="test.system.hdrc.hadoophome" value="@{hadoop.home}"
/>
- <sysproperty key="test.system.hdrc.hadoopconfdir"
- value="@{hadoop.conf.dir}" />
- <sysproperty key="test.system.hdrc.deployed.hadoopconfdir"
- value="@{hadoop.conf.dir.deployed}" />
+ value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
+ <sysproperty key="install.c++.examples"
value="${install.c++.examples}"/>
<!-- set io.compression.codec.lzo.class in the child jvm only if it is
set -->
<syspropertyset dynamic="no">
- <propertyref name="io.compression.codec.lzo.class" />
+ <propertyref name="io.compression.codec.lzo.class"/>
</syspropertyset>
<!-- set compile.c++ in the child jvm only if it is set -->
<syspropertyset dynamic="no">
- <propertyref name="compile.c++" />
+ <propertyref name="compile.c++"/>
</syspropertyset>
- <classpath refid="@{classpath}" />
+ <classpath refid="${test.classpath.id}"/>
<syspropertyset id="FaultProbabilityProperties">
- <propertyref regex="fi.*" />
+ <propertyref regex="fi.*"/>
</syspropertyset>
<formatter type="${test.junit.output.format}" />
- <batchtest todir="@{test.dir}" if="tests.notestcase">
- <fileset dir="@{fileset.dir}"
- includes="**/${test.include}.java"
- excludes="**/${test.exclude}.java aop/** system/**" />
+ <batchtest todir="${test.build.dir}" if="tests.notestcase">
+ <fileset dir="${test.src.dir}"
+ excludes="**/${test.exclude}.java aop/**">
+ <patternset>
+ <includesfile name="@{test.file}"/>
+ </patternset>
+ </fileset>
</batchtest>
<batchtest todir="${test.build.dir}" if="tests.notestcase.fi">
<fileset dir="${test.src.dir}/aop"
- includes="**/${test.include}.java"
- excludes="**/${test.exclude}.java" />
+ includes="**/${test.include}.java"
+ excludes="**/${test.exclude}.java" />
</batchtest>
- <batchtest todir="@{test.dir}" if="tests.testcase">
- <fileset dir="@{fileset.dir}"
- includes="**/${testcase}.java" excludes="aop/** system/**"/>
+ <batchtest todir="${test.build.dir}" if="tests.testcase">
+ <fileset dir="${test.src.dir}"
+ includes="**/${testcase}.java" excludes="aop/**"/>
</batchtest>
<batchtest todir="${test.build.dir}" if="tests.testcase.fi">
- <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java" />
+ <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java"/>
</batchtest>
<!--The following batch is for very special occasions only when
- a non-FI tests are needed to be executed against
FI-environment -->
+ a non-FI tests are needed to be executed against FI-environment -->
<batchtest todir="${test.build.dir}" if="tests.testcaseonly">
- <fileset dir="${test.src.dir}" includes="**/${testcase}.java" />
+ <fileset dir="${test.src.dir}" includes="**/${testcase}.java"/>
</batchtest>
</junit>
<antcall target="checkfailure"/>
</sequential>
</macrodef>
+ <target name="test-core" depends="jar-test" description="Run core unit
tests">
+ <macro-test-runner test.file="${test.all.tests.file}" />
+ </target>
+
+ <target name="test-commit" depends="jar-test"
+ description="Run approx 10-minute set of unit tests prior to commiting">
+ <macro-test-runner test.file="${test.commit.tests.file}" />
+ </target>
+
<target name="checkfailure" if="tests.failed">
<touch file="${test.build.dir}/testsfailed"/>
<fail unless="continueOnFailure">Tests failed!</fail>
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=1077188&r1=1077187&r2=1077188&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Fri Mar 4 03:49:59 2011
@@ -74,7 +74,7 @@ import org.apache.hadoop.util.StringUtil
*
* This is NOT a public interface!
*/
-class JobInProgress {
+public class JobInProgress {
/**
* Used when the a kill is issued to a job which is initializing.
*/
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=1077188&r1=1077187&r2=1077188&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobTracker.java
Fri Mar 4 03:49:59 2011
@@ -824,7 +824,7 @@ public class JobTracker implements MRCon
synchronized (potentiallyFaultyTrackers) {
fi = potentiallyFaultyTrackers.get(hostName);
if (fi == null && createIfNeccessary) {
- fi = new FaultInfo();
+ fi = new FaultInfo(clock.getTime());
potentiallyFaultyTrackers.put(hostName, fi);
}
}
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/Task.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/Task.java?rev=1077188&r1=1077187&r2=1077188&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/Task.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/Task.java
Fri Mar 4 03:49:59 2011
@@ -151,7 +151,6 @@ abstract public class Task implements Wr
private String pidFile = "";
protected TaskUmbilicalProtocol umbilical;
private int numSlotsRequired;
- protected JobTokens jobTokens=null; // storage of the secret keys
protected SecretKey tokenSecret;
////////////////////////////////////////////
Added: hadoop/common/branches/branch-0.20-security-patches/src/test/all-tests
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/test/all-tests?rev=1077188&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/test/all-tests
(added)
+++ hadoop/common/branches/branch-0.20-security-patches/src/test/all-tests Fri
Mar 4 03:49:59 2011
@@ -0,0 +1 @@
+**/Test*.java
Added: hadoop/common/branches/branch-0.20-security-patches/src/test/commit-tests
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/test/commit-tests?rev=1077188&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/test/commit-tests
(added)
+++ hadoop/common/branches/branch-0.20-security-patches/src/test/commit-tests
Fri Mar 4 03:49:59 2011
@@ -0,0 +1 @@
+**/TestCommandLineJobSubmission.java