hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1375356 - in /hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs: ./ src/main/java/org/apache/hadoop/hdfs/qjournal/client/
Date Tue, 21 Aug 2012 00:48:07 GMT
Author: atm
Date: Tue Aug 21 00:48:06 2012
New Revision: 1375356

URL: http://svn.apache.org/viewvc?rev=1375356&view=rev
Log:
HDFS-3826. QJM: Some trivial logging / exception text improvements. Contributed by Todd Lipcon
and Aaron T. Myers.

Modified:
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumException.java
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt?rev=1375356&r1=1375355&r2=1375356&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
Tue Aug 21 00:48:06 2012
@@ -28,3 +28,5 @@ HDFS-3797. QJM: add segment txid as a pa
 HDFS-3800. improvements to QJM fault testing (todd)
 
 HDFS-3823. QJM: TestQJMWithFaults fails occasionally because of missed setting of HTTP port.
(todd and atm)
+
+HDFS-3826. QJM: Some trivial logging / exception text improvements. (todd and atm)

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumException.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumException.java?rev=1375356&r1=1375355&r2=1375356&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumException.java
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumException.java
Tue Aug 21 00:48:06 2012
@@ -51,12 +51,14 @@ class QuorumException extends IOExceptio
     msg.append(simpleMsg).append(". ");
     if (!successes.isEmpty()) {
       msg.append(successes.size()).append(" successful responses:\n");
+      
       Joiner.on("\n")
-          .useForNull("null")
+          .useForNull("null [success]")
           .withKeyValueSeparator(": ")
           .appendTo(msg, successes);
       msg.append("\n");
     }
+    
     msg.append(exceptions.size() + " exceptions thrown:\n");
     boolean isFirst = true;
     
@@ -70,8 +72,10 @@ class QuorumException extends IOExceptio
       
       if (e.getValue() instanceof RuntimeException) {
         msg.append(StringUtils.stringifyException(e.getValue()));
-      } else {
+      } else if (e.getValue().getLocalizedMessage() != null) {
         msg.append(e.getValue().getLocalizedMessage());
+      } else {
+        msg.append(StringUtils.stringifyException(e.getValue()));
       }
     }
     return new QuorumException(msg.toString());

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java?rev=1375356&r1=1375355&r2=1375356&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
Tue Aug 21 00:48:06 2012
@@ -209,7 +209,7 @@ public class QuorumJournalManager implem
         loggers.prepareRecovery(segmentTxId);
     Map<AsyncLogger, PrepareRecoveryResponseProto> prepareResponses=
         loggers.waitForWriteQuorum(prepare, prepareRecoveryTimeoutMs);
-    LOG.info("Recovery prepare phase complete. Responses: " +
+    LOG.info("Recovery prepare phase complete. Responses:\n" +
         QuorumCall.mapToString(prepareResponses));
 
     // Determine the logger who either:
@@ -434,7 +434,6 @@ public class QuorumJournalManager implem
       
       for (RemoteEditLog remoteLog : manifest.getLogs()) {
         URL url = logger.buildURLToFetchLogs(remoteLog.getStartTxId());
-        LOG.info("URL: " + url);
 
         EditLogInputStream elis = EditLogFileInputStream.fromUrl(
             url, remoteLog.getStartTxId(), remoteLog.getEndTxId(),



Mime
View raw message