Package

org.apache.predictionio.data

storage

Permalink

package storage

If you are an engine developer, please refer to the store package.

This package provides convenient access to underlying data access objects. The common entry point is Storage.

Developer APIs are available to advanced developers to add support of other data store backends.

Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. storage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AccessKey(key: String, appid: Int, events: Seq[String]) extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores mapping of access keys, app IDs, and lists of allowed event names

    :: DeveloperApi :: Stores mapping of access keys, app IDs, and lists of allowed event names

    key

    Access key

    appid

    App ID

    events

    List of allowed events for this particular app key

    Annotations
    @DeveloperApi()
  2. trait AccessKeys extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of the AccessKey data access object

    :: DeveloperApi :: Base trait of the AccessKey data access object

    Annotations
    @DeveloperApi()
  3. case class App(id: Int, name: String, description: Option[String]) extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores mapping of app IDs and names

    :: DeveloperApi :: Stores mapping of app IDs and names

    id

    ID of the app.

    name

    Name of the app.

    description

    Long description of the app.

    Annotations
    @DeveloperApi()
  4. trait Apps extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of the App data access object

    :: DeveloperApi :: Base trait of the App data access object

    Annotations
    @DeveloperApi()
  5. trait BaseStorageClient extends AnyRef

    Permalink

    :: DeveloperApi :: Any storage backend drivers will need to implement this trait with exactly StorageClient as the class name.

    :: DeveloperApi :: Any storage backend drivers will need to implement this trait with exactly StorageClient as the class name. PredictionIO storage layer will look for this class when it instantiates the actual backend for use by higher level storage access APIs.

    Annotations
    @DeveloperApi()
  6. class BiMap[K, V] extends Serializable

    Permalink

    Immutable Bi-directional Map

  7. case class Channel(id: Int, name: String, appid: Int) extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores mapping of channel IDs, names and app ID

    :: DeveloperApi :: Stores mapping of channel IDs, names and app ID

    id

    ID of the channel

    name

    Name of the channel (must be unique within the same app)

    appid

    ID of the app which this channel belongs to

    Annotations
    @DeveloperApi()
  8. trait Channels extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of the Channel data access object

    :: DeveloperApi :: Base trait of the Channel data access object

    Annotations
    @DeveloperApi()
  9. class DataMap extends Serializable

    Permalink

    A DataMap stores properties of the event or entity.

    A DataMap stores properties of the event or entity. Internally it is a Map whose keys are property names and values are corresponding JSON values respectively. Use the String,clazz: Class[T]) method to retrieve the value of a mandatory property or use getOpt to retrieve the value of an optional property.

  10. case class DataMapException(msg: String, cause: Exception) extends Exception with Product with Serializable

    Permalink

    Exception class for DataMap

  11. case class EngineInstance(id: String, status: String, startTime: com.github.nscala_time.time.Imports.DateTime, endTime: com.github.nscala_time.time.Imports.DateTime, engineId: String, engineVersion: String, engineVariant: String, engineFactory: String, batch: String, env: Map[String, String], sparkConf: Map[String, String], dataSourceParams: String, preparatorParams: String, algorithmsParams: String, servingParams: String) extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores parameters, model, and other information for each engine instance

    :: DeveloperApi :: Stores parameters, model, and other information for each engine instance

    id

    Engine instance ID.

    status

    Status of the engine instance.

    startTime

    Start time of the training/evaluation.

    endTime

    End time of the training/evaluation.

    engineId

    Engine ID of the instance.

    engineVersion

    Engine version of the instance.

    engineVariant

    Engine variant ID of the instance.

    engineFactory

    Engine factory class for the instance.

    batch

    A batch label of the engine instance.

    env

    The environment in which the instance was created.

    sparkConf

    Custom Spark configuration of the instance.

    dataSourceParams

    Data source parameters of the instance.

    preparatorParams

    Preparator parameters of the instance.

    algorithmsParams

    Algorithms parameters of the instance.

    servingParams

    Serving parameters of the instance.

    Annotations
    @DeveloperApi()
  12. class EngineInstanceSerializer extends CustomSerializer[EngineInstance]

    Permalink

    :: DeveloperApi :: JSON4S serializer for EngineInstance

    :: DeveloperApi :: JSON4S serializer for EngineInstance

    Annotations
    @DeveloperApi()
  13. trait EngineInstances extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of the EngineInstance data access object

    :: DeveloperApi :: Base trait of the EngineInstance data access object

    Annotations
    @DeveloperApi()
  14. class EntityIdIxMap extends Serializable

    Permalink

    :: Experimental ::

    :: Experimental ::

    Annotations
    @Experimental()
  15. class EntityMap[A] extends EntityIdIxMap

    Permalink

    :: Experimental ::

    :: Experimental ::

    Annotations
    @Experimental()
  16. class EnvironmentService extends AnyRef

    Permalink
  17. case class EvaluationInstance(id: String = "", status: String = "", startTime: com.github.nscala_time.time.Imports.DateTime = DateTime.now, endTime: com.github.nscala_time.time.Imports.DateTime = DateTime.now, evaluationClass: String = "", engineParamsGeneratorClass: String = "", batch: String = "", env: Map[String, String] = Map.empty, sparkConf: Map[String, String] = Map.empty, evaluatorResults: String = "", evaluatorResultsHTML: String = "", evaluatorResultsJSON: String = "") extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores meta information for each evaluation instance.

    :: DeveloperApi :: Stores meta information for each evaluation instance.

    id

    Instance ID.

    status

    Status of this instance.

    startTime

    Start time of this instance.

    endTime

    End time of this instance.

    evaluationClass

    Evaluation class name of this instance.

    engineParamsGeneratorClass

    Engine parameters generator class name of this instance.

    batch

    Batch label of this instance.

    env

    The environment in which this instance was created.

    evaluatorResults

    Results of the evaluator.

    evaluatorResultsHTML

    HTML results of the evaluator.

    evaluatorResultsJSON

    JSON results of the evaluator.

    Annotations
    @DeveloperApi()
  18. class EvaluationInstanceSerializer extends CustomSerializer[EvaluationInstance]

    Permalink

    :: DeveloperApi :: JSON4S serializer for EvaluationInstance

  19. trait EvaluationInstances extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of the EvaluationInstance data access object

    :: DeveloperApi :: Base trait of the EvaluationInstance data access object

    Annotations
    @DeveloperApi()
  20. case class Event(eventId: Option[String] = None, event: String, entityType: String, entityId: String, targetEntityType: Option[String] = None, targetEntityId: Option[String] = None, properties: DataMap = DataMap(), eventTime: DateTime = DateTime.now, tags: Seq[String] = Nil, prId: Option[String] = None, creationTime: DateTime = DateTime.now) extends Product with Serializable

    Permalink

    Each event in the Event Store can be represented by fields in this case class.

    Each event in the Event Store can be represented by fields in this case class.

    eventId

    Unique ID of this event.

    event

    Name of this event.

    entityType

    Type of the entity associated with this event.

    entityId

    ID of the entity associated with this event.

    targetEntityType

    Type of the target entity associated with this event.

    targetEntityId

    ID of the target entity associated with this event.

    properties

    Properties associated with this event.

    eventTime

    Time of the happening of this event.

    tags

    Tags of this event.

    prId

    PredictedResultId of this event.

    creationTime

    Time of creation in the system of this event.

  21. trait LEvents extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait of a data access object that directly returns Event without going through Spark's parallelization.

    :: DeveloperApi :: Base trait of a data access object that directly returns Event without going through Spark's parallelization. Engine developers should use org.apache.predictionio.data.store.LEventStore instead of using this directly.

    Annotations
    @DeveloperApi()
  22. case class Model(id: String, models: Array[Byte]) extends Product with Serializable

    Permalink

    :: DeveloperApi :: Stores model for each engine instance

    :: DeveloperApi :: Stores model for each engine instance

    id

    ID of the model, which should be the same as engine instance ID

    models

    Trained models of all algorithms

    Annotations
    @DeveloperApi()
  23. class ModelSerializer extends CustomSerializer[Model]

    Permalink

    :: DeveloperApi :: JSON4S serializer for Model

    :: DeveloperApi :: JSON4S serializer for Model

    Annotations
    @DeveloperApi()
  24. trait Models extends AnyRef

    Permalink

    :: DeveloperApi :: Base trait for of the Model data access object

    :: DeveloperApi :: Base trait for of the Model data access object

    Annotations
    @DeveloperApi()
  25. case class NullModel() extends Product with Serializable

    Permalink
  26. trait PEvents extends Serializable

    Permalink

    :: DeveloperApi :: Base trait of a data access object that returns Event related RDD data structure.

    :: DeveloperApi :: Base trait of a data access object that returns Event related RDD data structure. Engine developers should use org.apache.predictionio.data.store.PEventStore instead of using this directly.

    Annotations
    @DeveloperApi()
  27. class PropertyMap extends DataMap

    Permalink

    A PropertyMap stores aggregated properties of the entity.

    A PropertyMap stores aggregated properties of the entity. Internally it is a Map whose keys are property names and values are corresponding JSON values respectively. Use the get() method to retrieve the value of mandatory property or use getOpt() to retrieve the value of the optional property.

  28. case class StorageClientConfig(parallel: Boolean = false, test: Boolean = false, properties: Map[String, String] = Map.empty) extends Product with Serializable

    Permalink

    :: DeveloperApi :: A wrapper of storage client configuration that will be populated by PredictionIO automatically, and passed to the StorageClient during instantiation.

    :: DeveloperApi :: A wrapper of storage client configuration that will be populated by PredictionIO automatically, and passed to the StorageClient during instantiation.

    parallel

    This is set to true by PredictionIO when the storage client is instantiated in a parallel data source.

    test

    This is set to true by PredictionIO when tests are being run.

    properties

    This is populated by PredictionIO automatically from environmental configuration variables. If you have these variables,

    • PIO_STORAGE_SOURCES_PGSQL_TYPE=jdbc
    • PIO_STORAGE_SOURCES_PGSQL_USERNAME=abc
    • PIO_STORAGE_SOURCES_PGSQL_PASSWORD=xyz this field will be filled as a map of string to string:
    • TYPE -> jdbc
    • USERNAME -> abc
    • PASSWORD -> xyz
    Annotations
    @DeveloperApi()
  29. class StorageClientException extends RuntimeException

    Permalink

    :: DeveloperApi :: Thrown when a StorageClient runs into an exceptional condition

    :: DeveloperApi :: Thrown when a StorageClient runs into an exceptional condition

    Annotations
    @DeveloperApi()
  30. class StorageException extends Exception

    Permalink

    :: DeveloperApi :: Thrown by data access objects when they run into exceptional conditions

    :: DeveloperApi :: Thrown by data access objects when they run into exceptional conditions

    Annotations
    @DeveloperApi()

Value Members

  1. object BatchEventsJson4sSupport

    Permalink
    Annotations
    @DeveloperApi()
  2. object BiMap extends Serializable

    Permalink
  3. object Channel extends Serializable

    Permalink

    :: DeveloperApi :: Companion object of Channel

    :: DeveloperApi :: Companion object of Channel

    Annotations
    @DeveloperApi()
  4. object DataMap extends Serializable

    Permalink

    Companion object of the DataMap class

  5. object DateTimeJson4sSupport

    Permalink

    :: DeveloperApi :: JSON4S serializer for Joda-Time

    :: DeveloperApi :: JSON4S serializer for Joda-Time

    Annotations
    @DeveloperApi()
  6. object EntityIdIxMap extends Serializable

    Permalink

    :: Experimental ::

    :: Experimental ::

    Annotations
    @Experimental()
  7. object EnvironmentFactory

    Permalink
  8. object EventJson4sSupport

    Permalink

    :: DeveloperApi :: Support library for dealing with Event and JSON4S

    :: DeveloperApi :: Support library for dealing with Event and JSON4S

    Annotations
    @DeveloperApi()
  9. object EventValidation

    Permalink

    :: DeveloperApi :: Utilities for validating Events

    :: DeveloperApi :: Utilities for validating Events

    Annotations
    @DeveloperApi()
  10. object LEventAggregator

    Permalink

    :: DeveloperApi :: Provides aggregation support of Events to LEvents.

    :: DeveloperApi :: Provides aggregation support of Events to LEvents. Engine developers should use org.apache.predictionio.data.store.LEventStore instead of using this directly.

    Annotations
    @DeveloperApi()
  11. object PropertyMap extends Serializable

    Permalink

    Companion object of the PropertyMap class.

  12. object Storage extends Logging

    Permalink

    Backend-agnostic data storage layer with lazy initialization.

    Backend-agnostic data storage layer with lazy initialization. Use this object when you need to interface with Event Store in your engine.

Inherited from AnyRef

Inherited from Any

Common

Event Data

Meta Data

Model Data

Storage System

Ungrouped