Java Code Examples for org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest#persistentSettings()
The following examples show how to use
org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest#persistentSettings() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ESClusterUpdateSettingsTask.java From Elasticsearch with Apache License 2.0 | 6 votes |
public ESClusterUpdateSettingsTask(UUID jobId, TransportClusterUpdateSettingsAction transport, ESClusterUpdateSettingsNode node) { super(jobId); this.transport = transport; final SettableFuture<TaskResult> result = SettableFuture.create(); results = Collections.<ListenableFuture<TaskResult>>singletonList(result); request = new ClusterUpdateSettingsRequest(); request.persistentSettings(node.persistentSettings()); request.transientSettings(node.transientSettings()); if (node.persistentSettingsToRemove() != null) { request.persistentSettingsToRemove(node.persistentSettingsToRemove()); } if (node.transientSettingsToRemove() != null) { request.transientSettingsToRemove(node.transientSettingsToRemove()); } listener = ActionListeners.wrap(result, Functions.constant(TaskResult.ONE_ROW)); }
Example 2
Source File: ClusterClientPutSettingsMethodsInterceptor.java From skywalking with Apache License 2.0 | 5 votes |
@Override public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable { ClusterUpdateSettingsRequest updateSettingsRequest = (ClusterUpdateSettingsRequest) (allArguments[0]); RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField()); if (restClientEnhanceInfo != null) { AbstractSpan span = ContextManager .createExitSpan(Constants.CLUSTER_PUT_SETTINGS_NAME, restClientEnhanceInfo.getPeers()); span.setComponent(ComponentsDefine.REST_HIGH_LEVEL_CLIENT); Tags.DB_TYPE.set(span, DB_TYPE); if (TRACE_DSL) { StringBuilder sb = new StringBuilder("persistent:["); Settings persist = updateSettingsRequest.persistentSettings(); if (persist != null) { sb.append(persist.toString()); } sb.append("]---transient:["); Settings transi = updateSettingsRequest.transientSettings(); if (transi != null) { sb.append(transi.toString()); } sb.append("]"); Tags.DB_STATEMENT.set(span, sb.toString()); } SpanLayer.asDB(span); } }