org.elasticsearch.common.settings.Settings.getAsGroups()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.elasticsearch.common.settings.Settings.getAsGroups()方法的一些代码示例,展示了Settings.getAsGroups()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.getAsGroups()方法的具体详情如下:
包路径:org.elasticsearch.common.settings.Settings
类名称:Settings
方法名:getAsGroups

Settings.getAsGroups介绍

[英]Returns group settings for the given setting prefix.
[中]返回给定设置前缀的组设置。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Returns group settings for the given setting prefix.
 */
public Map<String, Settings> getAsGroups() throws SettingsException {
  return getAsGroups(false);
}

代码示例来源:origin: org.elasticsearch/elasticsearch

private void setForcedAwarenessAttributes(Settings forceSettings) {
  Map<String, List<String>> forcedAwarenessAttributes = new HashMap<>();
  Map<String, Settings> forceGroups = forceSettings.getAsGroups();
  for (Map.Entry<String, Settings> entry : forceGroups.entrySet()) {
    List<String> aValues = entry.getValue().getAsList("values");
    if (aValues.size() > 0) {
      forcedAwarenessAttributes.put(entry.getKey(), aValues);
    }
  }
  this.forcedAwarenessAttributes = forcedAwarenessAttributes;
}

代码示例来源:origin: org.elasticsearch/elasticsearch

Map<String, Settings> gcThresholdGroups = GC_SETTING.get(settings).getAsGroups();
for (Map.Entry<String, Settings> entry : gcThresholdGroups.entrySet()) {
  String name = entry.getKey();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Returns group settings for the given setting prefix.
 */
public Map<String, Settings> getAsGroups() throws SettingsException {
  return getAsGroups(false);
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Returns group settings for the given setting prefix.
 */
public Map<String, Settings> getAsGroups() throws SettingsException {
  return getAsGroups(false);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private void setForcedAwarenessAttributes(Settings forceSettings) {
  Map<String, List<String>> forcedAwarenessAttributes = new HashMap<>();
  Map<String, Settings> forceGroups = forceSettings.getAsGroups();
  for (Map.Entry<String, Settings> entry : forceGroups.entrySet()) {
    List<String> aValues = entry.getValue().getAsList("values");
    if (aValues.size() > 0) {
      forcedAwarenessAttributes.put(entry.getKey(), aValues);
    }
  }
  this.forcedAwarenessAttributes = forcedAwarenessAttributes;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

private void setForcedAwarenessAttributes(Settings forceSettings) {
  Map<String, String[]> forcedAwarenessAttributes = new HashMap<>();
  Map<String, Settings> forceGroups = forceSettings.getAsGroups();
  for (Map.Entry<String, Settings> entry : forceGroups.entrySet()) {
    String[] aValues = entry.getValue().getAsArray("values");
    if (aValues.length > 0) {
      forcedAwarenessAttributes.put(entry.getKey(), aValues);
    }
  }
  this.forcedAwarenessAttributes = forcedAwarenessAttributes;
}

代码示例来源:origin: apache/servicemix-bundles

private void setForcedAwarenessAttributes(Settings forceSettings) {
  Map<String, List<String>> forcedAwarenessAttributes = new HashMap<>();
  Map<String, Settings> forceGroups = forceSettings.getAsGroups();
  for (Map.Entry<String, Settings> entry : forceGroups.entrySet()) {
    List<String> aValues = entry.getValue().getAsList("values");
    if (aValues.size() > 0) {
      forcedAwarenessAttributes.put(entry.getKey(), aValues);
    }
  }
  this.forcedAwarenessAttributes = forcedAwarenessAttributes;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

final Settings settings) {
final Map<String, Settings> profiles = new HashMap<>(TransportSettings.TRANSPORT_PROFILES_SETTING.get(settings).getAsGroups());
profiles.putIfAbsent(TransportSettings.DEFAULT_PROFILE, Settings.EMPTY);

代码示例来源:origin: apache/servicemix-bundles

/**
 * We have to lazy initialize the deprecation logger as otherwise a static logger here would be constructed before logging is configured
 * leading to a runtime failure (see {@link LogConfigurator#checkErrorListener()} ). The premature construction would come from any
 * {@link Setting} object constructed in, for example, {@link org.elasticsearch.env.Environment}.
 */
static class DeprecationLoggerHolder {
  static DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(Settings.class));
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

protected Map<String, Settings> buildProfileSettings() {
  Map<String, Settings> profiles = TransportSettings.TRANSPORT_PROFILES_SETTING.get(settings).getAsGroups(true);
  if (!profiles.containsKey(TransportSettings.DEFAULT_PROFILE)) {
    profiles = new HashMap<>(profiles);

代码示例来源:origin: com.strapdata.elasticsearch.test/framework

@After
@Override
public void tearDown() throws Exception {
  logger.info("[{}#{}]: cleaning up after test", getTestClass().getSimpleName(), getTestName());
  try {
    DeleteIndexRequestBuilder builder = ElassandraDaemon.instance.node().client().admin().indices().prepareDelete("*");
    assertAcked(builder.get());
    MetaData metaData = client().admin().cluster().prepareState().get().getState().getMetaData();
    assertThat("test leaves persistent cluster metadata behind: " + metaData.persistentSettings().getAsGroups(),
        metaData.persistentSettings().size(), equalTo(0));
    assertThat("test leaves transient cluster metadata behind: " + metaData.transientSettings().getAsGroups(),
        metaData.transientSettings().size(), equalTo(0));
    List<String> userKeyspaces = Schema.instance.getUserKeyspaces();
    userKeyspaces.remove(this.clusterService().getElasticAdminKeyspaceName());
    assertThat("test leaves a user keyspace behind:" + userKeyspaces, userKeyspaces.size(), equalTo(0));
  } catch(Exception e) {
    logger.warn("[{}#{}]: failed to clean indices and metadata: error="+e, getTestClass().getSimpleName(), getTestName());
  } finally {
    testMutex.release();
    logger.info("[{}#{}]: released semaphore={}", getTestClass().getSimpleName(), getTestName(), testMutex.toString());
  }
  super.tearDown();
}

代码示例来源:origin: apache/servicemix-bundles

Map<String, Settings> gcThresholdGroups = GC_SETTING.get(settings).getAsGroups();
for (Map.Entry<String, Settings> entry : gcThresholdGroups.entrySet()) {
  String name = entry.getKey();

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

Map<String, Settings> gcThresholdGroups = GC_SETTING.get(settings).getAsGroups();
for (Map.Entry<String, Settings> entry : gcThresholdGroups.entrySet()) {
  String name = entry.getKey();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

Map<String, Settings> gcThresholdGroups = GC_SETTING.get(settings).getAsGroups();
for (Map.Entry<String, Settings> entry : gcThresholdGroups.entrySet()) {
  String name = entry.getKey();

相关文章