Class RESTSessionCatalog

    • Constructor Detail

      • RESTSessionCatalog

        public RESTSessionCatalog()
      • RESTSessionCatalog

        public RESTSessionCatalog​(java.util.function.Function<java.util.Map<java.lang.String,​java.lang.String>,​RESTClient> clientBuilder,
                                  java.util.function.BiFunction<SessionCatalog.SessionContext,​java.util.Map<java.lang.String,​java.lang.String>,​FileIO> ioBuilder)
    • Method Detail

      • initialize

        public void initialize​(java.lang.String name,
                               java.util.Map<java.lang.String,​java.lang.String> unresolved)
        Description copied from interface: SessionCatalog
        Initialize given a custom name and a map of catalog properties.
        Specified by:
        initialize in interface SessionCatalog
        Overrides:
        initialize in class BaseSessionCatalog
        Parameters:
        name - a custom name for the catalog
        unresolved - catalog properties
      • setConf

        public void setConf​(java.lang.Object newConf)
        Specified by:
        setConf in interface Configurable<java.lang.Object>
      • setConf

        @Deprecated
        public void setConf​(org.apache.hadoop.conf.Configuration newConf)
        Deprecated.
        will be removed in 1.3.0; use setConf(Object)
      • dropTable

        public boolean dropTable​(SessionCatalog.SessionContext context,
                                 TableIdentifier identifier)
        Description copied from interface: SessionCatalog
        Drop a table, without requesting that files are immediately deleted.

        Data and metadata files should be deleted according to the catalog's policy.

        Specified by:
        dropTable in interface SessionCatalog
        Parameters:
        context - session context
        identifier - a table identifier
        Returns:
        true if the table was dropped, false if the table did not exist
      • purgeTable

        public boolean purgeTable​(SessionCatalog.SessionContext context,
                                  TableIdentifier identifier)
        Description copied from interface: SessionCatalog
        Drop a table and request that files are immediately deleted.
        Specified by:
        purgeTable in interface SessionCatalog
        Parameters:
        context - session context
        identifier - a table identifier
        Returns:
        true if the table was dropped and purged, false if the table did not exist
      • invalidateTable

        public void invalidateTable​(SessionCatalog.SessionContext context,
                                    TableIdentifier ident)
        Description copied from interface: SessionCatalog
        Invalidate cached table metadata from current catalog.

        If the table is already loaded or cached, drop cached data. If the table does not exist or is not cached, do nothing.

        Specified by:
        invalidateTable in interface SessionCatalog
        Parameters:
        context - session context
        ident - a table identifier
      • updateNamespaceMetadata

        public boolean updateNamespaceMetadata​(SessionCatalog.SessionContext context,
                                               Namespace ns,
                                               java.util.Map<java.lang.String,​java.lang.String> updates,
                                               java.util.Set<java.lang.String> removals)
        Description copied from interface: SessionCatalog
        Set a collection of properties on a namespace in the catalog.

        Properties that are not in the given map are not modified or removed by this method.

        Specified by:
        updateNamespaceMetadata in interface SessionCatalog
        Parameters:
        context - session context
        ns - a namespace
        updates - properties to set for the namespace
        removals - properties to remove from the namespace
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException