Class AbstractCouchbaseProcessor
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.couchbase.AbstractCouchbaseProcessor
- All Implemented Interfaces:
ConfigurableComponent,Processor
- Direct Known Subclasses:
GetCouchbaseKey,PutCouchbaseKey
Provides common functionality for Couchbase processors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<PropertyDescriptor> (package private) static final PropertyDescriptor(package private) static final Relationship(package private) static final Relationship(package private) static final Relationship(package private) static final Relationshipprivate Set<Relationship> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSupportedProperties(List<PropertyDescriptor> descriptors) Add processor specific properties.protected voidaddSupportedRelationships(Set<Relationship> relationships) Add processor specific relationships.protected Set<Relationship> filterRelationships(Set<Relationship> rels) getClusterService(ProcessContext context) final Set<Relationship> final List<PropertyDescriptor> protected StringgetTransitUrl(com.couchbase.client.java.Bucket bucket, String docId) Generate a transit url.protected voidhandleCouchbaseException(ProcessContext context, ProcessSession session, ComponentLog logger, FlowFile inFile, com.couchbase.client.core.CouchbaseException e, String errMsg) Handles the thrown CouchbaseException accordingly.protected final voidinit(ProcessorInitializationContext context) protected final com.couchbase.client.java.BucketopenBucket(ProcessContext context) Open a bucket connection using a CouchbaseClusterControllerService.Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTrigger, onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
DOC_ID
-
REL_ORIGINAL
-
REL_SUCCESS
-
REL_RETRY
-
REL_FAILURE
-
descriptors
-
relationships
-
clusterService
-
-
Constructor Details
-
AbstractCouchbaseProcessor
public AbstractCouchbaseProcessor()
-
-
Method Details
-
init
- Overrides:
initin classAbstractSessionFactoryProcessor
-
addSupportedProperties
Add processor specific properties.- Parameters:
descriptors- add properties to this list
-
addSupportedRelationships
Add processor specific relationships.- Parameters:
relationships- add relationships to this list
-
getRelationships
- Specified by:
getRelationshipsin interfaceProcessor- Overrides:
getRelationshipsin classAbstractSessionFactoryProcessor
-
filterRelationships
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classAbstractConfigurableComponent
-
getClusterService
-
openBucket
Open a bucket connection using a CouchbaseClusterControllerService.- Parameters:
context- a process context- Returns:
- a bucket instance
-
getTransitUrl
Generate a transit url.- Parameters:
bucket- the target bucket- Returns:
- a transit url based on the bucket name and the CouchbaseClusterControllerService name
-
handleCouchbaseException
protected void handleCouchbaseException(ProcessContext context, ProcessSession session, ComponentLog logger, FlowFile inFile, com.couchbase.client.core.CouchbaseException e, String errMsg) Handles the thrown CouchbaseException accordingly.- Parameters:
context- a process contextsession- a process sessionlogger- a loggerinFile- an input FlowFilee- the thrown CouchbaseExceptionerrMsg- a message to be logged
-