NIFI-5895 - Add a processor to start an Oozie workflow#3218
NIFI-5895 - Add a processor to start an Oozie workflow#3218pvillard31 wants to merge 4 commits intoapache:masterfrom
Conversation
|
This PR has been tested against an Oozie 4.2.0 server instance in the following conditions:
A very basic example has been used: NiFi workflow: The workflow.xml from the Oozie repo must be pushed in HDFS in a directory and that directory is used in the configuration of the processor. All the properties given in the job.properties file from the Oozie repo must be passed through the configuration of the processor or the attributes of the flow files. |
|
|
||
| public static final PropertyDescriptor APP_PATH = new PropertyDescriptor.Builder() | ||
| .name("oozie-app-path") | ||
| .displayName("HDFS Application Path") |
There was a problem hiding this comment.
I would recommend it to be changed to something like Workflow Path.
| <packaging>jar</packaging> | ||
|
|
||
| <dependencies> | ||
| <dependency> |
There was a problem hiding this comment.
Pure nitpick: Would like to see proper indentation. :)
|
Thanks for the review @zenfenan - just pushed a commit to address your comments. |
| String principal = credentialsService.getPrincipal(); | ||
| String keyTab = credentialsService.getKeytab(); | ||
| Configuration conf = new Configuration(); | ||
| conf.set("hadoop.security.authentication", "kerberos"); |
There was a problem hiding this comment.
Are there any other Oozie-or HDFS-related properties that should come from an oozie-site.xml or other site config file? Just wondering if there should be a property like the other Hadoop processors to specify configuration file(s).
There was a problem hiding this comment.
Not to my knowledge - IIRC this Kerberos property is to enable SPNEGO authN against the Oozie server REST API but there should not be any other requirement. The files hdfs-site, core-site, etc, are loaded by the Oozie server anyway.
|
|
||
| <properties> | ||
| <oozie.version>4.3.1</oozie.version> | ||
| <hadoop.version>3.0.0</hadoop.version> |
There was a problem hiding this comment.
For consistency, we should probably document that hadoop.version should match the one in nifi-hadoop-libraries, unless there's some way to inherit it (see my comment in the NAR POM)
There was a problem hiding this comment.
Yep true. Didn't look too long (switching planes in airport) but didn't find a way to inherit the version from the nifi-hadoop-libraries so I just added a comment about the version.
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.nifi</groupId> | ||
| <artifactId>nifi-standard-services-api-nar</artifactId> |
There was a problem hiding this comment.
For consistency, shouldn't we have nifi-hadoop-libraries-nar as a parent here? Then the hadoop-common and other dependencies in the processors POM could be marked as provided and we'd be sure to be using the same versions across the Hadoop-related processors.
| @@ -0,0 +1,136 @@ | |||
| nifi-kafka-nar | |||
There was a problem hiding this comment.
Copy/pasta typo here, should be nifi-oozie-nar. Did you check the L&N to make sure it's correct for Oozie (vs wherever it came from)?
There was a problem hiding this comment.
Good catch - I tried to be exhaustive on the Oozie deps, hopefully didn't miss one.
|
closing due to inactivity |
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.