hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r683363 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/DataNode.java src/test/log4j.properties
Date Wed, 06 Aug 2008 18:40:24 GMT
Author: omalley
Date: Wed Aug  6 11:40:23 2008
New Revision: 683363

URL: http://svn.apache.org/viewvc?rev=683363&view=rev
Log:
HADOOP-3859. Merge -r 683360:683361 from trunk to branch 0.18.

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DataNode.java
    hadoop/core/branches/branch-0.18/src/test/log4j.properties

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=683363&r1=683362&r2=683363&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Wed Aug  6 11:40:23 2008
@@ -821,6 +821,9 @@
     FileSystem.delete rather than the FileUtil.fullyDelete. (Amareshwari
     Sri Ramadasu via acmurthy)  
 
+    HADOOP-3859. Allow the maximum number of xceivers in the data node to
+    be configurable. (Johan Oskarsson via omalley)
+
 Release 0.17.1 - 2008-06-23
 
   INCOMPATIBLE CHANGES

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=683363&r1=683362&r2=683363&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 Wed Aug
 6 11:40:23 2008
@@ -139,6 +139,14 @@
   private static final Random R = new Random();
 
   /**
+   * Maximal number of concurrent xceivers per node.
+   * Enforcing the limit is required in order to avoid data-node
+   * running out of memory.
+   */
+  private static final int MAX_XCEIVER_COUNT = 256;
+  private int maxXceiverCount = MAX_XCEIVER_COUNT;
+  
+  /**
    * We need an estimate for block size to check if the disk partition has
    * enough space. For now we set it to be the default block size set
    * in the server side configuration, which is not ideal because the
@@ -282,6 +290,7 @@
     this.dnRegistration.setName(machineName + ":" + tmpPort);
     LOG.info("Opened info server at " + tmpPort);
       
+    this.maxXceiverCount = conf.getInt("dfs.datanode.max.xcievers", MAX_XCEIVER_COUNT);
     this.threadGroup = new ThreadGroup("dataXceiveServer");
     this.dataXceiveServer = new Daemon(threadGroup, new DataXceiveServer(ss));
     this.threadGroup.setDaemon(true); // auto destroy when empty
@@ -608,13 +617,6 @@
     shutdown();
   }
     
-  /**
-   * Maximal number of concurrent xceivers per node.
-   * Enforcing the limit is required in order to avoid data-node
-   * running out of memory.
-   */
-  private final static int MAX_XCEIVER_COUNT = 256;
-
   /** Number of concurrent xceivers per node. */
   int getXceiverCount() {
     return threadGroup == null ? 0 : threadGroup.activeCount();
@@ -1024,10 +1026,10 @@
         byte op = in.readByte();
         // Make sure the xciver count is not exceeded
         int curXceiverCount = getXceiverCount();
-        if(curXceiverCount > MAX_XCEIVER_COUNT) {
+        if (curXceiverCount > maxXceiverCount) {
           throw new IOException("xceiverCount " + curXceiverCount
                                 + " exceeds the limit of concurrent xcievers "
-                                + MAX_XCEIVER_COUNT);
+                                + maxXceiverCount);
         }
         long startTime = now();
         switch ( op ) {

Modified: hadoop/core/branches/branch-0.18/src/test/log4j.properties
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/test/log4j.properties?rev=683363&r1=683362&r2=683363&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/test/log4j.properties (original)
+++ hadoop/core/branches/branch-0.18/src/test/log4j.properties Wed Aug  6 11:40:23 2008
@@ -4,4 +4,10 @@
 log4j.threshhold=ALL
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} %x- %m%n
+
+#this is a logger that prints line numbers; it is unused but can be switched
+#on if desired
+log4j.appender.linenumbers=org.apache.log4j.ConsoleAppender
+log4j.appender.linenumbers.layout=org.apache.log4j.PatternLayout
+log4j.appender.linenumbers.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L))
%x - %m%n



Mime
View raw message