virajjasani commented on code in PR #5155:
URL: https://github.com/apache/hbase/pull/5155#discussion_r1159126757


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/OnlineLogRecord.java:
##########
@@ -136,11 +153,20 @@ public int getMultiServiceCalls() {
     return multiServiceCalls;
   }
 
-  private OnlineLogRecord(final long startTime, final int processingTime, 
final int queueTime,
+  /**
+   * If {@value 
org.apache.hadoop.hbase.HConstants#SLOW_LOG_SCAN_PAYLOAD_ENABLED} is enabled 
then
+   * this value may be present and should represent the Scan that produced the 
given
+   * {@link OnlineLogRecord}
+   */
+  public Optional<Scan> getScan() {
+    return scan;
+  }
+
+  protected OnlineLogRecord(final long startTime, final int processingTime, 
final int queueTime,

Review Comment:
   nit: remove `protected`



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/OnlineLogRecord.java:
##########
@@ -52,6 +59,15 @@ final public class OnlineLogRecord extends LogEntry {
         if (slowLogPayload.getMultiServiceCalls() == 0) {
           jsonObj.remove("multiServiceCalls");
         }
+        if (slowLogPayload.getScan().isPresent()) {
+          try {
+            jsonObj.add("scan", 
JsonParser.parseString(slowLogPayload.getScan().get().toJSON()));
+          } catch (IOException e) {
+            LOG.warn("Failed to serialize scan {}", 
slowLogPayload.getScan().get(), e);

Review Comment:
   Will this print byte[] ?



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to