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



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALPrettyPrinter.java
##########
@@ -356,11 +382,20 @@ public static void printCell(PrintStream out, Map<String, 
Object> op, boolean ou
     out.println("cell total size sum: " + op.get("total_size_sum"));
   }
 
-  public static Map<String, Object> toStringMap(Cell cell, boolean 
printRowKeyOnly) {
+  public static Map<String, Object> toStringMap(Cell cell,
+    boolean printRowKeyOnly, String rowPrefix, String row, boolean 
outputValues) {
     Map<String, Object> stringMap = new HashMap<>();
-    stringMap.put("row",
-      Bytes.toStringBinary(cell.getRowArray(), cell.getRowOffset(), 
cell.getRowLength()));
+    String rowKey = Bytes.toStringBinary(cell.getRowArray(),
+      cell.getRowOffset(), cell.getRowLength());
+    // Row and row prefix are mutually options so both cannot be true at the
+    // same time. We can include checks in the same condition
+    // Check if any of the filters are satisfied by the row, if not return 
empty map

Review comment:
       I see, this is because we are going to throw `ParseException` if both 
options are selected, which makes it possible to use this same method for both 
`row` and `rowPrefix`.




----------------------------------------------------------------
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