@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 AbstractElasticsearch5TransportClientProcessor
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
DOCUMENT_ID |
static String |
ES_ERROR_MESSAGE |
static String |
ES_FILENAME |
static String |
ES_INDEX |
static String |
ES_REST_STATUS |
static String |
ES_TYPE |
static PropertyDescriptor |
INDEX |
private static List<PropertyDescriptor> |
propertyDescriptors |
static Relationship |
REL_FAILURE |
static Relationship |
REL_NOT_FOUND |
static Relationship |
REL_RETRY |
static Relationship |
REL_SUCCESS |
private static Set<Relationship> |
relationships |
static PropertyDescriptor |
TYPE |
static String |
UNABLE_TO_DELETE_DOCUMENT_MESSAGE |
CLUSTER_NAME, esClient, esHosts, HOSTS, PING_TIMEOUT, PROP_XPACK_LOCATION, SAMPLER_INTERVALCHARSET, PASSWORD, PROP_SSL_CONTEXT_SERVICE, USERNAME| Constructor and Description |
|---|
DeleteElasticsearch5() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeClient()
Dispose of ElasticSearch client
|
protected org.elasticsearch.action.delete.DeleteResponse |
doDelete(org.elasticsearch.action.delete.DeleteRequestBuilder requestBuilder) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
protected org.elasticsearch.action.delete.DeleteRequestBuilder |
prepareDeleteRequest(String index,
String documentId,
String documentType) |
createElasticsearchClient, getTransportClientcustomValidate, setuponTriggergetControllerServiceLookup, 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 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
private static final Set<Relationship> relationships
private static final List<PropertyDescriptor> propertyDescriptors
public static final String ES_ERROR_MESSAGE
public static final String ES_FILENAME
public static final String ES_INDEX
public static final String ES_TYPE
public static final String ES_REST_STATUS
public Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprotected org.elasticsearch.action.delete.DeleteRequestBuilder prepareDeleteRequest(String index, String documentId, String documentType)
protected org.elasticsearch.action.delete.DeleteResponse doDelete(org.elasticsearch.action.delete.DeleteRequestBuilder requestBuilder)
throws InterruptedException,
ExecutionException
@OnStopped public void closeClient()
AbstractElasticsearch5TransportClientProcessorcloseClient in class AbstractElasticsearch5TransportClientProcessorCopyright © 2019 Apache NiFi Project. All rights reserved.