From 227399fafdfa267aec8a7be586520bba751f6f97 Mon Sep 17 00:00:00 2001 From: Ray Mattingly Date: Thu, 14 Sep 2023 11:34:14 -0400 Subject: [PATCH] spotless --- .../hbase/namequeues/impl/SlowLogQueueService.java | 13 ++++++------- .../hbase/namequeues/TestNamedQueueRecorder.java | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java index 8091419d8076..9072f4294894 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java @@ -37,21 +37,21 @@ import org.apache.hadoop.hbase.namequeues.SlowLogPersistentService; import org.apache.hadoop.hbase.namequeues.request.NamedQueueGetRequest; import org.apache.hadoop.hbase.namequeues.response.NamedQueueGetResponse; -import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -import org.apache.hbase.thirdparty.com.google.protobuf.ByteString; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.hbase.thirdparty.com.google.common.collect.EvictingQueue; import org.apache.hbase.thirdparty.com.google.common.collect.Queues; +import org.apache.hbase.thirdparty.com.google.protobuf.ByteString; import org.apache.hbase.thirdparty.com.google.protobuf.Descriptors; import org.apache.hbase.thirdparty.com.google.protobuf.Message; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos; import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos; +import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos; import org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog; /** @@ -183,12 +183,11 @@ public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload) { } } - private static Collection buildNameBytesPairs( - Map attributes) { + private static Collection + buildNameBytesPairs(Map attributes) { return attributes.entrySet().stream().map(attr -> HBaseProtos.NameBytesPair.newBuilder() - .setName(attr.getKey()) - .setValue(ByteString.copyFrom(attr.getValue())) - .build()).collect(Collectors.toSet()); + .setName(attr.getKey()).setValue(ByteString.copyFrom(attr.getValue())).build()) + .collect(Collectors.toSet()); } @Override diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/namequeues/TestNamedQueueRecorder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/namequeues/TestNamedQueueRecorder.java index f50039dcff46..1cd6b03f20c6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/namequeues/TestNamedQueueRecorder.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/namequeues/TestNamedQueueRecorder.java @@ -763,8 +763,8 @@ public RPCProtos.RequestHeader getHeader() { @Override public Map getConnectionAttributes() { - return CONNECTION_HEADERS.stream() - .collect(Collectors.toMap(nameBytesPair -> nameBytesPair.getName(), nameBytesPair -> nameBytesPair.toByteArray())); + return CONNECTION_HEADERS.stream().collect(Collectors.toMap( + nameBytesPair -> nameBytesPair.getName(), nameBytesPair -> nameBytesPair.toByteArray())); } @Override