[
https://issues.apache.org/jira/browse/NIFI-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15308140#comment-15308140
]
ASF GitHub Bot commented on NIFI-1754:
--------------------------------------
Github user trkurc commented on a diff in the pull request:
https://github.com/apache/nifi/pull/478#discussion_r65223758
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
---
@@ -950,6 +955,45 @@ private void rollback(final boolean penalize, final
boolean rollbackCheckpoint)
resetState();
}
+ private String loggableFlowfileInfo() {
+ final StringBuilder details = new StringBuilder(1024).append("[");
+ final int initLen = details.length();
+ int filesListed = 0;
+ int maxRollbackFlowfilesToLog = 5;
+ for (Map.Entry<FlowFileRecord, StandardRepositoryRecord> entry :
records.entrySet()) {
+ final FlowFileRecord entryKey = entry.getKey();
+ final StandardRepositoryRecord entryValue = entry.getValue();
+ if (details.length() > initLen) {
+ details.append(", ");
+ }
+ if (entryValue.getOriginalQueue() != null &&
entryValue.getOriginalQueue().getIdentifier() != null) {
+ details.append("queue=")
+
.append(entryValue.getOriginalQueue().getIdentifier())
+ .append("/");
+ }
+ details.append("filename=")
+
.append(entryKey.getAttribute(CoreAttributes.FILENAME.key()))
+ .append("/uuid=")
+
.append(entryKey.getAttribute(CoreAttributes.UUID.key()));
+ filesListed++;
+ if (filesListed > maxRollbackFlowfilesToLog) {
--- End diff --
I think this check needs to be moved up (if someone changes
maxRollbackFlowfilesToLog to 0 at some point in the future, this is too late),
and I believe the intent was for the > to be a >=.
> Rollback log messages should include the flowfile filename and UUID to assist
> in flow management.
> -------------------------------------------------------------------------------------------------
>
> Key: NIFI-1754
> URL: https://issues.apache.org/jira/browse/NIFI-1754
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 1.0.0, 0.7.0
> Reporter: Joe Skora
> Assignee: Joe Skora
>
> When a processor calls rollback on a flowfile, the filename and UUID of the
> flowfile should be included in log entry to make it easier for the offending
> files to be found and fixed or removed from the flow by the dataflow managers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)