K
- type of key read from input topicM
- type of message read from input topicU
- type of model message writtenpublic final class ScalaBatchLayerUpdateAdapter<K,M,U> extends Object implements BatchLayerUpdate<K,M,U>
ScalaBatchLayerUpdate
to be a Java BatchLayerUpdate
.Constructor and Description |
---|
ScalaBatchLayerUpdateAdapter(com.cloudera.oryx.api.batch.ScalaBatchLayerUpdate<K,M,U> scalaUpdate) |
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) |
public 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)
runUpdate
in interface BatchLayerUpdate<K,M,U>
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 topicCopyright © 2014–2018. All rights reserved.