public abstract class AbstractKuduProcessor extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
(package private) static PropertyDescriptor |
KERBEROS_CREDENTIALS_SERVICE |
(package private) static PropertyDescriptor |
KERBEROS_PASSWORD |
(package private) static PropertyDescriptor |
KERBEROS_PRINCIPAL |
private KerberosUser |
kerberosUser |
(package private) static PropertyDescriptor |
KUDU_KEEP_ALIVE_PERIOD_TIMEOUT_MS |
(package private) static PropertyDescriptor |
KUDU_MASTERS |
(package private) static PropertyDescriptor |
KUDU_OPERATION_TIMEOUT_MS |
private org.apache.kudu.client.KuduClient |
kuduClient |
private Lock |
kuduClientReadLock |
private ReadWriteLock |
kuduClientReadWriteLock |
private Lock |
kuduClientWriteLock |
| Constructor and Description |
|---|
AbstractKuduProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.kudu.client.KuduClient |
buildClient(ProcessContext context) |
protected void |
buildPartialRow(org.apache.kudu.Schema schema,
org.apache.kudu.client.PartialRow row,
Record record,
List<String> fieldNames,
Boolean ignoreNull,
Boolean lowercaseFields) |
protected KerberosUser |
createKerberosKeytabUser(String principal,
String keytab,
ProcessContext context) |
protected KerberosUser |
createKerberosPasswordUser(String principal,
String password,
ProcessContext context) |
protected void |
createKerberosUserAndOrKuduClient(ProcessContext context) |
protected void |
createKuduClient(ProcessContext context) |
protected Collection<ValidationResult> |
customValidate(ValidationContext context) |
protected void |
executeOnKuduClient(Consumer<org.apache.kudu.client.KuduClient> actionOnKuduClient) |
protected void |
flushKuduSession(org.apache.kudu.client.KuduSession kuduSession,
boolean close,
List<org.apache.kudu.client.RowError> rowErrors) |
protected org.apache.kudu.client.AlterTableOptions |
getAddNullableColumnStatement(String columnName,
DataType nifiType)
Based on NiFi field declaration, generates an alter statement to extend table with new column.
|
protected KerberosUser |
getKerberosUser() |
private org.apache.kudu.ColumnTypeAttributes |
getKuduTypeAttributes(DataType nifiType) |
void |
shutdown() |
protected boolean |
supportsIgnoreOperations() |
private org.apache.kudu.Type |
toKuduType(DataType nifiType)
Converts a NiFi DataType to it's equivalent Kudu Type.
|
onTrigger, onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getRelationships, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatestatic final PropertyDescriptor KUDU_MASTERS
static final PropertyDescriptor KERBEROS_CREDENTIALS_SERVICE
static final PropertyDescriptor KERBEROS_PRINCIPAL
static final PropertyDescriptor KERBEROS_PASSWORD
static final PropertyDescriptor KUDU_OPERATION_TIMEOUT_MS
static final PropertyDescriptor KUDU_KEEP_ALIVE_PERIOD_TIMEOUT_MS
private volatile org.apache.kudu.client.KuduClient kuduClient
private final ReadWriteLock kuduClientReadWriteLock
private final Lock kuduClientReadLock
private final Lock kuduClientWriteLock
private volatile KerberosUser kerberosUser
protected KerberosUser getKerberosUser()
protected boolean supportsIgnoreOperations()
protected void createKerberosUserAndOrKuduClient(ProcessContext context) throws LoginException
LoginExceptionprotected void createKuduClient(ProcessContext context)
protected org.apache.kudu.client.KuduClient buildClient(ProcessContext context)
protected void executeOnKuduClient(Consumer<org.apache.kudu.client.KuduClient> actionOnKuduClient)
protected void flushKuduSession(org.apache.kudu.client.KuduSession kuduSession,
boolean close,
List<org.apache.kudu.client.RowError> rowErrors)
throws org.apache.kudu.client.KuduException
org.apache.kudu.client.KuduExceptionprotected KerberosUser createKerberosKeytabUser(String principal, String keytab, ProcessContext context)
protected KerberosUser createKerberosPasswordUser(String principal, String password, ProcessContext context)
protected Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponent@OnStopped public void shutdown() throws Exception
Exceptionprotected void buildPartialRow(org.apache.kudu.Schema schema,
org.apache.kudu.client.PartialRow row,
Record record,
List<String> fieldNames,
Boolean ignoreNull,
Boolean lowercaseFields)
private org.apache.kudu.Type toKuduType(DataType nifiType)
private org.apache.kudu.ColumnTypeAttributes getKuduTypeAttributes(DataType nifiType)
protected org.apache.kudu.client.AlterTableOptions getAddNullableColumnStatement(String columnName, DataType nifiType)
AlterTableOptions.addNullableColumn(String, Type) is not sufficient as it does not cover BigDecimal scale and precision handling.columnName - Name of the new table column.nifiType - Type of the field.Copyright © 2021 Apache NiFi Project. All rights reserved.