public final class ExampleBatchLayerUpdate extends Object implements BatchLayerUpdate<String,String,String>
Constructor and Description |
---|
ExampleBatchLayerUpdate() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Integer> |
countDistinctOtherWords(org.apache.spark.api.java.JavaPairRDD<String,String> data) |
void |
runUpdate(org.apache.spark.api.java.JavaSparkContext sparkContext,
long timestamp,
org.apache.spark.api.java.JavaPairRDD<String,String> newData,
org.apache.spark.api.java.JavaPairRDD<String,String> pastData,
String modelDirString,
TopicProducer<String,String> modelUpdateTopic) |
public void runUpdate(org.apache.spark.api.java.JavaSparkContext sparkContext, long timestamp, org.apache.spark.api.java.JavaPairRDD<String,String> newData, org.apache.spark.api.java.JavaPairRDD<String,String> pastData, String modelDirString, TopicProducer<String,String> modelUpdateTopic) throws IOException
runUpdate
in interface BatchLayerUpdate<String,String,String>
sparkContext
- Spark contexttimestamp
- timestamp of current intervalnewData
- data that has arrived in current intervalpastData
- all previously-known data (may be null
)modelDirString
- String representation of path where models should be output, if desiredmodelUpdateTopic
- topic to push models onto, if desired. Note that this may be null
if the application is configured to not produce updates to a topicIOException
- if an error occurs during execution of the update functionCopyright © 2014–2018. All rights reserved.