THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
/**
* CollectionStream acts a descriptor that can be used to build an in memory input stream (single/multiple partition) of collections(list, map).
*/
public class CollectionStream<T> {
// Create an empty stream that a Samza job can produce to
public static <T> CollectionStream<T> empty(String streamName) {...}
// Create a stream of messages from input list with single partition
public static <T> CollectionStream<T> of(String streamName, Iterable<T> collection){...}
// Create a stream of messages from input list with multiple partition, key of partitions map is partitionId
public static <T> CollectionStream<T> of(String streamName, Map<Integer,? extends Iterable<T>> partitions){...}
// Associate this CollectionStream with a CollectionStreamSystem
public CollectionStream<T> from(CollectionStreamSystem system) {...}
}
|
...