Class AbstractDatabase
java.lang.Object
com.illumon.iris.db.tables.databases.BaseDatabase
com.illumon.iris.db.tables.databases.AbstractDatabase
- All Implemented Interfaces:
Database
- Direct Known Subclasses:
OnDiskDatabase
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.tables.databases.Database
Database.LogHandle, Database.StorageFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TexecuteQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) Executes a DB query.voidgc()Invoke the garbage collector for this database.Gets a client hostname.Get an error log for the DB.Gets the unique processInfoId of the worker.getReplayer(DBDateTime timeStart, DBDateTime timeEnd) Creates a data replayer.getReplayer(DBDateTime time, DBDateTime endTime, long interval) Creates a data replayer.Gets the server hostname.Gets the worker name.voidimportClass(Class classToImport) Imports a class for use in a query.voidimportStatic(Class classToImport) Imports the static methods from a class for use in a query.logPartitionTableSnapshot(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, String logInterval, boolean append) Snapshots a table at a regular interval and writes the snapshot to a local table.logPartitionTableSnapshot(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, String logInterval, ReplayerInterface replayer, boolean append) Snapshots a table at a regular interval and writes the snapshot to a local table.makeRemote(Table value) Make a copy of a local table on a remote server.Convenience method forDatabase.makeRemote(Table).
Make a copy of a local table on a remote server.voidshutdown()Shuts this database down.voidstartup()Starts this database up.Methods inherited from class com.illumon.iris.db.tables.databases.BaseDatabase
addPartitionedTableDefinition, addPartitionedTableDefinition, addPartitionedTableDefinitionIfAbsent, addPartitionedTableDefinitionIfAbsent, addTablePartition, addTablePartitionAndDefinition, addTablePartitionAndDefinition, appendCentral, appendTablePartition, removeTablePartition, replaceTablePartitionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.tables.databases.Database
addColumnPartitionAndDefinition, addColumnPartitionAndDefinition, addTable, addTable, addTableDefinition, addTablePartition, addTablePartition, addTablePartition, appendCentral, appendTable, appendTablePartition, closeAndDeleteCentral, closeAndDeleteCentral, deleteMatchingTables, deleteNamespace, deleteTables, getCatalog, getColumnPartitionTableWriter, getIntradayPartitions, getIntradayPartitionsAsTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getLastByTable, getNamespaces, getReplayer, getReplayer, getReplayer, getSchemaService, getSystemNamespaces, getTable, getTableDefinition, getTableNames, getTableV2, getTableWriter, getUserContext, getUserNamespaces, hasImportedData, hasIntradayData, hasIntradayTable, hasNamespace, hasTable, i, i, i, i, i, i, i2, i2, i2, i2, i2, i2, logPartitionTableIncremental, logPartitionTableIncremental, logPartitionTableSnapshot, logPartitionTableSnapshot, reloadData, removeTable, removeTableDefinition, removeTablePartition, replaceTable, replaceTable, replaceTableDefinition, replaceTablePartition, replaceTablePartition, replaceTablePartition, rm, setWatchdogMillis, setWatchdogTimeoutProcedure, t, t2, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable
-
Constructor Details
-
AbstractDatabase
public AbstractDatabase()
-
-
Method Details
-
getWorkerName
Description copied from interface:DatabaseGets the worker name.- Returns:
- worker name
-
getProcessInfoId
Description copied from interface:DatabaseGets the unique processInfoId of the worker.- Returns:
- process info id
-
getClientHost
Description copied from interface:DatabaseGets a client hostname.- Returns:
- client hostname
-
getServerHost
Description copied from interface:DatabaseGets the server hostname.- Returns:
- server hostname.
-
startup
public void startup()Description copied from interface:DatabaseStarts this database up. -
shutdown
public void shutdown()Description copied from interface:DatabaseShuts this database down. -
logPartitionTableSnapshot
public Database.LogHandle logPartitionTableSnapshot(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, String logInterval, ReplayerInterface replayer, boolean append) throws Exception Description copied from interface:DatabaseSnapshots a table at a regular interval and writes the snapshot to a local table.- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columncolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).table- table to snapshot and log (does not contain the partition column)logInterval- interval to log snapshots atreplayer- data replayerappend- true to append to an existing partition; false to replace the existing partition.- Returns:
- log handle
- Throws:
Exception- problems
-
logPartitionTableSnapshot
public Database.LogHandle logPartitionTableSnapshot(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, String logInterval, boolean append) throws Exception Description copied from interface:DatabaseSnapshots a table at a regular interval and writes the snapshot to a local table.- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columncolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).table- table to snapshot and log (does not contain the partition column)logInterval- interval to log snapshots atappend- true to append to an existing partition; false to replace the existing partition.- Returns:
- log handle
- Throws:
Exception- problems
-
importStatic
Description copied from interface:DatabaseImports the static methods from a class for use in a query. For example:db.importStaticClass(X.class) t=db.t(namespace,tablename).where("staticFunc(A)")where
staticFuncis a static function ofX.- Parameters:
classToImport- The class
-
importClass
Description copied from interface:DatabaseImports a class for use in a query. For example:db.importClass(X.class) t=db.t(namespace,tablename).where("X.func(A)")- Parameters:
classToImport- the class
-
executeQuery
Description copied from interface:DatabaseExecutes a DB query.- Type Parameters:
T- return type- Parameters:
remoteQuery- query to executeadditionalClasses- additional classes to use during the query- Returns:
- result of the query (must be serializable)
-
getErrorLog
Description copied from interface:DatabaseGet an error log for the DB. This is a real-time table.- Returns:
- error log
-
getReplayer
Description copied from interface:DatabaseCreates a data replayer.- Parameters:
timeStart- replay start timetimeEnd- replay end time- Returns:
- replayer
-
getReplayer
Description copied from interface:DatabaseCreates a data replayer.- Parameters:
time- replay start timeendTime- replay end timeinterval- replay step size- Returns:
- replayer
-
mr
Description copied from interface:DatabaseConvenience method forDatabase.makeRemote(Table).
Make a copy of a local table on a remote server.- Parameters:
value- local table- Returns:
- remote table.
-
makeRemote
Description copied from interface:DatabaseMake a copy of a local table on a remote server.- Parameters:
value- local table- Returns:
- remote table.
-
gc
public void gc()Description copied from interface:DatabaseInvoke the garbage collector for this database.
-