K
- type of key read from input topicM
- type of message read from input topicU
- type of model message written@FunctionalInterface public interface BatchLayerUpdate<K,M,U> extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
runUpdate(org.apache.spark.api.java.JavaSparkContext sparkContext,
long timestamp,
org.apache.spark.api.java.JavaPairRDD<K,M> newData,
org.apache.spark.api.java.JavaPairRDD<K,M> pastData,
String modelDirString,
TopicProducer<String,U> modelUpdateTopic) |
void runUpdate(org.apache.spark.api.java.JavaSparkContext sparkContext, long timestamp, org.apache.spark.api.java.JavaPairRDD<K,M> newData, org.apache.spark.api.java.JavaPairRDD<K,M> pastData, String modelDirString, TopicProducer<String,U> modelUpdateTopic) throws IOException, InterruptedException
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 functionInterruptedException
- if the caller is interrupted waiting for parallel tasks
to completeCopyright © 2014–2018. All rights reserved.