@Inject public TopNQueryRunnerFactory( @Global NonBlockingPool<ByteBuffer> computationBufferPool, TopNQueryQueryToolChest toolchest, QueryWatcher queryWatcher ) { this.computationBufferPool = computationBufferPool; this.toolchest = toolchest; this.queryWatcher = queryWatcher; }
@Inject public GroupByQueryEngine( Supplier<GroupByQueryConfig> config, @Global NonBlockingPool<ByteBuffer> intermediateResultsBufferPool ) { this.config = config; this.intermediateResultsBufferPool = intermediateResultsBufferPool; }
@Inject public TopNQueryRunnerFactory( @Global StupidPool<ByteBuffer> computationBufferPool, TopNQueryQueryToolChest toolchest ) { this.computationBufferPool = computationBufferPool; this.toolchest = toolchest; }
@Inject public GroupByStrategyV1( Supplier<GroupByQueryConfig> configSupplier, GroupByQueryEngine engine, QueryWatcher queryWatcher, @Global NonBlockingPool<ByteBuffer> bufferPool ) { this.configSupplier = configSupplier; this.engine = engine; this.queryWatcher = queryWatcher; this.bufferPool = bufferPool; }
@Inject public GroupByQueryEngine( Supplier<GroupByQueryConfig> config, @Global StupidPool<ByteBuffer> intermediateResultsBufferPool ) { this.config = config; this.intermediateResultsBufferPool = intermediateResultsBufferPool; }
@Inject public RemoteTaskRunnerFactory( final CuratorFramework curator, final RemoteTaskRunnerConfig remoteTaskRunnerConfig, final ZkPathsConfig zkPaths, final ObjectMapper jsonMapper, final Supplier<WorkerSetupData> setupDataWatch, @Global final HttpClient httpClient ) { this.curator = curator; this.remoteTaskRunnerConfig = remoteTaskRunnerConfig; this.zkPaths = zkPaths; this.jsonMapper = jsonMapper; this.setupDataWatch = setupDataWatch; this.httpClient = httpClient; }
@Inject public RemoteTaskActionClientFactory( @Global HttpClient httpClient, @IndexingService ServerDiscoverySelector selector, RetryPolicyFactory retryPolicyFactory, ObjectMapper jsonMapper ) { this.httpClient = httpClient; this.selector = selector; this.retryPolicyFactory = retryPolicyFactory; this.jsonMapper = jsonMapper; }
@Inject public IndexingServiceClient( @Global HttpClient client, ObjectMapper jsonMapper, @IndexingService ServerDiscoverySelector selector ) { this.client = client; this.jsonMapper = jsonMapper; this.selector = selector; }
@Inject public BridgeQuerySegmentWalker( ServerDiscoverySelector brokerSelector, @Global HttpClient httpClient, ObjectMapper jsonMapper ) { this.brokerSelector = brokerSelector; this.httpClient = httpClient; this.jsonMapper = jsonMapper; this.responseHandler = new StatusResponseHandler(Charsets.UTF_8); }
@Inject public LoadQueueTaskMaster( CuratorFramework curator, @Json ObjectMapper jsonMapper, ScheduledExecutorService peonExec, ExecutorService callbackExec, DruidCoordinatorConfig config, @Global HttpClient httpClient, ZkPathsConfig zkPaths ) { this.curator = curator; this.jsonMapper = jsonMapper; this.peonExec = peonExec; this.callbackExec = callbackExec; this.config = config; this.httpClient = httpClient; this.zkPaths = zkPaths; }
@Provides @LazySingleton @Global public NonBlockingPool<ByteBuffer> getIntermediateResultsPool() { return DummyNonBlockingPool.instance(); }
@Inject public CoordinatorRuleManager( @Global HttpClient httpClient, @Json ObjectMapper jsonMapper, Supplier<TieredBrokerConfig> config, ServerDiscoverySelector selector ) { this.httpClient = httpClient; this.jsonMapper = jsonMapper; this.config = config; this.selector = selector; this.responseHandler = new FullResponseHandler(Charsets.UTF_8); this.rules = new AtomicReference<>( new ConcurrentHashMap<String, List<Rule>>() ); }
@Inject public GroupByStrategyV2( DruidProcessingConfig processingConfig, Supplier<GroupByQueryConfig> configSupplier, @Global NonBlockingPool<ByteBuffer> bufferPool, @Merging BlockingPool<ByteBuffer> mergeBufferPool, @Smile ObjectMapper spillMapper, QueryWatcher queryWatcher ) { this.processingConfig = processingConfig; this.configSupplier = configSupplier; this.bufferPool = bufferPool; this.mergeBufferPool = mergeBufferPool; this.spillMapper = spillMapper; this.queryWatcher = queryWatcher; }
@Provides @LazySingleton public LoadQueueTaskMaster getLoadQueueTaskMaster( CuratorFramework curator, ObjectMapper jsonMapper, ScheduledExecutorFactory factory, DruidCoordinatorConfig config, @Global HttpClient httpClient, ZkPathsConfig zkPaths ) { return new LoadQueueTaskMaster( curator, jsonMapper, factory.create(1, "Master-PeonExec--%d"), Executors.newSingleThreadExecutor(), config, httpClient, zkPaths ); } }
@Provides @LazySingleton @Global public NonBlockingPool<ByteBuffer> getIntermediateResultsPool(DruidProcessingConfig config) { verifyDirectMemory(config); return new StupidPool<>( "intermediate processing pool", new OffheapBufferGenerator("intermediate processing", config.intermediateComputeSizeBytes()), config.getNumThreads(), config.poolCacheMaxCount() ); }
@Provides @LazySingleton @Global public StupidPool<ByteBuffer> getIntermediateResultsPool(DruidProcessingConfig config) { try { long maxDirectMemory = VMUtils.getMaxDirectMemory(); final long memoryNeeded = (long) config.intermediateComputeSizeBytes() * (config.getNumThreads() + 1); if (maxDirectMemory < memoryNeeded) { throw new ProvisionException( String.format( "Not enough direct memory. Please adjust -XX:MaxDirectMemorySize, druid.computation.buffer.size, or druid.processing.numThreads: " + "maxDirectMemory[%,d], memoryNeeded[%,d] = druid.computation.buffer.size[%,d] * ( druid.processing.numThreads[%,d] + 1 )", maxDirectMemory, memoryNeeded, config.intermediateComputeSizeBytes(), config.getNumThreads() ) ); } } catch(UnsupportedOperationException e) { log.info(e.getMessage()); } catch(RuntimeException e) { log.warn(e, e.getMessage()); } return new IntermediateProcessingBufferPool(config.intermediateComputeSizeBytes()); }