| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.RestHighLevelClient |
client |
static String |
TYPE |
| Constructor and Description |
|---|
ElasticSearchClient(String clusterNodes,
String protocol,
String trustStorePath,
String trustStorePass,
String namespace,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
org.elasticsearch.action.bulk.BulkProcessor |
createBulkProcessor(int bulkActions,
int flushInterval,
int concurrentRequests) |
boolean |
createIndex(String indexName) |
boolean |
createIndex(String indexName,
com.google.gson.JsonObject settings,
com.google.gson.JsonObject mapping) |
boolean |
createTemplate(String indexName,
com.google.gson.JsonObject settings,
com.google.gson.JsonObject mapping) |
int |
delete(String indexName,
String timeBucketColumnName,
long endTimeBucket) |
boolean |
deleteByIndexName(String indexName)
If your indexName is retrieved from elasticsearch through
retrievalIndexByAliases(String) or some other
method and it already contains namespace. |
boolean |
deleteByModelName(String modelName)
If your indexName is obtained from metadata or configuration and without namespace.
|
boolean |
deleteTemplate(String indexName) |
void |
forceInsert(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
void |
forceUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
void |
forceUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source,
long version) |
String |
formatIndexName(String indexName) |
org.elasticsearch.action.get.GetResponse |
get(String indexName,
String id) |
org.elasticsearch.action.search.SearchResponse |
ids(String indexName,
String[] ids) |
boolean |
isExistsIndex(String indexName) |
boolean |
isExistsTemplate(String indexName) |
ElasticSearchInsertRequest |
prepareInsert(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
ElasticSearchUpdateRequest |
prepareUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
List<String> |
retrievalIndexByAliases(String aliases) |
org.elasticsearch.action.search.SearchResponse |
search(String indexName,
org.elasticsearch.search.builder.SearchSourceBuilder searchSourceBuilder) |
void |
shutdown() |
void |
synchronousBulk(org.elasticsearch.action.bulk.BulkRequest request) |
public static final String TYPE
protected org.elasticsearch.client.RestHighLevelClient client
public void connect()
throws IOException,
KeyStoreException,
NoSuchAlgorithmException,
KeyManagementException,
CertificateException
connect in interface ClientIOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionKeyManagementExceptionCertificateExceptionpublic void shutdown()
throws IOException
shutdown in interface ClientIOExceptionpublic boolean createIndex(String indexName) throws IOException
IOExceptionpublic boolean createIndex(String indexName, com.google.gson.JsonObject settings, com.google.gson.JsonObject mapping) throws IOException
IOExceptionpublic List<String> retrievalIndexByAliases(String aliases) throws IOException
IOExceptionpublic boolean deleteByIndexName(String indexName) throws IOException
retrievalIndexByAliases(String) or some other
method and it already contains namespace. Then you should delete the index by this method, this method will no
longer concatenate namespace.
https://github.com/apache/skywalking/pull/3017
IOExceptionpublic boolean deleteByModelName(String modelName) throws IOException
https://github.com/apache/skywalking/pull/3017
IOExceptionpublic boolean isExistsIndex(String indexName) throws IOException
IOExceptionpublic boolean isExistsTemplate(String indexName) throws IOException
IOExceptionpublic boolean createTemplate(String indexName, com.google.gson.JsonObject settings, com.google.gson.JsonObject mapping) throws IOException
IOExceptionpublic boolean deleteTemplate(String indexName) throws IOException
IOExceptionpublic org.elasticsearch.action.search.SearchResponse search(String indexName, org.elasticsearch.search.builder.SearchSourceBuilder searchSourceBuilder) throws IOException
IOExceptionpublic org.elasticsearch.action.get.GetResponse get(String indexName, String id) throws IOException
IOExceptionpublic org.elasticsearch.action.search.SearchResponse ids(String indexName, String[] ids) throws IOException
IOExceptionpublic void forceInsert(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source) throws IOException
IOExceptionpublic void forceUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source, long version) throws IOException
IOExceptionpublic void forceUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source) throws IOException
IOExceptionpublic ElasticSearchInsertRequest prepareInsert(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source)
public ElasticSearchUpdateRequest prepareUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source)
public int delete(String indexName, String timeBucketColumnName, long endTimeBucket) throws IOException
IOExceptionpublic void synchronousBulk(org.elasticsearch.action.bulk.BulkRequest request)
public org.elasticsearch.action.bulk.BulkProcessor createBulkProcessor(int bulkActions,
int flushInterval,
int concurrentRequests)
Copyright © 2019 The Apache Software Foundation. All rights reserved.