@InputRequirement(value=INPUT_REQUIRED) @EventDriven @Tags(value={"rethinkdb","delete","remove"}) @CapabilityDescription(value="Processor to remove a JSON document from RethinkDB (https://www.rethinkdb.com/) using the document id.") @WritesAttribute(attribute="rethinkdb.error.message",description="RethinkDB error message") @WritesAttribute(attribute="rethinkdb.delete.errors",description="Error count while delete documents") @WritesAttribute(attribute="rethinkdb.delete.deleted",description="Number of documents deleted") @WritesAttribute(attribute="rethinkdb.delete.inserted",description="Number of documents inserted") @WritesAttribute(attribute="rethinkdb.delete.replaced",description="Number of documents replaced") @WritesAttribute(attribute="rethinkdb.delete.skipped",description="Number of documents skipped") @WritesAttribute(attribute="rethinkdb.delete.unchanged",description="Number of documents unchanged since they already existed") @SeeAlso(value={PutRethinkDB.class,GetRethinkDB.class}) public class DeleteRethinkDB extends AbstractRethinkDBProcessor
| Modifier and Type | Field and Description |
|---|---|
protected com.google.gson.Gson |
gson |
private static List<PropertyDescriptor> |
propertyDescriptors |
private static Set<Relationship> |
relationships |
static String |
RESULT_CHANGES_KEY |
static String |
RETHINKDB_DELETE_RESULT_DELETED_KEY |
static String |
RETHINKDB_DELETE_RESULT_ERROR_KEY |
static String |
RETHINKDB_DELETE_RESULT_INSERTED_KEY |
static String |
RETHINKDB_DELETE_RESULT_REPLACED_KEY |
static String |
RETHINKDB_DELETE_RESULT_SKIPPED_KEY |
static String |
RETHINKDB_DELETE_RESULT_UNCHANGED_KEY |
protected static PropertyDescriptor |
RETURN_CHANGES |
static AllowableValue |
RETURN_CHANGES_FALSE |
static String |
RETURN_CHANGES_OPTION_KEY |
static AllowableValue |
RETURN_CHANGES_TRUE |
CHARSET, databaseName, DB_HOST, DB_NAME, DB_PORT, DOCUMENT_ID_EMPTY_MESSAGE, DURABILITY, DURABILITY_HARD, DURABILITY_OPTION_KEY, DURABILITY_SOFT, hostname, MAX_DOCUMENTS_SIZE, maxDocumentsSize, password, PASSWORD, port, REL_FAILURE, REL_NOT_FOUND, REL_SUCCESS, RESULT_DELETED_KEY, RESULT_ERROR_KEY, RESULT_FIRST_ERROR_KEY, RESULT_GENERATED_KEYS_KEY, RESULT_INSERTED_KEY, RESULT_REPLACED_KEY, RESULT_SKIPPED_KEY, RESULT_UNCHANGED_KEY, RESULT_WARNINGS_KEY, RETHINKDB_DOCUMENT_ID, RETHINKDB_ERROR_MESSAGE, rethinkDbConnection, TABLE_NAME, tableName, username, USERNAME| Constructor and Description |
|---|
DeleteRethinkDB() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Map<String,Object> |
deleteDocument(String id,
String durablity,
Boolean returnChanges) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private FlowFile |
populateAttributes(ProcessSession session,
FlowFile flowFile,
Map<String,Object> result) |
getRdbTable, getRethinkDB, makeConnectiononTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static AllowableValue RETURN_CHANGES_TRUE
public static AllowableValue RETURN_CHANGES_FALSE
protected static final PropertyDescriptor RETURN_CHANGES
private static final Set<Relationship> relationships
private static final List<PropertyDescriptor> propertyDescriptors
public static final String RETHINKDB_DELETE_RESULT_ERROR_KEY
public static final String RETHINKDB_DELETE_RESULT_DELETED_KEY
public static final String RETHINKDB_DELETE_RESULT_INSERTED_KEY
public static final String RETHINKDB_DELETE_RESULT_REPLACED_KEY
public static final String RETHINKDB_DELETE_RESULT_SKIPPED_KEY
public static final String RETHINKDB_DELETE_RESULT_UNCHANGED_KEY
public static final String RESULT_CHANGES_KEY
public static final String RETURN_CHANGES_OPTION_KEY
protected com.google.gson.Gson gson
public Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context)
onScheduled in class AbstractRethinkDBProcessorpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate FlowFile populateAttributes(ProcessSession session, FlowFile flowFile, Map<String,Object> result)
protected Map<String,Object> deleteDocument(String id, String durablity, Boolean returnChanges)
@OnStopped public void close()
close in class AbstractRethinkDBProcessorCopyright © 2017 Apache NiFi Project. All rights reserved.