NIFI-4786 - Allow Expression Evaluation to Kinesis/Firehose Stream Name#2409
NIFI-4786 - Allow Expression Evaluation to Kinesis/Firehose Stream Name#2409SunSatION wants to merge 4 commits intoapache:masterfrom
Conversation
|
Reviewing... |
| session.exportTo(flowFile, baos); | ||
| records.add(new Record().withData(ByteBuffer.wrap(baos.toByteArray()))); | ||
|
|
||
| if ( !recordHash.containsKey(firehoseStreamName) ) |
There was a problem hiding this comment.
Thank you for following the pre-existing code style in this class file. That's usually a good practice. However, if statements in NiFi code typically have braces even for single-line contents, and there is typically no space between parenthesis:
if (somevar == true) {
doStuff();
}
Would you please fix these up?
| } | ||
|
|
||
| records.add(record); | ||
| if ( !recordHash.containsKey(streamName) ) { |
There was a problem hiding this comment.
Would you also please fix these ifs? I completely understand they were already that way.
|
@SunSatION , thanks for submitting this PR, it looks like good stuff. May I ask how you tested the changes? For PutKinesisFirehose, I was able to run the integration test suite successfully, and I was able to manually build and run a simple flow sending data to Kinesis Firehose. For PutKinesisStream, the manual flow building worked, but I get exceptions running the integration test suite (ITPutKinesisStream.testIntegrationSuccess) as it calls Did you try the integration tests, and did they work for you? I don't believe your change introduced this issue. A quick check of the master branch suggests it was already there, but it complicated testing. |
|
Hi @jvwing Thanks for the PR review. I've amended some changes to follow NIFI's I'll try having a look at the integration tests in the evening. I've performed the manual tests as you did and used |
…S Java SDK version
|
Hi @jvwing The problem is caused by an unsupported version of Jackson databind defined in the parent NIFI POM (2.9.3) file compared to the used by AWS Java SDK (2.6.6) I've included the old version with scope set to The tests were executed successfully. |
|
@SunSatION, this is nice work. Thanks for the new Kinesis expression language features. And double thanks for fixing the if statements and the integration tests, I think your Jackson test dependency fix is a good approach. |
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.