Class/Object

com.coxautodata.waimak.storage

AuditTableFile

Related Docs: object AuditTableFile | package storage

Permalink

class AuditTableFile extends AuditTable with Logging

Implementation of the AuditTable which is backed up by append only block storage like HDFS.

Created by Alexei Perelighin on 2018/03/03

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

Instance Constructors

  1. new AuditTableFile(tableInfo: AuditTableInfo, regions: Seq[AuditTableRegionInfo], storageOps: FileStorageOps, baseFolder: Path, newRegionID: (AuditTableFile) ⇒ String)

    Permalink

    tableInfo

    static details about the table, with custom metadata

    regions

    list of region details

    storageOps

    object that actually interacts with the physical storage

    baseFolder

    parent folder which contains folders with table names

    newRegionID

    function that generates region ids

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. def activeRegionIDs(): Option[Seq[String]]

    Permalink

    Returns regions ids for all active regions.

  5. def allBetween(from: Option[Timestamp], to: Option[Timestamp]): Option[Dataset[_]]

    Permalink

    Include all records between the given timestamps.

    Include all records between the given timestamps.

    returns

    if no data in storage layer, return None

    Definition Classes
    AuditTableFileAuditTable
  6. def append(ds: Dataset[_], lastUpdated: Column, appendTS: Timestamp): Try[(AuditTable, Long)]

    Permalink

    Appends a new set of records to the audit table.

    Appends a new set of records to the audit table.

    Fails when is called second time on same instance.

    ds

    records to append

    lastUpdated

    column that returns java.sql.Timestamp that will be used for de-duplication on the primary keys

    appendTS

    timestamp of when the append has happened. It will not be used for de-duplications

    returns

    (new state of the AuditTable, count of appended records) or error

    Definition Classes
    AuditTableFileAuditTable
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val baseFolder: Path

    Permalink

    parent folder which contains folders with table names

  9. def calcRegionStats(ds: Dataset[_]): (Long, Timestamp)

    Permalink
    Attributes
    protected
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val coldPath: Path

    Permalink
    Attributes
    protected
  12. def commitHotToCold(compactTS: Timestamp, rowsPerPartition: Int): Try[AuditTableFile]

    Permalink

    Compacts all hot regions into one cold.

    Compacts all hot regions into one cold.

    Attributes
    protected
  13. def compact(compactTS: Timestamp, trashMaxAge: Duration): Try[AuditTableFile.this.type]

    Permalink

    Request optimisation of the storage layer.

    Request optimisation of the storage layer.

    Fails when is called second time on same instance.

    compactTS

    timestamp of when the compaction is requested, will not be used for any filtering of the data

    trashMaxAge

    Maximum age of old region files kept in the .Trash folder after a compaction has happened.

    returns

    new state of the AuditTable

    Definition Classes
    AuditTableFileAuditTable
  14. def compactCold(compactTS: Timestamp, rowsPerRegion: Int, rowsPerPartition: Int): Try[AuditTableFile]

    Permalink

    Merges all regions below specific fresh cold into one cold region.

    Merges all regions below specific fresh cold into one cold region.

    Attributes
    protected
  15. def compactRegions(typePath: Path, toCompact: Seq[AuditTableRegionInfo], compactTS: Timestamp, rowsPerPartition: Int): Try[AuditTableFile]

    Permalink
    Attributes
    protected
  16. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getLatestTimestamp(): Option[Timestamp]

    Permalink

    Returns latest timestamp of records stored in the audit table.

    Returns latest timestamp of records stored in the audit table.

    Definition Classes
    AuditTableFileAuditTable
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. val hotPath: Path

    Permalink
    Attributes
    protected
  23. def initNewTable(): Try[AuditTableFile.this.type]

    Permalink

    Initializes audit table in the storage layer.

    Initializes audit table in the storage layer. It will also persist all of the metadata (name, primary keys, custom meta) to the storage layer.

    returns

    new state of the table or error

    Definition Classes
    AuditTableFileAuditTable
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  33. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  34. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  35. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  36. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  37. def markToUpdate(): Unit

    Permalink

    Each function that modifies the state of the storage layer must call this function in the first line.

    Each function that modifies the state of the storage layer must call this function in the first line. As audit's table state can be modified only once.

    Attributes
    protected
  38. def meta: Map[String, String]

    Permalink

    Custom attributes assigned by the client application during table creation.

    Custom attributes assigned by the client application during table creation.

    Definition Classes
    AuditTableFileAuditTable
  39. val metaBasePath: Path

    Permalink
    Attributes
    protected
  40. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  41. val newRegionID: (AuditTableFile) ⇒ String

    Permalink

    function that generates region ids

  42. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  44. val regionInfoBasePath: Path

    Permalink
    Attributes
    protected
  45. val regions: Seq[AuditTableRegionInfo]

    Permalink

    list of region details

    list of region details

    Definition Classes
    AuditTableFileAuditTable
  46. def snapshot(ts: Timestamp): Option[Dataset[_]]

    Permalink

    Generates snapshot that contains only the latest records for the given timestamp.

    Generates snapshot that contains only the latest records for the given timestamp. De-duplication happens on the primary keys.

    ts

    use records that are closest to this timestamp

    returns

    if no data in storage layer, return None

    Definition Classes
    AuditTableFileAuditTable
  47. val storageOps: FileStorageOps

    Permalink

    object that actually interacts with the physical storage

  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. val tableInfo: AuditTableInfo

    Permalink

    static details about the table, with custom metadata

  50. def tableName: String

    Permalink

    Name of the table.

    Name of the table.

    Definition Classes
    AuditTableFileAuditTable
  51. val tablePath: Path

    Permalink
    Attributes
    protected
  52. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. var wasModified: Boolean

    Permalink

    Not thread safe.

    Not thread safe. Protection against using mutator functions more than one time.

    Attributes
    protected

Inherited from Logging

Inherited from AuditTable

Inherited from AnyRef

Inherited from Any

Ungrouped