[
https://issues.apache.org/jira/browse/NIFI-3389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865852#comment-15865852
]
ASF GitHub Bot commented on NIFI-3389:
--------------------------------------
Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1446#discussion_r101047085
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/schema/RepositoryRecordSchema.java
---
@@ -91,4 +97,42 @@
final UnionRecordField repoUpdateField = new
UnionRecordField(REPOSITORY_RECORD_UPDATE_V1, Repetition.EXACTLY_ONE,
createOrUpdate, delete, swapOut, swapIn);
REPOSITORY_RECORD_SCHEMA_V1 = new
RecordSchema(Collections.singletonList(repoUpdateField));
}
+
+ static {
--- End diff --
I believe the only difference between this static block and the other is
which FlowFileSchema should be used (FLOWFILE_SCHEMA_V1 vs.
FLOWFILE_SCHEMA_V2), correct? This is quite a lot of code to duplicate. Can we
instead just have a
`private static RecordSchema createSchema(RecordSchema flowFileSchema)`
type of method, and have it just use the given FlowFileSchema? I believe
this would eliminate all of the duplication.
> FlowFileSchema writes attribute name and value as STRING instead of
> LONG_STRING
> -------------------------------------------------------------------------------
>
> Key: NIFI-3389
> URL: https://issues.apache.org/jira/browse/NIFI-3389
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.1.0
> Reporter: Bryan Rosander
> Assignee: Bryan Rosander
> Priority: Critical
> Labels: regression
>
> This causes errors when the names or values of attributes exceeds 65535 bytes
> when encoded as UTF-8.
> The fix would be pretty trivial but it has backwards compatibility
> implications and the schema will need to be versioned to still be able to
> read old flow files.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)