Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Mattingly committed Sep 14, 2023
1 parent da74c11 commit 227399f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -183,12 +183,11 @@ public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload) {
}
}

private static Collection<HBaseProtos.NameBytesPair> buildNameBytesPairs(
Map<String, byte[]> attributes) {
private static Collection<HBaseProtos.NameBytesPair>
buildNameBytesPairs(Map<String, byte[]> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,8 @@ public RPCProtos.RequestHeader getHeader() {

@Override
public Map<String, byte[]> 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
Expand Down

0 comments on commit 227399f

Please sign in to comment.