Skip to content

NIFI-1856 ExecuteStreamCommand Needs to Consume Standard Error#1355

Closed
rkarthik29 wants to merge 0 commit intoapache:masterfrom
rkarthik29:master
Closed

NIFI-1856 ExecuteStreamCommand Needs to Consume Standard Error#1355
rkarthik29 wants to merge 0 commit intoapache:masterfrom
rkarthik29:master

Conversation

@rkarthik29
Copy link
Contributor

@rkarthik29 rkarthik29 commented Dec 22, 2016

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.

@rkarthik29
Copy link
Contributor Author

added a property to executeSTreamCommand "Redirect Error Output". [log,output stream, error stream]. log is the default.
When set to log, the error stream is captured and output is logged to the Nifi app logs at the warn level.Also, the errors are available in the original stream as an attribute, which is the current behavior.
When set to output stream, the redirecterrorstream is set to true so all errors go to the output streams and are available in the output stream relation
when set to error stream, the error output is forwarded to an errorflowfile which is available in the error stream relationship.The error stream relationship is new.

Added a process.destroyforcibly of the processor unscheduled event.

Checked execute process, it was already capturing the error stream, so no change needed.

Copy link

@jackowaya jackowaya left a comment

Choose a reason for hiding this comment

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

Happy to see someone looking at this!

The logic looks mostly sound here. There are some stylistic changes that may get you flagged by contribCheck. Can you run mvn -Pcontrib-check clean install to verify that things are good there?

*/
package org.apache.nifi.processors.standard;

import java.io.BufferedReader;

Choose a reason for hiding this comment

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

I'm not sure if nifi has an import order rule, but generally I try to avoid commits that move a lot of imports around like this.

+ "\n1) log - outputs to the nifi logger"
+ "\n2) output stream - redirects to the output stream relation"
+ "\n3) error stream - redirects to the error stream relation")
.allowableValues("log", "output stream","error stream")

Choose a reason for hiding this comment

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

It would be better to hold these strings in static final variables so they can be reused later without fear of mistyping.

Also spacing looks off here. You should run autoformat again.

@rkarthik29
Copy link
Contributor Author

I did a contrib check and there were no style errors. I agree using final variables would be nicer , will do that.

@mattyb149
Copy link
Contributor

Many of the commits are merge commits, when this PR is merged it can make the commit log fairly messy. Do you mind rebasing your own branch against the latest "upstream" master branch. You may find it helpful to create a branch specifically for this PR, then reset your own master branch to upstream, then you can rebase this branch against master without worrying whether to fetch or pull from upstream in the future. Not a requirement, just a suggestion to help keep things a bit cleaner :)

@rkarthik29 rkarthik29 closed this Dec 28, 2016
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