use of org.apache.pulsar.common.io.SinkConfig in project incubator-pulsar by apache.
the class TestCmdSinks method testCmdSinkConfigFileCorrect.
@Test
public void testCmdSinkConfigFileCorrect() throws Exception {
SinkConfig sinkConfig = getSinkConfig();
testCmdSinkConfigFile(sinkConfig, sinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project incubator-pulsar by apache.
the class TestCmdSinks method testMissingConfig.
@Test
public void testMissingConfig() throws Exception {
SinkConfig sinkConfig = getSinkConfig();
sinkConfig.setConfigs(null);
testCmdSinkCliMissingArgs(TENANT, NAMESPACE, NAME, INPUTS, TOPIC_PATTERN, CUSTOM_SERDE_INPUT_STRING, PROCESSING_GUARANTEES, PARALLELISM, JAR_FILE_PATH, CPU, RAM, DISK, null, sinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project incubator-pulsar by apache.
the class TestCmdSinks method testMissingProcessingGuarantees.
@Test
public void testMissingProcessingGuarantees() throws Exception {
SinkConfig sinkConfig = getSinkConfig();
sinkConfig.setProcessingGuarantees(null);
testCmdSinkCliMissingArgs(TENANT, NAMESPACE, NAME, INPUTS, TOPIC_PATTERN, CUSTOM_SERDE_INPUT_STRING, null, PARALLELISM, JAR_FILE_PATH, CPU, RAM, DISK, SINK_CONFIG_STRING, sinkConfig);
}
use of org.apache.pulsar.common.io.SinkConfig in project incubator-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 incubator-pulsar by apache.
the class TestCmdSinks method testParseConfigs.
@Test
public void testParseConfigs() throws Exception {
SinkConfig testSinkConfig = getSinkConfig();
Map<String, Object> config = testSinkConfig.getConfigs();
Assert.assertEquals(config.get("int"), 1000);
Assert.assertEquals(config.get("int_string"), "1000");
Assert.assertEquals(config.get("float"), 1000.0);
Assert.assertEquals(config.get("float_string"), "1000.0");
Assert.assertEquals(config.get("created_at"), "Mon Jul 02 00:33:15 +0000 2018");
}
Aggregations