private void initializeExecutors() { final int maxPendingPersists = tuningConfig.getMaxPendingPersists(); if (persistExecutor == null) { // use a blocking single threaded executor to throttle the firehose when write to disk is slow persistExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_persist_%d", maxPendingPersists ) ); } if (pushExecutor == null) { // use a blocking single threaded executor to throttle the firehose when write to disk is slow pushExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_merge_%d", 1 ) ); } if (intermediateTempExecutor == null) { // use single threaded executor with SynchronousQueue so that all abandon operations occur sequentially intermediateTempExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_abandon_%d", 0 ) ); } }
private void initializeExecutors() { final int maxPendingPersists = tuningConfig.getMaxPendingPersists(); if (persistExecutor == null) { // use a blocking single threaded executor to throttle the firehose when write to disk is slow persistExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_persist_%d", maxPendingPersists ) ); } if (pushExecutor == null) { // use a blocking single threaded executor to throttle the firehose when write to disk is slow pushExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_merge_%d", 1 ) ); } if (intermediateTempExecutor == null) { // use single threaded executor with SynchronousQueue so that all abandon operations occur sequentially intermediateTempExecutor = MoreExecutors.listeningDecorator( Execs.newBlockingSingleThreaded( "appenderator_abandon_%d", 0 ) ); } }