Search in sources :

Example 31 with PhysicalSourceStaticConfig

use of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig in project databus by linkedin.

the class DbusEventBufferMult method addBuffer.

/** add another buffer with the mappings */
public synchronized void addBuffer(PhysicalSourceStaticConfig pConfig, DbusEventBuffer buf) {
    LOG.info("addBuffer for phSrc=" + pConfig + "; buf=" + buf.hashCode());
    PhysicalPartition pPartition = pConfig.getPhysicalPartition();
    PhysicalPartitionKey pKey = new PhysicalPartitionKey(pPartition);
    _bufsMap.put(pKey, buf);
    _uniqBufs.add(buf);
    buf.setDropOldEvents(_dropOldEvents);
    for (LogicalSourceStaticConfig lSrc : pConfig.getSources()) {
        updateLogicalSourceMapping(pKey, lSrc.getLogicalSource(), lSrc.getPartition());
    }
}
Also used : LogicalSourceStaticConfig(com.linkedin.databus2.relay.config.LogicalSourceStaticConfig) PhysicalPartition(com.linkedin.databus.core.data_model.PhysicalPartition)

Aggregations

PhysicalSourceStaticConfig (com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig)21 ArrayList (java.util.ArrayList)10 Test (org.testng.annotations.Test)9 PhysicalSourceConfig (com.linkedin.databus2.relay.config.PhysicalSourceConfig)8 DbusEventBufferAppendable (com.linkedin.databus.core.DbusEventBufferAppendable)7 PhysicalPartition (com.linkedin.databus.core.data_model.PhysicalPartition)7 InvalidConfigException (com.linkedin.databus.core.util.InvalidConfigException)6 LogicalSourceConfig (com.linkedin.databus2.relay.config.LogicalSourceConfig)6 TransactionInfo (com.linkedin.databus.monitoring.mbean.GGParserStatistics.TransactionInfo)5 LogicalSourceStaticConfig (com.linkedin.databus2.relay.config.LogicalSourceStaticConfig)5 DbusEventBuffer (com.linkedin.databus.core.DbusEventBuffer)4 NoSuchSchemaException (com.linkedin.databus2.schemas.NoSuchSchemaException)4 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)4 EventSourceStatistics (com.linkedin.databus.monitoring.mbean.EventSourceStatistics)3 DatabusException (com.linkedin.databus2.core.DatabusException)3 EventProducer (com.linkedin.databus2.producers.EventProducer)3 PartitionFunction (com.linkedin.databus2.producers.PartitionFunction)3 OracleEventProducer (com.linkedin.databus2.producers.db.OracleEventProducer)3 HashSet (java.util.HashSet)3 BeforeTest (org.testng.annotations.BeforeTest)3