Object

org.apache.predictionio.data.store

LEventStore

Related Doc: package store

Permalink

object LEventStore

This object provides a set of operation to access Event Store without going through Spark's parallelization.

Note that blocking methods of this object uses scala.concurrent.ExecutionContext.Implicits.global internally. Since this is a thread pool which has a number of threads equal to available processors, parallelism is limited up to the number of processors.

If this limitation become bottleneck of resource usage, you can increase the number of threads by declaring following VM options before calling "pio deploy":

export JAVA_OPTS="$JAVA_OPTS \
  -Dscala.concurrent.context.numThreads=1000 \
  -Dscala.concurrent.context.maxThreads=1000"

You can learn more about the global execution context in the Scala documentation: https://docs.scala-lang.org/overviews/core/futures.html#the-global-execution-context

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def find(appName: String, entityType: Option[String] = None, entityId: Option[String] = None, channelName: Option[String] = None, eventNames: Option[Seq[String]] = None, targetEntityType: Option[Option[String]] = None, targetEntityId: Option[Option[String]] = None, startTime: Option[DateTime] = None, untilTime: Option[DateTime] = None, limit: Option[Int] = None, timeout: Duration = defaultTimeout): Iterator[Event]

    Permalink

    Reads events generically.

    Reads events generically. If entityType or entityId is not specified, it results in table scan.

    appName

    return events of this app

    entityType

    return events of this entityType

    • None means no restriction on entityType
    • Some(x) means entityType should match x.
    entityId

    return events of this entityId

    • None means no restriction on entityId
    • Some(x) means entityId should match x.
    channelName

    return events of this channel (default channel if it's None)

    eventNames

    return events with any of these event names.

    targetEntityType

    return events of this targetEntityType:

    • None means no restriction on targetEntityType
    • Some(None) means no targetEntityType for this event
    • Some(Some(x)) means targetEntityType should match x.
    targetEntityId

    return events of this targetEntityId

    • None means no restriction on targetEntityId
    • Some(None) means no targetEntityId for this event
    • Some(Some(x)) means targetEntityId should match x.
    startTime

    return events with eventTime >= startTime

    untilTime

    return events with eventTime < untilTime

    limit

    Limit number of events. Get all events if None or Some(-1)

    returns

    Iterator[Event]

  10. def findAsync(appName: String, entityType: Option[String] = None, entityId: Option[String] = None, channelName: Option[String] = None, eventNames: Option[Seq[String]] = None, targetEntityType: Option[Option[String]] = None, targetEntityId: Option[Option[String]] = None, startTime: Option[DateTime] = None, untilTime: Option[DateTime] = None, limit: Option[Int] = None)(implicit ec: ExecutionContext): Future[Iterator[Event]]

    Permalink

    Reads events generically.

    Reads events generically. If entityType or entityId is not specified, it results in table scan.

    appName

    return events of this app

    entityType

    return events of this entityType

    • None means no restriction on entityType
    • Some(x) means entityType should match x.
    entityId

    return events of this entityId

    • None means no restriction on entityId
    • Some(x) means entityId should match x.
    channelName

    return events of this channel (default channel if it's None)

    eventNames

    return events with any of these event names.

    targetEntityType

    return events of this targetEntityType:

    • None means no restriction on targetEntityType
    • Some(None) means no targetEntityType for this event
    • Some(Some(x)) means targetEntityType should match x.
    targetEntityId

    return events of this targetEntityId

    • None means no restriction on targetEntityId
    • Some(None) means no targetEntityId for this event
    • Some(Some(x)) means targetEntityId should match x.
    startTime

    return events with eventTime >= startTime

    untilTime

    return events with eventTime < untilTime

    limit

    Limit number of events. Get all events if None or Some(-1)

    returns

    Future[Iterator[Event]]

  11. def findByEntity(appName: String, entityType: String, entityId: String, channelName: Option[String] = None, eventNames: Option[Seq[String]] = None, targetEntityType: Option[Option[String]] = None, targetEntityId: Option[Option[String]] = None, startTime: Option[DateTime] = None, untilTime: Option[DateTime] = None, limit: Option[Int] = None, latest: Boolean = true, timeout: Duration = defaultTimeout): Iterator[Event]

    Permalink

    Reads events of the specified entity.

    Reads events of the specified entity. May use this in Algorithm's predict() or Serving logic to have fast event store access.

    appName

    return events of this app

    entityType

    return events of this entityType

    entityId

    return events of this entityId

    channelName

    return events of this channel (default channel if it's None)

    eventNames

    return events with any of these event names.

    targetEntityType

    return events of this targetEntityType:

    • None means no restriction on targetEntityType
    • Some(None) means no targetEntityType for this event
    • Some(Some(x)) means targetEntityType should match x.
    targetEntityId

    return events of this targetEntityId

    • None means no restriction on targetEntityId
    • Some(None) means no targetEntityId for this event
    • Some(Some(x)) means targetEntityId should match x.
    startTime

    return events with eventTime >= startTime

    untilTime

    return events with eventTime < untilTime

    limit

    Limit number of events. Get all events if None or Some(-1)

    latest

    Return latest event first (default true)

    returns

    Iterator[Event]

  12. def findByEntityAsync(appName: String, entityType: String, entityId: String, channelName: Option[String] = None, eventNames: Option[Seq[String]] = None, targetEntityType: Option[Option[String]] = None, targetEntityId: Option[Option[String]] = None, startTime: Option[DateTime] = None, untilTime: Option[DateTime] = None, limit: Option[Int] = None, latest: Boolean = true)(implicit ec: ExecutionContext): Future[Iterator[Event]]

    Permalink

    Reads events of the specified entity.

    Reads events of the specified entity. May use this in Algorithm's predict() or Serving logic to have fast event store access.

    appName

    return events of this app

    entityType

    return events of this entityType

    entityId

    return events of this entityId

    channelName

    return events of this channel (default channel if it's None)

    eventNames

    return events with any of these event names.

    targetEntityType

    return events of this targetEntityType:

    • None means no restriction on targetEntityType
    • Some(None) means no targetEntityType for this event
    • Some(Some(x)) means targetEntityType should match x.
    targetEntityId

    return events of this targetEntityId

    • None means no restriction on targetEntityId
    • Some(None) means no targetEntityId for this event
    • Some(Some(x)) means targetEntityId should match x.
    startTime

    return events with eventTime >= startTime

    untilTime

    return events with eventTime < untilTime

    limit

    Limit number of events. Get all events if None or Some(-1)

    latest

    Return latest event first (default true)

    returns

    Future[Iterator[Event]]

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped