public class ElasticSearchClientServiceImpl extends AbstractControllerService implements ElasticSearchClientService
| Modifier and Type | Field and Description |
|---|---|
private org.elasticsearch.client.RestClient |
client |
private com.fasterxml.jackson.databind.ObjectMapper |
mapper |
private static List<PropertyDescriptor> |
properties |
private Charset |
responseCharset |
private String |
url |
ALWAYS_SUPPRESS, CHARSET, CONNECT_TIMEOUT, HTTP_HOSTS, NEVER_SUPPRESS, PASSWORD, PROP_SSL_CONTEXT_SERVICE, RETRY_TIMEOUT, SOCKET_TIMEOUT, SUPPRESS_NULLS, USERNAME| Constructor and Description |
|---|
ElasticSearchClientServiceImpl() |
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledcustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate com.fasterxml.jackson.databind.ObjectMapper mapper
private static final List<PropertyDescriptor> properties
private org.elasticsearch.client.RestClient client
private String url
private Charset responseCharset
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnEnabled public void onEnabled(ConfigurationContext context) throws InitializationException
InitializationException@OnDisabled public void onDisabled() throws IOException
IOExceptionprivate void setupClient(ConfigurationContext context) throws MalformedURLException, InitializationException
private org.elasticsearch.client.Response runQuery(String endpoint, String query, String index, String type)
public IndexOperationResponse add(IndexOperationRequest operation)
add in interface ElasticSearchClientServiceprivate String buildBulkHeader(IndexOperationRequest request) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprivate String buildBulkHeader(String operation, String index, String type, String id) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprotected void buildRequest(IndexOperationRequest request, StringBuilder builder) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic IndexOperationResponse bulk(List<IndexOperationRequest> operations)
bulk in interface ElasticSearchClientServicepublic Long count(String query, String index, String type)
count in interface ElasticSearchClientServicepublic DeleteOperationResponse deleteById(String index, String type, String id)
deleteById in interface ElasticSearchClientServicepublic DeleteOperationResponse deleteById(String index, String type, List<String> ids)
deleteById in interface ElasticSearchClientServicepublic DeleteOperationResponse deleteByQuery(String query, String index, String type)
deleteByQuery in interface ElasticSearchClientServicepublic Map<String,Object> get(String index, String type, String id)
get in interface ElasticSearchClientServiceprivate int handleSearchCount(Object raw)
public SearchResponse search(String query, String index, String type)
search in interface ElasticSearchClientServicepublic String getTransitUrl(String index, String type)
getTransitUrl in interface ElasticSearchClientServiceCopyright © 2021 Apache NiFi Project. All rights reserved.