hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject svn commit: r1507791 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
Date Sun, 28 Jul 2013 12:17:10 GMT
Author: mbertozzi
Date: Sun Jul 28 12:17:10 2013
New Revision: 1507791

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

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java?rev=1507791&r1=1507790&r2=1507791&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
Sun Jul 28 12:17:10 2013
@@ -246,7 +246,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];
@@ -263,7 +263,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;
           }
         }
@@ -271,7 +272,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) {



Mime
View raw message