Skip to content

NIFI-3600 Improve logging and relationship routing for failures in De…#1595

Closed
jdye64 wants to merge 3 commits intoapache:masterfrom
jdye64:NIFI-3600
Closed

NIFI-3600 Improve logging and relationship routing for failures in De…#1595
jdye64 wants to merge 3 commits intoapache:masterfrom
jdye64:NIFI-3600

Conversation

@jdye64
Copy link
Contributor

@jdye64 jdye64 commented Mar 14, 2017

…leteHDFS

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:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

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.

@trixpan
Copy link
Contributor

trixpan commented Apr 10, 2017

@jdye64 can you please solve the conflicts?

Cheers!

@jdye64
Copy link
Contributor Author

jdye64 commented Apr 10, 2017

@trixpan I tried talking it out but that didn't seem to solve the conflict?? Will try more forceful procedures when I get off the road and near a computer ;) thanks for taking a look at this!

@trixpan
Copy link
Contributor

trixpan commented Apr 11, 2017

🤣

@jdye64
Copy link
Contributor Author

jdye64 commented Apr 12, 2017

@trixpan I fixed the conflicts by refactoring some code that had changed due to NIFI-3204 #1561

@trixpan
Copy link
Contributor

trixpan commented Apr 12, 2017

Glad you managed to get the lines out of their conflict... 😀 will review

@trixpan
Copy link
Contributor

trixpan commented Apr 12, 2017

From a first look the code seems ok but I have a quick question:

Do we truly need a permission denied relationship? It seems like a deviation from the general nature of failure relationships (generally they are nearly all encompassing).

Perhaps we could add the failure reason to an attribute and route to failure?

Reason I ask is that I like the strong similarity between the *HDFS, the *File and *S3 processors and I suspect this change would introduce change that will move some of them appart?

for loop and the original flow file would be transferred but not be the
latest flow file if an error occurred in the for loop
@jdye64
Copy link
Contributor Author

jdye64 commented Apr 12, 2017

My reasoning for adding the extra relationship was for end users to understand that certain directories or files had improper permissions and have a visible way to see that with the extra relationship. However your right we could just add something like a "error.code" and "error.message" attributes and route to failure. I would like the "error.code" for sure however since that would be easy to route against while error.message might contain different messages from the exceptions when dependency versions change

Copy link
Contributor

@trixpan trixpan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thisbis what I had in mind. What do you think about using numeric codes borrowed from HTTP (as I suspect WebHDFS does?).

Good thing about numbers is that as long they are on the hundreds and have no fractional points they are locale agnostic. As long...

@mattyb149
Copy link
Contributor

Reviewer consensus (see the Jira case for details) is to exclude the hdfs.error.code for now, rather than possibly reporting an incorrect cause of an IOException. Once we can tell the difference, we can add that attribute back in. In that state, @bbende and I are a +1

Adding a unit test, removing the attribute, and merging to master. Thanks much!

@asfgit asfgit closed this in 5f65b25 May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants