Package co.cask.cdap.common.hooks

Examples of co.cask.cdap.common.hooks.MetricsReporterHook


    this.httpService = NettyHttpService.builder()
        .addHttpHandlers(handlers)
        .setHost(cConf.get(Constants.Explore.SERVER_ADDRESS))
        .setHandlerHooks(ImmutableList.of(
            new MetricsReporterHook(metricsCollectionService, Constants.Service.EXPLORE_HTTP_USER_SERVICE)))
        .setWorkerThreadPoolSize(workerThreads)
        .setExecThreadPoolSize(execThreads)
        .setConnectionBacklog(cConf.getInt(Constants.Explore.BACKLOG_CONNECTIONS, 20000))
        .build();
  }
View Full Code Here


    programRuntimeService.start();

    // Run http service on random port
    httpService = NettyHttpService.builder()
      .setHost(hostname.getCanonicalHostName())
      .setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                Constants.Service.APP_FABRIC_HTTP)))
      .addHttpHandlers(handlers)
      .setConnectionBacklog(configuration.getInt(Constants.Gateway.BACKLOG_CONNECTIONS,
                                                 Constants.Gateway.DEFAULT_BACKLOG))
      .setExecThreadPoolSize(configuration.getInt(Constants.Gateway.EXEC_THREADS,
View Full Code Here

    this.janitorService = janitorService;

    int workerThreads = cConf.getInt(Constants.Stream.WORKER_THREADS, 10);
    this.httpService = NettyHttpService.builder()
      .addHttpHandlers(handlers)
      .setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                Constants.Stream.STREAM_HANDLER)))
      .setHost(cConf.get(Constants.Stream.ADDRESS))
      .setWorkerThreadPoolSize(workerThreads)
      .setExecThreadPoolSize(0)         // Execution happens in the io worker thread directly
      .setConnectionBacklog(20000)
View Full Code Here

                 Set<HttpHandler> handlers, DiscoveryService discoveryService,
                 @Nullable MetricsCollectionService metricsCollectionService) {

    NettyHttpService.Builder builder = NettyHttpService.builder();
    builder.addHttpHandlers(handlers);
    builder.setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                     Constants.Service.GATEWAY)));

    builder.setHost(hostname.getCanonicalHostName());
    builder.setPort(cConf.getInt(Constants.Gateway.PORT, Constants.Gateway.DEFAULT_PORT));
View Full Code Here

    builder.addHttpHandlers(ImmutableList.of(new DatasetTypeHandler(typeManager, locationFactory, cConf),
                                             new DatasetInstanceHandler(typeManager, instanceManager, opExecutorClient,
                                                                        datasetExploreFacade, cConf)));

    builder.setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                     Constants.Service.DATASET_MANAGER)));

    builder.setHost(cConf.get(Constants.Dataset.Manager.ADDRESS));

    builder.setConnectionBacklog(cConf.getInt(Constants.Dataset.Manager.BACKLOG_CONNECTIONS,
View Full Code Here

    this.httpService = NettyHttpService.builder()
      .addHttpHandlers(handlers)
      .setHost(cConf.get(Constants.Dataset.Executor.ADDRESS))
      .setHandlerHooks(ImmutableList.of(
        new MetricsReporterHook(metricsCollectionService, Constants.Service.DATASET_EXECUTOR)))
      .setWorkerThreadPoolSize(workerThreads)
      .setExecThreadPoolSize(execThreads)
      .setConnectionBacklog(20000)
      .build();
  }
View Full Code Here

                               @Named(Constants.LogSaver.LOG_SAVER_STATUS_HANDLER) Set<HttpHandler> handlers,
                               MetricsCollectionService metricsCollectionService) {
    this.discoveryService = discoveryService;
    this.httpService = NettyHttpService.builder()
      .addHttpHandlers(handlers)
      .setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                Constants.LogSaver.LOG_SAVER_STATUS_HANDLER)))
      .setHost(cConf.get(Constants.LogSaver.ADDRESS))
      .build();
  }
View Full Code Here

    int bossthreads = cConf.getInt(Constants.Metrics.BOSS_THREADS, 1);
    int workerthreads = cConf.getInt(Constants.Metrics.WORKER_THREADS, 10);

    NettyHttpService.Builder builder = NettyHttpService.builder();
    builder.addHttpHandlers(handlers);
    builder.setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                                                                     Constants.Service.METRICS)));

    builder.setHost(address);

    builder.setConnectionBacklog(backlogcnxs);
View Full Code Here

                                        Set<HttpHandler> handlers,
                                        MetricsCollectionService metricsCollectionService) {
    this.discoveryService = discoveryService;
    this.httpService = NettyHttpService.builder()
      .addHttpHandlers(handlers)
      .setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,
                        Constants.MetricsProcessor.METRICS_PROCESSOR_STATUS_HANDLER)))
      .setHost(cConf.get(Constants.MetricsProcessor.ADDRESS))
      .build();
  }
View Full Code Here

TOP

Related Classes of co.cask.cdap.common.hooks.MetricsReporterHook

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.