U
- type of update message read/writtenpublic final class ScalaServingModelManagerAdapter<U> extends Object implements ServingModelManager<U>
ScalaServingModelManager
to be a Java ServingModelManager
.Constructor and Description |
---|
ScalaServingModelManagerAdapter(com.cloudera.oryx.api.serving.ScalaServingModelManager<U> scalaManager) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
consume(Iterator<KeyMessage<String,U>> 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.
|
com.typesafe.config.Config |
getConfig() |
ServingModel |
getModel() |
boolean |
isReadOnly() |
public ScalaServingModelManagerAdapter(com.cloudera.oryx.api.serving.ScalaServingModelManager<U> scalaManager)
public void consume(Iterator<KeyMessage<String,U>> updateIterator, org.apache.hadoop.conf.Configuration hadoopConf)
ServingModelManager
consume
in interface ServingModelManager<U>
updateIterator
- iterator to read models fromhadoopConf
- Hadoop context, which may be required for reading from HDFSpublic com.typesafe.config.Config getConfig()
getConfig
in interface ServingModelManager<U>
public ServingModel getModel()
getModel
in interface ServingModelManager<U>
public boolean isReadOnly()
isReadOnly
in interface ServingModelManager<U>
public void close()
close
in interface ServingModelManager<U>
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2014–2018. All rights reserved.