You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2013/07/28 14:17:39 UTC

svn commit: r1507792 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java

Author: mbertozzi
Date: Sun Jul 28 12:17:39 2013
New Revision: 1507792

URL: http://svn.apache.org/r1507792
Log:
HBASE-9060 ExportSnapshot job fails if target path contains percentage character (Jerry He)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java?rev=1507792&r1=1507791&r2=1507792&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java Sun Jul 28 12:17:39 2013
@@ -253,7 +253,7 @@ public final class ExportSnapshot extend
         final Path outputPath, final FSDataOutputStream out,
         final long inputFileSize) {
       final String statusMessage = "copied %s/" + StringUtils.humanReadableInt(inputFileSize) +
-                                   " (%.3f%%) from " + inputPath + " to " + outputPath;
+                                   " (%.3f%%)";
 
       try {
         byte[] buffer = new byte[BUFFER_SIZE];
@@ -270,7 +270,8 @@ public final class ExportSnapshot extend
             context.getCounter(Counter.BYTES_COPIED).increment(reportBytes);
             context.setStatus(String.format(statusMessage,
                               StringUtils.humanReadableInt(totalBytesWritten),
-                              reportBytes/(float)inputFileSize));
+                              totalBytesWritten/(float)inputFileSize) +
+                              " from " + inputPath + " to " + outputPath);
             reportBytes = 0;
           }
         }
@@ -278,7 +279,8 @@ public final class ExportSnapshot extend
         context.getCounter(Counter.BYTES_COPIED).increment(reportBytes);
         context.setStatus(String.format(statusMessage,
                           StringUtils.humanReadableInt(totalBytesWritten),
-                          reportBytes/(float)inputFileSize));
+                          totalBytesWritten/(float)inputFileSize) +
+                          " from " + inputPath + " to " + outputPath);
 
         // Verify that the written size match
         if (totalBytesWritten != inputFileSize) {