Packages

class RocksDB extends Logging

Class representing a RocksDB instance that checkpoints version of data to DFS. After a set of updates, a new version can be committed by calling commit(). Any past version can be loaded by calling load(version).

Note

This class is not thread-safe, so use it only from one thread.

See also

RocksDBFileManager to see how the files are laid out in local disk and DFS.

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RocksDB
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RocksDB(dfsRootDir: String, conf: RocksDBConf, localRootDir: File = Utils.createTempDir(), hadoopConf: Configuration = new Configuration, loggingId: String = "")

    dfsRootDir

    Remote directory where checkpoints are going to be written

    conf

    Configuration for RocksDB

    localRootDir

    Root directory in local disk that is used to working and checkpointing dirs

    hadoopConf

    Hadoop configuration for talking to the remote file system

    loggingId

    Id that will be prepended in logs for isolating concurrent RocksDBs

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cleanup(): Unit
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def close(): Unit

    Release all resources

  8. def commit(): Long

    Commit all the updates made as a version to DFS.

    Commit all the updates made as a version to DFS. The steps it needs to do to commits are: - Write all the updates to the native RocksDB - Flush all changes to disk - Create a RocksDB checkpoint in a new local dir - Sync the checkpoint dir files to DFS

  9. val conf: RocksDBConf
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. def get(key: Array[Byte]): Array[Byte]

    Get the value for the given key if present, or null.

    Get the value for the given key if present, or null.

    Note

    This will return the last written value even if it was uncommitted.

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def getLatestVersion(): Long

    Get the latest version available in the DFS

  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  18. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  21. def iterator(): Iterator[ByteArrayPair]

    Get an iterator of all committed and uncommitted key-value pairs.

  22. def load(version: Long): RocksDB

    Load the given version of data in a native RocksDB instance.

    Load the given version of data in a native RocksDB instance. Note that this will copy all the necessary file from DFS to local disk as needed, and possibly restart the native RocksDB instance.

  23. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  24. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  27. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logName: String
    Attributes
    protected
    Definition Classes
    RocksDB → Logging
  31. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def metrics: RocksDBMetrics

    Get current instantaneous statistics

  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. def prefixScan(prefix: Array[Byte]): Iterator[ByteArrayPair]
  40. def put(key: Array[Byte], value: Array[Byte]): Array[Byte]

    Put the given value for the given key and return the last written value.

    Put the given value for the given key and return the last written value.

    Note

    This update is not committed to disk until commit() is called.

  41. def remove(key: Array[Byte]): Array[Byte]

    Remove the key if present, and return the previous value if it was present (null otherwise).

    Remove the key if present, and return the previous value if it was present (null otherwise).

    Note

    This update is not committed to disk until commit() is called.

  42. def rollback(): Unit

    Drop uncommitted changes, and roll back to previous version.

  43. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  44. def timeTakenMs(body: => Unit): Long

    Records the duration of running body for the next query progress update.

    Records the duration of running body for the next query progress update.

    Attributes
    protected
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped