示例#1
0
 @Inject
 public HttpRemoteTaskFactory(
     QueryManagerConfig config,
     @ForScheduler AsyncHttpClient httpClient,
     LocationFactory locationFactory,
     JsonCodec<TaskInfo> taskInfoCodec,
     JsonCodec<TaskUpdateRequest> taskUpdateRequestCodec) {
   this.httpClient = httpClient;
   this.locationFactory = locationFactory;
   this.taskInfoCodec = taskInfoCodec;
   this.taskUpdateRequestCodec = taskUpdateRequestCodec;
   this.maxConsecutiveErrorCount = config.getRemoteTaskMaxConsecutiveErrorCount();
   this.minErrorDuration = config.getRemoteTaskMinErrorDuration();
 }
示例#2
0
 @Inject
 public ClusterMemoryManager(
     @ForMemoryManager HttpClient httpClient,
     NodeManager nodeManager,
     LocationFactory locationFactory,
     MBeanExporter exporter,
     JsonCodec<MemoryInfo> memoryInfoCodec,
     JsonCodec<MemoryPoolAssignmentsRequest> assignmentsRequestJsonCodec,
     QueryIdGenerator queryIdGenerator,
     ServerConfig serverConfig,
     MemoryManagerConfig config,
     QueryManagerConfig queryManagerConfig) {
   requireNonNull(config, "config is null");
   this.nodeManager = requireNonNull(nodeManager, "nodeManager is null");
   this.locationFactory = requireNonNull(locationFactory, "locationFactory is null");
   this.httpClient = requireNonNull(httpClient, "httpClient is null");
   this.exporter = requireNonNull(exporter, "exporter is null");
   this.memoryInfoCodec = requireNonNull(memoryInfoCodec, "memoryInfoCodec is null");
   this.assignmentsRequestJsonCodec =
       requireNonNull(assignmentsRequestJsonCodec, "assignmentsRequestJsonCodec is null");
   this.maxQueryMemory = config.getMaxQueryMemory();
   this.maxQueryCpuTime = queryManagerConfig.getQueryMaxCpuTime();
   this.coordinatorId = queryIdGenerator.getCoordinatorId();
   this.enabled = serverConfig.isCoordinator();
   this.killOnOutOfMemoryDelay = config.getKillOnOutOfMemoryDelay();
   this.killOnOutOfMemory = config.isKillOnOutOfMemory();
 }