use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.
the class ExecutePySpark 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(HADOOP_CONFIGURATION_RESOURCES);
properties.add(PYSPARK_APP_FILE);
properties.add(PYSPARK_APP_ARGS);
properties.add(PYSPARK_APP_NAME);
properties.add(PYSPARK_ADDITIONAL_FILES);
properties.add(SPARK_MASTER);
properties.add(SPARK_YARN_DEPLOY_MODE);
properties.add(YARN_QUEUE);
properties.add(SPARK_HOME);
properties.add(DRIVER_MEMORY);
properties.add(EXECUTOR_MEMORY);
properties.add(EXECUTOR_INSTANCES);
properties.add(EXECUTOR_CORES);
properties.add(NETWORK_TIMEOUT);
properties.add(ADDITIONAL_SPARK_CONFIG_OPTIONS);
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);
}
use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.
the class ExecuteSparkJob 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();
kerberosKeyTab = kerberosProperties.createKerberosKeytabProperty();
kerberosPrincipal = kerberosProperties.createKerberosPrincipalProperty();
// Create list of properties
final List<PropertyDescriptor> pds = new ArrayList<>();
pds.add(APPLICATION_JAR);
pds.add(EXTRA_JARS);
pds.add(MAIN_CLASS);
pds.add(MAIN_ARGS);
pds.add(SPARK_MASTER);
pds.add(SPARK_YARN_DEPLOY_MODE);
pds.add(SPARK_HOME);
pds.add(PROCESS_TIMEOUT);
pds.add(DRIVER_MEMORY);
pds.add(EXECUTOR_MEMORY);
pds.add(NUMBER_EXECUTORS);
pds.add(SPARK_APPLICATION_NAME);
pds.add(EXECUTOR_CORES);
pds.add(NETWORK_TIMEOUT);
pds.add(HADOOP_CONFIGURATION_RESOURCES);
pds.add(kerberosPrincipal);
pds.add(kerberosKeyTab);
pds.add(YARN_QUEUE);
pds.add(SPARK_CONFS);
pds.add(EXTRA_SPARK_FILES);
pds.add(DATASOURCES);
pds.add(METADATA_SERVICE);
propDescriptors = Collections.unmodifiableList(pds);
}
use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.
the class AbstractHadoopProcessor method init.
@Override
protected void init(@Nonnull final ProcessorInitializationContext context) {
super.init(context);
hdfsResources.set(new HdfsResources(null, null, null));
// Create Kerberos properties
final SpringSecurityContextLoader securityContextLoader = SpringSecurityContextLoader.create(context);
final KerberosProperties kerberosProperties = securityContextLoader.getKerberosProperties();
kerberosKeytab = kerberosProperties.createKerberosKeytabProperty();
kerberosPrincipal = kerberosProperties.createKerberosPrincipalProperty();
// Create list of properties
final List<PropertyDescriptor> props = new ArrayList<>();
props.add(HADOOP_CONFIGURATION_RESOURCES);
props.add(kerberosPrincipal);
props.add(kerberosKeytab);
props.add(KerberosProperties.KERBEROS_RELOGIN_PERIOD);
properties = Collections.unmodifiableList(props);
}
use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.
the class ExportSqoop 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_HDFS_DIRECTORY);
properties.add(SOURCE_HDFS_FILE_DELIMITER);
properties.add(SOURCE_NULL_INTERPRETATION_STRATEGY);
properties.add(SOURCE_NULL_CUSTOM_STRING_IDENTIFIER);
properties.add(SOURCE_NULL_CUSTOM_NON_STRING_IDENTIFIER);
properties.add(HCATALOG_DATABASE);
properties.add(HCATALOG_TABLE);
properties.add(SQOOP_SYSTEM_PROPERTIES);
properties.add(SQOOP_ADDITIONAL_ARGUMENTS);
properties.add(TARGET_TABLE_NAME);
properties.add(CLUSTER_MAP_TASKS);
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);
}
use of com.thinkbiganalytics.nifi.security.KerberosProperties in project kylo by Teradata.
the class ThriftConnectionPool method init.
@Override
protected void init(@Nonnull final ControllerServiceInitializationContext config) throws InitializationException {
// Create Kerberos properties
final SpringSecurityContextLoader securityContextLoader = SpringSecurityContextLoader.create(config);
final KerberosProperties kerberosProperties = securityContextLoader.getKerberosProperties();
kerberosKeytab = kerberosProperties.createKerberosKeytabProperty();
kerberosPrincipal = kerberosProperties.createKerberosPrincipalProperty();
// Create list of properties
final List<PropertyDescriptor> props = new ArrayList<>();
props.add(DATABASE_URL);
props.add(DB_DRIVERNAME);
props.add(DB_DRIVER_JAR_URL);
props.add(DB_USER);
props.add(DB_PASSWORD);
props.add(DB_VALIDATION_QUERY);
props.add(DB_VALIDATION_QUERY_TIMEOUT);
props.add(MAX_WAIT_TIME);
props.add(MAX_TOTAL_CONNECTIONS);
props.add(HADOOP_CONFIGURATION_RESOURCES);
props.add(kerberosPrincipal);
props.add(kerberosKeytab);
properties = Collections.unmodifiableList(props);
}
Aggregations