Ejemplo n.º 1
0
 public void initializeTaskToolbox() throws S3ServiceException {
   if (taskToolbox == null) {
     final RestS3Service s3Client =
         new RestS3Service(
             new AWSCredentials(
                 PropUtils.getProperty(props, "com.metamx.aws.accessKey"),
                 PropUtils.getProperty(props, "com.metamx.aws.secretKey")));
     final SegmentPusher segmentPusher =
         new S3SegmentPusher(
             s3Client, configFactory.build(S3SegmentPusherConfig.class), jsonMapper);
     taskToolbox =
         new TaskToolbox(coordinatorConfig, emitter, s3Client, segmentPusher, jsonMapper);
   }
 }
Ejemplo n.º 2
0
  private void initializeEmitter() {
    if (emitter == null) {
      final HttpClient httpClient =
          HttpClientInit.createClient(
              HttpClientConfig.builder().withNumConnections(1).build(), lifecycle);

      emitter =
          new ServiceEmitter(
              PropUtils.getProperty(props, "druid.service"),
              PropUtils.getProperty(props, "druid.host"),
              Emitters.create(props, httpClient, jsonMapper, lifecycle));
    }
    EmittingLogger.registerEmitter(emitter);
  }