Package com.linkedin.databus2.core.container.monitoring.mbean

Examples of com.linkedin.databus2.core.container.monitoring.mbean.HttpStatisticsCollector


        keyPairs.add(kp);
        GenericRecord gr = new GenericData.Record(s);
        gr.put(keyName, k);
        gr.put(valName, keyVals.get(k));

        DBUpdateImage dbi = new DBUpdateImage(keyPairs, scn, gr, s,
                                              DbUpdateState.DBUpdateImage.OpType.INSERT,false);
        db.add(dbi);
        TransactionState.PerSourceTransactionalUpdate dbUpdate = new TransactionState.PerSourceTransactionalUpdate(
                                                                                                                   sourceId, db);
        dbUpdates.add(dbUpdate);
View Full Code Here


            1);
        keyPairs.add(kp);
        GenericRecord gr = new GenericData.Record(s);
        gr.put(keyName, k);

        DBUpdateImage dbi = new DBUpdateImage(keyPairs, scn, gr, s,
                                              DbUpdateState.DBUpdateImage.OpType.INSERT,false);
        db.add(dbi);
        TransactionState.PerSourceTransactionalUpdate dbUpdate = new TransactionState.PerSourceTransactionalUpdate(
                                                                                                                   sourceId, db);
        dbUpdates.add(dbUpdate);
View Full Code Here

    GenericRecord gr5 = new GenericData.Record(s);
    gr5.put("name1", "phani5");
    gr5.put("name2", "boris5");


    DBUpdateImage dbi1 = new DBUpdateImage(keyPairs, scn, gr1, s,
        DbUpdateState.DBUpdateImage.OpType.INSERT, false);
    DBUpdateImage dbi2 = new DBUpdateImage(keyPairs, scn, gr2, s,
        DbUpdateState.DBUpdateImage.OpType.INSERT, false);
    DBUpdateImage dbi3 = new DBUpdateImage(keyPairs, scn, gr3, s,
        DbUpdateState.DBUpdateImage.OpType.INSERT, false);
    DBUpdateImage dbi4 = new DBUpdateImage(keyPairs, scn, gr4, s,
        DbUpdateState.DBUpdateImage.OpType.INSERT, false);
    DBUpdateImage dbi5 = new DBUpdateImage(keyPairs, scn, gr5, s,
        DbUpdateState.DBUpdateImage.OpType.INSERT, false);

    db.add(dbi1);
    db.add(dbi2);
    db.add(dbi3);
View Full Code Here

    // Create the event producer
    String uri = pConfig.getUri();
    if(uri == null)
      throw new DatabusException("Uri is required to start the relay");
    uri = uri.trim();
    EventProducer producer = null;
    if (uri.startsWith("jdbc:")) {
      SourceType sourceType = pConfig.getReplBitSetter().getSourceType();
          if (SourceType.TOKEN.equals(sourceType))
            throw new DatabusException("Token Source-type for Replication bit setter config cannot be set for trigger-based Databus relay !!");
View Full Code Here

    LOG.info("Starting. Producers are :" + _producers);

    for (Entry<PhysicalPartition, EventProducer> entry : _producers
        .entrySet()) {
      EventProducer producer = entry.getValue();
      // now start the default DB puller thread; depending on
      // configuration setting / cmd line
      if (this.getDbPullerStart()) {
        if (producer != null) {
          LOG.info("starting db puller: " + producer.getName());
          producer.start(-1L);
          LOG.info("db puller started: " + producer.getName());
        }
      }
    }
  }
View Full Code Here

  @Override
  public void pause() {
    for (Entry<PhysicalPartition, EventProducer> entry : _producers
        .entrySet()) {
      EventProducer producer = entry.getValue();

      if (null != producer) {
        if (producer.isRunning()) {
          producer.pause();
          LOG.info("EventProducer :" + producer.getName()
              + "  pause sent");
        } else if (producer.isPaused()) {
          LOG.info("EventProducer :" + producer.getName()
              + "  already paused");
        }
      }
    }
  }
View Full Code Here

  @Override
  public void resume() {
    for (Entry<PhysicalPartition, EventProducer> entry : _producers
        .entrySet()) {
      EventProducer producer = entry.getValue();
      if (null != producer) {
        if (producer.isPaused()) {
          producer.unpause();
          LOG.info("EventProducer :" + producer.getName()
              + "  resume sent");
        } else if (producer.isRunning()) {
          LOG.info("EventProducer :" + producer.getName()
              + "  already running");
        }
      }
    }
  }
View Full Code Here

  protected void doShutdown() {
    LOG.warn("Shutting down Relay!");
    for (Entry<PhysicalPartition, EventProducer> entry : _producers
        .entrySet()) {
      PhysicalPartition pPartition = entry.getKey();
      EventProducer producer = entry.getValue();

      if (null != producer
          && (producer.isRunning() || producer.isPaused())) {
        producer.shutdown();
        try {
          producer.waitForShutdown();
        } catch (InterruptedException ie) {
        }
        LOG.info("EventProducer is shutdown!");
      }
View Full Code Here

              .getStatsCollector(statsCollectorName),
          maxScnReaderWriters);
    } else if (uri.startsWith("mock")) {
      // Get all relevant pConfig attributes
      //TODO add real instantiation
      EventProducerServiceProvider mockProvider = _producersRegistry.getEventProducerServiceProvider("mock");
      if (null == mockProvider)
      {
        throw new DatabusRuntimeException("relay event producer not available: " + "mock");
      }
      producer = mockProvider.createProducer(pConfig, schemaRegistryService,
                                             dbusEventBuffer,
                                             _inBoundStatsCollectors
                                                     .getStatsCollector(statsCollectorName),
                                             maxScnReaderWriters);
    } else if (uri.startsWith("gg:")){
      producer = new GoldenGateEventProducer(pConfig,
                                             schemaRegistryService,
                                             dbusEventBuffer,
                                             _inBoundStatsCollectors
                                                 .getStatsCollector(statsCollectorName),
                                             maxScnReaderWriters);

    } else if (uri.startsWith("mysql:")){
       LOG.info("Adding OpenReplicatorEventProducer for uri :" + uri);
       final String serviceName = "or";
       EventProducerServiceProvider orProvider = _producersRegistry.getEventProducerServiceProvider(serviceName);
       if (null == orProvider)
       {
         throw new DatabusRuntimeException("relay event producer not available: " + serviceName);
       }
       producer = orProvider.createProducer(pConfig, schemaRegistryService,
                                            dbusEventBuffer,
                                            _inBoundStatsCollectors.getStatsCollector(statsCollectorName),
                                            maxScnReaderWriters);
    } else
     {
View Full Code Here

     {
      // Get all relevant pConfig attributes and initialize the nettyThreadPool objects
      RelayEventProducer.DatabusClientNettyThreadPools nettyThreadPools =
            new RelayEventProducer.DatabusClientNettyThreadPools(0,getNetworkTimeoutTimer(),getBossExecutorService(),
                                        getIoExecutorService(), getHttpChannelGroup());
      producer = new RelayEventProducer(pConfig, dbusEventBuffer,
          _inBoundStatsCollectors
              .getStatsCollector(statsCollectorName),
          maxScnReaderWriters,nettyThreadPools);
    }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.container.monitoring.mbean.HttpStatisticsCollector

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.