@EventDriven @SupportsBatching @RequiresInstanceClassLoading @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"put","database","NoSQL","kudu","HDFS","record"}) @CapabilityDescription(value="Reads records from an incoming FlowFile using the provided Record Reader, and writes those records to the specified Kudu\'s table. The schema for the table must be provided in the processor properties or from your source. If any error occurs while reading records from the input, or writing records to Kudu, the FlowFile will be routed to failure") @WritesAttribute(attribute="record.count", description="Number of records written to Kudu") public class PutKudu extends AbstractKuduProcessor
| Modifier and Type | Field and Description |
|---|---|
protected static PropertyDescriptor |
BATCH_SIZE |
protected int |
batchSize |
protected int |
ffbatch |
protected static PropertyDescriptor |
FLOWFILE_BATCH_SIZE |
protected static PropertyDescriptor |
FLUSH_MODE |
protected org.apache.kudu.client.SessionConfiguration.FlushMode |
flushMode |
protected static PropertyDescriptor |
IGNORE_NULL |
protected static PropertyDescriptor |
INSERT_OPERATION |
protected KerberosUser |
kerberosUser |
protected org.apache.kudu.client.KuduSession |
kuduSession |
protected OperationType |
operationType |
static String |
RECORD_COUNT_ATTR |
static PropertyDescriptor |
RECORD_READER |
protected static Relationship |
REL_FAILURE |
protected static Relationship |
REL_SUCCESS |
protected static PropertyDescriptor |
SKIP_HEAD_LINE |
protected static PropertyDescriptor |
TABLE_NAME |
KERBEROS_CREDENTIALS_SERVICE, KUDU_KEEP_ALIVE_PERIOD_TIMEOUT_MS, KUDU_MASTERS, KUDU_OPERATION_TIMEOUT_MS, kuduClient| Constructor and Description |
|---|
PutKudu() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.kudu.client.Operation |
getKuduOperationType(OperationType operationType,
Record record,
List<String> fieldNames,
Boolean ignoreNull,
org.apache.kudu.client.KuduTable kuduTable) |
protected org.apache.kudu.client.KuduSession |
getKuduSession(org.apache.kudu.client.KuduClient client) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private void |
trigger(ProcessContext context,
ProcessSession session,
List<FlowFile> flowFiles) |
buildClient, buildPartialRow, createKuduClient, deleteRecordFromKudu, flushKuduSession, getKerberosUser, getKuduClient, insertRecordToKudu, loginKerberosUser, shutdown, updateRecordToKudu, upsertRecordToKuduonTriggergetControllerServiceLookup, 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, validateprotected static final PropertyDescriptor TABLE_NAME
public static final PropertyDescriptor RECORD_READER
protected static final PropertyDescriptor SKIP_HEAD_LINE
protected static final PropertyDescriptor INSERT_OPERATION
protected static final PropertyDescriptor FLUSH_MODE
protected static final PropertyDescriptor FLOWFILE_BATCH_SIZE
protected static final PropertyDescriptor BATCH_SIZE
protected static final PropertyDescriptor IGNORE_NULL
protected static final Relationship REL_SUCCESS
protected static final Relationship REL_FAILURE
public static final String RECORD_COUNT_ATTR
protected OperationType operationType
protected org.apache.kudu.client.SessionConfiguration.FlushMode flushMode
protected int batchSize
protected int ffbatch
protected KerberosUser kerberosUser
protected org.apache.kudu.client.KuduSession kuduSession
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void onScheduled(ProcessContext context) throws IOException, LoginException
IOExceptionLoginExceptionpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate void trigger(ProcessContext context, ProcessSession session, List<FlowFile> flowFiles) throws ProcessException
ProcessExceptionprotected org.apache.kudu.client.KuduSession getKuduSession(org.apache.kudu.client.KuduClient client)
private org.apache.kudu.client.Operation getKuduOperationType(OperationType operationType, Record record, List<String> fieldNames, Boolean ignoreNull, org.apache.kudu.client.KuduTable kuduTable)
Copyright © 2019 Apache NiFi Project. All rights reserved.