class ContaineredTaskManagerParameters implements java.io.Serializable {

	public static ContaineredTaskManagerParameters create(
			Configuration config,
			TaskExecutorProcessSpec taskExecutorProcessSpec) {

		// obtain the additional environment variables from the configuration
		final HashMap<String, String> envVars = new HashMap<>();
		final String prefix = ResourceManagerOptions.CONTAINERIZED_TASK_MANAGER_ENV_PREFIX;

		for (String key : config.keySet()) {
			if (key.startsWith(prefix) && key.length() > prefix.length()) {
				// remove prefix
				String envVarKey = key.substring(prefix.length());
				envVars.put(envVarKey, config.getString(key, null));
			}
		}

		// done
		return new ContaineredTaskManagerParameters(taskExecutorProcessSpec, envVars);
	}

	public  ContaineredTaskManagerParameters(
			TaskExecutorProcessSpec taskExecutorProcessSpec,
			HashMap<String, String> taskManagerEnv);

}