Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rsOperationDetails UI fixes
Browse files Browse the repository at this point in the history
Ray Mattingly committed Jul 31, 2023
1 parent db79ecf commit 1616d2e
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -378,7 +378,7 @@ public String toString() {
.append("connectionAttributes", connectionAttributes).toString();
}

public static Map<String, String> deserializeAttributes(Map<String, byte[]> attributes) {
private static Map<String, String> deserializeAttributes(Map<String, byte[]> attributes) {
return attributes.entrySet().stream().collect(
Collectors.toMap(Map.Entry::getKey, entry -> Bytes.toStringBinary(entry.getValue())));
}
Original file line number Diff line number Diff line change
@@ -2196,6 +2196,15 @@ public static SlowLogParams getSlowLogParams(Message message, boolean slowLogSca
return new SlowLogParams(params);
}

public static Map<String, String> deserializeAttributes(List<NameBytesPair> attributes) {
return deserializeAttributes(convertNameBytesPairsToMap(attributes));
}

public static Map<String, String> deserializeAttributes(Map<String, byte[]> attributes) {
return attributes.entrySet().stream().collect(
Collectors.toMap(Map.Entry::getKey, entry -> Bytes.toStringBinary(entry.getValue())));
}

/**
* Print out some subset of a MutationProto rather than all of it and its data
* @param proto Protobuf to print out
Original file line number Diff line number Diff line change
@@ -25,8 +25,8 @@
import="org.apache.hadoop.util.StringUtils"
import="org.apache.hadoop.hbase.regionserver.HRegionServer"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.client.OnlineLogRecord.deserializeAttributes"
import="org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog"
import="org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil"
import="org.apache.hadoop.hbase.namequeues.NamedQueueRecorder"
import="org.apache.hadoop.hbase.namequeues.RpcLogDetails"
import="org.apache.hadoop.hbase.namequeues.request.NamedQueueGetRequest"
@@ -130,8 +130,8 @@
<td><%=r.getMultiServiceCalls()%></td>
<td><%=r.getCallDetails()%></td>
<td><%=r.getParam()%></td>
<td><%=deserializeAttributes(r.getRequestAttributes())%></td>
<td><%=deserializeAttributes(r.getConnectionAttributes())%></td>
<td><%=ProtobufUtil.deserializeAttributes(r.getRequestAttributeList())%></td>
<td><%=ProtobufUtil.deserializeAttributes(r.getConnectionAttributeList())%></td>
</tr>
<% } %>
<% } %>
@@ -177,8 +177,8 @@
<td><%=r.getMultiServiceCalls()%></td>
<td><%=r.getCallDetails()%></td>
<td><%=r.getParam()%></td>
<td><%=deserializeAttributes(r.getRequestAttributes())%></td>
<td><%=deserializeAttributes(r.getConnectionAttributes())%></td>
<td><%=ProtobufUtil.deserializeAttributes(r.getRequestAttributeList())%></td>
<td><%=ProtobufUtil.deserializeAttributes(r.getConnectionAttributeList())%></td>
</tr>
<% } %>
<% } %>

0 comments on commit 1616d2e

Please sign in to comment.