Class UnimplementedDatabase

java.lang.Object
com.illumon.iris.db.tables.databases.UnimplementedDatabase
All Implemented Interfaces:
Database

public abstract class UnimplementedDatabase extends Object implements Database
This class exists as the basis for an adapter shim between the Community implementation of DatabaseInternal and the enterprise version. Everything will return an UnsupportedOperationException.
  • Constructor Details

    • UnimplementedDatabase

      public UnimplementedDatabase()
  • Method Details

    • getWorkerName

      public String getWorkerName()
      Description copied from interface: Database
      Gets the worker name.
      Specified by:
      getWorkerName in interface Database
      Returns:
      worker name
    • getProcessInfoId

      public String getProcessInfoId()
      Description copied from interface: Database
      Gets the unique processInfoId of the worker.
      Specified by:
      getProcessInfoId in interface Database
      Returns:
      process info id
    • getClientHost

      public String getClientHost()
      Description copied from interface: Database
      Gets a client hostname.
      Specified by:
      getClientHost in interface Database
      Returns:
      client hostname
    • getServerHost

      public String getServerHost()
      Description copied from interface: Database
      Gets the server hostname.
      Specified by:
      getServerHost in interface Database
      Returns:
      server hostname.
    • startup

      public void startup()
      Description copied from interface: Database
      Starts this database up.
      Specified by:
      startup in interface Database
    • shutdown

      public void shutdown()
      Description copied from interface: Database
      Shuts this database down.
      Specified by:
      shutdown in interface Database
    • reloadData

      public void reloadData()
      Description copied from interface: Database
      Reload any internally-cached data.
      Specified by:
      reloadData in interface Database
    • gc

      public void gc()
      Description copied from interface: Database
      Invoke the garbage collector for this database.
      Specified by:
      gc in interface Database
    • getErrorLog

      public Table getErrorLog() throws Exception
      Description copied from interface: Database
      Get an error log for the DB. This is a real-time table.
      Specified by:
      getErrorLog in interface Database
      Returns:
      error log
      Throws:
      Exception - problems retrieving the error log.
    • setWatchdogMillis

      public int setWatchdogMillis(int millis) throws IOException
      Description copied from interface: Database
      Sets monitoring of delays in the LiveTableMonitor refresh loop. If the LiveTableMonitor refresh loop takes longer than the specified amount of time, the watchdog timeout procedure is executed. The watchdog timeout procedure is specified by calling Database.setWatchdogTimeoutProcedure(LongConsumer).
      Specified by:
      setWatchdogMillis in interface Database
      Parameters:
      millis - if LiveTableMonitor refresh loop takes longer than this amount of time, the watchdog timeout procedure will be called.
      Returns:
      the new value of the watchdog timer, in ms
      Throws:
      IOException - problems setting the monitor interval
    • setWatchdogTimeoutProcedure

      public void setWatchdogTimeoutProcedure(LongConsumer watchdogTimeoutProcedure) throws IOException
      Description copied from interface: Database
      Set the watchdog timeout procedure. If LiveTableMonitor refresh loop takes longer than the amount of time specified via Database.setWatchdogMillis(int), the timeout procedure is called.
      Specified by:
      setWatchdogTimeoutProcedure in interface Database
      Parameters:
      watchdogTimeoutProcedure - the procedure called when the LiveTableMonitor refresh loop takes longer than watchdogMillis.
      Throws:
      IOException
    • executeQuery

      public <T> T executeQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) throws IOException
      Description copied from interface: Database
      Executes a DB query.
      Specified by:
      executeQuery in interface Database
      Type Parameters:
      T - return type
      Parameters:
      remoteQuery - query to execute
      additionalClasses - additional classes to use during the query
      Returns:
      result of the query (must be serializable)
      Throws:
      IOException - problems executing the query or transmitting results
    • importClass

      public void importClass(Class classToImport)
      Description copied from interface: Database
      Imports a class for use in a query. For example:
       db.importClass(X.class)
       t=db.t(namespace,tablename).where("X.func(A)")
       
      Specified by:
      importClass in interface Database
      Parameters:
      classToImport - the class
    • importStatic

      public void importStatic(Class classToImport)
      Description copied from interface: Database
      Imports 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 staticFunc is a static function of X.

      Specified by:
      importStatic in interface Database
      Parameters:
      classToImport - The class
    • mr

      public Table mr(Table value)
      Description copied from interface: Database
      Convenience method for Database.makeRemote(Table).
      Make a copy of a local table on a remote server.
      Specified by:
      mr in interface Database
      Parameters:
      value - local table
      Returns:
      remote table.
    • makeRemote

      public Table makeRemote(Table value)
      Description copied from interface: Database
      Make a copy of a local table on a remote server.
      Specified by:
      makeRemote in interface Database
      Parameters:
      value - local table
      Returns:
      remote table.
    • getReplayer

      public ReplayerInterface getReplayer(DBDateTime timeStart, DBDateTime timeEnd) throws IOException
      Description copied from interface: Database
      Creates a data replayer.
      Specified by:
      getReplayer in interface Database
      Parameters:
      timeStart - replay start time
      timeEnd - replay end time
      Returns:
      replayer
      Throws:
      IOException - problems creating the replayer
    • getReplayer

      public ReplayerInterface getReplayer(DBDateTime timeStart, DBDateTime timeEnd, long interval) throws Exception
      Description copied from interface: Database
      Creates a data replayer.
      Specified by:
      getReplayer in interface Database
      Parameters:
      timeStart - replay start time
      timeEnd - replay end time
      interval - replay step size
      Returns:
      replayer
      Throws:
      IOException - problems creating the replayer
      Exception
    • getSystemNamespaces

      public List<String> getSystemNamespaces()
      Description copied from interface: Database
      Retrieves system namespace names from the database.
      Specified by:
      getSystemNamespaces in interface Database
      Returns:
      The list of namespace names
    • getUserNamespaces

      public List<String> getUserNamespaces()
      Description copied from interface: Database
      Retrieves user namespace names from the database.
      Specified by:
      getUserNamespaces in interface Database
      Returns:
      The list of namespace names
    • getNamespaces

      public List<String> getNamespaces()
      Description copied from interface: Database
      Retrieves all namespace names from the database.
      Specified by:
      getNamespaces in interface Database
      Returns:
      The list of namespace names
    • hasNamespace

      public boolean hasNamespace(String namespace)
      Description copied from interface: Database
      Determines if the namespace is present in the DB.
      Specified by:
      hasNamespace in interface Database
      Parameters:
      namespace - namespace
      Returns:
      true if the namespace exists; false otherwise.
    • getCatalog

      public Table getCatalog()
      Description copied from interface: Database
      Gets a table containing information on all tables in the DB.
      Specified by:
      getCatalog in interface Database
      Returns:
      table containing information on all tables in the DB
    • getTableNames

      public List<String> getTableNames(String namespace)
      Description copied from interface: Database
      Gets all table names from the specified namespace.
      Specified by:
      getTableNames in interface Database
      Parameters:
      namespace - The namespace to list the contents of
      Returns:
      The list of table names
    • hasTable

      public boolean hasTable(String namespace, String tableName)
      Description copied from interface: Database
      Determines if the table is defined in the DB.
      Specified by:
      hasTable in interface Database
      Parameters:
      namespace - namespace
      tableName - table name
      Returns:
      true if the table definition exists; false otherwise.
    • hasIntradayTable

      public boolean hasIntradayTable(String namespace, String tableName)
      Description copied from interface: Database
      Determines if the table is present in the DB and currently has intraday data.
      Specified by:
      hasIntradayTable in interface Database
      Parameters:
      namespace - namespace
      tableName - table name
      Returns:
      true if the table exists and has intraday data; false otherwise.
    • getTableDefinition

      public TableDefinition getTableDefinition(String namespace, String tableName)
      Description copied from interface: Database
      Retrieves a table definition by namespace and name, generally from the schema service.
      Specified by:
      getTableDefinition in interface Database
      Parameters:
      namespace - The namespace of the definition to retrieve
      tableName - The table name of the definition to retrieve
      Returns:
      The table definition retrieved, null if not found
    • getIntradayPartitions

      public List<String> getIntradayPartitions(String namespace, String tableName)
      Description copied from interface: Database
      Get a list of all internal partition values available for the specified intraday table.
      Specified by:
      getIntradayPartitions in interface Database
      Parameters:
      namespace - The namespace of the table
      tableName - The table name to examine in the intraday data space
      Returns:
      A list of internal partition values for top-level partitioning of the intraday table. Typically represents one partition per source.
    • getIntradayPartitionsAsTable

      public Table getIntradayPartitionsAsTable(String namespace, String tableName)
      Description copied from interface: Database
      Get all internal partition values available for the specified intraday table, returned as table.
      Specified by:
      getIntradayPartitionsAsTable in interface Database
      Parameters:
      namespace - The namespace of the table
      tableName - The table name to examine in the intraday data space
      Returns:
      A table containing the internal partition values for top-level partitioning of the intraday table. Typically represents one partition per source.
    • hasImportedData

      public boolean hasImportedData(String namespace, String tableName, String columnPartitionValue)
      Description copied from interface: Database
      Determines if the historical table's column partition is present in the DB.
      Specified by:
      hasImportedData in interface Database
      Parameters:
      namespace - namespace
      tableName - table name
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      Returns:
      true if the table's column partition exists; false otherwise.
    • hasIntradayData

      public boolean hasIntradayData(String namespace, String tableName, String columnPartitionValue)
      Description copied from interface: Database
      Determines if the intraday table's column partition is present in the DB.
      Specified by:
      hasIntradayData in interface Database
      Parameters:
      namespace - namespace
      tableName - table name
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      Returns:
      true if the intraday table's column partition exists; false otherwise.
    • getSchemaService

      public SchemaService getSchemaService()
      Description copied from interface: Database
      Get the SchemaService for retrieving Schemas from which TableDefinitions can be retrieved.
      Specified by:
      getSchemaService in interface Database
      Returns:
      The SchemaService that this Database was created with.
    • getTableV2

      public Table getTableV2(String namespace, String tableName)
      Description copied from interface: Database
      Retrieves a table by namespace and name. Throws exceptions for unknown tables.
      Specified by:
      getTableV2 in interface Database
      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      Returns:
      table in "v2" format
    • getIntradayTableV2

      public Table getIntradayTableV2(String namespace, String tableName, boolean live)
      Description copied from interface: Database
      Retrieves an intraday table by namespace and name. Throws exceptions for unknown tables.
      Specified by:
      getIntradayTableV2 in interface Database
      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      live - true if the table should be live/updating; false otherwise
      Returns:
      intraday table
    • getIntradayTableV2

      public Table getIntradayTableV2(String namespace, String tableName, Set<String> internalPartitionValues, boolean live)
      Description copied from interface: Database
      Retrieves the specified internal partitions of the specified intraday table. The result may contain locations for multiple column partition values, and so a subsequent filter (e.g. on "Date") will often be desired.

      Throws exceptions for unknown tables.

      Specified by:
      getIntradayTableV2 in interface Database
      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      internalPartitionValues - locations will be restricted to these internal partition values
      live - true if the table should be live/updating; false otherwise
      Returns:
      single partition intraday table
    • getLastByTable

      public Table getLastByTable(String namespace, String tableName)
      Description copied from interface: Database
      Retrieves an intraday last-by table by namespace and name.

      Throws exceptions for unknown tables.

      Always provides a live result.

      This may not be configured on your system.

      Specified by:
      getLastByTable in interface Database
      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      Returns:
      live intraday last-by table
    • deleteNamespace

      public void deleteNamespace(String namespace)
      Description copied from interface: Database
      Delete all files related to the specified namespace.

      Note: This is a dangerous API - don't use it if you don't fully understand the implications.

      Specified by:
      deleteNamespace in interface Database
      Parameters:
      namespace - namespace to be deleted.
    • deleteTables

      public void deleteTables(String namespace, String... tableNames)
      Description copied from interface: Database
      Delete all files related to a set of tables. Database.removeTable(String, String) is a better option, unless the underlying table is damaged.
      Specified by:
      deleteTables in interface Database
      Parameters:
      namespace - table namespace
      tableNames - table names to delete
    • deleteMatchingTables

      public void deleteMatchingTables(String namespace, String tableNameRegex)
      Description copied from interface: Database
      Delete all files related to the set of tables whose names match the supplied regular expression.

      Note: This only works for tables that still have a definition file, although it need not be readable.

      Note: This is a dangerous API - don't use it if you don't fully understand the implications.

      Specified by:
      deleteMatchingTables in interface Database
      Parameters:
      namespace - table namespace
      tableNameRegex - table names in the given namespace that match this regular expression will be cleaned up.
    • addTable

      public void addTable(String namespace, String tableName, Table table, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Adds a non-partitioned table by name to the specified namespace.
      Specified by:
      addTable in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      table - table to add
      storageFormat - the storage format to use (ex DeephavenV1 or Parquet)
    • appendTable

      public void appendTable(String namespace, String tableName, Table table)
      Description copied from interface: Database
      Appends to a non-partitioned table, or adds the table if it is not present. Adds a TableDefinition if necessary.
      Specified by:
      appendTable in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      table - data to add or append
    • removeTable

      public void removeTable(String namespace, String tableName)
      Description copied from interface: Database
      Removes a table. This method is a better choice than Database.deleteTables(String, String...), unless the underlying table no longer has consistent metadata. Throws an exception for tables that don't exist.
      Specified by:
      removeTable in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
    • replaceTable

      public void replaceTable(String namespace, String tableName, Table table, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Replaces a non-partitioned table with a new table, or adds the table, if it is not already present. Not guaranteed to be atomic in the case of failures.
      Specified by:
      replaceTable in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      table - data for the replacement table
      storageFormat - the storage format to use (ex DeephavenV1 or Parquet)
    • addTableDefinition

      public void addTableDefinition(String namespace, String tableName, TableDefinition tableDefinition)
      Description copied from interface: Database
      Adds a table definition to the specified namespace. Throws an exception if the table definition already exists.
      Specified by:
      addTableDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      tableDefinition - table definition to add
    • removeTableDefinition

      public void removeTableDefinition(String namespace, String tableName)
      Description copied from interface: Database
      Removes a table definition.
      Specified by:
      removeTableDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
    • replaceTableDefinition

      public void replaceTableDefinition(String namespace, String tableName, TableDefinition tableDefinition)
      Description copied from interface: Database
      Replaces a user table definition.

      Not guaranteed to be atomic in the case of failures.

      Does not throw an exception for tables that don't exist.

      Specified by:
      replaceTableDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      tableDefinition - table definition for the replacement
    • addTablePartition

      public void addTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Adds 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.defaultInternalPartitionNamingFunction property.

      Throws an exception if the partition already exists.

      Specified by:
      addTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - 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
    • addTablePartition

      public void addTablePartition(String namespace, String tableName, String internalPartitionValue, String columnPartitionValue, Table data, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Adds a single table partition (e.g. one date) to a partitioned table.

      Requires that a suitable TableDefinition has already been added.

      Throws an exception if the partition already exists.

      Specified by:
      addTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      internalPartitionValue - internal (not user-visible) partition value.
      columnPartitionValue - 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 void appendTablePartition(String namespace, String tableName, String columnPartitionValue, Table data)
      Description copied from interface: Database
      Adds 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.defaultInternalPartitionNamingFunction property.

      Specified by:
      appendTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - 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.
    • appendTablePartition

      public void appendTablePartition(String namespace, String tableName, String internalPartitionValue, String columnPartitionValue, Table data)
      Description copied from interface: Database
      Adds or appends to a single table location (e.g. one date) to a partitioned table.

      Requires that a suitable TableDefinition has already been added.

      Specified by:
      appendTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      internalPartitionValue - internal (not user-visible) partition value.
      columnPartitionValue - 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 void removeTablePartition(String namespace, String tableName, String columnPartitionValue)
      Description copied from interface: Database
      Removes 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.defaultInternalPartitionNamingFunction property.

      Specified by:
      removeTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
    • removeTablePartition

      public void removeTablePartition(String namespace, String tableName, String internalPartitionValue, String columnPartitionValue)
      Description copied from interface: Database
      Removes a single table location (e.g. one date) from a partitioned table. Requires that a suitable TableDefinition still exists.
      Specified by:
      removeTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      internalPartitionValue - internal (not user-visible) partition value.
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
    • replaceTablePartition

      public void replaceTablePartition(String namespace, String tableName, String columnPartitionValue, Table data, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Removes 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.defaultInternalPartitionNamingFunction property.

      Not guaranteed to be atomic in the case of failures.

      Specified by:
      replaceTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - 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)
    • replaceTablePartition

      public void replaceTablePartition(String namespace, String tableName, String internalPartitionValue, String columnPartitionValue, Table data, Database.StorageFormat storageFormat)
      Description copied from interface: Database
      Replaces a single table location (e.g. one date) from/to a partitioned table.

      Requires that a suitable TableDefinition has already been added.

      Not guaranteed to be atomic in the case of failures.

      Specified by:
      replaceTablePartition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      internalPartitionValue - internal (not user-visible) partition value.
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      data - data to replace this partition. Must *not* contain the partitioning column.
      storageFormat - the storage format to use (ex DeephavenV1 or Parquet)
    • addPartitionedTableDefinitionIfAbsent

      public void addPartitionedTableDefinitionIfAbsent(String namespace, String tableName, String partitioningColumnName, TableDefinition prototypeDefinition)
      Description copied from interface: Database
      Adds a table definition for a partitioned table, if the table definition is absent.
      Specified by:
      addPartitionedTableDefinitionIfAbsent in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      prototypeDefinition - prototype table definition used to generate the table definition
    • addPartitionedTableDefinitionIfAbsent

      public void addPartitionedTableDefinitionIfAbsent(String namespace, String tableName, String partitioningColumnName, TableDefinition prototypeDefinition, boolean checkPartitioningColumn)
      Description copied from interface: Database
      Adds a table definition for a partitioned table, if the table definition is absent.
      Specified by:
      addPartitionedTableDefinitionIfAbsent in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      prototypeDefinition - prototype table definition used to generate the table definition
      checkPartitioningColumn - true to make sure the partitioning columns are the same
    • addPartitionedTableDefinition

      public void addPartitionedTableDefinition(String namespace, String tableName, String partitioningColumnName, TableDefinition prototypeDefinition)
      Description copied from interface: Database
      Adds a table definition for a partitioned table.
      Specified by:
      addPartitionedTableDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      prototypeDefinition - prototype table definition used to generate the table definition
    • addPartitionedTableDefinition

      public void addPartitionedTableDefinition(String namespace, String tableName, TableDefinition prototypeDefinition)
      Description copied from interface: Database
      Adds a table definition for a partitioned table. The partitioning column depends on the iris.defaultColumnPartitionColumnName property.
      Specified by:
      addPartitionedTableDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      prototypeDefinition - prototype table definition used to generate the table definition
    • addTablePartitionAndDefinition

      public void addTablePartitionAndDefinition(String namespace, String tableName, String partitioningColumnName, String internalPartitionValue, String columnPartitionValue, Table data)
      Description copied from interface: Database
      Adds a table definition and data for a partitioned table.

      This operation is not atomic.

      Specified by:
      addTablePartitionAndDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      internalPartitionValue - 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 void addTablePartitionAndDefinition(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table data)
      Description copied from interface: Database
      Adds 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.defaultInternalPartitionNamingFunction property.

      Specified by:
      addTablePartitionAndDefinition in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      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
    • appendCentral

      public void appendCentral(String namespace, String tableName, String columnPartitionValue, Table table, boolean flush) throws IOException
      Description copied from interface: Database
      Append to a table via a centralized table appender.

      Note: The table data is appended to a system-defined internal partition, and the specified column partition value.

      Specified by:
      appendCentral in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      table - new data
      flush - true to flush the table to disk; false to wait for flushing (if the implementation supports waiting)
      Throws:
      IOException - problem appending
    • appendCentral

      public void appendCentral(String namespace, String tableName, Table table, boolean flush) throws IOException
      Description copied from interface: Database
      Append to a table via a centralized table appender.

      This variant implicitly uses a default partitioning column value set by the iris.defaultColumnPartitionNamingFunction function.

      Specified by:
      appendCentral in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      table - new data
      flush - true to flush the table to disk; false to wait for flushing (if the implementation supports waiting)
      Throws:
      IOException - problem appending
    • closeAndDeleteCentral

      public void closeAndDeleteCentral(String namespace, String tableName) throws IOException
      Description copied from interface: Database
      Close all logger connections to the centralized logging for the specified table, and then atomically delete all centrally logged table data for this namespace and table name. Remove all local table data also, as with Database.removeTable(String, String).

      USE WITH EXTREME CAUTION!!!

      Specified by:
      closeAndDeleteCentral in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      Throws:
      IOException - problems encountered
    • closeAndDeleteCentral

      public void closeAndDeleteCentral(String namespace, String tableName, String columnPartitionValue) throws IOException
      Description copied from interface: Database
      Close all logger connections to the centralized logging for the specified table, and then atomically delete all centrally logged table data for this namespace and table name, restricted to the column partition value if provided.

      USE WITH EXTREME CAUTION!!!

      Specified by:
      closeAndDeleteCentral in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      columnPartitionValue - optional column partition value
      Throws:
      IOException - problems encountered
    • 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: Database
      Snapshots a table at a regular interval and writes the snapshot to a centrally managed table.
      Specified by:
      logPartitionTableSnapshot in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - 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 at
      replayer - data replayer
      append - 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: Database
      Snapshots a table at a regular interval and writes the snapshot to a centrally managed table.
      Specified by:
      logPartitionTableSnapshot in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - 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 at
      append - 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, long logIntervalMillis, ReplayerInterface replayer, boolean append) throws IOException
      Description copied from interface: Database
      Snapshots a table at a regular interval and writes the snapshot to a centrally managed table.
      Specified by:
      logPartitionTableSnapshot in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - 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)
      logIntervalMillis - interval in milliseconds to log snapshots at
      replayer - data replayer
      append - true to append to an existing partition; false to replace the existing partition.
      Returns:
      log handle
      Throws:
      IOException - problems
    • logPartitionTableSnapshot

      public Database.LogHandle logPartitionTableSnapshot(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, long logIntervalMillis, boolean append) throws IOException
      Description copied from interface: Database
      Snapshots a table at a regular interval and writes the snapshot to a centrally managed table.
      Specified by:
      logPartitionTableSnapshot in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - 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)
      logIntervalMillis - interval in milliseconds to log snapshots at
      append - true to append to an existing partition; false to replace the existing partition.
      Returns:
      log handle
      Throws:
      IOException - problems
    • logPartitionTableIncremental

      public Database.LogHandle logPartitionTableIncremental(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, ReplayerInterface replayer, boolean append) throws IOException
      Description copied from interface: Database
      Writes all changes in a table to a centrally managed table.
      Specified by:
      logPartitionTableIncremental in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      table - table to log (does not contain the partition column)
      replayer - data replayer
      append - true to append to an existing partition; false to replace the existing partition.
      Returns:
      log handle
      Throws:
      IOException - problems
    • logPartitionTableIncremental

      public Database.LogHandle logPartitionTableIncremental(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, Table table, boolean append) throws IOException
      Description copied from interface: Database
      Writes all changes in a table to a centrally managed table.
      Specified by:
      logPartitionTableIncremental in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      table - table to log (does not contain the partition column)
      append - true to append to an existing partition; false to replace the existing partition.
      Returns:
      log handle
      Throws:
      IOException - problems
    • getColumnPartitionTableWriter

      public TableWriter getColumnPartitionTableWriter(String namespace, String tableName, String partitioningColumnName, String columnPartitionValue, TableDefinition tableDefinition, boolean append)
      Description copied from interface: Database
      Gets a table writer for a partitioned table.
      Specified by:
      getColumnPartitionTableWriter in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      partitioningColumnName - name of the partitioning column
      columnPartitionValue - column partition value (e.g. "2015-09-25" for a Date partitioning column).
      tableDefinition - table definition
      append - true to append to an existing partition; false to overwrite an existing partition.
      Returns:
      table writer
    • getTableWriter

      public TableWriter getTableWriter(String namespace, String tableName, TableDefinition tableDefinition, boolean append) throws IOException
      Description copied from interface: Database
      Gets a table writer for an unpartitioned table.
      Specified by:
      getTableWriter in interface Database
      Parameters:
      namespace - table namespace
      tableName - table name
      tableDefinition - table definition
      append - true to append to an existing partition; false to overwrite an existing partition.
      Returns:
      table writer
      Throws:
      IOException