object AuditTableFile extends Logging
- Alphabetic
- By Inheritance
- AuditTableFile
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type RegionMap = Map[(String, String, String), AuditTableRegionInfo]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val COLD_PARTITION: String
- val DE_LAST_UPDATED_COLUMN: String
- val HOT_PARTITION: String
- val REGION_INFO_DIRECTORY: String
- val STORE_REGION_COLUMN: String
- val STORE_TYPE_COLUMN: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearTableRegionCache(audit: AuditTableFile): Unit
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
createTable(sparkSession: SparkSession, fileStorage: FileStorageOps, basePath: Path, tableInfo: AuditTableInfo)(newRegionID: (AuditTableFile) ⇒ String): Try[AuditTableFile]
Creates a table in the physical storage layer.
Creates a table in the physical storage layer.
- tableInfo
table metadata
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val highTimestamp: Timestamp
-
def
inferRegionsWithStats(sparkSession: SparkSession, fileStorage: FileStorageOps, basePath: Path, tableNames: Seq[String], includeHot: Boolean = true, skipRegionInfoCache: Boolean = false): Seq[AuditTableRegionInfo]
In one spark job scans all of the specified tables and infers stats about each region of the listed tables.
In one spark job scans all of the specified tables and infers stats about each region of the listed tables.
- includeHot
if true, than hot regions will be included in the scan. By default is true. False is useful when reading production data from dev environments, as compactions will be happening in out of office hours, this helps to avoid reading data in an inconsistent state.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
logAndReturn[A](a: A, msg: String, level: Level): A
- Definition Classes
- Logging
-
def
logAndReturn[A](a: A, message: (A) ⇒ String, level: Level): A
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- val lowTimestamp: Timestamp
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextLongRegion(table: AuditTableFile): String
Generic function that generates sequential region ids that are padded on the left with zeros up to 20 chars.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
openTables(sparkSession: SparkSession, fileStorage: FileStorageOps, basePath: Path, tableNames: Seq[String], includeHot: Boolean = true)(newRegionID: (AuditTableFile) ⇒ String): (Map[String, Try[AuditTableFile]], Seq[String])
Reads the state of the multiple Audit Tables.
Reads the state of the multiple Audit Tables. It will scan the state of regions of all specified tables in one go.
- fileStorage
object that actually interacts with the physical storage
- basePath
parent folder which contains folders with table names
- tableNames
list of tables to open
- includeHot
include hot regions in the table
- newRegionID
function that generates region ids
- returns
(Map[TABLE NAME, AuditTable], Seq[MISSING TABLES]) - audit table objects that exist and of table names that were not found under the basePath
-
def
setRegions(audit: AuditTableFile, allRegions: Seq[AuditTableRegionInfo], appendedRegions: Option[Seq[AuditTableRegionInfo]]): AuditTableFile
Creates a copy of the table with new list of regions.
Creates a copy of the table with new list of regions.
- audit
- Audit table with old regions
- allRegions
- Complete set of current regions
- appendedRegions
- Optional list of regions that have been appended. If given, only new regions are written to cache. If None the current cached region information is completely rewritten. If the case of any region deletes, this should be None.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()