本文整理了Java中com.hazelcast.config.Config.getJobTrackerConfig()
方法的一些代码示例,展示了Config.getJobTrackerConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getJobTrackerConfig()
方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:getJobTrackerConfig
[英]Returns the JobTrackerConfig for the given name, creating one if necessary and adding it to the collection of known configurations.
The configuration is found by matching the configuration name pattern to the provided name without the partition qualifier (the part of the name after '@'). If no configuration matches, it will create one by cloning the "default" configuration and add it to the configuration collection.
This method is intended to easily and fluently create and add configurations more specific than the default configuration without explicitly adding it by invoking #addJobTrackerConfig(JobTrackerConfig).
Because it adds new configurations if they are not already present, this method is intended to be used before this config is used to create a hazelcast instance. Afterwards, newly added configurations may be ignored.
[中]返回给定名称的JobTrackerConfig,必要时创建一个,并将其添加到已知配置的集合中。
通过将配置名称模式与不带分区限定符的提供名称(名称中“@”之后的部分)匹配,可以找到配置。如果没有匹配的配置,它将通过克隆“默认”配置创建一个配置,并将其添加到配置集合中。
此方法旨在轻松、流畅地创建和添加比默认配置更具体的配置,而无需通过调用#addJobTrackerConfig(JobTrackerConfig)显式添加。
因为如果新配置尚未出现,它会添加新配置,所以此方法将在使用此配置创建hazelcast实例之前使用。之后,可能会忽略新添加的配置。
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public JobTrackerConfig getJobTrackerConfig(String name) {
return staticConfig.getJobTrackerConfig(name);
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public JobTrackerConfig getJobTrackerConfig(String name) {
return staticConfig.getJobTrackerConfig(name);
}
代码示例来源:origin: hazelcast/hazelcast-jet
/**
* Returns a read-only {@link com.hazelcast.mapreduce.JobTracker}
* configuration for the given name.
* <p>
* The name is matched by pattern to the configuration and by stripping the
* partition ID qualifier from the given {@code name}.
* If there is no config found by the name, it will return the configuration
* with the name {@code default}.
*
* @param name name of the job tracker config
* @return the job tracker configuration
* @throws ConfigurationException if ambiguous configurations are found
* @see StringPartitioningStrategy#getBaseName(java.lang.String)
* @see #setConfigPatternMatcher(ConfigPatternMatcher)
* @see #getConfigPatternMatcher()
* @see EvictionConfig#setSize(int)
*/
public JobTrackerConfig findJobTrackerConfig(String name) {
name = getBaseName(name);
JobTrackerConfig config = lookupByPattern(configPatternMatcher, jobTrackerConfigs, name);
if (config != null) {
return config.getAsReadOnly();
}
return getJobTrackerConfig("default").getAsReadOnly();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
/**
* Returns a read-only {@link com.hazelcast.mapreduce.JobTracker}
* configuration for the given name.
* <p>
* The name is matched by pattern to the configuration and by stripping the
* partition ID qualifier from the given {@code name}.
* If there is no config found by the name, it will return the configuration
* with the name {@code default}.
*
* @param name name of the job tracker config
* @return the job tracker configuration
* @throws ConfigurationException if ambiguous configurations are found
* @see StringPartitioningStrategy#getBaseName(java.lang.String)
* @see #setConfigPatternMatcher(ConfigPatternMatcher)
* @see #getConfigPatternMatcher()
* @see EvictionConfig#setSize(int)
*/
public JobTrackerConfig findJobTrackerConfig(String name) {
name = getBaseName(name);
JobTrackerConfig config = lookupByPattern(configPatternMatcher, jobTrackerConfigs, name);
if (config != null) {
return config.getAsReadOnly();
}
return getJobTrackerConfig("default").getAsReadOnly();
}
内容来源于网络,如有侵权,请联系作者删除!