You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/04/01 09:03:58 UTC

[GitHub] [nifi-minifi-cpp] am-c-p-p opened a new pull request #748: MINIFICPP-1187 Implemented.

am-c-p-p opened a new pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748
 
 
   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
   

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] szaszm commented on issue #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
szaszm commented on issue #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#issuecomment-608055970
 
 
   Shouldn't this be a configuration setting instead of a processor property? Since it's effective only once, on the first agent run, there's no point in ever changing it.

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] bakaid closed pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
bakaid closed pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748
 
 
   

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401701273
 
 

 ##########
 File path: extensions/windows-event-log/Bookmark.cpp
 ##########
 @@ -48,7 +48,7 @@ Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const
   }
   const utils::ScopeGuard guard_hEventResults([hEventResults]() { EvtClose(hEventResults); });
 
-  if (!EvtSeek(hEventResults, 0, 0, 0, EvtSeekRelativeToLast)) {
+  if (!EvtSeek(hEventResults, 0, 0, 0, processOldEvents? EvtSeekRelativeToFirst : EvtSeekRelativeToLast)) {
 
 Review comment:
   Since already processed events are bookmarked, only events which are not processed from  bookmark point will be processed, it could be not yet processed old events or new ones.
   

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] arpadboda commented on issue #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
arpadboda commented on issue #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#issuecomment-608103460
 
 
   > Shouldn't this be a configuration setting instead of a processor property? Since it's effective only once, on the first agent run, there's no point in ever changing it.
   
   Reasonable question, but I the config (traditionally) only contains core configuration and no processor related stuff. Because of the processors are mostly in extensions, I would keep it this way. 
   

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401494448
 
 

 ##########
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##########
 @@ -149,6 +149,14 @@ core::Property ConsumeWindowsEventLog::BookmarkRootDirectory(
   withDescription("Directory which contains processor state data.")->
   build());
 
+core::Property ConsumeWindowsEventLog::ProcessOldEvents(
+  core::PropertyBuilder::createProperty("Process Old Events")->
+  isRequired(true)->
+  withAllowableValues<std::string>({ "true", "false" })->
 
 Review comment:
   In case you add a bool validator, you don't need this, but it becomes more consistent with C2.

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401865551
 
 

 ##########
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##########
 @@ -149,6 +149,14 @@ core::Property ConsumeWindowsEventLog::BookmarkRootDirectory(
   withDescription("Directory which contains processor state data.")->
   build());
 
+core::Property ConsumeWindowsEventLog::ProcessOldEvents(
+  core::PropertyBuilder::createProperty("Process Old Events")->
+  isRequired(true)->
+  withAllowableValues<std::string>({ "true", "false" })->
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401495968
 
 

 ##########
 File path: extensions/windows-event-log/Bookmark.cpp
 ##########
 @@ -48,7 +48,7 @@ Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const
   }
   const utils::ScopeGuard guard_hEventResults([hEventResults]() { EvtClose(hEventResults); });
 
-  if (!EvtSeek(hEventResults, 0, 0, 0, EvtSeekRelativeToLast)) {
+  if (!EvtSeek(hEventResults, 0, 0, 0, processOldEvents? EvtSeekRelativeToFirst : EvtSeekRelativeToLast)) {
 
 Review comment:
   What happens in case the property is true and the server restarted? (It processed some events before, so not all event should be reprocessed)

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
am-c-p-p commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401740932
 
 

 ##########
 File path: extensions/windows-event-log/Bookmark.cpp
 ##########
 @@ -11,7 +11,7 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
-Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const std::string& bookmarkRootDir, const std::string& uuid, std::shared_ptr<logging::Logger> logger)
+Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const std::string& bookmarkRootDir, const std::string& uuid, bool processOldEvents, std::shared_ptr<logging::Logger> logger)
 
 Review comment:
   The change in Bookmark is internal to CWEL, it doesn't affect other code, it is not necessary to maintain API signature.

----------------------------------------------------------------
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

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #748: MINIFICPP-1187 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/748#discussion_r401493725
 
 

 ##########
 File path: extensions/windows-event-log/Bookmark.cpp
 ##########
 @@ -11,7 +11,7 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
-Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const std::string& bookmarkRootDir, const std::string& uuid, std::shared_ptr<logging::Logger> logger)
+Bookmark::Bookmark(const std::wstring& channel, const std::wstring& query, const std::string& bookmarkRootDir, const std::string& uuid, bool processOldEvents, std::shared_ptr<logging::Logger> logger)
 
 Review comment:
   This is an incompatible API change.
   Why don't you put the bool to the end with a default value?

----------------------------------------------------------------
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