public final class RDFSpeedModelManager extends Object implements SpeedModelManager<String,String,String>
SpeedModelManager
that maintains and updates a random decision
forest model in memory.Constructor and Description |
---|
RDFSpeedModelManager(com.typesafe.config.Config config) |
Modifier and Type | Method and Description |
---|---|
Iterable<String> |
buildUpdates(org.apache.spark.api.java.JavaPairRDD<String,String> newData) |
void |
consume(Iterator<KeyMessage<String,String>> updateIterator,
org.apache.hadoop.conf.Configuration hadoopConf)
Called by the framework to initiate a continuous process of reading models, and reading
from the input topic and updating model state in memory, and issuing updates to the
update topic.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public RDFSpeedModelManager(com.typesafe.config.Config config)
public void consume(Iterator<KeyMessage<String,String>> updateIterator, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException
SpeedModelManager
consume
in interface SpeedModelManager<String,String,String>
updateIterator
- iterator to read models fromhadoopConf
- Hadoop context, which may be required for reading from HDFSIOException
- if an error occurs while reading updatespublic Iterable<String> buildUpdates(org.apache.spark.api.java.JavaPairRDD<String,String> newData)
buildUpdates
in interface SpeedModelManager<String,String,String>
newData
- RDD of raw new data from the topicCopyright © 2014–2016. All rights reserved.