Class DerbyConnector

  • All Implemented Interfaces:
    org.apache.druid.metadata.MetadataStorageConnector

    public class DerbyConnector
    extends SQLMetadataConnector
    • Constructor Detail

      • DerbyConnector

        @Inject
        public DerbyConnector​(MetadataStorage storage,
                              com.google.common.base.Supplier<org.apache.druid.metadata.MetadataStorageConnectorConfig> config,
                              com.google.common.base.Supplier<org.apache.druid.metadata.MetadataStorageTablesConfig> dbTables)
      • DerbyConnector

        public DerbyConnector​(MetadataStorage storage,
                              com.google.common.base.Supplier<org.apache.druid.metadata.MetadataStorageConnectorConfig> config,
                              com.google.common.base.Supplier<org.apache.druid.metadata.MetadataStorageTablesConfig> dbTables,
                              org.skife.jdbi.v2.DBI dbi)
    • Method Detail

      • getSerialType

        public String getSerialType()
        Description copied from class: SQLMetadataConnector
        Auto-incrementing integer SQL type to use for IDs. The returned string is interpolated into the table creation statement as follows:
         CREATE TABLE druid_table (
           id <serial-type> NOT NULL,
           col_2 VARCHAR(255) NOT NULL,
           col_3 VARCHAR(255) NOT NULL
           ...
         )
         
        Specified by:
        getSerialType in class SQLMetadataConnector
        Returns:
        String representing auto-incrementing SQL integer type to use for IDs.
      • getStreamingFetchSize

        public int getStreamingFetchSize()
        Description copied from class: SQLMetadataConnector
        Returns the value that should be passed to statement.setFetchSize to ensure results are streamed back from the database instead of fetching the entire result set in memory.
        Specified by:
        getStreamingFetchSize in class SQLMetadataConnector
        Returns:
        optimal fetch size to stream results back
      • exportTable

        public void exportTable​(String tableName,
                                String outputPath)
      • tableHasColumn

        public boolean tableHasColumn​(String tableName,
                                      String columnName)
        Interrogate table metadata and return true or false depending on the existance of the indicated column public visibility because DerbyConnector needs to override thanks to uppercase table and column names.
        Overrides:
        tableHasColumn in class SQLMetadataConnector
        Parameters:
        tableName - The table being interrogated
        columnName - The column being looked for
        Returns:
        boolean indicating the existence of the column in question
      • start

        public void start()
      • stop

        public void stop()