use of org.apache.samza.system.descriptors.examples.expanding.ExampleExpandingSystemDescriptor in project samza by apache.
the class TestExpandingInputDescriptor method testISDObjectsWithOverrides.
@Test
public void testISDObjectsWithOverrides() {
ExampleExpandingSystemDescriptor expandingSystem = new ExampleExpandingSystemDescriptor("expandingSystem");
IntegerSerde streamSerde = new IntegerSerde();
ExampleExpandingInputDescriptor<Long> expandingISD = expandingSystem.getInputDescriptor("input-stream", streamSerde);
assertEquals(streamSerde, expandingISD.getSerde());
assertEquals(expandingSystem.getTransformer().get(), expandingISD.getTransformer().get());
}
use of org.apache.samza.system.descriptors.examples.expanding.ExampleExpandingSystemDescriptor in project samza by apache.
the class TestExpandingInputDescriptor method testAPIUsage.
public void testAPIUsage() {
// does not assert anything, but acts as a compile-time check on expected descriptor type parameters
// and validates that the method calls can be chained.
ExampleExpandingSystemDescriptor expandingSystem = new ExampleExpandingSystemDescriptor("expandingSystem");
ExampleExpandingInputDescriptor<Long> input1 = expandingSystem.getInputDescriptor("input1", new IntegerSerde());
ExampleExpandingOutputDescriptor<Integer> output1 = expandingSystem.getOutputDescriptor("output1", new IntegerSerde());
input1.shouldBootstrap().withOffsetDefault(SystemStreamMetadata.OffsetType.NEWEST).withPriority(1).shouldResetOffset().withStreamConfigs(Collections.emptyMap());
output1.withStreamConfigs(Collections.emptyMap());
}
Aggregations