Class BaseMetastoreCatalog

    • Constructor Detail

      • BaseMetastoreCatalog

        public BaseMetastoreCatalog()
    • Method Detail

      • createTable

        public Table createTable​(TableIdentifier identifier,
                                 Schema schema,
                                 PartitionSpec spec,
                                 java.lang.String location,
                                 java.util.Map<java.lang.String,​java.lang.String> properties)
        Description copied from interface: Catalog
        Create a table.
        Specified by:
        createTable in interface Catalog
        Parameters:
        identifier - a table identifier
        schema - a schema
        spec - a partition spec
        location - a location for the table; leave null if unspecified
        properties - a string map of table properties
        Returns:
        a Table instance
      • newCreateTableTransaction

        public Transaction newCreateTableTransaction​(TableIdentifier identifier,
                                                     Schema schema,
                                                     PartitionSpec spec,
                                                     java.lang.String location,
                                                     java.util.Map<java.lang.String,​java.lang.String> properties)
        Description copied from interface: Catalog
        Start a transaction to create a table.
        Specified by:
        newCreateTableTransaction in interface Catalog
        Parameters:
        identifier - a table identifier
        schema - a schema
        spec - a partition spec
        location - a location for the table; leave null if unspecified
        properties - a string map of table properties
        Returns:
        a Transaction to create the table
      • newReplaceTableTransaction

        public Transaction newReplaceTableTransaction​(TableIdentifier identifier,
                                                      Schema schema,
                                                      PartitionSpec spec,
                                                      java.lang.String location,
                                                      java.util.Map<java.lang.String,​java.lang.String> properties,
                                                      boolean orCreate)
        Description copied from interface: Catalog
        Start a transaction to replace a table.
        Specified by:
        newReplaceTableTransaction in interface Catalog
        Parameters:
        identifier - a table identifier
        schema - a schema
        spec - a partition spec
        location - a location for the table; leave null if unspecified
        properties - a string map of table properties
        orCreate - whether to create the table if not exists
        Returns:
        a Transaction to replace the table
      • loadTable

        public Table loadTable​(TableIdentifier identifier)
        Description copied from interface: Catalog
        Load a table.
        Specified by:
        loadTable in interface Catalog
        Parameters:
        identifier - a table identifier
        Returns:
        instance of Table implementation referred by tableIdentifier
      • buildTable

        public Catalog.TableBuilder buildTable​(TableIdentifier identifier,
                                               Schema schema)
        Description copied from interface: Catalog
        Instantiate a builder to either create a table or start a create/replace transaction.
        Specified by:
        buildTable in interface Catalog
        Parameters:
        identifier - a table identifier
        schema - a schema
        Returns:
        the builder to create a table or start a create/replace transaction
      • isValidIdentifier

        protected boolean isValidIdentifier​(TableIdentifier tableIdentifier)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • defaultWarehouseLocation

        protected abstract java.lang.String defaultWarehouseLocation​(TableIdentifier tableIdentifier)
      • fullTableName

        protected static java.lang.String fullTableName​(java.lang.String catalogName,
                                                        TableIdentifier identifier)