Skip to content

Commit

Permalink
Fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
w.montaz committed Nov 27, 2023
1 parent 84cdc6a commit 390485c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ public class PartitionedWriter<MESSAGE_KIND> implements Closeable {

// A pool of worker dedicated to writing files to HDFS. Allows the reader to block for less time
// the pool is static to avoid creating too many pools
private static final ExecutorService consumerCloserThreads = Executors.newCachedThreadPool();
private static final ExecutorService CONSUMER_CLOSER_THREADS = Executors.newCachedThreadPool();

static {
Runtime.getRuntime().addShutdownHook(new Thread(consumerCloserThreads::shutdown));
Runtime.getRuntime().addShutdownHook(new Thread(CONSUMER_CLOSER_THREADS::shutdown));
}

private final BiFunction<Integer, LocalDateTime, ExpiringConsumer<MESSAGE_KIND>> writerBuilder;
Expand Down Expand Up @@ -222,7 +223,7 @@ private void possiblyCloseConsumers(Predicate<ExpiringConsumer<MESSAGE_KIND>> sh

return dailyWriters.entrySet().stream().map(e -> CompletableFuture.supplyAsync(
new CloseConsumerTask(shouldClose, partitionId, e.getKey(), e.getValue()),
consumerCloserThreads
CONSUMER_CLOSER_THREADS
));
}).collect(Collectors.toList());

Expand Down

0 comments on commit 390485c

Please sign in to comment.