@InterfaceStability.Evolving public class StreamFactory extends Object
| Constructor and Description |
|---|
StreamFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ApexStream<String> |
fromFolder(String folderName) |
static ApexStream<String> |
fromFolder(String folderName,
Option... opts)
Create a stream of string tuples from reading files in hdfs folder line by line
|
static <T> ApexStream<T> |
fromInput(com.datatorrent.api.InputOperator operator,
com.datatorrent.api.Operator.OutputPort<T> outputPort,
Option... opts)
Create a stream with any input operator
|
static ApexStream<String> |
fromKafka08(String zookeepers,
String topic) |
static ApexStream<String> |
fromKafka08(String zookeepers,
String topic,
Option... opts)
Create a stream of string reading input from kafka 0.8
|
static ApexStream<byte[]> |
fromKafka09(String brokers,
String topic,
Option... opts)
Create stream of byte array messages from kafka 0.9
|
static ApexStream<byte[]> |
fromKafka09(String brokers,
String topic,
PartitionStrategy strategy,
int partitionNumber,
Option... opts)
Create stream of byte array messages from kafka 0.9 with more partition options
|
public static ApexStream<String> fromFolder(String folderName, Option... opts)
folderName - opts - public static ApexStream<String> fromFolder(String folderName)
public static ApexStream<String> fromKafka08(String zookeepers, String topic)
public static ApexStream<String> fromKafka08(String zookeepers, String topic, Option... opts)
zookeepers - topic - opts - public static <T> ApexStream<T> fromInput(com.datatorrent.api.InputOperator operator, com.datatorrent.api.Operator.OutputPort<T> outputPort, Option... opts)
T - operator - outputPort - opts - public static ApexStream<byte[]> fromKafka09(String brokers, String topic, Option... opts)
brokers - topic - opts - public static ApexStream<byte[]> fromKafka09(String brokers, String topic, PartitionStrategy strategy, int partitionNumber, Option... opts)
Copyright © 2015-2017 Apache Software Foundation. All Rights Reserved.