Skip to content

Commit 51f1e8b

Browse files
fix: spotless, changed log levels
Signed-off-by: Matt Peterson <matt.peterson@swirldslabs.com>
1 parent 5cc2bc8 commit 51f1e8b

File tree

10 files changed

+33
-54
lines changed

10 files changed

+33
-54
lines changed

server/src/main/java/com/hedera/block/server/Constants.java

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,25 @@
2020
public final class Constants {
2121
private Constants() {}
2222

23-
/**
24-
* Constant mapped to the root path config key where the block files are stored
25-
*/
23+
/** Constant mapped to the root path config key where the block files are stored */
2624
public static final String BLOCKNODE_STORAGE_ROOT_PATH_KEY = "blocknode.storage.root.path";
2725

28-
/**
29-
* Constant mapped to the timeout for stream consumers in milliseconds
30-
*/
26+
/** Constant mapped to the timeout for stream consumers in milliseconds */
3127
public static final String BLOCKNODE_SERVER_CONSUMER_TIMEOUT_THRESHOLD_KEY =
3228
"blocknode.server.consumer.timeout.threshold";
3329

34-
/**
35-
* Constant mapped to the name of the service in the .proto file
36-
*/
30+
/** Constant mapped to the name of the service in the .proto file */
3731
public static final String SERVICE_NAME = "BlockStreamGrpcService";
3832

39-
/**
40-
* Constant mapped to the publishBlockStream service method name in the .proto file
41-
*/
33+
/** Constant mapped to the publishBlockStream service method name in the .proto file */
4234
public static final String CLIENT_STREAMING_METHOD_NAME = "publishBlockStream";
4335

44-
/**
45-
* Constant mapped to the subscribeBlockStream service method name in the .proto file
46-
*/
36+
/** Constant mapped to the subscribeBlockStream service method name in the .proto file */
4737
public static final String SERVER_STREAMING_METHOD_NAME = "subscribeBlockStream";
4838

49-
/**
50-
* Constant mapped to the singleBlock service method name in the .proto file
51-
*/
39+
/** Constant mapped to the singleBlock service method name in the .proto file */
5240
public static final String SINGLE_BLOCK_METHOD_NAME = "singleBlock";
5341

54-
/**
55-
* Constant defining the block file extension
56-
*/
42+
/** Constant defining the block file extension */
5743
public static final String BLOCK_FILE_EXTENSION = ".blk";
5844
}

server/src/main/java/com/hedera/block/server/ServiceStatusImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ public class ServiceStatusImpl implements ServiceStatus {
2828
private final AtomicBoolean isRunning = new AtomicBoolean(true);
2929
private WebServer webServer;
3030

31-
/**
32-
* Constructor for the ServiceStatusImpl class.
33-
*/
31+
/** Constructor for the ServiceStatusImpl class. */
3432
public ServiceStatusImpl() {}
3533

3634
/**

server/src/main/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserver.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public class ConsumerStreamResponseObserver
5555
protected Runnable onCancel;
5656

5757
/**
58-
* The onClose handler to execute when the consumer closes the stream. This handler is
59-
* protected to facilitate testing.
58+
* The onClose handler to execute when the consumer closes the stream. This handler is protected
59+
* to facilitate testing.
6060
*/
6161
protected Runnable onClose;
6262

@@ -65,10 +65,11 @@ public class ConsumerStreamResponseObserver
6565
* SubscribeStreamResponse events from the Disruptor and passing them to the downstream consumer
6666
* via the subscribeStreamResponseObserver.
6767
*
68-
* @param timeoutThresholdMillis the timeout threshold in milliseconds for the producer to publish
69-
* block items
68+
* @param timeoutThresholdMillis the timeout threshold in milliseconds for the producer to
69+
* publish block items
7070
* @param producerLivenessClock the clock to use to determine the producer liveness
71-
* @param subscriptionHandler the subscription handler to use to manage the subscription lifecycle
71+
* @param subscriptionHandler the subscription handler to use to manage the subscription
72+
* lifecycle
7273
* @param subscribeStreamResponseObserver the observer to use to send responses to the consumer
7374
*/
7475
public ConsumerStreamResponseObserver(

server/src/main/java/com/hedera/block/server/data/ObjectEvent.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
*/
2525
public class ObjectEvent<T> {
2626

27-
/**
28-
* Constructor for the ObjectEvent class.
29-
*/
27+
/** Constructor for the ObjectEvent class. */
3028
public ObjectEvent() {}
3129

3230
private T val;

server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void publish(final BlockItem blockItem) throws IOException {
113113
if (serviceStatus.isRunning()) {
114114

115115
// Publish the block for all subscribers to receive
116-
LOGGER.log(System.Logger.Level.INFO, "Publishing BlockItem: {0}", blockItem);
116+
LOGGER.log(System.Logger.Level.DEBUG, "Publishing BlockItem: {0}", blockItem);
117117
final var subscribeStreamResponse =
118118
SubscribeStreamResponse.newBuilder().setBlockItem(blockItem).build();
119119
ringBuffer.publishEvent((event, sequence) -> event.set(subscribeStreamResponse));
@@ -130,15 +130,15 @@ public void publish(final BlockItem blockItem) throws IOException {
130130
+ blockItem,
131131
e);
132132

133-
LOGGER.log(System.Logger.Level.INFO, "Send a response to end the stream");
133+
LOGGER.log(System.Logger.Level.DEBUG, "Send a response to end the stream");
134134

135135
// Publish the block for all subscribers to receive
136136
final SubscribeStreamResponse endStreamResponse = buildEndStreamResponse();
137137
ringBuffer.publishEvent((event, sequence) -> event.set(endStreamResponse));
138138

139139
// Unsubscribe all downstream consumers
140140
for (final var subscriber : subscribers.keySet()) {
141-
LOGGER.log(System.Logger.Level.INFO, "Unsubscribing: {0}", subscriber);
141+
LOGGER.log(System.Logger.Level.DEBUG, "Unsubscribing: {0}", subscriber);
142142
unsubscribe(subscriber);
143143
}
144144

server/src/main/java/com/hedera/block/server/persistence/storage/BlockAsDirReader.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public class BlockAsDirReader implements BlockReader<Block> {
4545
private final FileAttribute<Set<PosixFilePermission>> filePerms;
4646

4747
/**
48-
* Constructor for the BlockAsDirReader class. It initializes the BlockAsDirReader with the given
49-
* parameters.
48+
* Constructor for the BlockAsDirReader class. It initializes the BlockAsDirReader with the
49+
* given parameters.
5050
*
5151
* @param key the key to retrieve the block node root path from the configuration
5252
* @param config the configuration to retrieve the block node root path
@@ -69,8 +69,8 @@ public BlockAsDirReader(
6969
}
7070

7171
/**
72-
* Constructor for the BlockAsDirReader class. It initializes the BlockAsDirReader with the given
73-
* parameters.
72+
* Constructor for the BlockAsDirReader class. It initializes the BlockAsDirReader with the
73+
* given parameters.
7474
*
7575
* @param key the key to retrieve the block node root path from the configuration
7676
* @param config the configuration to retrieve the block node root path
@@ -80,8 +80,8 @@ public BlockAsDirReader(final String key, final Config config) {
8080
}
8181

8282
/**
83-
* Reads a block from the file system. The block is stored as a directory containing block items.
84-
* The block items are stored as files within the block directory.
83+
* Reads a block from the file system. The block is stored as a directory containing block
84+
* items. The block items are stored as files within the block directory.
8585
*
8686
* @param blockNumber the block number to read
8787
* @return an optional of the block read from the file system

server/src/main/java/com/hedera/block/server/persistence/storage/BlockAsDirRemover.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import java.util.Set;
2626

2727
/**
28-
* The BlockAsDirRemover class removes a block from the file system. The block is stored as a directory
29-
* containing block items. The block items are stored as files within the block directory.
28+
* The BlockAsDirRemover class removes a block from the file system. The block is stored as a
29+
* directory containing block items. The block items are stored as files within the block directory.
3030
*/
3131
public class BlockAsDirRemover implements BlockRemover {
3232

@@ -36,8 +36,8 @@ public class BlockAsDirRemover implements BlockRemover {
3636
private final FileAttribute<Set<PosixFilePermission>> filePerms;
3737

3838
/**
39-
* Constructor for the BlockAsDirRemover class. It initializes the BlockAsDirRemover with the given
40-
* parameters.
39+
* Constructor for the BlockAsDirRemover class. It initializes the BlockAsDirRemover with the
40+
* given parameters.
4141
*
4242
* @param blockNodeRootPath the root path where the block files are stored
4343
* @param filePerms the file permissions to set on the block node root path

server/src/main/java/com/hedera/block/server/persistence/storage/BlockAsDirWriter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public class BlockAsDirWriter implements BlockWriter<BlockItem> {
4949
private final BlockRemover blockRemover;
5050

5151
/**
52-
* Constructor for the BlockAsDirWriter class. It initializes the BlockAsDirWriter with the given
53-
* key, config, block remover, and file permissions.
52+
* Constructor for the BlockAsDirWriter class. It initializes the BlockAsDirWriter with the
53+
* given key, config, block remover, and file permissions.
5454
*
5555
* @param key the key to use to retrieve the block node root path from the config
5656
* @param config the config to use to retrieve the block node root path
5757
* @param blockRemover the block remover to use to remove blocks if there's an exception while
58-
* writing a partial block
58+
* writing a partial block
5959
* @param filePerms the file permissions to set on the block node root path
6060
* @throws IOException if an error occurs while initializing the BlockAsDirWriter
6161
*/

server/src/main/java/com/hedera/block/server/producer/ItemAckBuilder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
*/
3232
public class ItemAckBuilder {
3333

34-
/**
35-
* Constructor for the ItemAckBuilder class.
36-
*/
34+
/** Constructor for the ItemAckBuilder class. */
3735
public ItemAckBuilder() {}
3836

3937
/**

server/src/main/java/com/hedera/block/server/producer/Util.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
import java.security.MessageDigest;
2525
import java.security.NoSuchAlgorithmException;
2626

27-
/**
28-
* Utility class for the BlockNode service.
29-
*/
27+
/** Utility class for the BlockNode service. */
3028
public final class Util {
3129
private Util() {}
3230

0 commit comments

Comments
 (0)