virajjasani commented on a change in pull request #754: HBASE-22978 : Online 
slow response log
URL: https://github.com/apache/hbase/pull/754#discussion_r382490012
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
 ##########
 @@ -2217,6 +2227,57 @@ private static String getStringForByteString(ByteString 
bs) {
     return Bytes.toStringBinary(bs.toByteArray());
   }
 
+  /**
+   * Return SlowLogParams to maintain recent online slowlog responses
+   *
+   * @param message Message object {@link Message}
+   * @return SlowLogParams with regionName(for filter queries) and params
+   */
+  public static SlowLogParams getSlowLogParams(Message message) {
+    if (message == null) {
+      return null;
+    }
+    if (message instanceof ScanRequest) {
+      ScanRequest scanRequest = (ScanRequest) message;
 
 Review comment:
   Then we print only class, the flow goes at the end.
   ```
   String params = message.getClass().toString();
   return new SlowLogParams(params);
   ```
   
   As new requests come, they need to be implemented.

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


With regards,
Apache Git Services

Reply via email to