@InputRequirement(value=INPUT_REQUIRED) @EventDriven @Tags(value={"elasticsearch","elasticsearch 5","delete","remove"}) @CapabilityDescription(value="Delete a document from Elasticsearch 5.0 by document id. If the cluster has been configured for authorization and/or secure transport (SSL/TLS), and the X-Pack plugin is available, secure connections can be made.") @WritesAttribute(attribute="es.error.message",description="The message attribute in case of error") @WritesAttribute(attribute="filename",description="The filename attribute which is set to the document identifier") @WritesAttribute(attribute="es.index",description="The Elasticsearch index containing the document") @WritesAttribute(attribute="es.type",description="The Elasticsearch document type") @WritesAttribute(attribute="es.rest.status",description="The filename attribute with rest status") @SeeAlso(value={FetchElasticsearch5.class,PutElasticsearch5.class}) public class DeleteElasticsearch5 extends AbstractProcessor
| Constructor and Description |
|---|
DeleteElasticsearch5() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeClient()
Dispose of ElasticSearch client
|
protected void |
createElasticsearchClient(ProcessContext context)
Instantiate ElasticSearch Client.
|
protected java.util.Collection<ValidationResult> |
customValidate(ValidationContext validationContext)
Allows subclasses to perform their own validation on the already set
properties.
|
protected org.elasticsearch.action.delete.DeleteResponse |
doDelete(org.elasticsearch.action.delete.DeleteRequestBuilder requestBuilder) |
java.util.Set<Relationship> |
getRelationships() |
java.util.List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Allows subclasses to register which property descriptor objects are
supported.
|
protected org.elasticsearch.client.Client |
getTransportClient(org.elasticsearch.common.settings.Settings.Builder settingsBuilder,
java.lang.String xPackPath,
java.lang.String username,
java.lang.String password,
java.util.List<java.net.InetSocketAddress> esHosts,
ComponentLog log) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
protected org.elasticsearch.action.delete.DeleteRequestBuilder |
prepareDeleteRequest(java.lang.String index,
java.lang.String documentId,
java.lang.String documentType) |
void |
setup(ProcessContext context) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final java.lang.String UNABLE_TO_DELETE_DOCUMENT_MESSAGE
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
public static final Relationship REL_RETRY
public static final Relationship REL_NOT_FOUND
public static final PropertyDescriptor DOCUMENT_ID
public static final PropertyDescriptor INDEX
public static final PropertyDescriptor TYPE
public static final java.lang.String ES_ERROR_MESSAGE
public static final java.lang.String ES_FILENAME
public static final java.lang.String ES_INDEX
public static final java.lang.String ES_TYPE
public static final java.lang.String ES_REST_STATUS
protected static final PropertyDescriptor CLUSTER_NAME
protected static final PropertyDescriptor HOSTS
public static final PropertyDescriptor PROP_XPACK_LOCATION
protected static final PropertyDescriptor PING_TIMEOUT
protected static final PropertyDescriptor SAMPLER_INTERVAL
protected final java.util.concurrent.atomic.AtomicReference<org.elasticsearch.client.Client> esClient
protected java.util.List<java.net.InetSocketAddress> esHosts
public static final PropertyDescriptor PROP_SSL_CONTEXT_SERVICE
protected static final PropertyDescriptor CHARSET
public static final PropertyDescriptor USERNAME
public static final PropertyDescriptor PASSWORD
public java.util.Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
AbstractConfigurableComponentgetSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprotected org.elasticsearch.action.delete.DeleteRequestBuilder prepareDeleteRequest(java.lang.String index,
java.lang.String documentId,
java.lang.String documentType)
protected org.elasticsearch.action.delete.DeleteResponse doDelete(org.elasticsearch.action.delete.DeleteRequestBuilder requestBuilder)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException@OnStopped public void closeClient()
protected void createElasticsearchClient(ProcessContext context) throws ProcessException
context - The context for this processorProcessException - if an error occurs while creating an Elasticsearch clientprotected org.elasticsearch.client.Client getTransportClient(org.elasticsearch.common.settings.Settings.Builder settingsBuilder,
java.lang.String xPackPath,
java.lang.String username,
java.lang.String password,
java.util.List<java.net.InetSocketAddress> esHosts,
ComponentLog log)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionprotected java.util.Collection<ValidationResult> customValidate(ValidationContext validationContext)
AbstractConfigurableComponentcustomValidate in class AbstractConfigurableComponentvalidationContext - provides a mechanism for obtaining externally
managed values, such as property values and supplies convenience methods
for operating on those valuespublic void setup(ProcessContext context)