From bd13246f81190b2e2a5a1255dde8ab0f97703a3c Mon Sep 17 00:00:00 2001 From: Alfredo Gutierrez Date: Tue, 13 Aug 2024 23:36:29 -0600 Subject: [PATCH] style fixes and removal of comment and log Signed-off-by: Alfredo Gutierrez --- .../hedera/block/server/mediator/LiveStreamMediatorImpl.java | 2 +- .../server/persistence/storage/write/BlockAsDirWriter.java | 2 -- .../persistence/storage/PersistenceStorageConfigTest.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java b/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java index 5c5fdc0a1..015eb09e7 100644 --- a/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java +++ b/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java @@ -88,7 +88,7 @@ class LiveStreamMediatorImpl // Initialize and start the disruptor @NonNull final Disruptor> disruptor = - // TODO: replace ring buffer size with a configurable value + // TODO: replace ring buffer size with a configurable value, create a MediatorConfig new Disruptor<>(ObjectEvent::new, 1024, DaemonThreadFactory.INSTANCE); this.ringBuffer = disruptor.start(); this.executor = Executors.newCachedThreadPool(DaemonThreadFactory.INSTANCE); diff --git a/server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java b/server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java index 749d311a3..1dedf6500 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java +++ b/server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java @@ -73,8 +73,6 @@ class BlockAsDirWriter implements BlockWriter { blockNodeContext.configuration().getConfigData(PersistenceStorageConfig.class); final Path blockNodeRootPath = Path.of(config.rootPath()); - // TODO: Remove comment but, Ask matt why we are logging the config? - // LOGGER.log(System.Logger.Level.INFO, config.toString()); LOGGER.log(System.Logger.Level.INFO, "Block Node Root Path: " + blockNodeRootPath); this.blockNodeRootPath = blockNodeRootPath; diff --git a/server/src/test/java/com/hedera/block/server/persistence/storage/PersistenceStorageConfigTest.java b/server/src/test/java/com/hedera/block/server/persistence/storage/PersistenceStorageConfigTest.java index c3ba8ddbe..a869b7091 100644 --- a/server/src/test/java/com/hedera/block/server/persistence/storage/PersistenceStorageConfigTest.java +++ b/server/src/test/java/com/hedera/block/server/persistence/storage/PersistenceStorageConfigTest.java @@ -47,7 +47,7 @@ void testPersistenceStorageConfig_emptyRootPath() throws IOException { } public static void deleteDirectory(Path path) throws IOException { - if(!Files.exists(path)) { + if (!Files.exists(path)) { return; } try (Stream walk = Files.walk(path)) {