Java Code Examples for org.apache.flink.table.client.config.entries.ExecutionEntry#enrich()

The following examples show how to use org.apache.flink.table.client.config.entries.ExecutionEntry#enrich() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Environment.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
/**
 * Enriches an environment with new/modified properties or views and returns the new instance.
 */
public static Environment enrich(
		Environment env,
		Map<String, String> properties,
		Map<String, ViewEntry> views) {
	final Environment enrichedEnv = new Environment();

	// merge tables
	enrichedEnv.tables = new LinkedHashMap<>(env.getTables());
	enrichedEnv.tables.putAll(views);

	// merge functions
	enrichedEnv.functions = new HashMap<>(env.getFunctions());

	// enrich execution properties
	enrichedEnv.execution = ExecutionEntry.enrich(env.execution, properties);

	// enrich deployment properties
	enrichedEnv.deployment = DeploymentEntry.enrich(env.deployment, properties);

	return enrichedEnv;
}
 
Example 2
Source File: Environment.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Enriches an environment with new/modified properties or views and returns the new instance.
 */
public static Environment enrich(
		Environment env,
		Map<String, String> properties,
		Map<String, ViewEntry> views) {
	final Environment enrichedEnv = new Environment();

	// merge catalogs
	enrichedEnv.catalogs = new LinkedHashMap<>(env.getCatalogs());

	// merge tables
	enrichedEnv.tables = new LinkedHashMap<>(env.getTables());
	enrichedEnv.tables.putAll(views);

	// merge functions
	enrichedEnv.functions = new HashMap<>(env.getFunctions());

	// enrich execution properties
	enrichedEnv.execution = ExecutionEntry.enrich(env.execution, properties);

	// enrich configuration properties
	enrichedEnv.configuration = ConfigurationEntry.enrich(env.configuration, properties);

	// enrich deployment properties
	enrichedEnv.deployment = DeploymentEntry.enrich(env.deployment, properties);

	return enrichedEnv;
}
 
Example 3
Source File: Environment.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Enriches an environment with new/modified properties and returns the new instance.
 */
public static Environment enrich(Environment env, Map<String, String> properties) {
	final Environment enrichedEnv = new Environment();

	// copy modules
	enrichedEnv.modules = new LinkedHashMap<>(env.getModules());

	// copy catalogs
	enrichedEnv.catalogs = new LinkedHashMap<>(env.getCatalogs());

	// copy tables
	enrichedEnv.tables = new LinkedHashMap<>(env.getTables());

	// copy functions
	enrichedEnv.functions = new HashMap<>(env.getFunctions());

	// enrich execution properties
	enrichedEnv.execution = ExecutionEntry.enrich(env.execution, properties);

	// enrich configuration properties
	enrichedEnv.configuration = ConfigurationEntry.enrich(env.configuration, properties);

	// enrich deployment properties
	enrichedEnv.deployment = DeploymentEntry.enrich(env.deployment, properties);

	return enrichedEnv;
}