[
https://issues.apache.org/jira/browse/NIFI-16313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112457#comment-18112457
]
ASF subversion and git services commented on NIFI-16313:
--------------------------------------------------------
Commit aa62195da024633d5a4101b9383104bbf0a936d1 in nifi's branch
refs/heads/NIFI-16313 from Joe Witt
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=aa62195da02 ]
NIFI-16313 Align SegmentContent docs with filename attributes
Co-authored-by: Cursor <[email protected]>
> 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
>
> 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)