[ 
https://issues.apache.org/jira/browse/NIFI-16313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113589#comment-18113589
 ] 

ASF subversion and git services commented on NIFI-16313:
--------------------------------------------------------

Commit 25c8f625d6f31c0141557150c4e91c4e4fca4303 in nifi's branch 
refs/heads/NIFI-16315 from Joe Witt
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=25c8f625d6f ]

NIFI-16313 Align SegmentContent docs with filename attributes (#11640)

> 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
>            Assignee: Joe Witt
>            Priority: Major
>             Fix For: 2.12.0
>
>          Time Spent: 20m
>  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)

Reply via email to