use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.
the class BundleJarApp method configure.
@Override
public void configure() {
setName("BundleJarApp");
setDescription("Demonstrates usage of bundle jar applications");
addStream(new Stream("simpleInputStream"));
createDataset("simpleInputDataset", KeyValueTable.class);
createDataset("simpleOutputDataset", KeyValueTable.class);
addFlow(new SimpleFlow());
addService(new BasicService("SimpleGetOutput", new SimpleGetOutput()));
addService(new BasicService("SimpleGetInput", new SimpleGetInput()));
addService(new BasicService("PrintService", new PrintHandler()));
addMapReduce(new SimpleMapReduce());
}
use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.
the class AppWithStreamSizeSchedule method configure.
@Override
public void configure() {
try {
setName("AppWithStreamSizeSchedule");
setDescription("Sample application");
ObjectStores.createObjectStore(getConfigurer(), "input", String.class);
ObjectStores.createObjectStore(getConfigurer(), "output", String.class);
addWorkflow(new SampleWorkflow());
addStream(new Stream("stream"));
scheduleWorkflow(Schedules.builder("SampleSchedule1").createDataSchedule(Schedules.Source.STREAM, "stream", 1), "SampleWorkflow", SCHEDULE_PROPS);
scheduleWorkflow(Schedules.builder("SampleSchedule2").createDataSchedule(Schedules.Source.STREAM, "stream", 2), "SampleWorkflow", SCHEDULE_PROPS);
} catch (UnsupportedTypeException e) {
throw Throwables.propagate(e);
}
}
use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.
the class AppWithWorkflow method configure.
@Override
public void configure() {
try {
setName(NAME);
setDescription("Sample application");
addStream(new Stream("stream"));
ObjectStores.createObjectStore(getConfigurer(), "input", String.class);
ObjectStores.createObjectStore(getConfigurer(), "output", String.class);
addMapReduce(new WordCountMapReduce());
addWorkflow(new SampleWorkflow());
} catch (UnsupportedTypeException e) {
throw Throwables.propagate(e);
}
}
use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.
the class BloatedWordCountApp method configure.
@Override
public void configure() {
setName("WordCountApp");
setDescription("Application for counting words");
addStream(new Stream("text"));
createDataset("mydataset", KeyValueTable.class);
addFlow(new WordCountFlow());
addMapReduce(new VoidMapReduceJob());
addService(new WordFrequencyService());
addSpark(new SparklingNothing());
addWorker(new LazyGuy());
addWorkflow(new SingleStep());
}
use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.
the class WordCountApp method configure.
@Override
public void configure() {
setName("WordCountApp");
setDescription("Application for counting words");
addStream(new Stream("text"));
createDataset("mydataset", KeyValueTable.class);
addFlow(new WordCountFlow());
addService(new WordFrequencyService());
addMapReduce(new VoidMapReduceJob());
}
Aggregations