rmdmattingly commented on code in PR #5155:
URL: https://github.com/apache/hbase/pull/5155#discussion_r1159755698
##########
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:
I believe it would manifest as the toString representation. For example,
this:
```java
import org.apache.hadoop.hbase.client.Scan;
public static void main(String[] args) {
Scan scan = new Scan();
scan.withStartRow(Bytes.toBytes("1234"));
LOG.info("Failed to serialize scan {}", scan);
}
```
produces this:
```
Failed to serialize scan
{"startRow":"1234","stopRow":"","batch":-1,"cacheBlocks":true,"totalColumns":0,"maxResultSize":"-1","families":{},"caching":-1,"maxVersions":1,"timeRange":["0","9223372036854775807"]}
```
--
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]