Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

References


Appendix A: API changes


Code Block
languagejava
titleChanges for dataset
// Dataset Context:
<T extends Dataset> T getDataset(String namespace, String name) 
<T extends Dataset> T getDataset(String namespace, String name, Map<String, String> arguments) 



// Add APIs to programs to support accessing dataset from a different namespace: 

// MapReduce: 
context.addInput(Input.ofStream("stream").fromNamespace("ns")); 

// Spark: 
public <K, V> JavaPairRDD<K, V> fromDataset(String namespace, String datasetName) 

public <K, V> JavaPairRDD<K, V> fromDataset(String namespace, String datasetName, Map<String, String> arguments) 

public abstract <K, V> JavaPairRDD<K, V> fromDataset(String namespace, String datasetName, Map<String, String> arguments, @Nullable Iterable<? extends Split> splits); 	
Code Block
languagejava
titleChanges for dataset
// Dataset Context:
<T extends Dataset> T getDataset(String namespace, String name) 
<T extends Dataset> T getDataset(String namespace, String name, Map<String, String> arguments) 



// Add APIs for todifferent programs to support accessing datasetstream from aanother different namespace: 

// MapReduce: 
context.addInput(Input.ofStream("stream").fromNamespace("ns")); 


// SparkFlowlet: 
public <K, V> JavaPairRDD<K, V> fromDatasetvoid connectStream(String stream, Flowlet flowlet) 
void connectStream(String namespacestream, String datasetNameflowlet) 

public
<K, V> JavaPairRDD<K, V> fromDataset// Spark: 
JavaRDD<StreamEvent> fromStream(String namespace, String datasetNamestreamName, long Map<StringstartTime, String>long argumentsendTime); 

public abstract <KJavaPairRDD<Long, V> JavaPairRDD<K, V> fromDatasetfromStream(String namespace, String datasetNamestreamName, Map<String,Class<V> String>valueType) arguments,
@Nullable Iterable<? extends Split> splits); 	

...


JavaPairRDD<Long, V> fromStream(String namespace, String streamName, long startTime, long endTime,Class<V> valueType); 

JavaPairRDD<K, V> fromStream(String namespace, String streamName, long startTime, long endTime,Class<? extends StreamEventDecoder<K, V>> decoderClass,Class<K> keyType, Class<V> valueType); 

JavaPairRDD<Long, GenericStreamEventData<T>> fromStream(String namespace, String streamName,FormatSpecification formatSpec,long startTime, long endTime,Class<T> dataType);