hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r824960 - in /hadoop/common/branches/branch-0.21: ./ .eclipse.templates/ ivy/ src/ src/test/ src/test/aop/ src/test/aop/build/ src/test/aop/org/ src/test/aop/org/apache/ src/test/aop/org/apache/hadoop/ src/test/aop/org/apache/hadoop/fi/
Date Tue, 13 Oct 2009 22:30:43 GMT
Author: cos
Date: Tue Oct 13 22:30:43 2009
New Revision: 824960

URL: http://svn.apache.org/viewvc?rev=824960&view=rev
Log:
HADOOP-6204. Merge -r 824899:824942 from trunk to branch 0.21

Added:
    hadoop/common/branches/branch-0.21/src/test/aop/
      - copied from r824942, hadoop/common/trunk/src/test/aop/
    hadoop/common/branches/branch-0.21/src/test/aop/build/
      - copied from r824942, hadoop/common/trunk/src/test/aop/build/
    hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml
      - copied unchanged from r824942, hadoop/common/trunk/src/test/aop/build/aop.xml
    hadoop/common/branches/branch-0.21/src/test/aop/org/
      - copied from r824942, hadoop/common/trunk/src/test/aop/org/
    hadoop/common/branches/branch-0.21/src/test/aop/org/apache/
      - copied from r824942, hadoop/common/trunk/src/test/aop/org/apache/
    hadoop/common/branches/branch-0.21/src/test/aop/org/apache/hadoop/
      - copied from r824942, hadoop/common/trunk/src/test/aop/org/apache/hadoop/
    hadoop/common/branches/branch-0.21/src/test/aop/org/apache/hadoop/fi/
      - copied from r824942, hadoop/common/trunk/src/test/aop/org/apache/hadoop/fi/
    hadoop/common/branches/branch-0.21/src/test/aop/org/apache/hadoop/fi/FiConfig.java
      - copied unchanged from r824942, hadoop/common/trunk/src/test/aop/org/apache/hadoop/fi/FiConfig.java
    hadoop/common/branches/branch-0.21/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java
      - copied unchanged from r824942, hadoop/common/trunk/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java
    hadoop/common/branches/branch-0.21/src/test/fi-site.xml
      - copied unchanged from r824942, hadoop/common/trunk/src/test/fi-site.xml
Modified:
    hadoop/common/branches/branch-0.21/   (props changed)
    hadoop/common/branches/branch-0.21/.eclipse.templates/.classpath
    hadoop/common/branches/branch-0.21/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/branch-0.21/build.xml
    hadoop/common/branches/branch-0.21/ivy.xml
    hadoop/common/branches/branch-0.21/ivy/libraries.properties
    hadoop/common/branches/branch-0.21/src/saveVersion.sh

Propchange: hadoop/common/branches/branch-0.21/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 13 22:30:43 2009
@@ -1,2 +1,2 @@
-/hadoop/common/trunk:818543,819670
+/hadoop/common/trunk:818543,819670,824900-824942
 /hadoop/core/branches/branch-0.19/core:713112

Modified: hadoop/common/branches/branch-0.21/.eclipse.templates/.classpath
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/.eclipse.templates/.classpath?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/.eclipse.templates/.classpath (original)
+++ hadoop/common/branches/branch-0.21/.eclipse.templates/.classpath Tue Oct 13 22:30:43 2009
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test/aop"/>
 	<classpathentry kind="src" path="src/test/core"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>

Modified: hadoop/common/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/CHANGES.txt?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.21/CHANGES.txt Tue Oct 13 22:30:43 2009
@@ -206,6 +206,9 @@
     HADOOP-6240. Add new FileContext rename operation that posix compliant
     that allows overwriting existing destination. (suresh)
 
+    HADOOP-6205. Implementing aspects development and fault injeciton
+    framework for Hadoop (cos)
+
   IMPROVEMENTS
 
     HADOOP-4565. Added CombineFileInputFormat to use data locality information

Propchange: hadoop/common/branches/branch-0.21/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 13 22:30:43 2009
@@ -1,4 +1,4 @@
-/hadoop/common/trunk/CHANGES.txt:818543,819670,823756
+/hadoop/common/trunk/CHANGES.txt:818543,819670,823756,824900-824942
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:776175-785643,785929-786278

Modified: hadoop/common/branches/branch-0.21/build.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/build.xml?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/build.xml (original)
+++ hadoop/common/branches/branch-0.21/build.xml Tue Oct 13 22:30:43 2009
@@ -252,7 +252,7 @@
     </copy>
 
     <exec executable="sh">
-       <arg line="src/saveVersion.sh ${version}"/>
+       <arg line="src/saveVersion.sh ${version} ${build.dir}"/>
     </exec>
 	
    <exec executable="sh">
@@ -260,6 +260,8 @@
    </exec>
   </target>
 
+  <import file="${test.src.dir}/aop/build/aop.xml"/>
+
   <!-- ====================================================== -->
   <!-- Compile the Java files                                 -->
   <!-- ====================================================== -->
@@ -381,7 +383,8 @@
     <tar compression="gzip" destfile="${build.classes}/bin.tgz">
       <tarfileset dir="bin" mode="755"/>
     </tar>
-    <jar jarfile="${hadoop-core.jar}"
+    <property name="jar.properties.list" value="commons-logging.properties, log4j.properties,
hadoop-metrics.properties" />
+    <jar jarfile="${build.dir}/${final.name}.jar"
          basedir="${build.classes}">
       <manifest>
         <section name="org/apache/hadoop">
@@ -390,13 +393,11 @@
           <attribute name="Implementation-Vendor" value="Apache"/>
         </section>
       </manifest>
-      <fileset file="${conf.dir}/commons-logging.properties"/>
-      <fileset file="${conf.dir}/log4j.properties"/>
-      <fileset file="${conf.dir}/hadoop-metrics.properties"/>
+      <fileset dir="${conf.dir}" includes="${jar.properties.list}" />
+      <fileset file="${jar.extra.properties.list}" />
     </jar>
   </target>
 
-
   <!-- ================================================================== -->
   <!-- Make the Hadoop metrics jar. (for use outside Hadoop)              -->
   <!-- ================================================================== -->
@@ -431,6 +432,9 @@
   <!-- ================================================================== -->
   <!-- Compile test code                                                  --> 
   <!-- ================================================================== -->
+  <!-- This is a wrapper for fault-injection needs-->
+  <target name="compile-tests" depends="compile-core-test"/> 
+
   <target name="compile-core-test" depends="compile-core-classes, ivy-retrieve-test, generate-test-records,
generate-avro-records">
     <mkdir dir="${test.core.build.classes}"/>
     <javac 
@@ -498,6 +502,75 @@
   </target>
 
   <!-- ================================================================== -->
+  <!-- Fault injection customization section.
+       These targets ought to be copied over to other projects and modified
+       as needed -->
+  <!-- ================================================================== -->
+  <target name="run-test-core-fault-inject" depends="injectfaults" 
+	  description="Run full set of the unit tests with fault injection">
+    <macro-run-tests-fault-inject target.name="run-test-core"
+      testcasesonly="false"/>
+  </target>
+
+  <target name="jar-test-fault-inject" depends="injectfaults" 
+    description="Make hadoop-test-fi.jar">
+    <macro-jar-test-fault-inject
+      target.name="jar-test"
+      jar.final.name="test.final.name"
+      jar.final.value="${test.final.name}-fi" />
+  </target>
+
+  <target name="jar-fault-inject" depends="injectfaults" 
+    description="Make hadoop-fi.jar">
+    <macro-jar-fault-inject
+      target.name="jar"
+      jar.final.name="final.name"
+      jar.final.value="${final.name}-fi" />
+  </target>
+
+  <!--This target is not included into the the top level list of target
+  for it serves a special "regression" testing purpose of non-FI tests in
+  FI environment -->
+  <target name="run-fault-inject-with-testcaseonly" depends="injectfaults">
+    <fail unless="testcase">Can't run this target without -Dtestcase setting!
+    </fail>
+    <macro-run-tests-fault-inject target.name="run-test-core" 
+      testcasesonly="true"/>
+  </target>
+  <!-- ================================================================== -->
+  <!-- End of Fault injection customization section                       -->
+  <!-- ================================================================== -->
+
+  <condition property="tests.notestcase">
+    <and>
+      <isfalse value="${test.fault.inject}"/>
+      <not>
+        <isset property="testcase"/>
+      </not>
+    </and>
+  </condition>
+  <condition property="tests.notestcase.fi">
+    <and>
+      <not>
+        <isset property="testcase" />
+      </not>
+      <istrue value="${test.fault.inject}" />
+    </and>
+  </condition>
+  <condition property="tests.testcase">
+    <and>
+      <isfalse value="${test.fault.inject}" />
+      <isset property="testcase" />
+    </and>
+  </condition>
+  <condition property="tests.testcase.fi">
+    <and>
+      <istrue value="${test.fault.inject}" />
+      <isset property="testcase" />
+    </and>
+  </condition>
+	     
+  <!-- ================================================================== -->
   <!-- Run unit tests                                                     --> 
   <!-- ================================================================== -->
   <target name="run-test-core" depends="compile-core-test" description="Run core unit
tests">
@@ -508,6 +581,8 @@
     <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.build.extraconf}" />
     <junit showoutput="${test.output}"
       printsummary="${test.junit.printsummary}"
       haltonfailure="${test.junit.haltonfailure}"
@@ -536,13 +611,30 @@
          <propertyref name="compile.c++"/>
       </syspropertyset>
       <classpath refid="test.classpath"/>
+      <syspropertyset id="FaultProbabilityProperties">
+        <propertyref regex="fi.*"/>
+      </syspropertyset>
       <formatter type="${test.junit.output.format}" />
-      <batchtest todir="${test.build.dir}" unless="testcase">
+      <batchtest todir="${test.build.dir}" if="tests.notestcase">
         <fileset dir="${test.src.dir}/core"
 	         includes="**/${test.include}.java"
 		 excludes="**/${test.exclude}.java" />
       </batchtest>
-      <batchtest todir="${test.build.dir}" if="testcase">
+      <batchtest todir="${test.build.dir}" if="tests.notestcase.fi">
+        <fileset dir="${test.src.dir}/aop"
+          includes="**/${test.include}.java"
+          excludes="**/${test.exclude}.java" />
+      </batchtest>
+      <batchtest todir="${test.build.dir}" if="tests.testcase">
+        <fileset dir="${test.src.dir}/core" includes="**/${testcase}.java"/>
+      </batchtest>
+      <batchtest todir="${test.build.dir}" if="tests.testcase.fi">
+        <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 -->
+      <batchtest todir="${test.build.dir}" if="special.fi.testcasesonly">
+        <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java"/>
         <fileset dir="${test.src.dir}/core" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
@@ -566,6 +658,7 @@
     <delete file="${test.build.dir}/testsfailed"/> 
     <property name="continueOnFailure" value="true"/> 
     <antcall target="run-test-core"/>
+    <antcall target="run-test-core-fault-inject"/>
     <available file="${test.build.dir}/testsfailed" property="testsfailed"/>
     <fail if="testsfailed">Tests failed!</fail> 
   </target>
@@ -1045,7 +1138,7 @@
   <!-- ================================================================== -->
   <!-- Clean.  Delete the build files, and their directories              -->
   <!-- ================================================================== -->
-  <target name="clean" depends="clean-contrib" description="Clean.  Delete the build files,
and their directories">
+  <target name="clean" depends="clean-contrib, clean-fi" description="Clean.  Delete the
build files, and their directories">
     <delete dir="${build.dir}"/>
     <delete dir="${docs.src}/build"/>
     <delete dir="${src.docs.cn}/build"/>

Modified: hadoop/common/branches/branch-0.21/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/ivy.xml?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/ivy.xml (original)
+++ hadoop/common/branches/branch-0.21/ivy.xml Tue Oct 13 22:30:43 2009
@@ -285,6 +285,16 @@
       name="paranamer-ant"
       rev="${paranamer.version}"
       conf="common->default"/>
+    <dependency org="org.aspectj"
+      name="aspectjrt"
+      rev="${aspectj.version}"
+      conf="common->default">
+    </dependency>
+    <dependency org="org.aspectj"
+      name="aspectjtools"
+      rev="${aspectj.version}"
+      conf="common->default">
+    </dependency>
     </dependencies>
-  
+
 </ivy-module>

Modified: hadoop/common/branches/branch-0.21/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/ivy/libraries.properties?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/ivy/libraries.properties (original)
+++ hadoop/common/branches/branch-0.21/ivy/libraries.properties Tue Oct 13 22:30:43 2009
@@ -77,3 +77,5 @@
 
 xmlenc.version=0.52
 xerces.version=1.4.4
+
+aspectj.version=1.6.4

Modified: hadoop/common/branches/branch-0.21/src/saveVersion.sh
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/src/saveVersion.sh?rev=824960&r1=824959&r2=824960&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/src/saveVersion.sh (original)
+++ hadoop/common/branches/branch-0.21/src/saveVersion.sh Tue Oct 13 22:30:43 2009
@@ -21,6 +21,7 @@
 unset LANG
 unset LC_CTYPE
 version=$1
+build_dir=$2
 user=`whoami`
 date=`date`
 cwd=`pwd`
@@ -43,12 +44,12 @@
 fi
 srcChecksum=`find src -name '*.java' | LC_ALL=C sort | xargs md5sum | md5sum | cut -d ' '
-f 1`
 
-mkdir -p build/src/org/apache/hadoop
+mkdir -p $build_dir/src/org/apache/hadoop
 cat << EOF | \
   sed -e "s/VERSION/$version/" -e "s/USER/$user/" -e "s/DATE/$date/" \
       -e "s|URL|$url|" -e "s/REV/$revision/" \
       -e "s|BRANCH|$branch|" -e "s/SRCCHECKSUM/$srcChecksum/" \
-      > build/src/org/apache/hadoop/package-info.java
+      > $build_dir/src/org/apache/hadoop/package-info.java
 /*
  * Generated by src/saveVersion.sh
  */



Mime
View raw message