Package co.cask.cdap.watchdog.election

Examples of co.cask.cdap.watchdog.election.MultiLeaderElection


  public KafkaMetricsProcessorService(CConfiguration conf,
                                      ZKClientService zkClientService,
                                      KafkaMetricsProcessorServiceFactory kafkaMetricsProcessorServiceFactory) {
    int partitionSize = conf.getInt(MetricsConstants.ConfigKeys.KAFKA_PARTITION_SIZE,
                                    MetricsConstants.DEFAULT_KAFKA_PARTITION_SIZE);
    multiElection = new MultiLeaderElection(
      zkClientService, "metrics-processor", partitionSize,
      createPartitionChangeHandler(kafkaMetricsProcessorServiceFactory));
    this.completion = SettableFuture.create();
  }
View Full Code Here


      logSaver = injector.getInstance(LogSaver.class);

      int numPartitions = Integer.parseInt(cConf.get(LoggingConfiguration.NUM_PARTITIONS,
                                                     LoggingConfiguration.DEFAULT_NUM_PARTITIONS));
      LOG.info("Num partitions = {}", numPartitions);
      multiElection = new MultiLeaderElection(zkClientService, "log-saver-partitions", numPartitions,
                                              createPartitionChangeHandler(logSaver));

      logSaverStatusService = injector.getInstance(LogSaverStatusService.class);
      LOG.info("Runnable initialized: " + name);
    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of co.cask.cdap.watchdog.election.MultiLeaderElection

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.