Search in sources :

Example 6 with KerberosProperties

use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.

the class ImportSqoop method init.

@Override
protected void init(@Nonnull final ProcessorInitializationContext context) {
    super.init(context);
    /* Create Kerberos properties */
    final SpringSecurityContextLoader securityContextLoader = SpringSecurityContextLoader.create(context);
    final KerberosProperties kerberosProperties = securityContextLoader.getKerberosProperties();
    KERBEROS_KEYTAB = kerberosProperties.createKerberosKeytabProperty();
    KERBEROS_PRINCIPAL = kerberosProperties.createKerberosPrincipalProperty();
    /* Create list of properties */
    final List<PropertyDescriptor> properties = new ArrayList<>();
    properties.add(KERBEROS_PRINCIPAL);
    properties.add(KERBEROS_KEYTAB);
    properties.add(SQOOP_CONNECTION_SERVICE);
    properties.add(SOURCE_TABLE_NAME);
    properties.add(SOURCE_TABLE_FIELDS);
    properties.add(SOURCE_TABLE_WHERE_CLAUSE);
    properties.add(SOURCE_LOAD_STRATEGY);
    properties.add(SOURCE_CHECK_COLUMN_NAME);
    properties.add(SOURCE_CHECK_COLUMN_LAST_VALUE);
    properties.add(SOURCE_PROPERTY_WATERMARK);
    properties.add(SOURCE_SPLIT_BY_FIELD);
    properties.add(SOURCE_BOUNDARY_QUERY);
    properties.add(CLUSTER_MAP_TASKS);
    properties.add(CLUSTER_UI_JOB_NAME);
    properties.add(TARGET_HDFS_DIRECTORY);
    properties.add(TARGET_HDFS_DIRECTORY_EXISTS_STRATEGY);
    properties.add(TARGET_EXTRACT_DATA_FORMAT);
    properties.add(TARGET_HDFS_FILE_FIELD_DELIMITER);
    properties.add(TARGET_HDFS_FILE_RECORD_DELIMITER);
    properties.add(TARGET_HIVE_DELIM_STRATEGY);
    properties.add(TARGET_HIVE_REPLACE_DELIM);
    properties.add(TARGET_COMPRESSION_ALGORITHM);
    properties.add(TARGET_COLUMN_TYPE_MAPPING);
    properties.add(SQOOP_CODEGEN_DIR);
    properties.add(SOURCESPECIFIC_SQLSERVER_SCHEMA);
    properties.add(SQOOP_SYSTEM_PROPERTIES);
    properties.add(SQOOP_ADDITIONAL_ARGUMENTS);
    this.properties = Collections.unmodifiableList(properties);
    /* Create list of relationships */
    final Set<Relationship> relationships = new HashSet<>();
    relationships.add(REL_SUCCESS);
    relationships.add(REL_FAILURE);
    this.relationships = Collections.unmodifiableSet(relationships);
}
Also used : PropertyDescriptor(org.apache.nifi.components.PropertyDescriptor) SpringSecurityContextLoader(com.thinkbiganalytics.nifi.security.SpringSecurityContextLoader) Relationship(org.apache.nifi.processor.Relationship) ArrayList(java.util.ArrayList) KerberosProperties(com.thinkbiganalytics.nifi.security.KerberosProperties) HashSet(java.util.HashSet)

Aggregations

KerberosProperties (com.thinkbiganalytics.nifi.security.KerberosProperties)6 SpringSecurityContextLoader (com.thinkbiganalytics.nifi.security.SpringSecurityContextLoader)6 ArrayList (java.util.ArrayList)6 PropertyDescriptor (org.apache.nifi.components.PropertyDescriptor)6 HashSet (java.util.HashSet)3 Relationship (org.apache.nifi.processor.Relationship)3