hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1097011 - in /hadoop/common/branches/branch-0.20-security-203: ./ ivy/ src/contrib/ src/contrib/data_join/ src/contrib/fairscheduler/ src/contrib/hdfsproxy/ src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/ src/contrib/index/ src...
Date Wed, 27 Apr 2011 06:53:30 GMT
Author: omalley
Date: Wed Apr 27 06:53:29 2011
New Revision: 1097011

URL: http://svn.apache.org/viewvc?rev=1097011&view=rev
Log:
HADOOP-7243. Fix contrib unit tests missing dependencies. (omalley)

Modified:
    hadoop/common/branches/branch-0.20-security-203/CHANGES.txt
    hadoop/common/branches/branch-0.20-security-203/ivy/libraries.properties
    hadoop/common/branches/branch-0.20-security-203/src/contrib/build-contrib.xml
    hadoop/common/branches/branch-0.20-security-203/src/contrib/data_join/ivy.xml
    hadoop/common/branches/branch-0.20-security-203/src/contrib/fairscheduler/ivy.xml
    hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/build.xml
    hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java
    hadoop/common/branches/branch-0.20-security-203/src/contrib/index/ivy.xml
    hadoop/common/branches/branch-0.20-security-203/src/contrib/streaming/ivy/libraries.properties
    hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/fs/FileUtil.java

Modified: hadoop/common/branches/branch-0.20-security-203/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/CHANGES.txt?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security-203/CHANGES.txt Wed Apr 27 06:53:29 2011
@@ -2,6 +2,8 @@ Hadoop Change Log
 
 Release 0.20.203.0 - unreleased
 
+    HADOOP-7243. Fix contrib unit tests missing dependencies. (omalley)
+
     MAPREDUCE-2355. Add a dampner to out-of-band heartbeats. (acmurthy) 
  
     HADOOP-7190. Add metrics v1 back for backwards compatibility. (omalley)

Modified: hadoop/common/branches/branch-0.20-security-203/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/ivy/libraries.properties?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/ivy/libraries.properties (original)
+++ hadoop/common/branches/branch-0.20-security-203/ivy/libraries.properties Wed Apr 27 06:53:29
2011
@@ -47,6 +47,7 @@ hsqldb.version=1.8.0.10
 ivy.version=2.1.0
 
 jasper.version=5.5.12
+jackson.version=1.0.1
 #not able to figureout the version of jsp & jsp-api version to get it resolved throught
ivy
 # but still declared here as we are going to have a local copy from the lib folder
 jsp.version=2.1

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/build-contrib.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/build-contrib.xml?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/build-contrib.xml (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/build-contrib.xml Wed Apr
27 06:53:29 2011
@@ -282,7 +282,7 @@
     <mkdir dir="${hadoop.log.dir}"/>
     <junit
       printsummary="yes" showoutput="${test.output}" 
-      haltonfailure="no" fork="yes" maxmemory="256m"
+      haltonfailure="no" fork="yes" maxmemory="512m"
       errorProperty="tests.failed" failureProperty="tests.failed"
       timeout="${test.timeout}">
       

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/data_join/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/data_join/ivy.xml?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/data_join/ivy.xml (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/data_join/ivy.xml Wed Apr
27 06:53:29 2011
@@ -40,5 +40,29 @@
       name="commons-math"
       rev="${commons-math.version}"
       conf="common->default"/>
+    <dependency org="junit"
+      name="junit"
+      rev="${junit.version}"
+      conf="common->default"/>
+    <dependency org="org.mortbay.jetty"
+      name="jetty-util"
+      rev="${jetty-util.version}"
+      conf="common->master"/>
+    <dependency org="org.mortbay.jetty"
+      name="jetty"
+      rev="${jetty.version}"
+      conf="common->default"/>
+    <dependency org="org.codehaus.jackson"
+      name="jackson-core-asl"
+      rev="${jackson.version}"
+      conf="common->default"/>
+    <dependency org="org.codehaus.jackson"
+      name="jackson-mapper-asl"
+      rev="${jackson.version}"
+      conf="common->default"/>
+    <dependency org="commons-httpclient"
+      name="commons-httpclient"
+      rev="${commons-httpclient.version}"
+      conf="common->master"/> 
     </dependencies>
 </ivy-module>

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/fairscheduler/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/fairscheduler/ivy.xml?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/fairscheduler/ivy.xml (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/fairscheduler/ivy.xml Wed
Apr 27 06:53:29 2011
@@ -47,8 +47,32 @@
       rev="${jsp-api-2.1.version}"
       conf="common->master"/>
     <dependency org="org.mortbay.jetty"
-      name="jsp-2.1"
-      rev="${jsp-2.1.version}"
+      name="jetty"
+      rev="${jetty.version}"
+      conf="common->default"/>
+    <dependency org="org.codehaus.jackson"
+      name="jackson-core-asl"
+      rev="${jackson.version}"
+      conf="common->default"/>
+    <dependency org="org.codehaus.jackson"
+      name="jackson-mapper-asl"
+      rev="${jackson.version}"
+      conf="common->default"/>
+    <dependency org="commons-httpclient"
+      name="commons-httpclient"
+      rev="${commons-httpclient.version}"
+      conf="common->master"/> 
+    <dependency org="commons-configuration"
+      name="commons-configuration"
+      rev="${commons-configuration.version}"
+      conf="common->master"/>
+    <dependency org="org.apache.commons"
+      name="commons-math"
+      rev="${commons-math.version}"
+      conf="common->master"/>
+    <dependency org="commons-lang"
+      name="commons-lang"
+      rev="${commons-lang.version}"
       conf="common->master"/>
   </dependencies>
 </ivy-module>

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/build.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/build.xml?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/build.xml (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/build.xml Wed Apr
27 06:53:29 2011
@@ -80,7 +80,8 @@
     </and>
   </condition>
 
-  <property name="ivy.settings.file" location="${hadoop.root}/ivy/ivysettings.xml"/>
+  <property name="ivy.settings.file" 
+            location="${hadoop.root}/ivy/ivysettings.xml"/>
 
   <target name="ivy-init" depends="ivy-init-antlib">
     <ivy:settings id="${ant.project.name}.ivy.settings"/>
@@ -239,7 +240,8 @@
     <copy file="${proxy.conf.dir}/tomcat-web.xml" todir="${src.test.resources}"/>
     <copy file="${proxy.conf.dir}/tomcat-forward-web.xml" todir="${src.test.resources}"/>
 
-    <junit fork="yes" printsummary="yes" errorProperty="tests.failed" failureProperty="tests.failed">
+    <junit fork="yes" printsummary="yes" errorProperty="tests.failed" 
+           failureProperty="tests.failed" showoutput="${test.output}">
       <classpath refid="test.classpath"/>
       <sysproperty key="test.build.data" value="${build.test}/data"/>
       <sysproperty key="build.test" value="${build.test}"/>

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java
(original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java
Wed Apr 27 06:53:29 2011
@@ -26,6 +26,7 @@ import java.util.Random;
 
 import junit.framework.TestCase;
 
+import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.impl.Log4JLogger;
 import org.apache.log4j.Level;
@@ -46,13 +47,8 @@ import org.apache.hadoop.security.author
  * A JUnit test for HdfsProxy
  */
 public class TestHdfsProxy extends TestCase {
-  {
-    ((Log4JLogger) LogFactory.getLog("org.apache.hadoop.hdfs.StateChange"))
-        .getLogger().setLevel(Level.OFF);
-    ((Log4JLogger) DataNode.LOG).getLogger().setLevel(Level.OFF);
-    ((Log4JLogger) FSNamesystem.LOG).getLogger().setLevel(Level.OFF);
-  }
 
+  static final Log LOG = LogFactory.getLog(TestHdfsProxy.class);
   static final URI LOCAL_FS = URI.create("file:///");
 
   private static final int NFILES = 10;
@@ -221,12 +217,13 @@ public class TestHdfsProxy extends TestC
       final FileSystem localfs = FileSystem.get(LOCAL_FS, dfsConf);
       final FileSystem hdfs = cluster.getFileSystem();
       final Configuration proxyConf = new Configuration(false);
-      proxyConf.set("hdfsproxy.dfs.namenode.address", hdfs.getUri().getHost() + ":"
-          + hdfs.getUri().getPort());
+      proxyConf.set("hdfsproxy.dfs.namenode.address", hdfs.getUri().getHost() +
+          ":" + hdfs.getUri().getPort());
       proxyConf.set("hdfsproxy.https.address", "localhost:0");
       final String namenode = hdfs.getUri().toString();
       if (namenode.startsWith("hdfs://")) {
         MyFile[] files = createFiles(LOCAL_FS, TEST_ROOT_DIR + "/srcdat");
+
         hdfs.copyFromLocalFile
 	    (new Path("file:///" + TEST_ROOT_DIR + "/srcdat"),
              new Path(namenode + "/destdat" ));
@@ -240,7 +237,8 @@ public class TestHdfsProxy extends TestC
         final String realProxyAddr = proxyAddr.getHostName() + ":"
             + proxy.getPort();
         final Path proxyUrl = new Path("hftp://" + realProxyAddr);
-	final FileSystem hftp = proxyUrl.getFileSystem(dfsConf);
+        final FileSystem hftp = proxyUrl.getFileSystem(dfsConf);
+
         FileUtil.copy(hftp, new Path(proxyUrl, "/destdat"),
                       hdfs, new Path(namenode + "/copied1"),
                       false, true, proxyConf);
@@ -260,13 +258,21 @@ public class TestHdfsProxy extends TestC
         deldir(localfs, TEST_ROOT_DIR + "/srcdat");
         deldir(localfs, TEST_ROOT_DIR + "/copied2");
       }
-    } finally {
       if (cluster != null) {
         cluster.shutdown();
       }
       if (proxy != null) {
         proxy.stop();
       }
+    } catch (Exception t) {
+      LOG.fatal("caught exception in test", t);
+      if (cluster != null) {
+        cluster.shutdown();
+      }
+      if (proxy != null) {
+        proxy.stop();
+      }
+      throw t;
     }
   }
 }

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/index/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/index/ivy.xml?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/index/ivy.xml (original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/index/ivy.xml Wed Apr 27 06:53:29
2011
@@ -32,6 +32,18 @@
       name="log4j"
       rev="${log4j.version}"
       conf="common->master"/>
+    <dependency org="junit"
+      name="junit"
+      rev="${junit.version}"
+      conf="common->default"/>
+    <dependency org="org.mortbay.jetty"
+      name="jetty-util"
+      rev="${jetty-util.version}"
+      conf="common->master"/>
+    <dependency org="org.mortbay.jetty"
+      name="jetty"
+      rev="${jetty.version}"
+      conf="common->default"/>
     <dependency org="org.apache.lucene"
       name="lucene-core"
       rev="${lucene-core.version}"
@@ -44,5 +56,9 @@
       name="commons-math"
       rev="${commons-math.version}"
       conf="common->default"/>
+    <dependency org="org.codehaus.jackson"
+      name="jackson-core-asl"
+      rev="${jackson.version}"
+      conf="common->default"/>
     </dependencies>
 </ivy-module>

Modified: hadoop/common/branches/branch-0.20-security-203/src/contrib/streaming/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/contrib/streaming/ivy/libraries.properties?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/contrib/streaming/ivy/libraries.properties
(original)
+++ hadoop/common/branches/branch-0.20-security-203/src/contrib/streaming/ivy/libraries.properties
Wed Apr 27 06:53:29 2011
@@ -4,6 +4,5 @@
 #Please list the dependencies name with version if they are different from the ones 
 #listed in the global libraries.properties file (in alphabetical order)
 
-jackson.version=1.0.1
 commons-configuration.version=1.6
 commons-math.version=2.1

Modified: hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/fs/FileUtil.java?rev=1097011&r1=1097010&r2=1097011&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/fs/FileUtil.java
(original)
+++ hadoop/common/branches/branch-0.20-security-203/src/core/org/apache/hadoop/fs/FileUtil.java
Wed Apr 27 06:53:29 2011
@@ -22,17 +22,20 @@ import java.io.*;
 import java.util.Enumeration;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.util.Shell;
 import org.apache.hadoop.util.Shell.ShellCommandExecutor;
-import org.mortbay.log.Log;
 
 /**
  * A collection of file-processing util methods
  */
 public class FileUtil {
+  private static final Log LOG = LogFactory.getLog(FileUtil.class);
+
   /**
    * convert an array of FileStatus to an array of Path
    * 
@@ -596,9 +599,9 @@ public class FileUtil {
     try {
       shExec.execute();
     }catch(IOException e) {
-      if(Log.isDebugEnabled()) {
-        Log.debug("Error while changing permission : " + filename 
-            +" Exception: " + StringUtils.stringifyException(e));
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("Error while changing permission : " + filename 
+                  +" Exception: " + StringUtils.stringifyException(e));
       }
     }
     return shExec.getExitCode();



Mime
View raw message