use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.RestClientBuilder in project pancm_project by xuwujing.
the class EsParticipleSearchTest method init.
/*
* 初始化服务
*/
private static void init() {
RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost(elasticIp, elasticPort));
client = new RestHighLevelClient(restClientBuilder);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.RestClientBuilder in project pancm_project by xuwujing.
the class EsAggregationSearchTest method init.
/*
* 初始化服务
*/
private static void init() {
RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost(elasticIp, elasticPort));
client = new RestHighLevelClient(restClientBuilder);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.RestClientBuilder in project pancm_project by xuwujing.
the class EsAggregationSearchTest2 method init.
/*
* 初始化服务
*/
private static void init() {
RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost(elasticIp, elasticPort));
client = new RestHighLevelClient(restClientBuilder);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.RestClientBuilder in project pancm_project by xuwujing.
the class IpHandler method init.
/*
* 初始化服务
*/
private static RestHighLevelClient init() {
if (client == null) {
synchronized (EsUtil.class) {
if (client == null) {
RestClientBuilder restClientBuilder = RestClient.builder(httpHosts);
client = new RestHighLevelClient(restClientBuilder);
}
}
}
return client;
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.RestClientBuilder in project janusgraph by JanusGraph.
the class RestClientSetup method getRestClient.
protected RestClient getRestClient(HttpHost[] hosts, Configuration config) {
final RestClientBuilder restClientBuilder = getRestClientBuilder(hosts);
final HttpClientConfigCallback httpClientConfigCallback = getHttpClientConfigCallback(config);
if (httpClientConfigCallback != null) {
restClientBuilder.setHttpClientConfigCallback(httpClientConfigCallback);
}
final RequestConfigCallback requestConfigCallback = getRequestConfigCallback(config);
if (requestConfigCallback != null) {
restClientBuilder.setRequestConfigCallback(requestConfigCallback);
}
return restClientBuilder.build();
}
Aggregations