hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r741706 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/DataNode.java src/test/org/apache/hadoop/dfs/TestDiskError.java src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java
Date Fri, 06 Feb 2009 20:24:55 GMT
Author: rangadi
Date: Fri Feb  6 20:24:55 2009
New Revision: 741706

URL: http://svn.apache.org/viewvc?rev=741706&view=rev
Log:
HADOOP-5114. Remove timeout for accept() in DataNode. This makes accept()
fail in JDK on Windows and causes many tests to fail. (Raghu Angadi)

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java
    hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestDiskError.java
    hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=741706&r1=741705&r2=741706&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Fri Feb  6 20:24:55 2009
@@ -1,5 +1,12 @@
 Hadoop Change Log
 
+Release 0.18.4 - Unreleased
+
+  BUG FIXES
+
+    HADOOP-5114. Remove timeout for accept() in DataNode. This makes accept() 
+    fail in JDK on Windows and causes many tests to fail. (Raghu Angadi)
+
 Release 0.18.3 - 2009-01-27
 
   IMPROVEMENTS

Propchange: hadoop/core/branches/branch-0.18/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  6 20:24:55 2009
@@ -1 +1 @@
-/hadoop/core/trunk/CHANGES.txt:699517,700163,700923,704701,705420,705430,707258,709040,720602,723460,723831,723918,732572
+/hadoop/core/trunk/CHANGES.txt:699517,700163,700923,704701,705420,705430,707258,709040,720602,723460,723831,723918,732572,741703

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java?rev=741706&r1=741705&r2=741706&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java Fri Feb
 6 20:24:55 2009
@@ -316,7 +316,6 @@
           ServerSocketChannel.open().socket() : new ServerSocket();
     Server.bind(ss, socAddr, 0);
     ss.setReceiveBufferSize(DEFAULT_DATA_SOCKET_SIZE); 
-    ss.setSoTimeout(conf.getInt("dfs.dataXceiver.timeoutInMS", 30000)); //30s
     // adjust machine name with the actual port
     tmpPort = ss.getLocalPort();
     selfAddr = new InetSocketAddress(ss.getInetAddress().getHostAddress(),
@@ -589,6 +588,10 @@
           } catch (InterruptedException e) {}
         }
       }
+      try {
+        this.dataXceiveServer.join();
+      } catch (InterruptedException ie) {
+      }
     }
     
     RPC.stopProxy(namenode); // stop the RPC threads
@@ -2976,12 +2979,6 @@
       }
     }
         
-    // wait for dataXceiveServer to terminate
-    try {
-      this.dataXceiveServer.join();
-    } catch (InterruptedException ie) {
-    }
-        
     LOG.info(dnRegistration + ":Finishing DataNode in: "+data);
     shutdown();
   }

Modified: hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestDiskError.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestDiskError.java?rev=741706&r1=741705&r2=741706&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestDiskError.java (original)
+++ hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestDiskError.java Fri
Feb  6 20:24:55 2009
@@ -37,10 +37,18 @@
 /** Test if a datanode can correctly handle errors during block read/write*/
 public class TestDiskError extends TestCase {
   public void testShutdown() throws Exception {
+    if (System.getProperty("os.name").startsWith("Windows")) {
+      /**
+       * This test depends on OS not allowing file creations on a directory
+       * that does not have write permissions for the user. Apparently it is 
+       * not the case on Windows (at least under Cygwin), and possibly AIX.
+       * This is disabled on Windows.
+       */
+      return;
+    }
     // bring up a cluster of 3
     Configuration conf = new Configuration();
     conf.setLong("dfs.block.size", 512L);
-    conf.setInt("dfs.dataXceiver.timeoutInMS", 1000);
     MiniDFSCluster cluster = new MiniDFSCluster(conf, 3, true, null);
     cluster.waitActive();
     FileSystem fs = cluster.getFileSystem();

Modified: hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java?rev=741706&r1=741705&r2=741706&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java
(original)
+++ hadoop/core/branches/branch-0.18/src/test/org/apache/hadoop/dfs/TestOverReplicatedBlocks.java
Fri Feb  6 20:24:55 2009
@@ -11,6 +11,7 @@
 import org.apache.hadoop.dfs.TestDatanodeBlockScanner;
 import org.apache.hadoop.dfs.Block;
 import org.apache.hadoop.dfs.DatanodeID;
+import org.apache.hadoop.dfs.MiniDFSCluster.DataNodeProperties;
 
 import junit.framework.TestCase;
 
@@ -35,11 +36,20 @@
       // corrupt the block on datanode 0
       Block block = DFSTestUtil.getFirstBlock(fs, fileName);
       TestDatanodeBlockScanner.corruptReplica(block.getBlockName(), 0);
+      DataNodeProperties dnProps = cluster.stopDataNode(0);
+      // remove block scanner log to trigger block scanning
       File scanLog = new File(System.getProperty("test.build.data"),
           "dfs/data/data1/current/dncp_block_verification.log.curr");
-      assertTrue(scanLog.delete()); 
+      //wait for one minute for deletion to succeed;
+      for(int i=0; !scanLog.delete(); i++) {
+        assertTrue("Could not delete log file in one minute", i < 60);
+        try {
+          Thread.sleep(1000);
+        } catch (InterruptedException ignored) {}
+      }
+      
       // restart the datanode so the corrupt replica will be detected
-      cluster.restartDataNode(0);
+      cluster.restartDataNode(dnProps);
       DFSTestUtil.waitReplication(fs, fileName, (short)2);
       
       final DatanodeID corruptDataNode = 



Mime
View raw message