Package org.apache.flink.table.api
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 aTableEnvironment
and cannot be changed afterwards.Example:
EnvironmentSettings.newInstance() .inStreamingMode() .withBuiltInCatalogName("default_catalog") .withBuiltInDatabaseName("default_database") .build()
inStreamingMode()
orinBatchMode()
might be convenient as shortcuts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnvironmentSettings.Builder
A builder forEnvironmentSettings
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EnvironmentSettings
fromConfiguration(org.apache.flink.configuration.ReadableConfig configuration)
Deprecated.String
getBuiltInCatalogName()
Gets the specified name of the initial catalog to be created when instantiating aTableEnvironment
.String
getBuiltInDatabaseName()
Gets the specified name of the default database in the initial catalog to be created when instantiating aTableEnvironment
.org.apache.flink.table.catalog.CatalogStore
getCatalogStore()
org.apache.flink.configuration.Configuration
getConfiguration()
Get the underlyingConfiguration
.ClassLoader
getUserClassLoader()
Returns the userClassLoader
to use for code generation, UDF loading and other operations requiring reflections on user code.static EnvironmentSettings
inBatchMode()
Creates a default instance ofEnvironmentSettings
in batch execution mode.static EnvironmentSettings
inStreamingMode()
Creates a default instance ofEnvironmentSettings
in streaming execution mode.boolean
isStreamingMode()
Tells if theTableEnvironment
should work in a batch or streaming mode.static EnvironmentSettings.Builder
newInstance()
Creates a builder for creating an instance ofEnvironmentSettings
.org.apache.flink.configuration.Configuration
toConfiguration()
Deprecated.usegetConfiguration()
instead.
-
-
-
Method Detail
-
inStreamingMode
public static EnvironmentSettings inStreamingMode()
Creates a default instance ofEnvironmentSettings
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 innewInstance()
for advanced settings.
-
inBatchMode
public static EnvironmentSettings inBatchMode()
Creates a default instance ofEnvironmentSettings
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 innewInstance()
for advanced settings.
-
newInstance
public static EnvironmentSettings.Builder newInstance()
Creates a builder for creating an instance ofEnvironmentSettings
.
-
fromConfiguration
@Deprecated public static EnvironmentSettings fromConfiguration(org.apache.flink.configuration.ReadableConfig configuration)
Deprecated.Creates an instance ofEnvironmentSettings
from configuration.
-
toConfiguration
@Deprecated public org.apache.flink.configuration.Configuration toConfiguration()
Deprecated.usegetConfiguration()
instead.Convert the environment setting to theConfiguration
.
-
getConfiguration
public org.apache.flink.configuration.Configuration getConfiguration()
Get the underlyingConfiguration
.
-
getBuiltInCatalogName
public String getBuiltInCatalogName()
Gets the specified name of the initial catalog to be created when instantiating aTableEnvironment
.
-
getBuiltInDatabaseName
public String getBuiltInDatabaseName()
Gets the specified name of the default database in the initial catalog to be created when instantiating aTableEnvironment
.
-
isStreamingMode
public boolean isStreamingMode()
Tells if theTableEnvironment
should work in a batch or streaming mode.
-
getUserClassLoader
@Internal public ClassLoader getUserClassLoader()
Returns the userClassLoader
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()
-
-