You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/04 19:20:21 UTC
[jira] [Commented] (MINIFI-46) MiNiFi Connections Should be able to
handle multiple selected relationships
[ https://issues.apache.org/jira/browse/MINIFI-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15546375#comment-15546375 ]
ASF GitHub Bot commented on MINIFI-46:
--------------------------------------
Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi-minifi/pull/40#discussion_r81809792
--- Diff: minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/ConnectionSchema.java ---
@@ -60,7 +63,16 @@ public ConnectionSchema(Map map) {
if (StringUtil.isNullOrEmpty(sourceId)) {
sourceName = getRequiredKeyAsType(map, SOURCE_NAME_KEY, String.class, CONNECTIONS_KEY);
}
- sourceRelationshipName = getRequiredKeyAsType(map, SOURCE_RELATIONSHIP_NAME_KEY, String.class, CONNECTIONS_KEY);
+
+ String sourceRelationshipName = getOptionalKeyAsType(map, SOURCE_RELATIONSHIP_NAME_KEY, String.class, CONNECTIONS_KEY, null);
+ if (StringUtil.isNullOrEmpty(sourceRelationshipName)) {
+ sourceRelationshipNames = getOptionalKeyAsType(map, SOURCE_RELATIONSHIP_NAMES_KEY, List.class, CONNECTIONS_KEY, new ArrayList());
+ if (sourceRelationshipNames.isEmpty()) {
+ addValidationIssue(getIssueText(SOURCE_RELATIONSHIP_NAMES_KEY, CONNECTIONS_KEY, "expected at least one relationship to be specified"));
+ }
+ } else {
+ sourceRelationshipNames = getOptionalKeyAsType(map, SOURCE_RELATIONSHIP_NAMES_KEY, List.class, CONNECTIONS_KEY, new ArrayList<>(Arrays.asList(sourceRelationshipName)));
--- End diff --
Why use optionalKeyAsType here with the default of "sourceRelationshipName"? Wouldn't it be more appropriate to check if "names" is set, if so add a validation issue ("name" and "names" shouldn't both be set?), else just create a singleton list of "sourceRelationshipName".
> MiNiFi Connections Should be able to handle multiple selected relationships
> ---------------------------------------------------------------------------
>
> Key: MINIFI-46
> URL: https://issues.apache.org/jira/browse/MINIFI-46
> Project: Apache NiFi MiNiFi
> Issue Type: New Feature
> Reporter: Bryan Rosander
> Assignee: Bryan Rosander
>
> In NiFi you can select that multiple relationships from a Processor are sent via the same connection to another processor. That functionality helps keep the flow design clean and should be supported by MiNiFi.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)