ソースを参照

HADOOP-583. Reduce logging level of reconnect attempts. Contributed by Konstantin.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@464693 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 年 前
コミット
40eeeaf846
2 ファイル変更8 行追加2 行削除
  1. 4 0
      CHANGES.txt
  2. 4 2
      src/java/org/apache/hadoop/dfs/DFSClient.java

+ 4 - 0
CHANGES.txt

@@ -7,6 +7,10 @@ Trunk (unreleased changes)
     variables when resolving executable program names.
     (Dhruba Borthakur via cutting) 
 
+ 2. HADOOP-583.  In DFSClient, reduce the log level of re-connect
+    attempts from 'info' to 'debug', so they are not normally shown.
+    (Konstantin Shvachko via cutting)
+
 
 Release 0.7.1 - 2006-10-11
 

+ 4 - 2
src/java/org/apache/hadoop/dfs/DFSClient.java

@@ -608,7 +608,8 @@ class DFSClient implements FSConstants {
                     this.blockStream = in;
                 } catch (IOException ex) {
                     // Put chosen node into dead list, continue
-                    LOG.info("Failed to connect to " + targetAddr + ":" + ex);
+                    LOG.debug("Failed to connect to " + targetAddr + ":" 
+                              + StringUtils.stringifyException(ex));
                     deadNodes.add(chosenNode);
                     if (s != null) {
                         try {
@@ -771,7 +772,8 @@ class DFSClient implements FSConstants {
               int nread = in.read(buf, offset, (int)(end - start + 1));
             } catch (IOException ex) {
               // Put chosen node into dead list, continue
-              LOG.info("Failed to connect to " + targetAddr + ":" + ex);
+              LOG.debug("Failed to connect to " + targetAddr + ":" 
+                        + StringUtils.stringifyException(ex));
               deadNodes.add(chosenNode);
               if (dn != null) {
                 try {