K- type of key read from input topic
M- type of message read from input topic
U- type of update message read/written
public abstract class AbstractSpeedModelManager<K,M,U> extends Object implements SpeedModelManager<K,M,U>
SpeedModelManagerthat provides default implementations.
|Constructor and Description|
|Modifier and Type||Method and Description|
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.
Convenience method that is called by the default implementation of
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void consume(Iterator<KeyMessage<String,U>> updateIterator, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException
public void consumeKeyMessage(String key, U message, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException
consume(Iterator, Configuration), to process one key-message pair. It does nothing, except log the message. This should generally be overridden if and only if
consume(Iterator, Configuration)is not.
key- key to process (non-null)
message- message to process
hadoopConf- Hadoop configuration for process
IOException- if an error occurs while processing the message
Copyright © 2014–2017. All rights reserved.