Search in sources :

Example 11 with Stream

use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.

the class NoMapperStreamSpaceApp method configure.

@Override
public void configure() {
    addStream(new Stream("nomapper"));
    createDataset("results", KeyValueTable.class);
    addMapReduce(new NoMapperMapReduce());
}
Also used : Stream(co.cask.cdap.api.data.stream.Stream)

Example 12 with Stream

use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.

the class TestBatchStreamIntegrationApp method configure.

@Override
public void configure() {
    setName("TestFlowStreamIntegrationApp");
    addStream(new Stream("s_1"));
    createDataset("results", KeyValueTable.class);
    addFlow(new StreamTestFlow());
    addMapReduce(new StreamTestBatch());
    addMapReduce(new StreamTestBatchIdDecoder());
}
Also used : Stream(co.cask.cdap.api.data.stream.Stream)

Example 13 with Stream

use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.

the class AppWithMapReduceUsingStream method configure.

@Override
public void configure() {
    setName("AppWithMapReduceUsingStream");
    setDescription("Application with MapReduce job using stream as input");
    addStream(new Stream("mrStream"));
    createDataset("prices", KeyValueTable.class);
    addMapReduce(new BodyTracker());
}
Also used : Stream(co.cask.cdap.api.data.stream.Stream)

Example 14 with Stream

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");
    addStream(new Stream("text"));
    addDatasetModule("my-kv", MyKeyValueTableDefinition.Module.class);
    createDataset("mydataset", "myKeyValueTable", DatasetProperties.EMPTY);
    createDataset("totals", "myKeyValueTable", DatasetProperties.EMPTY);
    addFlow(new WordCountFlow());
    addService(new BasicService("WordFrequency", new WordFrequencyHandler()));
    addMapReduce(new CountTotal());
    addMapReduce(new CountFromStream());
}
Also used : BasicService(co.cask.cdap.api.service.BasicService) Stream(co.cask.cdap.api.data.stream.Stream)

Example 15 with Stream

use of co.cask.cdap.api.data.stream.Stream in project cdap by caskdata.

the class DefaultDatasetConfigurer method addStream.

@Override
public void addStream(String streamName) {
    checkArgument(streamName != null && !streamName.isEmpty(), "Stream Name cannot be null or empty");
    addStream(new Stream(streamName));
}
Also used : Stream(co.cask.cdap.api.data.stream.Stream)

Aggregations

Stream (co.cask.cdap.api.data.stream.Stream)48 UnsupportedTypeException (co.cask.cdap.api.data.schema.UnsupportedTypeException)10 BasicService (co.cask.cdap.api.service.BasicService)6 InputStream (java.io.InputStream)2 Schema (co.cask.cdap.api.data.schema.Schema)1 KeyValueTable (co.cask.cdap.api.dataset.lib.KeyValueTable)1 Table (co.cask.cdap.api.dataset.table.Table)1 AvroKeyOutputFormat (org.apache.avro.mapreduce.AvroKeyOutputFormat)1 TextOutputFormat (org.apache.hadoop.mapreduce.lib.output.TextOutputFormat)1