use of org.elasticsearch.action.admin.cluster.settings.ClusterGetSettingsResponse in project pancm_project by xuwujing.
the class EsHighLevelCluster method clusterGetSetting.
/**
* @return void
* @Author pancm
* @Description 设获取集群的设置情况
* @Date 2020/1/2
* @Param [index]
*/
public static void clusterGetSetting() throws IOException {
ClusterGetSettingsRequest request = new ClusterGetSettingsRequest();
ClusterGetSettingsResponse response = client.cluster().getSettings(request, RequestOptions.DEFAULT);
Settings setting = response.getPersistentSettings();
Settings setting2 = response.getTransientSettings();
logger.info("setting:{}", setting);
logger.info("setting2:{}", setting2);
}
use of org.elasticsearch.action.admin.cluster.settings.ClusterGetSettingsResponse in project graylog2-server by Graylog2.
the class ClusterAdapterES7 method clusterAllocationDiskSettings.
@Override
public ClusterAllocationDiskSettings clusterAllocationDiskSettings() {
final ClusterGetSettingsRequest request = new ClusterGetSettingsRequest();
request.includeDefaults(true);
final ClusterGetSettingsResponse response = client.execute((c, requestOptions) -> c.cluster().getSettings(request, requestOptions));
return ClusterAllocationDiskSettingsFactory.create(Boolean.parseBoolean(response.getSetting("cluster.routing.allocation.disk.threshold_enabled")), response.getSetting("cluster.routing.allocation.disk.watermark.low"), response.getSetting("cluster.routing.allocation.disk.watermark.high"), response.getSetting("cluster.routing.allocation.disk.watermark.flood_stage"));
}
Aggregations