Examples of BootstrapProducerStatsCollector


Examples of com.linkedin.databus.bootstrap.common.BootstrapProducerStatsCollector

    super(bootstrapProducerStaticConfig.getClient());
    _registeredPhysicalSources = new HashSet<SourceInfo>();
    decouplePhysicalSources();
    _bootstrapProducerStaticConfig = bootstrapProducerStaticConfig;
    _registeredSources = new ArrayList<String>();
    _applierStatsCollector = new BootstrapProducerStatsCollector(
        getContainerStaticConfig().getId(), "bootstrapApplier", true, true,
        getMbeanServer(), null);
    _bootstrapProducerStatsCollectors = new StatsCollectors<BootstrapProducerStatsCollector>();

    _applierThreads = new HashMap<String, DatabusThreadBase>();

    BootstrapConn conn = new BootstrapConn();
    final boolean autoCommit = false;
    _dbDao = new BootstrapDBMetaDataDAO(conn,
        bootstrapProducerStaticConfig.getBootstrapDBHostname(),
        bootstrapProducerStaticConfig.getBootstrapDBUsername(),
        bootstrapProducerStaticConfig.getBootstrapDBPassword(),
        bootstrapProducerStaticConfig.getBootstrapDBName(), autoCommit);
    _srcNameIdMap = new HashMap<String, Integer>();
    conn.initBootstrapConn(autoCommit,
        bootstrapProducerStaticConfig.getBootstrapDBUsername(),
        bootstrapProducerStaticConfig.getBootstrapDBPassword(),
        bootstrapProducerStaticConfig.getBootstrapDBHostname(),
        bootstrapProducerStaticConfig.getBootstrapDBName());
    if (!_dbDao.doesMinScnTableExist())
    {
      LOG.error("Bootstrap table not found! Please create table: "
          + BootstrapDBMetaDataDAO.CREATE_MINSCN_TABLE);
      throw new BootstrapDBException(
          "Bootstrap DB does not have necessary meta data table! "
              + BootstrapDBMetaDataDAO.MIN_SCN_TABLE_NAME);
    }
    initBootstrapDBMetadata();

    // callback should only be registered after DBMetadata is initialized.
    LOG.info("The Bootstrap Producer is configured for "
        + _registeredPhysicalSources.size() + " sources");
    for (SourceInfo sourceInfo : _registeredPhysicalSources)
    {
      LOG.info("Creating BootstrapProducer callback for PhysicalSource: "
          + sourceInfo.getPhysicalSourceName());
      BootstrapProducerStatsCollector producerStatsCollector = new BootstrapProducerStatsCollector(
          getContainerStaticConfig().getId(),
          sourceInfo.getPhysicalSourceName(), true, true, getMbeanServer(),
          sourceInfo.getLogicalSources());
      _bootstrapProducerStatsCollectors.addStatsCollector(
          sourceInfo.getPhysicalSourceName(), producerStatsCollector);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.