@DeprecationNotice(reason="Planned for removal in NiFi 2.0") @Tags(value={"atlas","lineage"}) @CapabilityDescription(value="Report NiFi flow data set level lineage to Apache Atlas. End-to-end lineages across NiFi environments and other systems can be reported if those are connected by different protocols and data set, such as NiFi Site-to-Site, Kafka topic or Hive tables ... etc. Atlas lineage reported by this reporting task can be useful to grasp the high level relationships between processes and data sets, in addition to NiFi provenance events providing detailed event level lineage. See \'Additional Details\' for further description and limitations.") @Stateful(scopes=LOCAL, description="Stores the Reporting Task\'s last event Id so that on restart the task knows where it left off.") @DynamicProperty(name="hostnamePattern.<namespace>", value="hostname Regex patterns", description="White space delimited (including new line) Regular Expressions to resolve a namespace from a hostname or IP address of a transit URI of NiFi provenance record.", expressionLanguageScope=VARIABLE_REGISTRY) @RequiresInstanceClassLoading public class ReportLineageToAtlas extends AbstractReportingTask
| Constructor and Description |
|---|
ReportLineageToAtlas() |
getControllerServiceLookup, getIdentifier, getLogger, getName, getNodeTypeProvider, getSchedulingPeriod, init, initialize, setComponentInfoequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate static final String ATLAS_URL_DELIMITER
static final PropertyDescriptor ATLAS_URLS
public static final PropertyDescriptor ATLAS_CONNECT_TIMEOUT
public static final PropertyDescriptor ATLAS_READ_TIMEOUT
static final AllowableValue ATLAS_AUTHN_BASIC
static final AllowableValue ATLAS_AUTHN_KERBEROS
static final PropertyDescriptor ATLAS_AUTHN_METHOD
public static final PropertyDescriptor ATLAS_USER
public static final PropertyDescriptor ATLAS_PASSWORD
static final PropertyDescriptor ATLAS_CONF_DIR
public static final PropertyDescriptor ATLAS_NIFI_URL
public static final PropertyDescriptor ATLAS_DEFAULT_CLUSTER_NAME
static final PropertyDescriptor ATLAS_CONF_CREATE
static final PropertyDescriptor SSL_CONTEXT_SERVICE
static final PropertyDescriptor KAFKA_BOOTSTRAP_SERVERS
static final AllowableValue SEC_PLAINTEXT
static final AllowableValue SEC_SSL
static final AllowableValue SEC_SASL_PLAINTEXT
static final AllowableValue SEC_SASL_SSL
static final PropertyDescriptor KAFKA_SECURITY_PROTOCOL
public static final PropertyDescriptor KERBEROS_PRINCIPAL
public static final PropertyDescriptor KERBEROS_KEYTAB
public static final PropertyDescriptor KERBEROS_CREDENTIALS_SERVICE
static final PropertyDescriptor KAFKA_KERBEROS_SERVICE_NAME
static final AllowableValue LINEAGE_STRATEGY_SIMPLE_PATH
static final AllowableValue LINEAGE_STRATEGY_COMPLETE_PATH
static final PropertyDescriptor LINEAGE_STRATEGY
static final AllowableValue AWS_S3_MODEL_VERSION_V1
static final AllowableValue AWS_S3_MODEL_VERSION_V2
static final PropertyDescriptor AWS_S3_MODEL_VERSION
static final AllowableValue FILESYSTEM_PATHS_LEVEL_FILE
static final AllowableValue FILESYSTEM_PATHS_LEVEL_DIRECTORY
static final PropertyDescriptor FILESYSTEM_PATHS_LEVEL
private static final String ATLAS_PROPERTIES_FILENAME
private static final String ATLAS_PROPERTY_CLIENT_CONNECT_TIMEOUT_MS
private static final String ATLAS_PROPERTY_CLIENT_READ_TIMEOUT_MS
private static final String ATLAS_PROPERTY_METADATA_NAMESPACE
private static final String ATLAS_PROPERTY_CLUSTER_NAME
private static final String ATLAS_PROPERTY_REST_ADDRESS
private static final String ATLAS_PROPERTY_ENABLE_TLS
private static final String ATLAS_KAFKA_PREFIX
private static final String ATLAS_PROPERTY_KAFKA_BOOTSTRAP_SERVERS
private static final String ATLAS_PROPERTY_KAFKA_CLIENT_ID
private static final String SSL_CLIENT_XML_FILENAME
private static final String SSL_CLIENT_XML_TRUSTSTORE_LOCATION
private static final String SSL_CLIENT_XML_TRUSTSTORE_PASSWORD
private static final String SSL_CLIENT_XML_TRUSTSTORE_TYPE
private final ServiceLoader<NamespaceResolver> namespaceResolverLoader
private volatile AtlasAuthN atlasAuthN
private volatile Properties atlasProperties
private volatile boolean isTypeDefCreated
private volatile String defaultMetadataNamespace
private volatile ProvenanceEventConsumer consumer
private volatile NamespaceResolvers namespaceResolvers
private volatile NiFiAtlasHook nifiAtlasHook
private volatile LineageStrategy lineageStrategy
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponentprivate void validateKafkaProperties(ValidationContext context, Collection<ValidationResult> results)
@OnScheduled public void setup(ConfigurationContext context) throws Exception
Exceptionprivate void initLineageStrategy(ConfigurationContext context) throws IOException
IOExceptionprivate void initNamespaceResolvers(ConfigurationContext context)
private void initAtlasProperties(ConfigurationContext context) throws Exception
Exceptionprivate List<String> parseAtlasUrls(PropertyValue atlasUrlsProp)
private void setValue(Consumer<String> setter, Runnable emptyHandler, PropertyValue elEnabledPropertyValue, String... properties)
private void setAtlasSSLConfig(Properties atlasProperties, ConfigurationContext context, List<String> urls, File confDir) throws Exception
Exceptionprivate void createSslClientXml(File confDir, SSLContextService sslContextService) throws Exception
Exceptionprotected NiFiAtlasClient createNiFiAtlasClient(ReportingContext context)
private AtlasAuthN getAtlasAuthN(String atlasAuthNMethod)
private void initProvenanceConsumer(ConfigurationContext context) throws IOException
IOException@OnUnscheduled public void onUnscheduled()
@OnStopped public void onStopped()
public void onTrigger(ReportingContext context)
private NiFiFlow createNiFiFlow(ReportingContext context, NiFiAtlasClient atlasClient)
private void consumeNiFiProvenanceEvents(ReportingContext context, NiFiFlow nifiFlow)
private void setKafkaConfig(Map<Object,Object> mapToPopulate, PropertyContext context)
private void setKafkaJaasConfig(Map<Object,Object> mapToPopulate, PropertyContext context)
mapToPopulate - Map of configuration propertiescontext - ContextCopyright © 2024 Apache NiFi Project. All rights reserved.