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();
}
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;
}
Aggregations