congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ClusterUpdateSettingsRequest.transientSettings
Code IndexAdd Tabnine to your IDE (free)

How to use
transientSettings
method
in
org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest

Best Java code snippets using org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings (Showing top 20 results out of 315)

origin: floragunncom/search-guard

final boolean successful = tc.admin().cluster()
    .updateSettings(new ClusterUpdateSettingsRequest()
    .transientSettings(ENABLE_ALL_ALLOCATIONS_SETTINGS)
    .persistentSettings(ENABLE_ALL_ALLOCATIONS_SETTINGS))
    .actionGet()
origin: org.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings.Builder settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Map settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.elasticsearch/elasticsearch

/**
 * Sets the source containing the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(String settings, XContentType xContentType) {
  request.transientSettings(settings, xContentType);
  return this;
}
origin: org.elasticsearch/elasticsearch

  @Override
  public ClusterState execute(final ClusterState currentState) {
    final ClusterState clusterState =
        updater.updateSettings(
            currentState,
            clusterSettings.upgradeSettings(request.transientSettings()),
            clusterSettings.upgradeSettings(request.persistentSettings()),
            logger);
    changed = clusterState != currentState;
    return clusterState;
  }
});
origin: org.elasticsearch/elasticsearch

@Override
protected ClusterBlockException checkBlock(ClusterUpdateSettingsRequest request, ClusterState state) {
  // allow for dedicated changes to the metadata blocks, so we don't block those to allow to "re-enable" it
  if (request.transientSettings().size() + request.persistentSettings().size() == 1) {
    // only one setting
    if (MetaData.SETTING_READ_ONLY_SETTING.exists(request.persistentSettings())
      || MetaData.SETTING_READ_ONLY_SETTING.exists(request.transientSettings())
      || MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.transientSettings())
      || MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.persistentSettings())) {
      // one of the settings above as the only setting in the request means - resetting the block!
      return null;
    }
  }
  return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
}
origin: org.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
@SuppressWarnings({"unchecked", "rawtypes"})
public ClusterUpdateSettingsRequest transientSettings(Map source) {
  try {
    XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
    builder.map(source);
    transientSettings(Strings.toString(builder), builder.contentType());
  } catch (IOException e) {
    throw new ElasticsearchGenerationException("Failed to generate [" + source + "]", e);
  }
  return this;
}
origin: org.elasticsearch/elasticsearch

@Override
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
  final ClusterUpdateSettingsRequest clusterUpdateSettingsRequest = Requests.clusterUpdateSettingsRequest();
  clusterUpdateSettingsRequest.timeout(request.paramAsTime("timeout", clusterUpdateSettingsRequest.timeout()));
  clusterUpdateSettingsRequest.masterNodeTimeout(
      request.paramAsTime("master_timeout", clusterUpdateSettingsRequest.masterNodeTimeout()));
  Map<String, Object> source;
  try (XContentParser parser = request.contentParser()) {
    source = parser.map();
  }
  if (source.containsKey(TRANSIENT)) {
    clusterUpdateSettingsRequest.transientSettings((Map) source.get(TRANSIENT));
  }
  if (source.containsKey(PERSISTENT)) {
    clusterUpdateSettingsRequest.persistentSettings((Map) source.get(PERSISTENT));
  }
  return channel -> client.admin().cluster().updateSettings(clusterUpdateSettingsRequest, new RestToXContentListener<>(channel));
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings.Builder settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Sets the source containing the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(String settings, XContentType xContentType) {
  request.transientSettings(settings, xContentType);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings settings) {
  request.transientSettings(settings);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Sets the source containing the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(String settings, XContentType xContentType) {
  request.transientSettings(settings, xContentType);
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Settings.Builder settings) {
  request.transientSettings(settings);
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Map settings) {
  request.transientSettings(settings);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Sets the transient settings to be updated. They will not survive a full cluster restart
 */
public ClusterUpdateSettingsRequestBuilder setTransientSettings(Map settings) {
  request.transientSettings(settings);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Sets the source containing the transient settings to be updated. They will not survive a full cluster restart
 * @deprecated use {@link #setTransientSettings(String, XContentType)} to avoid content type detection
 */
@Deprecated
public ClusterUpdateSettingsRequestBuilder setTransientSettings(String settings) {
  request.transientSettings(settings);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

  @Override
  public ClusterState execute(final ClusterState currentState) {
    ClusterState clusterState = updater.updateSettings(currentState, request.transientSettings(), request.persistentSettings());
    changed = clusterState != currentState;
    return clusterState;
  }
});
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

  @Override
  public ClusterState execute(final ClusterState currentState) {
    final ClusterState clusterState =
        updater.updateSettings(
            currentState,
            clusterSettings.upgradeSettings(request.transientSettings()),
            clusterSettings.upgradeSettings(request.persistentSettings()),
            logger);
    changed = clusterState != currentState;
    return clusterState;
  }
});
org.elasticsearch.action.admin.cluster.settingsClusterUpdateSettingsRequesttransientSettings

Javadoc

Sets the source containing the transient settings to be updated. They will not survive a full cluster restart

Popular methods of ClusterUpdateSettingsRequest

  • <init>
  • masterNodeTimeout
  • persistentSettings
    Sets the persistent settings to be updated. They will get applied cross restarts
  • timeout
  • readTimeout
  • writeTimeout

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now