Class EnvironmentSettings

java.lang.Object
org.apache.flink.table.api.EnvironmentSettings

@PublicEvolving public class EnvironmentSettings extends Object
Defines all parameters that initialize a table environment. Those parameters are used only during instantiation of a TableEnvironment and cannot be changed afterwards.

Example:


 EnvironmentSettings.newInstance()
   .inStreamingMode()
   .withBuiltInCatalogName("default_catalog")
   .withBuiltInDatabaseName("default_database")
   .build()
 

inStreamingMode() or inBatchMode() might be convenient as shortcuts.

  • Method Details

    • inStreamingMode

      public static EnvironmentSettings inStreamingMode()
      Creates a default instance of EnvironmentSettings in streaming execution mode.

      In this mode, both bounded and unbounded data streams can be processed.

      This method is a shortcut for creating a TableEnvironment with little code. Use the builder provided in newInstance() for advanced settings.

    • inBatchMode

      public static EnvironmentSettings inBatchMode()
      Creates a default instance of EnvironmentSettings in batch execution mode.

      This mode is highly optimized for batch scenarios. Only bounded data streams can be processed in this mode.

      This method is a shortcut for creating a TableEnvironment with little code. Use the builder provided in newInstance() for advanced settings.

    • newInstance

      public static EnvironmentSettings.Builder newInstance()
      Creates a builder for creating an instance of EnvironmentSettings.
    • getConfiguration

      public org.apache.flink.configuration.Configuration getConfiguration()
      Get the underlying Configuration.
    • getBuiltInCatalogName

      public String getBuiltInCatalogName()
      Gets the specified name of the initial catalog to be created when instantiating a TableEnvironment.
    • getBuiltInDatabaseName

      public String getBuiltInDatabaseName()
      Gets the specified name of the default database in the initial catalog to be created when instantiating a TableEnvironment.
    • isStreamingMode

      public boolean isStreamingMode()
      Tells if the TableEnvironment should work in a batch or streaming mode.
    • getUserClassLoader

      @Internal public ClassLoader getUserClassLoader()
      Returns the user ClassLoader to use for code generation, UDF loading and other operations requiring reflections on user code.
    • getCatalogStore

      @Internal @Nullable public org.apache.flink.table.catalog.CatalogStore getCatalogStore()