本文整理了Java中org.apache.flink.configuration.Configuration.clone()
方法的一些代码示例,展示了Configuration.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.clone()
方法的具体详情如下:
包路径:org.apache.flink.configuration.Configuration
类名称:Configuration
方法名:clone
暂无
代码示例来源:origin: apache/flink
/**
* Return the Flink configuration object.
* @return The Flink configuration object
*/
public Configuration getFlinkConfiguration() {
return flinkConfig.clone();
}
代码示例来源:origin: apache/flink
@Override
public Configuration clone() {
return new DelegatingConfiguration(backingConfig.clone(), prefix);
}
代码示例来源:origin: org.apache.flink/flink-clients_2.10
/**
* Return the Flink configuration object
* @return The Flink configuration object
*/
public Configuration getFlinkConfiguration() {
return flinkConfig.clone();
}
代码示例来源:origin: org.apache.flink/flink-clients_2.11
/**
* Return the Flink configuration object.
* @return The Flink configuration object
*/
public Configuration getFlinkConfiguration() {
return flinkConfig.clone();
}
代码示例来源:origin: com.alibaba.blink/flink-clients
/**
* Return the Flink configuration object.
* @return The Flink configuration object
*/
public Configuration getFlinkConfiguration() {
return flinkConfig.clone();
}
代码示例来源:origin: org.apache.flink/flink-core
@Override
public Configuration clone() {
return new DelegatingConfiguration(backingConfig.clone(), prefix);
}
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public Configuration clone() {
return new DelegatingConfiguration(backingConfig.clone(), prefix);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
/**
* Generate a task manager configuration.
* @param baseConfig Config to start from.
* @param jobManagerHostname Job manager host name.
* @param jobManagerPort Port of the job manager.
* @param numSlots Number of slots to configure.
* @param registrationTimeout Timeout for registration
* @return TaskManager configuration
*/
public static Configuration generateTaskManagerConfiguration(
Configuration baseConfig,
String jobManagerHostname,
int jobManagerPort,
int numSlots,
FiniteDuration registrationTimeout) {
Configuration cfg = baseConfig.clone();
if (jobManagerHostname != null && !jobManagerHostname.isEmpty()) {
cfg.setString(JobManagerOptions.ADDRESS, jobManagerHostname);
}
if (jobManagerPort > 0) {
cfg.setInteger(JobManagerOptions.PORT, jobManagerPort);
}
if (registrationTimeout != null) {
cfg.setString(TaskManagerOptions.REGISTRATION_TIMEOUT, registrationTimeout.toString());
}
if (numSlots != -1){
cfg.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, numSlots);
}
return cfg;
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
/**
* Generate a task manager configuration.
* @param baseConfig Config to start from.
* @param jobManagerHostname Job manager host name.
* @param jobManagerPort Port of the job manager.
* @param numSlots Number of slots to configure.
* @param registrationTimeout Timeout for registration
* @return TaskManager configuration
*/
public static Configuration generateTaskManagerConfiguration(
Configuration baseConfig,
String jobManagerHostname,
int jobManagerPort,
int numSlots,
FiniteDuration registrationTimeout) {
Configuration cfg = baseConfig.clone();
cfg.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, jobManagerHostname);
cfg.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, jobManagerPort);
cfg.setString(ConfigConstants.TASK_MANAGER_MAX_REGISTRATION_DURATION, registrationTimeout.toString());
if (numSlots != -1){
cfg.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, numSlots);
}
return cfg;
}
内容来源于网络,如有侵权,请联系作者删除!