@Override public boolean containsKey(String key) { return backingConfig.containsKey(prefix + key); }
/** * Get job manager's heap memory. This method will check the new key * {@link JobManagerOptions#JOB_MANAGER_HEAP_MEMORY} and * the old key {@link JobManagerOptions#JOB_MANAGER_HEAP_MEMORY_MB} for backwards compatibility. * * @param configuration the configuration object * @return the memory size of job manager's heap memory. */ public static MemorySize getJobManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY_MB.key())) { return MemorySize.parse(configuration.getInteger(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY_MB) + "m"); } else { //use default value return MemorySize.parse(configuration.getString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY)); } }
/** * Get task manager's heap memory. This method will check the new key * {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY} and * the old key {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY_MB} for backwards compatibility. * * @param configuration the configuration object * @return the memory size of task manager's heap memory. */ public static MemorySize getTaskManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY_MB.key())) { return MemorySize.parse(configuration.getInteger(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY_MB) + "m"); } else { //use default value return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } }
@Override public boolean containsKey(String key) { return backingConfig.containsKey(prefix + key); }
@Override public boolean containsKey(String key) { return backingConfig.containsKey(prefix + key); }
public boolean hasStubWrapper() { return this.config.containsKey(STUB_OBJECT); }
public boolean hasStubWrapper() { return this.config.containsKey(STUB_OBJECT); }
public boolean hasStubWrapper() { return this.config.containsKey(STUB_OBJECT); }
public boolean hasStubWrapper() { return this.config.containsKey(STUB_OBJECT); }
private File getUploadDir(Configuration configuration) { File baseDir = new File(configuration.getString(ConfigConstants.JOB_MANAGER_WEB_UPLOAD_DIR_KEY, getBaseDirStr(configuration))); boolean uploadDirSpecified = configuration.containsKey(ConfigConstants.JOB_MANAGER_WEB_UPLOAD_DIR_KEY); return uploadDirSpecified ? baseDir : new File(baseDir, "flink-web-" + UUID.randomUUID()); } }
/** * Sets the value of a new config key to the value of a deprecated config key. * @param config Config to write * @param deprecated The old config key * @param designated The new config key */ public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { // set the designated key only if it is not set already if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } }
/** * Sets the value of a new config key to the value of a deprecated config key. * @param config Config to write * @param deprecated The old config key * @param designated The new config key */ public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { // set the designated key only if it is not set already if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } }
/** * Sets the value of a new config key to the value of a deprecated config key. * @param config Config to write * @param deprecated The old config key * @param designated The new config key */ public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { // set the designated key only if it is not set already if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } }
/** * Sets the value of a new config key to the value of a deprecated config key. * @param config Config to write * @param deprecated The old config key * @param designated The new config key */ public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { // set the designated key only if it is not set already if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } }
public void addBroadcastInputToGroup(int groupIndex) { final String grp = BROADCAST_INPUT_GROUP_SIZE_PREFIX + groupIndex; if (!this.config.containsKey(grp)) { this.config.setInteger(NUM_BROADCAST_INPUTS, this.config.getInteger(NUM_BROADCAST_INPUTS, 0) + 1); } this.config.setInteger(grp, this.config.getInteger(grp, 0) + 1); }
public void addBroadcastInputToGroup(int groupIndex) { final String grp = BROADCAST_INPUT_GROUP_SIZE_PREFIX + groupIndex; if (!this.config.containsKey(grp)) { this.config.setInteger(NUM_BROADCAST_INPUTS, this.config.getInteger(NUM_BROADCAST_INPUTS, 0) + 1); } this.config.setInteger(grp, this.config.getInteger(grp, 0) + 1); }
public void addBroadcastInputToGroup(int groupIndex) { final String grp = BROADCAST_INPUT_GROUP_SIZE_PREFIX + groupIndex; if (!this.config.containsKey(grp)) { this.config.setInteger(NUM_BROADCAST_INPUTS, this.config.getInteger(NUM_BROADCAST_INPUTS, 0) + 1); } this.config.setInteger(grp, this.config.getInteger(grp, 0) + 1); }
public void addBroadcastInputToGroup(int groupIndex) { final String grp = BROADCAST_INPUT_GROUP_SIZE_PREFIX + groupIndex; if (!this.config.containsKey(grp)) { this.config.setInteger(NUM_BROADCAST_INPUTS, this.config.getInteger(NUM_BROADCAST_INPUTS, 0) + 1); } this.config.setInteger(grp, this.config.getInteger(grp, 0) + 1); }
/** * Get task manager's heap memory. This method will check the new key * {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY} and * the old key {@link TaskManagerOptions#TASK_MANAGER_HEAP_MEMORY_MB} for backwards compatibility. * * @param configuration the configuration object * @return the memory size of task manager's heap memory. */ public static MemorySize getTaskManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY_MB.key())) { return MemorySize.parse(configuration.getInteger(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY_MB) + "m"); } else { //use default value return MemorySize.parse(configuration.getString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY)); } }
/** * Get job manager's heap memory. This method will check the new key * {@link JobManagerOptions#JOB_MANAGER_HEAP_MEMORY} and * the old key {@link JobManagerOptions#JOB_MANAGER_HEAP_MEMORY_MB} for backwards compatibility. * * @param configuration the configuration object * @return the memory size of job manager's heap memory. */ public static MemorySize getJobManagerHeapMemory(Configuration configuration) { if (configuration.containsKey(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY.key())) { return MemorySize.parse(configuration.getString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY)); } else if (configuration.containsKey(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY_MB.key())) { return MemorySize.parse(configuration.getInteger(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY_MB) + "m"); } else { //use default value return MemorySize.parse(configuration.getString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY)); } }