Class InMemoryCatalog

java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.catalog.InMemoryCatalog
All Implemented Interfaces:
Catalog
Direct Known Subclasses:
IcebergCatalog

public class InMemoryCatalog extends Object implements Catalog
  • Field Details

  • Constructor Details

  • Method Details

    • type

      public String type()
      Description copied from interface: Catalog
      A type that defines this catalog.
      Specified by:
      type in interface Catalog
    • name

      public String name()
      Description copied from interface: Catalog
      The name of this catalog, specified by the user.
      Specified by:
      name in interface Catalog
    • metaStore

      public MetaStore metaStore()
      Description copied from interface: Catalog
      The underlying MetaStore that actually manages tables.
      Specified by:
      metaStore in interface Catalog
    • properties

      public Map<String,String> properties()
      Description copied from interface: Catalog
      User-specified configuration properties.
      Specified by:
      properties in interface Catalog
    • createDatabase

      public boolean createDatabase(String database)
      Description copied from interface: Catalog
      Creates a database with this name.
      Specified by:
      createDatabase in interface Catalog
      Parameters:
      database -
      Returns:
      true if the database was created, false otherwise.
    • useDatabase

      public void useDatabase(String database)
      Description copied from interface: Catalog
      Switches to use the specified database.
      Specified by:
      useDatabase in interface Catalog
      Parameters:
      database -
    • currentDatabase

      public @Nullable String currentDatabase()
      Description copied from interface: Catalog
      Produces the currently active database. Can be null if no database is active.
      Specified by:
      currentDatabase in interface Catalog
      Returns:
      the current active database
    • dropDatabase

      public boolean dropDatabase(String database, boolean cascade)
      Description copied from interface: Catalog
      Drops the database with this name. If cascade is true, the catalog should first drop all tables contained in this database.
      Specified by:
      dropDatabase in interface Catalog
      Parameters:
      database -
      cascade -
      Returns:
      true if the database was dropped, false otherwise.
    • listDatabases

      public Set<String> listDatabases()
      Description copied from interface: Catalog
      Returns a set of existing databases accessible to this catalog.
      Specified by:
      listDatabases in interface Catalog
      Returns:
      a set of existing database names