@InputRequirement(value=INPUT_ALLOWED) @EventDriven @SupportsBatching @Tags(value={"elasticsearch","fetch","read","get","http"}) @CapabilityDescription(value="Retrieves a document from Elasticsearch using the specified connection properties and the identifier of the document to retrieve. Note that the full body of the document will be read into memory before being written to a Flow File for transfer.") @WritesAttribute(attribute="filename",description="The filename attribute 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") @DynamicProperty(name="A URL query parameter", value="The value to set it to", expressionLanguageScope=VARIABLE_REGISTRY, description="Adds the specified property name/value as a query parameter in the Elasticsearch URL used for processing") public class FetchElasticsearchHttp extends AbstractElasticsearchHttpProcessor
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
DOC_ID |
static PropertyDescriptor |
FIELDS |
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 |
COMMON_PROPERTY_DESCRIPTORS, CONNECT_TIMEOUT, ES_URL, FIELD_INCLUDE_QUERY_PARAM, PROXY_CONFIGURATION_SERVICE, PROXY_HOST, PROXY_PASSWORD, PROXY_PORT, PROXY_USERNAME, QUERY_QUERY_PARAM, RESPONSE_TIMEOUT, SIZE_QUERY_PARAM, SORT_QUERY_PARAMCHARSET, PASSWORD, PROP_SSL_CONTEXT_SERVICE, USERNAME| Constructor and Description |
|---|
FetchElasticsearchHttp() |
| Modifier and Type | Method and Description |
|---|---|
private URL |
buildRequestURL(String baseUrl,
String docId,
String index,
String type,
String fields,
ProcessContext context) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
void |
setup(ProcessContext context) |
buildBulkCommand, createElasticsearchClient, customValidate, getClient, getSupportedDynamicPropertyDescriptor, isSuccess, parseJsonResponse, sendRequestToElasticsearchonTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic 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 DOC_ID
public static final PropertyDescriptor INDEX
public static final PropertyDescriptor TYPE
public static final PropertyDescriptor FIELDS
private static final Set<Relationship> relationships
private static final List<PropertyDescriptor> propertyDescriptors
public Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void setup(ProcessContext context)
setup in class AbstractElasticsearchProcessorpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate URL buildRequestURL(String baseUrl, String docId, String index, String type, String fields, ProcessContext context) throws MalformedURLException
MalformedURLExceptionCopyright © 2020 Apache NiFi Project. All rights reserved.