@InputRequirement(value=INPUT_REQUIRED) @EventDriven @SupportsBatching @Tags(value={"rethinkdb","stream","insert","update","write","put"}) @CapabilityDescription(value="Processor to write the JSON content of a FlowFile to RethinkDB (https://www.rethinkdb.com/). The flow file should contain either JSON Object an array of JSON documents") @WritesAttribute(attribute="rethinkdb.error.message",description="RethinkDB error message") @WritesAttribute(attribute="rethinkdb.insert.errors",description="Error count while inserting documents") @WritesAttribute(attribute="rethinkdb.insert.deleted",description="Number of documents deleted") @WritesAttribute(attribute="rethinkdb.insert.generated_keys",description="Keys generated on inserting documents") @WritesAttribute(attribute="rethinkdb.insert.inserted",description="Number of documents inserted") @WritesAttribute(attribute="rethinkdb.insert.replaced",description="Number of documents replaced") @WritesAttribute(attribute="rethinkdb.insert.skipped",description="Number of documents skipped because they already existed") @WritesAttribute(attribute="rethinkdb.insert.unchanged",description="Number of documents unchanged since they already existed") @WritesAttribute(attribute="rethinkdb.insert.first_error",description="First error while inserting documents") @WritesAttribute(attribute="rethinkdb.insert.warnings",description="Warning message in case of large number of ids being returned on insertion") @SeeAlso(value={GetRethinkDB.class,DeleteRethinkDB.class}) public class PutRethinkDB extends AbstractRethinkDBProcessor
| Modifier and Type | Field and Description |
|---|---|
String |
CONFLICT_OPTION_KEY |
protected static PropertyDescriptor |
CONFLICT_STRATEGY |
static AllowableValue |
CONFLICT_STRATEGY_ERROR |
static AllowableValue |
CONFLICT_STRATEGY_REPLACE |
static AllowableValue |
CONFLICT_STRATEGY_UPDATE |
private static List<PropertyDescriptor> |
propertyDescriptors |
private static Set<Relationship> |
relationships |
static String |
RETHINKDB_INSERT_RESULT |
static String |
RETHINKDB_INSERT_RESULT_DELETED_KEY |
static String |
RETHINKDB_INSERT_RESULT_ERROR_KEY |
static String |
RETHINKDB_INSERT_RESULT_FIRST_ERROR_KEY |
static String |
RETHINKDB_INSERT_RESULT_GENERATED_KEYS_KEY |
static String |
RETHINKDB_INSERT_RESULT_INSERTED_KEY |
static String |
RETHINKDB_INSERT_RESULT_REPLACED_KEY |
static String |
RETHINKDB_INSERT_RESULT_SKIPPED_KEY |
static String |
RETHINKDB_INSERT_RESULT_UNCHANGED_KEY |
static String |
RETHINKDB_INSERT_RESULT_WARNINGS_KEY |
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 |
|---|
PutRethinkDB() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shutdown client connection
|
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private FlowFile |
populateAttributes(ProcessSession session,
FlowFile flowFile,
HashMap<String,Object> result) |
protected HashMap<String,Object> |
runInsert(com.rethinkdb.gen.ast.Insert insert) |
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 CONFLICT_STRATEGY_UPDATE
public static AllowableValue CONFLICT_STRATEGY_REPLACE
public static AllowableValue CONFLICT_STRATEGY_ERROR
protected static final PropertyDescriptor CONFLICT_STRATEGY
private static final Set<Relationship> relationships
private static final List<PropertyDescriptor> propertyDescriptors
public static final String RETHINKDB_INSERT_RESULT
public static final String RETHINKDB_INSERT_RESULT_ERROR_KEY
public static final String RETHINKDB_INSERT_RESULT_DELETED_KEY
public static final String RETHINKDB_INSERT_RESULT_GENERATED_KEYS_KEY
public static final String RETHINKDB_INSERT_RESULT_INSERTED_KEY
public static final String RETHINKDB_INSERT_RESULT_REPLACED_KEY
public static final String RETHINKDB_INSERT_RESULT_SKIPPED_KEY
public static final String RETHINKDB_INSERT_RESULT_UNCHANGED_KEY
public static final String RETHINKDB_INSERT_RESULT_FIRST_ERROR_KEY
public static final String RETHINKDB_INSERT_RESULT_WARNINGS_KEY
public final String CONFLICT_OPTION_KEY
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, HashMap<String,Object> result)
@OnStopped public void close()
close in class AbstractRethinkDBProcessorCopyright © 2017 Apache NiFi Project. All rights reserved.