use of org.apache.pulsar.common.io.SinkConfig in project pulsar by apache.
the class TestCmdSinks method testMissingTopicPattern.
@Test
public void testMissingTopicPattern() throws Exception {
SinkConfig sinkConfig = getSinkConfig();
sinkConfig.setTopicsPattern(null);
testCmdSinkCliMissingArgs(TENANT, NAMESPACE, NAME, INPUTS, null, CUSTOM_SERDE_INPUT_STRING, PROCESSING_GUARANTEES, PARALLELISM, JAR_FILE_PATH, CPU, RAM, DISK, SINK_CONFIG_STRING, sinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project pulsar by apache.
the class TestCmdSinks method testMissingArchive.
@Test(expectedExceptions = ParameterException.class, expectedExceptionsMessageRegExp = "Sink archive not specfied")
public void testMissingArchive() throws Exception {
SinkConfig sinkConfig = getSinkConfig();
sinkConfig.setArchive(null);
testCmdSinkCliMissingArgs(TENANT, NAMESPACE, NAME, INPUTS, TOPIC_PATTERN, CUSTOM_SERDE_INPUT_STRING, PROCESSING_GUARANTEES, PARALLELISM, null, CPU, RAM, DISK, SINK_CONFIG_STRING, sinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project pulsar by apache.
the class TestCmdSinks method testCmdSinkConfigFileMissingProcessingGuarantees.
@Test
public void testCmdSinkConfigFileMissingProcessingGuarantees() throws Exception {
SinkConfig testSinkConfig = getSinkConfig();
testSinkConfig.setProcessingGuarantees(null);
SinkConfig expectedSinkConfig = getSinkConfig();
expectedSinkConfig.setProcessingGuarantees(null);
testCmdSinkConfigFile(testSinkConfig, expectedSinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project pulsar by apache.
the class TestCmdSinks method getSinkConfig.
public SinkConfig getSinkConfig() throws JsonProcessingException {
SinkConfig sinkConfig = new SinkConfig();
sinkConfig.setTenant(TENANT);
sinkConfig.setNamespace(NAMESPACE);
sinkConfig.setName(NAME);
sinkConfig.setInputs(INPUTS_LIST);
sinkConfig.setTopicToSerdeClassName(CUSTOM_SERDE_INPUT_MAP);
sinkConfig.setTopicsPattern(TOPIC_PATTERN);
sinkConfig.setProcessingGuarantees(PROCESSING_GUARANTEES);
sinkConfig.setParallelism(PARALLELISM);
sinkConfig.setArchive(JAR_FILE_PATH);
sinkConfig.setResources(new Resources(CPU, RAM, DISK));
sinkConfig.setConfigs(createSink.parseConfigs(SINK_CONFIG_STRING));
return sinkConfig;
}
use of org.apache.pulsar.common.io.SinkConfig in project pulsar by apache.
the class TestCmdSinks method testCmdSinkConfigFileMissingTopicToSerdeClassName.
@Test
public void testCmdSinkConfigFileMissingTopicToSerdeClassName() throws Exception {
SinkConfig testSinkConfig = getSinkConfig();
SinkConfig expectedSinkConfig = getSinkConfig();
testCmdSinkConfigFile(testSinkConfig, expectedSinkConfig);
}
Aggregations