wchevreuil commented on a change in pull request #2556:
URL: https://github.com/apache/hbase/pull/2556#discussion_r509136370



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALPrettyPrinter.java
##########
@@ -326,15 +340,19 @@ public void processFile(final Configuration conf, final 
Path p)
           out.print(GSON.toJson(txn));
         } else {
           // Pretty output, complete with indentation by atomic action
-          out.println(String.format(outputTmpl,
+          if (!outputOnlyRowKey) {

Review comment:
       Why we are removing this info from the output? Is it an additional 
change not mentioned on the jira original description?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALPrettyPrinter.java
##########
@@ -326,15 +340,19 @@ public void processFile(final Configuration conf, final 
Path p)
           out.print(GSON.toJson(txn));
         } else {
           // Pretty output, complete with indentation by atomic action
-          out.println(String.format(outputTmpl,
+          if (!outputOnlyRowKey) {
+            out.println(String.format(outputTmpl,
               txn.get("sequence"), txn.get("table"), txn.get("region"), new 
Date(writeTime)));
+          }
           for (int i = 0; i < actions.size(); i++) {
             Map<String, Object> op = actions.get(i);
-            printCell(out, op, outputValues);
+            printCell(out, op, outputOnlyRowKey, outputValues);
           }
         }
-        out.println("edit heap size: " + entry.getEdit().heapSize());
-        out.println("position: " + log.getPosition());
+        if (!outputOnlyRowKey) {

Review comment:
       Why we are removing this info from the output? Is it an additional 
change not mentioned on the jira original description?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALPrettyPrinter.java
##########
@@ -344,9 +362,17 @@ public void processFile(final Configuration conf, final 
Path p)
     }
   }
 
-  public static void printCell(PrintStream out, Map<String, Object> op, 
boolean outputValues) {
-    out.println("row=" + op.get("row") + ", type=" + op.get("type") + ", 
column=" +
-      op.get("family") + ":" + op.get("qualifier"));
+  public static void printCell(PrintStream out, Map<String, Object> op,
+    boolean outputOnlyRowKey, boolean outputValues) {

Review comment:
       nit: when changing existing method signatures to add more parameters, a 
good practice is to add the new parameters at the end of parameters list. That 
helps when fixing compile errors on possible existing clients. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to