You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2017/09/12 17:51:29 UTC

[06/11] nifi-minifi-cpp git commit: MINIFI-338: Address linter errors

MINIFI-338: Address linter errors


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/ead9e84e
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/ead9e84e
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/ead9e84e

Branch: refs/heads/master
Commit: ead9e84ec163252b63e7889de925e6eac72e1b63
Parents: 747691d
Author: Marc Parisi <ph...@apache.org>
Authored: Wed Jul 5 12:13:45 2017 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Tue Sep 12 13:51:03 2017 -0400

----------------------------------------------------------------------
 libminifi/src/FlowController.cpp             | 1 -
 libminifi/src/ThreadedSchedulingAgent.cpp    | 4 +---
 libminifi/src/TimerDrivenSchedulingAgent.cpp | 3 ---
 3 files changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/ead9e84e/libminifi/src/FlowController.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/FlowController.cpp b/libminifi/src/FlowController.cpp
index 32fd298..b0fbffa 100644
--- a/libminifi/src/FlowController.cpp
+++ b/libminifi/src/FlowController.cpp
@@ -192,7 +192,6 @@ void FlowController::stop(bool force) {
     this->timer_scheduler_->stop();
     this->event_scheduler_->stop();
     running_ = false;
-
   }
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/ead9e84e/libminifi/src/ThreadedSchedulingAgent.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/ThreadedSchedulingAgent.cpp b/libminifi/src/ThreadedSchedulingAgent.cpp
index d6b8fae..82d4dfd 100644
--- a/libminifi/src/ThreadedSchedulingAgent.cpp
+++ b/libminifi/src/ThreadedSchedulingAgent.cpp
@@ -21,6 +21,7 @@
 #include <memory>
 #include <string>
 #include <vector>
+#include <utility>
 #include <map>
 #include <thread>
 #include <iostream>
@@ -76,7 +77,6 @@ void ThreadedSchedulingAgent::schedule(std::shared_ptr<core::Processor> processo
 
   ThreadedSchedulingAgent *agent = this;
   for (int i = 0; i < processor->getMaxConcurrentTasks(); i++) {
-
     // reference the disable function from serviceNode
     std::function<uint64_t()> f_ex = [agent, processor, processContext, sessionFactory] () {
       return agent->run(processor, processContext.get(), sessionFactory.get());
@@ -88,10 +88,8 @@ void ThreadedSchedulingAgent::schedule(std::shared_ptr<core::Processor> processo
     // we aren't terribly concerned with the result.
     std::future<uint64_t> future;
     thread_pool_.execute(std::move(functor), future);
-
   }
   logger_->log_info("Scheduled thread %d concurrent workers for for process %s", processor->getMaxConcurrentTasks(), processor->getName().c_str());
-
   return;
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/ead9e84e/libminifi/src/TimerDrivenSchedulingAgent.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/TimerDrivenSchedulingAgent.cpp b/libminifi/src/TimerDrivenSchedulingAgent.cpp
index 3276470..c3aaa69 100644
--- a/libminifi/src/TimerDrivenSchedulingAgent.cpp
+++ b/libminifi/src/TimerDrivenSchedulingAgent.cpp
@@ -37,14 +37,11 @@ uint64_t TimerDrivenSchedulingAgent::run(std::shared_ptr<core::Processor> proces
       return processor->getYieldTime();
     } else if (shouldYield && this->bored_yield_duration_ > 0) {
       // No work to do or need to apply back pressure
-      //std::this_thread::sleep_for(std::chrono::milliseconds(x));
       return this->bored_yield_duration_;
     }
     return processor->getSchedulingPeriodNano() / 1000000;
-    //std::this_thread::sleep_for(std::chrono::nanoseconds(processor->getSchedulingPeriodNano()));
   }
   return 0;
-  //return;
 }
 
 } /* namespace minifi */