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(String db)
      Description copied from interface: Catalog
      Returns the underlying MetaStore for this database. Creates a new MetaStore if one does not exist yet.
      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.
    • databaseExists

      public boolean databaseExists(String db)
      Description copied from interface: Catalog
      Returns true if the database exists.
      Specified by:
      databaseExists in interface Catalog
    • 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.
    • registerTableProvider

      public void registerTableProvider(TableProvider provider)
      Description copied from interface: Catalog
      Registers this TableProvider and propagates it to underlying MetaStores.
      Specified by:
      registerTableProvider in interface Catalog
    • tableProviders

      public Map<String,TableProvider> tableProviders()
      Description copied from interface: Catalog
      Returns all the TableProviders available to this Catalog, organized by type.
      Specified by:
      tableProviders in interface Catalog
    • toString

      public String toString()
      Overrides:
      toString in class Object