You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joe Witt (Jira)" <ji...@apache.org> on 2026/09/07 23:08:00 UTC

[jira] [Updated] (NIFI-16313) SegmentContent documents a filename rewrite it does not perform

     [ https://issues.apache.org/jira/browse/NIFI-16313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Witt updated NIFI-16313:
----------------------------
    Status: Patch Available  (was: Open)

> SegmentContent documents a filename rewrite it does not perform
> ---------------------------------------------------------------
>
>                 Key: NIFI-16313
>                 URL: https://issues.apache.org/jira/browse/NIFI-16313
>             Project: Apache NiFi
>          Issue Type: Task
>            Reporter: Joe Witt
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> SegmentContent's generated documentation disagrees with what onTrigger actually writes.
> @WritesAttributes currently has two entries, both named "segment.original.filename " (trailing space):
> 1. "The filename of the parent FlowFile"
> 2. "The filename will be updated to include the parent's filename, the segment index, and the segment count"
> Neither is accurate as written. The runtime attribute is FragmentAttributes.SEGMENT_ORIGINAL_FILENAME ("segment.original.filename", no trailing space). The processor copies CoreAttributes.FILENAME onto that attribute and leaves filename itself unchanged. MergeContent reconstitutes the original FlowFile using segment.original.filename, so rewriting filename would be the wrong contract.
> This is a documentation defect, not a behavior change. The trailing-space paste also appears on other Split* processors; those belong in a follow-up so this ticket stays about SegmentContent's false rewrite claim.
> Proposed change:
> - Keep a single @WritesAttribute for segment.original.filename (no trailing space) describing the parent's filename.
> - Do not document a filename rewrite.
> - Extend TestSegmentContent so segments keep the parent filename and set segment.original.filename to that same value, for both the split path and the "small enough not to segment" path.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)