Github user benqiu2016 commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/90#discussion_r114679460
--- Diff: libminifi/src/core/yaml/YamlConfiguration.cpp ---
@@ -417,29 +405,27 @@ void YamlConfiguration::parseConnectionYaml(
// Configure connection source
- auto rawRelationship = connectionNode["source relationship name"]
- .as<std::string>();
+ checkRequiredField(&connectionNode, "source relationship name",
CONFIG_YAML_CONNECTIONS_KEY);
+ auto rawRelationship = connectionNode["source relationship
name"].as<std::string>();
core::Relationship relationship(rawRelationship, "");
- logger_->log_debug(
- "parseConnection: relationship => [%s]", rawRelationship);
+ logger_->log_debug("parseConnection: relationship => [%s]",
rawRelationship);
if (connection) {
connection->setRelationship(relationship);
}
uuid_t srcUUID;
- std::string connectionSrcProcName = connectionNode["source name"]
- .as<std::string>();
+
if (connectionNode["source id"]) {
- std::string connectionSrcProcId = connectionNode["source id"]
- .as<std::string>();
+ std::string connectionSrcProcId = connectionNode["source
id"].as<std::string>();
uuid_parse(connectionSrcProcId.c_str(), srcUUID);
} else {
// if we don't have a source id, try harder to resolve the
source processor.
// config schema v2 will make this unnecessary
+ checkRequiredField(&connectionNode, "source name",
CONFIG_YAML_CONNECTIONS_KEY);
--- End diff --
i thought we only use source id instead of source name. source id is the
process UUID for the connection source
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---