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



##########
File path: libminifi/include/sitetosite/SiteToSite.h
##########
@@ -246,24 +246,24 @@ class Transaction {
     current_transfers_ = 0;
     total_transfers_ = 0;
     _bytes = 0;
-
-    // Generate the global UUID for the transaction
-    uuid_str_ = uuid_.to_string();
   }
   // Destructor
   virtual ~Transaction() = default;
   // getUUIDStr
-  std::string getUUIDStr() {
-    return uuid_str_;
+  utils::SmallString<36> getUUIDStr() {

Review comment:
       const

##########
File path: libminifi/include/core/CoreComponentState.h
##########
@@ -48,13 +49,13 @@ class CoreComponentStateManagerProvider {
  public:
   virtual ~CoreComponentStateManagerProvider() = default;
 
-  virtual std::shared_ptr<CoreComponentStateManager> 
getCoreComponentStateManager(const std::string& uuid) = 0;
+  virtual std::shared_ptr<CoreComponentStateManager> 
getCoreComponentStateManager(const utils::Identifier& uuid) = 0;
 
   virtual std::shared_ptr<CoreComponentStateManager> 
getCoreComponentStateManager(const CoreComponent& component) {
-    return getCoreComponentStateManager(component.getUUIDStr());
+    return getCoreComponentStateManager(component.getUUID());
   }
 
-  virtual std::unordered_map<std::string, std::unordered_map<std::string, 
std::string>> getAllCoreComponentStates() = 0;
+  virtual std::map<utils::Identifier, std::unordered_map<std::string, 
std::string>> getAllCoreComponentStates() = 0;

Review comment:
       What's the reason behind this change?
   If you do this, unordered map include can be removed imho. 

##########
File path: libminifi/src/CronDrivenSchedulingAgent.cpp
##########
@@ -56,8 +56,8 @@ utils::TaskRescheduleInfo 
CronDrivenSchedulingAgent::run(const std::shared_ptr<c
       } else {
         Bosma::Cron schedule(processor->getCronPeriod());
         result = schedule.cron_to_next(from);
-        last_exec_[uuidStr] = result;
-        schedules_.insert(std::make_pair(uuidStr, schedule));
+        last_exec_[uuid] = result;
+        schedules_.insert(std::make_pair(uuid, schedule));

Review comment:
       It's old code, but it's a map! :)
   
   schedules_[uuid] = schedule;




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