exceptionfactory commented on code in PR #9321:
URL: https://github.com/apache/nifi/pull/9321#discussion_r1797459907
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CalculateRecordStats.java:
##########
@@ -133,104 +141,106 @@ public Set<Relationship> getRelationships() {
@Override
public void onTrigger(ProcessContext context, ProcessSession session)
throws ProcessException {
- FlowFile input = session.get();
- if (input == null) {
+ FlowFile flowFile = session.get();
+ if (flowFile == null) {
return;
}
try {
- Map<String, RecordPath> paths = getRecordPaths(context, input);
- Map<String, String> stats = getStats(input, paths, context,
session);
-
- input = session.putAllAttributes(input, stats);
-
- session.transfer(input, REL_SUCCESS);
-
- } catch (Exception ex) {
- getLogger().error("Error processing stats.", ex);
- session.transfer(input, REL_FAILURE);
+ final Map<String, RecordPath> recordPath = getRecordPaths(context,
flowFile);
Review Comment:
That's worth adjusting @EndzeitBegins, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]