hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1204124 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
Date Sun, 20 Nov 2011 04:27:59 GMT
Author: eli
Date: Sun Nov 20 04:27:59 2011
New Revision: 1204124

URL: http://svn.apache.org/viewvc?rev=1204124&view=rev
Log:
HDFS-2454. Move maxXceiverCount check to before starting the thread in dataXceiver. Contributed
by Harsh J

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1204124&r1=1204123&r2=1204124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Sun Nov 20 04:27:59 2011
@@ -127,6 +127,9 @@ Release 0.23.1 - UNRELEASED
     HDFS-2568. Use a set to manage child sockets in XceiverServer.
     (harsh via eli)
 
+    HDFS-2454. Move maxXceiverCount check to before starting the
+    thread in dataXceiver. (harsh via eli)
+
     HDFS-2536. Remove unused imports. (harsh via eli)
 
   OPTIMIZATIONS

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java?rev=1204124&r1=1204123&r2=1204124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
Sun Nov 20 04:27:59 2011
@@ -163,14 +163,6 @@ class DataXceiver extends Receiver imple
           s.setSoTimeout(stdTimeout);
         }
 
-        // Make sure the xceiver count is not exceeded
-        int curXceiverCount = datanode.getXceiverCount();
-        if (curXceiverCount > dataXceiverServer.maxXceiverCount) {
-          throw new IOException("xceiverCount " + curXceiverCount
-                                + " exceeds the limit of concurrent xcievers "
-                                + dataXceiverServer.maxXceiverCount);
-        }
-
         opStartTime = now();
         processOp(op);
         ++opsProcessed;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java?rev=1204124&r1=1204123&r2=1204124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
Sun Nov 20 04:27:59 2011
@@ -135,6 +135,15 @@ class DataXceiverServer implements Runna
       try {
         s = ss.accept();
         s.setTcpNoDelay(true);
+
+        // Make sure the xceiver count is not exceeded
+        int curXceiverCount = datanode.getXceiverCount();
+        if (curXceiverCount > maxXceiverCount) {
+          throw new IOException("Xceiver count " + curXceiverCount
+              + " exceeds the limit of concurrent xcievers: "
+              + maxXceiverCount);
+        }
+
         new Daemon(datanode.threadGroup, new DataXceiver(s, datanode, this))
             .start();
       } catch (SocketTimeoutException ignored) {



Mime
View raw message