nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and
Date Tue, 04 Feb 2020 18:08:11 GMT
nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110,1111 - PublishKafka,
OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r374834609
 
 

 ##########
 File path: extensions/standard-processors/processors/LogAttribute.cpp
 ##########
 @@ -88,23 +88,14 @@ void LogAttribute::initialize() {
 }
 
 void LogAttribute::onSchedule(const std::shared_ptr<core::ProcessContext> &context,
const std::shared_ptr<core::ProcessSessionFactory> &factory) {
-  core::Property flowsToLog = FlowFilesToLog;
-
-  if (getProperty(FlowFilesToLog.getName(), flowsToLog)) {
-    // we are going this route since to avoid breaking backwards compatibility the get property
function doesn't perform validation ( That's done
-    // in configuration. In future releases we can add that exception handling there.
-    if (!flowsToLog.getValue().validate("Validating FlowFilesToLog").valid())
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Invalid value for flowfiles to log: "
+ flowsToLog.getValue().to_string());
-    flowfiles_to_log_ = flowsToLog.getValue();
-  }
 
-  std::string value;
-  if (context->getProperty(HexencodePayload.getName(), value)) {
-    utils::StringUtils::StringToBool(value, hexencode_);
-  }
-  if (context->getProperty(MaxPayloadLineLength.getName(), value)) {
-    core::Property::StringToInt(value, max_line_length_);
-  }
+  context->getProperty(FlowFilesToLog.getName(), flowfiles_to_log_);
 
 Review comment:
   This line, if I wrote like: 
   ```
   if (!context->getProperty(FlowFilesToLog.getName(), flowfiles_to_log_)) {
         throw ...
   }
   ```
   Then the GetTCPTest (only this) will fail due to exception, so I guess that test's configuration
has issues, will take a look later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message