Search in sources :

Example 11 with LogicalSourceConfig

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

the class TestGoldenGateEventProducer method buildSimplePssc.

private PhysicalSourceStaticConfig buildSimplePssc(short[] sourceIds, String[] sourceNames, String uri) throws InvalidConfigException {
    String partitionFunction = "constant:1";
    String pPartName = "part1";
    short pPartId = 0;
    PhysicalSourceConfig pc = new PhysicalSourceConfig(pPartName, uri, pPartId);
    for (int i = 0; i < sourceIds.length; i++) {
        LogicalSourceConfig lc = new LogicalSourceConfig();
        lc.setId(sourceIds[i]);
        lc.setName(sourceNames[i]);
        lc.setPartitionFunction(partitionFunction);
        // this format is expected by GG
        lc.setUri(pPartName + "." + sourceNames[i]);
        pc.addSource(lc);
    }
    return pc.build();
}
Also used : PhysicalSourceConfig(com.linkedin.databus2.relay.config.PhysicalSourceConfig) LogicalSourceConfig(com.linkedin.databus2.relay.config.LogicalSourceConfig)

Example 12 with LogicalSourceConfig

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

the class DatabusRelayTestUtil method createLogicalSourceConfig.

public static LogicalSourceConfig createLogicalSourceConfig(short logicalSourceId, String logicalSourceName, String logicalSourceUri, String logicalPartitionFunction) {
    LogicalSourceConfig lconf = new LogicalSourceConfig();
    lconf.setId(logicalSourceId);
    lconf.setName(logicalSourceName);
    lconf.setUri(logicalSourceUri);
    lconf.setPartitionFunction(logicalPartitionFunction);
    return lconf;
}
Also used : LogicalSourceConfig(com.linkedin.databus2.relay.config.LogicalSourceConfig)

Aggregations

LogicalSourceConfig (com.linkedin.databus2.relay.config.LogicalSourceConfig)12 PhysicalSourceConfig (com.linkedin.databus2.relay.config.PhysicalSourceConfig)10 PhysicalSourceStaticConfig (com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig)4 File (java.io.File)4 FileSystemSchemaRegistryService (com.linkedin.databus2.schemas.FileSystemSchemaRegistryService)3 BootstrapConfig (com.linkedin.databus.bootstrap.common.BootstrapConfig)2 BootstrapReadOnlyConfig (com.linkedin.databus.bootstrap.common.BootstrapReadOnlyConfig)2 ConfigLoader (com.linkedin.databus.core.util.ConfigLoader)2 InvalidConfigException (com.linkedin.databus.core.util.InvalidConfigException)2 OracleTriggerMonitoredSourceInfo (com.linkedin.databus2.producers.db.OracleTriggerMonitoredSourceInfo)2 OracleEventProducerFactory (com.linkedin.databus2.relay.OracleEventProducerFactory)2 SchemaRegistryStaticConfig (com.linkedin.databus2.schemas.SchemaRegistryStaticConfig)2 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)2 Test (org.testng.annotations.Test)2 HttpRelay (com.linkedin.databus.container.netty.HttpRelay)1 Checkpoint (com.linkedin.databus.core.Checkpoint)1 DbusEventBuffer (com.linkedin.databus.core.DbusEventBuffer)1 DbusEventKey (com.linkedin.databus.core.DbusEventKey)1 LogicalSource (com.linkedin.databus.core.data_model.LogicalSource)1 BackoffTimerStaticConfigBuilder (com.linkedin.databus2.core.BackoffTimerStaticConfigBuilder)1