Java Code Examples for org.apache.nifi.processor.ProcessorInitializationContext#getKerberosConfigurationFile()

The following examples show how to use org.apache.nifi.processor.ProcessorInitializationContext#getKerberosConfigurationFile() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PutHiveStreaming.java    From localization_nifi with Apache License 2.0 6 votes vote down vote up
@Override
protected void init(ProcessorInitializationContext context) {
    List<PropertyDescriptor> props = new ArrayList<>();
    props.add(METASTORE_URI);
    props.add(HIVE_CONFIGURATION_RESOURCES);
    props.add(DB_NAME);
    props.add(TABLE_NAME);
    props.add(PARTITION_COLUMNS);
    props.add(AUTOCREATE_PARTITIONS);
    props.add(MAX_OPEN_CONNECTIONS);
    props.add(HEARTBEAT_INTERVAL);
    props.add(TXNS_PER_BATCH);
    props.add(RECORDS_PER_TXN);

    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosProperties = new KerberosProperties(kerberosConfigFile);
    props.add(kerberosProperties.getKerberosPrincipal());
    props.add(kerberosProperties.getKerberosKeytab());
    propertyDescriptors = Collections.unmodifiableList(props);

    Set<Relationship> _relationships = new HashSet<>();
    _relationships.add(REL_SUCCESS);
    _relationships.add(REL_FAILURE);
    _relationships.add(REL_RETRY);
    relationships = Collections.unmodifiableSet(_relationships);
}
 
Example 2
Source File: AbstractHadoopProcessor.java    From nifi with Apache License 2.0 6 votes vote down vote up
@Override
protected void init(ProcessorInitializationContext context) {
    hdfsResources.set(EMPTY_HDFS_RESOURCES);

    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosProperties = getKerberosProperties(kerberosConfigFile);

    List<PropertyDescriptor> props = new ArrayList<>();
    props.add(HADOOP_CONFIGURATION_RESOURCES);
    props.add(KERBEROS_CREDENTIALS_SERVICE);
    props.add(kerberosProperties.getKerberosPrincipal());
    props.add(kerberosProperties.getKerberosKeytab());
    props.add(kerberosProperties.getKerberosPassword());
    props.add(KERBEROS_RELOGIN_PERIOD);
    props.add(ADDITIONAL_CLASSPATH_RESOURCES);
    properties = Collections.unmodifiableList(props);
}
 
Example 3
Source File: AbstractHadoopProcessor.java    From localization_nifi with Apache License 2.0 5 votes vote down vote up
@Override
protected void init(ProcessorInitializationContext context) {
    hdfsResources.set(new HdfsResources(null, null, null));

    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosProperties = getKerberosProperties(kerberosConfigFile);

    List<PropertyDescriptor> props = new ArrayList<>();
    props.add(HADOOP_CONFIGURATION_RESOURCES);
    props.add(kerberosProperties.getKerberosPrincipal());
    props.add(kerberosProperties.getKerberosKeytab());
    props.add(KERBEROS_RELOGIN_PERIOD);
    props.add(ADDITIONAL_CLASSPATH_RESOURCES);
    properties = Collections.unmodifiableList(props);
}
 
Example 4
Source File: PutHiveStreaming.java    From nifi with Apache License 2.0 5 votes vote down vote up
@Override
protected void init(ProcessorInitializationContext context) {
    List<PropertyDescriptor> props = new ArrayList<>();
    props.add(METASTORE_URI);
    props.add(HIVE_CONFIGURATION_RESOURCES);
    props.add(DB_NAME);
    props.add(TABLE_NAME);
    props.add(PARTITION_COLUMNS);
    props.add(AUTOCREATE_PARTITIONS);
    props.add(MAX_OPEN_CONNECTIONS);
    props.add(HEARTBEAT_INTERVAL);
    props.add(TXNS_PER_BATCH);
    props.add(RECORDS_PER_TXN);
    props.add(CALL_TIMEOUT);
    props.add(ROLLBACK_ON_FAILURE);
    props.add(KERBEROS_CREDENTIALS_SERVICE);

    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosProperties = new KerberosProperties(kerberosConfigFile);
    props.add(kerberosProperties.getKerberosPrincipal());
    props.add(kerberosProperties.getKerberosKeytab());
    props.add(kerberosProperties.getKerberosPassword());
    propertyDescriptors = Collections.unmodifiableList(props);

    Set<Relationship> _relationships = new HashSet<>();
    _relationships.add(REL_SUCCESS);
    _relationships.add(REL_FAILURE);
    _relationships.add(REL_RETRY);
    relationships = Collections.unmodifiableSet(_relationships);
}
 
Example 5
Source File: InvokeScriptedProcessor.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Override
protected void init(final ProcessorInitializationContext context) {
    kerberosServicePrincipal = context.getKerberosServicePrincipal();
    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosServiceKeytab = context.getKerberosServiceKeytab();
}
 
Example 6
Source File: InvokeScriptedProcessor.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
protected void init(final ProcessorInitializationContext context) {
    kerberosServicePrincipal = context.getKerberosServicePrincipal();
    kerberosConfigFile = context.getKerberosConfigurationFile();
    kerberosServiceKeytab = context.getKerberosServiceKeytab();
}