adamdebreceni commented on a change in pull request #932:
URL: https://github.com/apache/nifi-minifi-cpp/pull/932#discussion_r514136812



##########
File path: libminifi/src/ThreadedSchedulingAgent.cpp
##########
@@ -110,16 +110,15 @@ void 
ThreadedSchedulingAgent::schedule(std::shared_ptr<core::Processor> processo
     thread_pool_.execute(std::move(functor), future);
   }
   logger_->log_debug("Scheduled thread %d concurrent workers for for process 
%s", processor->getMaxConcurrentTasks(), processor->getName());
-  processors_running_.insert(processor->getUUIDStr());
-  return;
+  processors_running_.insert(processor->getUUID());
 }
 
 void ThreadedSchedulingAgent::stop() {
   SchedulingAgent::stop();
   std::lock_guard<std::mutex> lock(mutex_);
   for (const auto& p : processors_running_) {
-    logger_->log_error("SchedulingAgent is stopped before processor was 
unscheduled: %s", p);
-    thread_pool_.stopTasks(p);
+    logger_->log_error("SchedulingAgent is stopped before processor was 
unscheduled: %s", p.to_string());

Review comment:
       done

##########
File path: 
libminifi/src/controllers/keyvalue/PersistableKeyValueStoreService.cpp
##########
@@ -29,20 +29,29 @@ 
PersistableKeyValueStoreService::PersistableKeyValueStoreService(const std::stri
 
 PersistableKeyValueStoreService::~PersistableKeyValueStoreService() = default;
 
-bool PersistableKeyValueStoreService::setImpl(const std::string& key, const 
std::string& value) {
-  return set(key, value);
+bool PersistableKeyValueStoreService::setImpl(const utils::Identifier& key, 
const std::string& value) {
+  return set(key.to_string(), value);
 }
 
-bool PersistableKeyValueStoreService::getImpl(const std::string& key, 
std::string& value) {
-  return get(key, value);
+bool PersistableKeyValueStoreService::getImpl(const utils::Identifier& key, 
std::string& value) {
+  return get(key.to_string(), value);
 }
 
-bool PersistableKeyValueStoreService::getImpl(std::unordered_map<std::string, 
std::string>& kvs) {
-  return get(kvs);
+bool PersistableKeyValueStoreService::getImpl(std::map<utils::Identifier, 
std::string>& kvs) {
+  std::unordered_map<std::string, std::string> states;
+  if (!get(states)) {
+    return false;
+  }
+  kvs.clear();
+  for (const auto& state : states) {
+    const auto uuid = utils::Identifier::parse(state.first);

Review comment:
       done




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to