Class BaseDatabase
- All Implemented Interfaces:
Database
- Direct Known Subclasses:
AbstractDatabase,DatabaseWrapper,RemoteDatabase
-
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 TypeMethodDescriptionfinal voidaddPartitionedTableDefinition(String namespace, String tableName, TableDefinition tableDefinition) Adds a table definition for a partitioned table.final voidaddPartitionedTableDefinition(String namespace, String tableName, String partitioningColumnName, TableDefinition tableDefinition) Adds a table definition for a partitioned table.final voidaddPartitionedTableDefinitionIfAbsent(String namespace, String tableName, String partitioningColumnName, TableDefinition prototypeDefinition) Adds a table definition for a partitioned table, if the table definition is absent.final voidaddPartitionedTableDefinitionIfAbsent(String namespace, String tableName, String partitioningColumnName, TableDefinition prototypeDefinition, boolean checkPartitioningColumn) Adds a table definition for a partitioned table, if the table definition is absent.final voidaddTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat) Adds a single table partition (e.g.final voidaddTablePartitionAndDefinition(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table data) Adds a table definition and data for a partitioned user table location.final voidaddTablePartitionAndDefinition(String namespace, String tableName, String partitioningColumnName, String internalPartitionValue, String columnPartitionValue, Table data) Adds a table definition and data for a partitioned table.voidappendCentral(String namespace, String tableName, Table table, boolean flush) Append to a table via a centralized table appender.final voidappendTablePartition(String namespace, String tableName, String columnPartitionValue, Table data) Adds or appends to a single table location (e.g.final voidremoveTablePartition(String namespace, String tableName, String columnPartitionValue) Removes a single table location (e.g.final voidreplaceTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat) Removes and re-adds a single table location (e.g.Methods 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, executeQuery, gc, getCatalog, getClientHost, getColumnPartitionTableWriter, getErrorLog, getIntradayPartitions, getIntradayPartitionsAsTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTable, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getIntradayTableV2, getLastByTable, getNamespaces, getProcessInfoId, getReplayer, getReplayer, getReplayer, getReplayer, getReplayer, getSchemaService, getServerHost, getSystemNamespaces, getTable, getTableDefinition, getTableNames, getTableV2, getTableWriter, getUserContext, getUserNamespaces, getWorkerName, hasImportedData, hasIntradayData, hasIntradayTable, hasNamespace, hasTable, i, i, i, i, i, i, i2, i2, i2, i2, i2, i2, importClass, importStatic, logPartitionTableIncremental, logPartitionTableIncremental, logPartitionTableSnapshot, logPartitionTableSnapshot, logPartitionTableSnapshot, logPartitionTableSnapshot, makeRemote, mr, reloadData, removeTable, removeTableDefinition, removeTablePartition, replaceTable, replaceTable, replaceTableDefinition, replaceTablePartition, replaceTablePartition, replaceTablePartition, rm, setWatchdogMillis, setWatchdogTimeoutProcedure, shutdown, startup, t, t2, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable, timeTable
-
Constructor Details
-
BaseDatabase
public BaseDatabase()
-
-
Method Details
-
addTablePartition
public final void addTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat) Description copied from interface:DatabaseAdds a single table partition (e.g. one date) to a partitioned table.Requires that a suitable TableDefinition has already been added.
This variant implicitly uses internalPartitionValue set by the
iris.defaultInternalPartitionNamingFunctionproperty.Throws an exception if the partition already exists.
- Specified by:
addTablePartitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namecolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).data- data for this partition. Must *not* contain the partitioning column.storageFormat- the format used for storage
-
appendTablePartition
public final void appendTablePartition(String namespace, String tableName, String columnPartitionValue, Table data) Description copied from interface:DatabaseAdds or appends to a single table location (e.g. one date) to a partitioned user table.Requires that a suitable TableDefinition has already been added.
This variant implicitly uses internalPartitionName set by the
iris.defaultInternalPartitionNamingFunctionproperty.- Specified by:
appendTablePartitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namecolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).data- data to append to this partition. Must *not* contain the partitioning column.
-
removeTablePartition
public final void removeTablePartition(String namespace, String tableName, String columnPartitionValue) Description copied from interface:DatabaseRemoves a single table location (e.g. one date) from a partitioned user table.Requires that a suitable TableDefinition still exists.
This variant implicitly uses internalPartitionValue set by the
iris.defaultInternalPartitionNamingFunctionproperty.- Specified by:
removeTablePartitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namecolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).
-
replaceTablePartition
public final void replaceTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat) Description copied from interface:DatabaseRemoves and re-adds a single table location (e.g. one date) from/to a partitioned table.Requires that a suitable TableDefinition has already been added.
This variant implicitly uses internalPartitionName set by the
iris.defaultInternalPartitionNamingFunctionproperty.Not guaranteed to be atomic in the case of failures.
- Specified by:
replaceTablePartitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namecolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).data- data for this partition. Must *not* contain the partitioning column.storageFormat- the storage format to use (ex DeephavenV1 or Parquet)
-
addPartitionedTableDefinitionIfAbsent
public final void addPartitionedTableDefinitionIfAbsent(@NotNull String namespace, @NotNull String tableName, @NotNull String partitioningColumnName, @NotNull TableDefinition prototypeDefinition) Description copied from interface:DatabaseAdds a table definition for a partitioned table, if the table definition is absent.- Specified by:
addPartitionedTableDefinitionIfAbsentin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columnprototypeDefinition- prototype table definition used to generate the table definition
-
addPartitionedTableDefinitionIfAbsent
public final void addPartitionedTableDefinitionIfAbsent(@NotNull String namespace, @NotNull String tableName, @NotNull String partitioningColumnName, @NotNull TableDefinition prototypeDefinition, boolean checkPartitioningColumn) Description copied from interface:DatabaseAdds a table definition for a partitioned table, if the table definition is absent.- Specified by:
addPartitionedTableDefinitionIfAbsentin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columnprototypeDefinition- prototype table definition used to generate the table definitioncheckPartitioningColumn- true to make sure the partitioning columns are the same
-
addPartitionedTableDefinition
public final void addPartitionedTableDefinition(@NotNull String namespace, @NotNull String tableName, @NotNull String partitioningColumnName, @NotNull TableDefinition tableDefinition) Description copied from interface:DatabaseAdds a table definition for a partitioned table.- Specified by:
addPartitionedTableDefinitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columntableDefinition- prototype table definition used to generate the table definition
-
addPartitionedTableDefinition
public final void addPartitionedTableDefinition(@NotNull String namespace, @NotNull String tableName, @NotNull TableDefinition tableDefinition) Description copied from interface:DatabaseAdds a table definition for a partitioned table. The partitioning column depends on theiris.defaultColumnPartitionColumnNameproperty.- Specified by:
addPartitionedTableDefinitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table nametableDefinition- prototype table definition used to generate the table definition
-
addTablePartitionAndDefinition
public final void addTablePartitionAndDefinition(@NotNull String namespace, @NotNull String tableName, @NotNull String partitioningColumnName, @NotNull String internalPartitionValue, @NotNull String columnPartitionValue, @NotNull Table data) Description copied from interface:DatabaseAdds a table definition and data for a partitioned table.This operation is not atomic.
- Specified by:
addTablePartitionAndDefinitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columninternalPartitionValue- internal (not user-visible) partition value.columnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).data- table containing the data and table definition to write out
-
addTablePartitionAndDefinition
public final void addTablePartitionAndDefinition(@NotNull String namespace, @NotNull String tableName, @NotNull String partitioningColumnName, @NotNull String columnPartitionValue, @NotNull Table data) Description copied from interface:DatabaseAdds a table definition and data for a partitioned user table location.This operation is not atomic.
This variant implicitly uses internalPartitionName set by the
iris.defaultInternalPartitionNamingFunctionproperty.- Specified by:
addTablePartitionAndDefinitionin interfaceDatabase- Parameters:
namespace- table namespacetableName- table namepartitioningColumnName- name of the partitioning columncolumnPartitionValue- column partition value (e.g. "2015-09-25" for a Date partitioning column).data- table containing the data and table definition to write out
-
appendCentral
public void appendCentral(@NotNull String namespace, @NotNull String tableName, @NotNull Table table, boolean flush) throws IOException Description copied from interface:DatabaseAppend to a table via a centralized table appender. Tables larger than a configurable size limit will be rejected.This variant implicitly uses a default partitioning column value set by the
iris.defaultColumnPartitionNamingFunctionfunction.- Specified by:
appendCentralin interfaceDatabase- Parameters:
namespace- table namespacetableName- table nametable- new dataflush- true to flush the table to disk; false to wait for flushing (if the implementation supports waiting)- Throws:
IOException- problem appending
-