[jira] [Commented] (MINIFI-338) Threads can be unbounded per flow configuration

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111925#comment-16111925
 ] 

ASF GitHub Bot commented on MINIFI-338:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/117


> Threads can be unbounded per flow configuration
> ---
>
> Key: MINIFI-338
> URL: https://issues.apache.org/jira/browse/MINIFI-338
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> The number of tasks configured by a given processor should be bounded by a 
> thread pool configuration. Currently the schedulers have no concept of a 
> thread pool except for the component life cycle thread pool. We should 
> transition the tasks to a thread pool shared by the scheduler and is globally 
> configurable to better minimize the impact of processors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-338) Threads can be unbounded per flow configuration

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111921#comment-16111921
 ] 

ASF subversion and git services commented on MINIFI-338:


Commit 7f052c84312ba988a016de126f334576f6f121ed in nifi-minifi-cpp's branch 
refs/heads/master from Marc Parisi
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=7f052c8 ]

MINIFI-338: Convert processor threads to use thread pools


> Threads can be unbounded per flow configuration
> ---
>
> Key: MINIFI-338
> URL: https://issues.apache.org/jira/browse/MINIFI-338
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> The number of tasks configured by a given processor should be bounded by a 
> thread pool configuration. Currently the schedulers have no concept of a 
> thread pool except for the component life cycle thread pool. We should 
> transition the tasks to a thread pool shared by the scheduler and is globally 
> configurable to better minimize the impact of processors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-338) Threads can be unbounded per flow configuration

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111923#comment-16111923
 ] 

ASF subversion and git services commented on MINIFI-338:


Commit 9d500354a3a4c5538ee425162482cb5e8af1bf00 in nifi-minifi-cpp's branch 
refs/heads/master from [~phrocker]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=9d50035 ]

MINIFI-338: Improve wait decay per pull request comments


> Threads can be unbounded per flow configuration
> ---
>
> Key: MINIFI-338
> URL: https://issues.apache.org/jira/browse/MINIFI-338
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> The number of tasks configured by a given processor should be bounded by a 
> thread pool configuration. Currently the schedulers have no concept of a 
> thread pool except for the component life cycle thread pool. We should 
> transition the tasks to a thread pool shared by the scheduler and is globally 
> configurable to better minimize the impact of processors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-338) Threads can be unbounded per flow configuration

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111922#comment-16111922
 ] 

ASF subversion and git services commented on MINIFI-338:


Commit 97c8a7f11e4e5cd4fd86439dd1b8744382fd7e2c in nifi-minifi-cpp's branch 
refs/heads/master from Marc Parisi
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=97c8a7f ]

MINIFI-338: Address linter errors


> Threads can be unbounded per flow configuration
> ---
>
> Key: MINIFI-338
> URL: https://issues.apache.org/jira/browse/MINIFI-338
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> The number of tasks configured by a given processor should be bounded by a 
> thread pool configuration. Currently the schedulers have no concept of a 
> thread pool except for the component life cycle thread pool. We should 
> transition the tasks to a thread pool shared by the scheduler and is globally 
> configurable to better minimize the impact of processors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-338) Threads can be unbounded per flow configuration

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111924#comment-16111924
 ] 

ASF subversion and git services commented on MINIFI-338:


Commit 58c21e0bf95197bf746b7f2c45ba5b3f66010d29 in nifi-minifi-cpp's branch 
refs/heads/master from [~bqiu]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=58c21e0 ]

MINIFI-338: Convert processor threads to use thread pools

Author: Marc Parisi 

Signed-off-by: Bin Qiu 

This closes #177


> Threads can be unbounded per flow configuration
> ---
>
> Key: MINIFI-338
> URL: https://issues.apache.org/jira/browse/MINIFI-338
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> The number of tasks configured by a given processor should be bounded by a 
> thread pool configuration. Currently the schedulers have no concept of a 
> thread pool except for the component life cycle thread pool. We should 
> transition the tasks to a thread pool shared by the scheduler and is globally 
> configurable to better minimize the impact of processors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[3/4] nifi-minifi-cpp git commit: MINIFI-338: Improve wait decay per pull request comments

2017-08-02 Thread bqiu
MINIFI-338: Improve wait decay per pull request comments


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/9d500354
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/9d500354
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/9d500354

Branch: refs/heads/master
Commit: 9d500354a3a4c5538ee425162482cb5e8af1bf00
Parents: 97c8a7f
Author: Marc 
Authored: Thu Jul 20 19:28:26 2017 -0400
Committer: Marc Parisi 
Committed: Mon Jul 31 21:12:51 2017 -0400

--
 libminifi/include/utils/ThreadPool.h | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/9d500354/libminifi/include/utils/ThreadPool.h
--
diff --git a/libminifi/include/utils/ThreadPool.h 
b/libminifi/include/utils/ThreadPool.h
index 8ff3975..5335c81 100644
--- a/libminifi/include/utils/ThreadPool.h
+++ b/libminifi/include/utils/ThreadPool.h
@@ -129,6 +129,10 @@ class Worker {
   virtual uint64_t getTimeSlice() {
 return time_slice_;
   }
+  
+  virtual uint64_t getWaitTime(){
+return run_determinant_->wait_time();
+  }
 
   Worker(const Worker&) = delete;
   Worker& operator =(const Worker&) = delete;
@@ -352,11 +356,19 @@ void ThreadPool::run_tasks() {
   uint64_t wait_decay_ = 0;
   while (running_.load()) {
 
+// if we exceed 500ms of wait due to not being able to run any tasks and 
there are tasks available, meaning
+// they are eligible to run per the fact that the thread pool isn't shut 
down and the tasks are in a runnable state
+// BUT they've been continually timesliced, we will lower the wait decay 
to 100ms and continue incrementing from
+// there. This ensures we don't have arbitrarily long sleep cycles. 
+if (wait_decay_ > 5L){
+ wait_decay_ = 1L;
+}
 // if we are spinning, perform a wait. If something changes in the worker 
such that the timeslice has changed, we will pick that information up. Note 
that it's possible
 // we could starve for processing time if all workers are waiting. In the 
event that the number of workers far exceeds the number of threads, threads 
will spin and potentially
 // wait until they arrive at a task that can be run. In this case we reset 
the wait_decay and attempt to pick up a new task. This means that threads that 
recently ran should
 // be more likely to run. This is intentional.
-if (wait_decay_ > 1000) {
+
+if (wait_decay_ > 2000) {
   std::this_thread::sleep_for(std::chrono::nanoseconds(wait_decay_));
 }
 Worker task;
@@ -376,9 +388,12 @@ void ThreadPool::run_tasks() {
 
 bool wait_to_run = false;
 if (task.getTimeSlice() > 1) {
+  double wt = (double)task.getWaitTime();
   auto now = std::chrono::system_clock::now().time_since_epoch();
-  auto ms = std::chrono::duration_cast(now);
-  if (task.getTimeSlice() > ms.count()) {
+  auto ms = 
std::chrono::duration_cast(now).count();
+  // if our differential is < 10% of the wait time we will not put the 
task into a wait state
+  // since requeuing will break the time slice contract.
+  if (task.getTimeSlice() > ms && (task.getTimeSlice() - ms) > (wt*.10)) {
 wait_to_run = true;
   }
 }
@@ -392,7 +407,7 @@ void ThreadPool::run_tasks() {
   }
   worker_queue_.enqueue(std::move(task));
 
-  wait_decay_ += 100;
+  wait_decay_ += 25;
   continue;
 }
 



[2/4] nifi-minifi-cpp git commit: MINIFI-338: Convert processor threads to use thread pools

2017-08-02 Thread bqiu
MINIFI-338: Convert processor threads to use thread pools


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/7f052c84
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/7f052c84
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/7f052c84

Branch: refs/heads/master
Commit: 7f052c84312ba988a016de126f334576f6f121ed
Parents: 7ecdafa
Author: Marc Parisi 
Authored: Fri Jun 30 10:05:15 2017 -0400
Committer: Marc Parisi 
Committed: Mon Jul 31 21:09:56 2017 -0400

--
 libminifi/include/EventDrivenSchedulingAgent.h |   2 +-
 libminifi/include/SchedulingAgent.h|   2 +-
 libminifi/include/ThreadedSchedulingAgent.h|  56 +-
 libminifi/include/TimerDrivenSchedulingAgent.h |   2 +-
 libminifi/include/core/Processor.h |   5 +-
 libminifi/include/utils/ThreadPool.h   | 180 +++-
 libminifi/src/EventDrivenSchedulingAgent.cpp   |  13 +-
 libminifi/src/FlowController.cpp   |  15 +-
 libminifi/src/SchedulingAgent.cpp  |   4 +-
 libminifi/src/ThreadedSchedulingAgent.cpp  |  44 ++---
 libminifi/src/TimerDrivenSchedulingAgent.cpp   |  13 +-
 libminifi/test/unit/SocketTests.cpp|   2 +-
 libminifi/test/unit/ThreadPoolTests.cpp|   2 +-
 13 files changed, 281 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7f052c84/libminifi/include/EventDrivenSchedulingAgent.h
--
diff --git a/libminifi/include/EventDrivenSchedulingAgent.h 
b/libminifi/include/EventDrivenSchedulingAgent.h
index c838b11..ca9f021 100644
--- a/libminifi/include/EventDrivenSchedulingAgent.h
+++ b/libminifi/include/EventDrivenSchedulingAgent.h
@@ -46,7 +46,7 @@ class EventDrivenSchedulingAgent : public 
ThreadedSchedulingAgent {
   virtual ~EventDrivenSchedulingAgent() {
   }
   // Run function for the thread
-  void run(std::shared_ptr processor, core::ProcessContext 
*processContext, core::ProcessSessionFactory *sessionFactory);
+  uint64_t run(std::shared_ptr processor, 
core::ProcessContext *processContext, core::ProcessSessionFactory 
*sessionFactory);
 
  private:
   // Prevent default copy constructor and assignment operation

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7f052c84/libminifi/include/SchedulingAgent.h
--
diff --git a/libminifi/include/SchedulingAgent.h 
b/libminifi/include/SchedulingAgent.h
index 1ff3fac..130c088 100644
--- a/libminifi/include/SchedulingAgent.h
+++ b/libminifi/include/SchedulingAgent.h
@@ -84,7 +84,7 @@ class SchedulingAgent {
 running_ = true;
   }
   // stop
-  void stop() {
+  virtual void stop() {
 running_ = false;
 component_lifecycle_thread_pool_.shutdown();
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/7f052c84/libminifi/include/ThreadedSchedulingAgent.h
--
diff --git a/libminifi/include/ThreadedSchedulingAgent.h 
b/libminifi/include/ThreadedSchedulingAgent.h
index b4db4bf..27b8b3a 100644
--- a/libminifi/include/ThreadedSchedulingAgent.h
+++ b/libminifi/include/ThreadedSchedulingAgent.h
@@ -20,6 +20,7 @@
 #ifndef __THREADED_SCHEDULING_AGENT_H__
 #define __THREADED_SCHEDULING_AGENT_H__
 
+#include 
 #include "properties/Configure.h"
 #include "core/logging/LoggerConfiguration.h"
 #include "core/Processor.h"
@@ -33,6 +34,47 @@ namespace nifi {
 namespace minifi {
 
 /**
+ * Uses the wait time for a given worker to determine if it is eligible to run
+ */
+class TimerAwareMonitor : public utils::AfterExecute {
+ public:
+  TimerAwareMonitor(std::atomic *run_monitor)
+  : run_monitor_(run_monitor),
+current_wait_(0) {
+
+  }
+  explicit TimerAwareMonitor(TimerAwareMonitor &)
+  : AfterExecute(std::move(other)),
+run_monitor_(std::move(other.run_monitor_)) {
+current_wait_.store(other.current_wait_.load());
+  }
+  virtual bool isFinished(const uint64_t ) {
+current_wait_.store(result);
+if (*run_monitor_) {
+  return false;
+}
+return true;
+  }
+  virtual bool isCancelled(const uint64_t ) {
+if (*run_monitor_) {
+  return false;
+}
+return true;
+  }
+  /**
+   * Time to wait before re-running this task if necessary
+   * @return milliseconds since epoch after which we are eligible to re-run 
this task.
+   */
+  virtual int64_t wait_time() {
+return current_wait_.load();
+  }
+ private:
+
+  std::atomic current_wait_;
+  std::atomic *run_monitor_;
+};
+
+/**
  * An abstract scheduling agent which creates and manages a pool of threads for
  * each processor scheduled.
  */
@@ 

[1/4] nifi-minifi-cpp git commit: MINIFI-338: Address linter errors

2017-08-02 Thread bqiu
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 5fca46f7c -> 58c21e0bf


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/97c8a7f1
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/97c8a7f1
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/97c8a7f1

Branch: refs/heads/master
Commit: 97c8a7f11e4e5cd4fd86439dd1b8744382fd7e2c
Parents: 7f052c8
Author: Marc Parisi 
Authored: Wed Jul 5 12:13:45 2017 -0400
Committer: Marc Parisi 
Committed: Mon Jul 31 21:09:56 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/97c8a7f1/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/97c8a7f1/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 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -76,7 +77,6 @@ void 
ThreadedSchedulingAgent::schedule(std::shared_ptr processo
 
   ThreadedSchedulingAgent *agent = this;
   for (int i = 0; i < processor->getMaxConcurrentTasks(); i++) {
-
 // reference the disable function from serviceNode
 std::function f_ex = [agent, processor, processContext, 
sessionFactory] () {
   return agent->run(processor, processContext.get(), sessionFactory.get());
@@ -88,10 +88,8 @@ void 
ThreadedSchedulingAgent::schedule(std::shared_ptr processo
 // we aren't terribly concerned with the result.
 std::future 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/97c8a7f1/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 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() / 100;
-
//std::this_thread::sleep_for(std::chrono::nanoseconds(processor->getSchedulingPeriodNano()));
   }
   return 0;
-  //return;
 }
 
 } /* namespace minifi */



[4/4] nifi-minifi-cpp git commit: MINIFI-338: Convert processor threads to use thread pools

2017-08-02 Thread bqiu
MINIFI-338: Convert processor threads to use thread pools

Author: Marc Parisi 

Signed-off-by: Bin Qiu 

This closes #177


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/58c21e0b
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/58c21e0b
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/58c21e0b

Branch: refs/heads/master
Commit: 58c21e0bf95197bf746b7f2c45ba5b3f66010d29
Parents: 5fca46f 9d50035
Author: Bin Qiu 
Authored: Wed Aug 2 16:18:16 2017 -0700
Committer: Bin Qiu 
Committed: Wed Aug 2 16:32:44 2017 -0700

--
 libminifi/include/EventDrivenSchedulingAgent.h |   2 +-
 libminifi/include/SchedulingAgent.h|   2 +-
 libminifi/include/ThreadedSchedulingAgent.h|  56 +-
 libminifi/include/TimerDrivenSchedulingAgent.h |   2 +-
 libminifi/include/core/Processor.h |   5 +-
 libminifi/include/utils/ThreadPool.h   | 195 +++-
 libminifi/src/EventDrivenSchedulingAgent.cpp   |  13 +-
 libminifi/src/FlowController.cpp   |  14 +-
 libminifi/src/SchedulingAgent.cpp  |   4 +-
 libminifi/src/ThreadedSchedulingAgent.cpp  |  44 ++---
 libminifi/src/TimerDrivenSchedulingAgent.cpp   |  10 +-
 libminifi/test/unit/SocketTests.cpp|   2 +-
 libminifi/test/unit/ThreadPoolTests.cpp|   2 +-
 13 files changed, 291 insertions(+), 60 deletions(-)
--




[jira] [Commented] (MINIFI-359) Create tests for PutFile

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111739#comment-16111739
 ] 

ASF subversion and git services commented on MINIFI-359:


Commit 5fca46f7c7ee9059feb1b4926f769b932a186964 in nifi-minifi-cpp's branch 
refs/heads/master from Marc Parisi
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=5fca46f ]

MINIFI-359: Add PutFile test to test a variety of conditions for the user 
provided input

Signed-off-by: Bin Qiu 

This closes #122


> Create tests for PutFile
> 
>
> Key: MINIFI-359
> URL: https://issues.apache.org/jira/browse/MINIFI-359
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: marco polo
>Assignee: marco polo
>
> Need tests for PutFile to avoid regression issues. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-359) Create tests for PutFile

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111740#comment-16111740
 ] 

ASF GitHub Bot commented on MINIFI-359:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/122


> Create tests for PutFile
> 
>
> Key: MINIFI-359
> URL: https://issues.apache.org/jira/browse/MINIFI-359
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: marco polo
>Assignee: marco polo
>
> Need tests for PutFile to avoid regression issues. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


nifi-minifi-cpp git commit: MINIFI-359: Add PutFile test to test a variety of conditions for the user provided input

2017-08-02 Thread bqiu
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master dad324142 -> 5fca46f7c


MINIFI-359: Add PutFile test to test a variety of conditions for the user 
provided input

Signed-off-by: Bin Qiu 

This closes #122


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/5fca46f7
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/5fca46f7
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/5fca46f7

Branch: refs/heads/master
Commit: 5fca46f7c7ee9059feb1b4926f769b932a186964
Parents: dad3241
Author: Marc Parisi 
Authored: Mon Jul 31 10:57:28 2017 -0400
Committer: Bin Qiu 
Committed: Wed Aug 2 14:10:56 2017 -0700

--
 libminifi/src/processors/PutFile.cpp |  19 +-
 libminifi/test/TestBase.cpp  |   8 +-
 libminifi/test/TestBase.h|   3 +
 libminifi/test/unit/PutFileTests.cpp | 326 ++
 4 files changed, 346 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/5fca46f7/libminifi/src/processors/PutFile.cpp
--
diff --git a/libminifi/src/processors/PutFile.cpp 
b/libminifi/src/processors/PutFile.cpp
index 824c7d1..80aea6c 100644
--- a/libminifi/src/processors/PutFile.cpp
+++ b/libminifi/src/processors/PutFile.cpp
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 
-#include "../../include/processors/PutFile.h"
+#include "processors/PutFile.h"
 
 #include 
 #include 
@@ -30,13 +30,13 @@
 #include 
 #include 
 
-#include "../../include/core/logging/Logger.h"
-#include "../../include/core/ProcessContext.h"
-#include "../../include/core/Property.h"
-#include "../../include/core/Relationship.h"
-#include "../../include/io/BaseStream.h"
-#include "../../include/io/DataStream.h"
-#include "../../include/io/validation.h"
+#include "core/logging/Logger.h"
+#include "core/ProcessContext.h"
+#include "core/Property.h"
+#include "core/Relationship.h"
+#include "io/BaseStream.h"
+#include "io/DataStream.h"
+#include "io/validation.h"
 
 namespace org {
 namespace apache {
@@ -82,7 +82,7 @@ void PutFile::onTrigger(core::ProcessContext *context, 
core::ProcessSession *ses
 return;
   }
 
-  std::shared_ptr flowFile = std::static_pointer_cast < 
FlowFileRecord > (session->get());
+  std::shared_ptr flowFile = 
std::static_pointer_cast(session->get());
 
   // Do nothing if there are no incoming files
   if (!flowFile) {
@@ -131,6 +131,7 @@ bool PutFile::putFile(core::ProcessSession *session, 
std::shared_ptrread(flowFile, );
 
+  logger_->log_info("Committing %s", destFile);
   if (cb.commit()) {
 session->transfer(flowFile, Success);
 return true;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/5fca46f7/libminifi/test/TestBase.cpp
--
diff --git a/libminifi/test/TestBase.cpp b/libminifi/test/TestBase.cpp
index 4c0814d..a471afe 100644
--- a/libminifi/test/TestBase.cpp
+++ b/libminifi/test/TestBase.cpp
@@ -29,7 +29,8 @@ TestPlan::TestPlan(std::shared_ptr 
content_repo, std::s
   prov_repo_(prov_repo),
   location(-1),
   finalized(false),
-  current_flowfile_(nullptr) {
+  current_flowfile_(nullptr),
+  logger_(logging::LoggerFactory::getLogger()) {
 }
 
 std::shared_ptr TestPlan::addProcessor(const 
std::shared_ptr , const std::string , 
core::Relationship relationship,
@@ -59,6 +60,7 @@ bool linkToPrevious) {
 
 std::stringstream connection_name;
 connection_name << last->getUUIDStr() << "-to-" << processor->getUUIDStr();
+logger_->log_info("Creating %s connection for proc 
%d",connection_name.str(),processor_queue_.size()+1);
 std::shared_ptr connection = 
std::make_shared(flow_repo_, content_repo_, 
connection_name.str());
 connection->setRelationship(relationship);
 
@@ -114,11 +116,13 @@ bool linkToPrevious) {
 bool TestPlan::setProperty(const std::shared_ptr proc, const 
std::string , const std::string ) {
   std::lock_guard guard(mutex);
   int i = 0;
+  logger_->log_info("Attempting to set property %s %s for 
%s",prop,value,proc->getName());
   for (i = 0; i < processor_queue_.size(); i++) {
 if (processor_queue_.at(i) == proc) {
   break;
 }
   }
+
   if (i >= processor_queue_.size() || i < 0 || i >= 
processor_contexts_.size()) {
 return false;
   }
@@ -142,6 +146,7 @@ bool 
TestPlan::runNextProcessor(std::functionlog_info("Running next processor %d, processor_queue_.size %d, 
processor_contexts_.size %d", location, processor_queue_.size(), 
processor_contexts_.size());
   std::lock_guard guard(mutex);
   

[jira] [Commented] (MINIFI-363) Set format macros before inclusion of inttypes.h

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111706#comment-16111706
 ] 

ASF subversion and git services commented on MINIFI-363:


Commit dad32414298864996ed0571f5611d483ae7de574 in nifi-minifi-cpp's branch 
refs/heads/master from Marc Parisi
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=dad3241 ]

MINIFI-363: Set format macro declaration to avoid issues from GLIBC

This closes #123

Signed-off-by: Bin Qiu 


> Set format macros before inclusion of inttypes.h
> 
>
> Key: MINIFI-363
> URL: https://issues.apache.org/jira/browse/MINIFI-363
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> Set format macros before inclusion of inttypes.h



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-363) Set format macros before inclusion of inttypes.h

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111707#comment-16111707
 ] 

ASF GitHub Bot commented on MINIFI-363:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/123


> Set format macros before inclusion of inttypes.h
> 
>
> Key: MINIFI-363
> URL: https://issues.apache.org/jira/browse/MINIFI-363
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> Set format macros before inclusion of inttypes.h



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


nifi-minifi-cpp git commit: MINIFI-363: Set format macro declaration to avoid issues from GLIBC

2017-08-02 Thread bqiu
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 8389c8aa8 -> dad324142


MINIFI-363: Set format macro declaration to avoid issues from GLIBC

This closes #123

Signed-off-by: Bin Qiu 


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/dad32414
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/dad32414
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/dad32414

Branch: refs/heads/master
Commit: dad32414298864996ed0571f5611d483ae7de574
Parents: 8389c8a
Author: Marc Parisi 
Authored: Tue Aug 1 13:39:15 2017 -0400
Committer: Bin Qiu 
Committed: Wed Aug 2 13:50:34 2017 -0700

--
 libminifi/src/utils/Id.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/dad32414/libminifi/src/utils/Id.cpp
--
diff --git a/libminifi/src/utils/Id.cpp b/libminifi/src/utils/Id.cpp
index e74652e..ee6d84d 100644
--- a/libminifi/src/utils/Id.cpp
+++ b/libminifi/src/utils/Id.cpp
@@ -17,7 +17,7 @@
  */
 
 #include "utils/Id.h"
-
+#define __STDC_FORMAT_MACROS 1
 #include 
 #include 
 



[jira] [Resolved] (MINIFI-349) Use multiple stages for docker build

2017-08-02 Thread Andrew Christianson (JIRA)

 [ 
https://issues.apache.org/jira/browse/MINIFI-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Christianson resolved MINIFI-349.

Resolution: Fixed

> Use multiple stages for docker build
> 
>
> Key: MINIFI-349
> URL: https://issues.apache.org/jira/browse/MINIFI-349
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Separate the docker build into two stages. This will allow us to install all 
> compilers and development dependencies only into the build stage, then build 
> a final runtime stage which is free from bloat.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-350) Create integration tests for cpp docker image

2017-08-02 Thread Andrew Christianson (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111065#comment-16111065
 ] 

Andrew Christianson commented on MINIFI-350:


Initial pytest tests show much better portability and flexibility. Currently 
migrating from using HTTP to input/output test data to using volumes/FS events 
because communicating from host to container requires special firewall rules 
and also introduces race conditions (waiting for HTTP server to start up).

> Create integration tests for cpp docker image
> -
>
> Key: MINIFI-350
> URL: https://issues.apache.org/jira/browse/MINIFI-350
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Create a unit test suite which uses compose or docker commands to set up 
> minifi using the docker image and send data through test flows. Consider 
> looking into existing test frameworks/harnesses.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-363) Set format macros before inclusion of inttypes.h

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111062#comment-16111062
 ] 

ASF GitHub Bot commented on MINIFI-363:
---

Github user benqiu2016 commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/123
  
@phrocker the CI build is failing.


> Set format macros before inclusion of inttypes.h
> 
>
> Key: MINIFI-363
> URL: https://issues.apache.org/jira/browse/MINIFI-363
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> Set format macros before inclusion of inttypes.h



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111051#comment-16111051
 ] 

ASF subversion and git services commented on MINIFI-311:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-349) Use multiple stages for docker build

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111054#comment-16111054
 ] 

ASF subversion and git services commented on MINIFI-349:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Use multiple stages for docker build
> 
>
> Key: MINIFI-349
> URL: https://issues.apache.org/jira/browse/MINIFI-349
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Reporter: Andrew Christianson
>Assignee: Andrew Christianson
>
> Separate the docker build into two stages. This will allow us to install all 
> compilers and development dependencies only into the build stage, then build 
> a final runtime stage which is free from bloat.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111055#comment-16111055
 ] 

ASF GitHub Bot commented on MINIFI-311:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/118


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111056#comment-16111056
 ] 

ASF subversion and git services commented on MINIFI-311:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111050#comment-16111050
 ] 

ASF subversion and git services commented on MINIFI-311:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-312) spdlog compilation failure in Alpine linux

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111058#comment-16111058
 ] 

ASF subversion and git services commented on MINIFI-312:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> spdlog compilation failure in Alpine linux
> --
>
> Key: MINIFI-312
> URL: https://issues.apache.org/jira/browse/MINIFI-312
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> When trying to build an alpine-based minifi-cpp image, I ran into the 
> following:
> https://github.com/foonathan/standardese/issues/55
> We could probably mitigate this by upgrading to latest spdlog.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111052#comment-16111052
 ] 

ASF subversion and git services commented on MINIFI-311:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111053#comment-16111053
 ] 

ASF subversion and git services commented on MINIFI-311:


Commit 8389c8aa827118e5a8d605f0def6b1e4727efa90 in nifi-minifi-cpp's branch 
refs/heads/master from [~achristianson]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=8389c8a ]

MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[2/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h
--
diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h 
b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h
new file mode 100644
index 000..64c949b
--- /dev/null
+++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/format.h
@@ -0,0 +1,4501 @@
+/*
+ Formatting library for C++
+
+ Copyright (c) 2012 - 2016, Victor Zverovich
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FMT_FORMAT_H_
+#define FMT_FORMAT_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef _SECURE_SCL
+# define FMT_SECURE_SCL _SECURE_SCL
+#else
+# define FMT_SECURE_SCL 0
+#endif
+
+#if FMT_SECURE_SCL
+# include 
+#endif
+
+#ifdef _MSC_VER
+# define FMT_MSC_VER _MSC_VER
+#else
+# define FMT_MSC_VER 0
+#endif
+
+#if FMT_MSC_VER && FMT_MSC_VER <= 1500
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+typedef __int64  intmax_t;
+#else
+#include 
+#endif
+
+#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
+# ifdef FMT_EXPORT
+#  define FMT_API __declspec(dllexport)
+# elif defined(FMT_SHARED)
+#  define FMT_API __declspec(dllimport)
+# endif
+#endif
+#ifndef FMT_API
+# define FMT_API
+#endif
+
+#ifdef __GNUC__
+# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
+# define FMT_GCC_EXTENSION __extension__
+# if FMT_GCC_VERSION >= 406
+#  pragma GCC diagnostic push
+// Disable the warning about "long long" which is sometimes reported even
+// when using __extension__.
+#  pragma GCC diagnostic ignored "-Wlong-long"
+// Disable the warning about declaration shadowing because it affects too
+// many valid cases.
+#  pragma GCC diagnostic ignored "-Wshadow"
+// Disable the warning about implicit conversions that may change the sign of
+// an integer; silencing it otherwise would require many explicit casts.
+#  pragma GCC diagnostic ignored "-Wsign-conversion"
+# endif
+# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
+#  define FMT_HAS_GXX_CXX11 1
+# endif
+#else
+# define FMT_GCC_EXTENSION
+#endif
+
+#if defined(__INTEL_COMPILER)
+# define FMT_ICC_VERSION __INTEL_COMPILER
+#elif defined(__ICL)
+# define FMT_ICC_VERSION __ICL
+#endif
+
+#if defined(__clang__) && !defined(FMT_ICC_VERSION)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
+# pragma clang diagnostic ignored "-Wpadded"
+#endif
+
+#ifdef __GNUC_LIBSTD__
+# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100 + 
__GNUC_LIBSTD_MINOR__)
+#endif
+
+#ifdef __has_feature
+# define FMT_HAS_FEATURE(x) __has_feature(x)
+#else
+# define FMT_HAS_FEATURE(x) 0
+#endif
+
+#ifdef __has_builtin
+# define FMT_HAS_BUILTIN(x) __has_builtin(x)
+#else
+# define FMT_HAS_BUILTIN(x) 0
+#endif
+
+#ifdef __has_cpp_attribute
+# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
+#else
+# define FMT_HAS_CPP_ATTRIBUTE(x) 0
+#endif
+
+#ifndef FMT_USE_VARIADIC_TEMPLATES
+// Variadic templates are available in GCC since version 4.4
+// (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++
+// since version 2013.
+# define FMT_USE_VARIADIC_TEMPLATES \
+   (FMT_HAS_FEATURE(cxx_variadic_templates) || \
+   (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800)
+#endif
+
+#ifndef FMT_USE_RVALUE_REFERENCES
+// Don't use rvalue references when compiling with clang and an old libstdc++
+// as the latter doesn't provide std::move.
+# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402
+#  define 

[6/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/format.h
--
diff --git a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/format.h 
b/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/format.h
deleted file mode 100644
index 64c949b..000
--- a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/format.h
+++ /dev/null
@@ -1,4501 +0,0 @@
-/*
- Formatting library for C++
-
- Copyright (c) 2012 - 2016, Victor Zverovich
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FMT_FORMAT_H_
-#define FMT_FORMAT_H_
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#ifdef _SECURE_SCL
-# define FMT_SECURE_SCL _SECURE_SCL
-#else
-# define FMT_SECURE_SCL 0
-#endif
-
-#if FMT_SECURE_SCL
-# include 
-#endif
-
-#ifdef _MSC_VER
-# define FMT_MSC_VER _MSC_VER
-#else
-# define FMT_MSC_VER 0
-#endif
-
-#if FMT_MSC_VER && FMT_MSC_VER <= 1500
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-typedef __int64  intmax_t;
-#else
-#include 
-#endif
-
-#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
-# ifdef FMT_EXPORT
-#  define FMT_API __declspec(dllexport)
-# elif defined(FMT_SHARED)
-#  define FMT_API __declspec(dllimport)
-# endif
-#endif
-#ifndef FMT_API
-# define FMT_API
-#endif
-
-#ifdef __GNUC__
-# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
-# define FMT_GCC_EXTENSION __extension__
-# if FMT_GCC_VERSION >= 406
-#  pragma GCC diagnostic push
-// Disable the warning about "long long" which is sometimes reported even
-// when using __extension__.
-#  pragma GCC diagnostic ignored "-Wlong-long"
-// Disable the warning about declaration shadowing because it affects too
-// many valid cases.
-#  pragma GCC diagnostic ignored "-Wshadow"
-// Disable the warning about implicit conversions that may change the sign of
-// an integer; silencing it otherwise would require many explicit casts.
-#  pragma GCC diagnostic ignored "-Wsign-conversion"
-# endif
-# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
-#  define FMT_HAS_GXX_CXX11 1
-# endif
-#else
-# define FMT_GCC_EXTENSION
-#endif
-
-#if defined(__INTEL_COMPILER)
-# define FMT_ICC_VERSION __INTEL_COMPILER
-#elif defined(__ICL)
-# define FMT_ICC_VERSION __ICL
-#endif
-
-#if defined(__clang__) && !defined(FMT_ICC_VERSION)
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
-# pragma clang diagnostic ignored "-Wpadded"
-#endif
-
-#ifdef __GNUC_LIBSTD__
-# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100 + 
__GNUC_LIBSTD_MINOR__)
-#endif
-
-#ifdef __has_feature
-# define FMT_HAS_FEATURE(x) __has_feature(x)
-#else
-# define FMT_HAS_FEATURE(x) 0
-#endif
-
-#ifdef __has_builtin
-# define FMT_HAS_BUILTIN(x) __has_builtin(x)
-#else
-# define FMT_HAS_BUILTIN(x) 0
-#endif
-
-#ifdef __has_cpp_attribute
-# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
-#else
-# define FMT_HAS_CPP_ATTRIBUTE(x) 0
-#endif
-
-#ifndef FMT_USE_VARIADIC_TEMPLATES
-// Variadic templates are available in GCC since version 4.4
-// (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++
-// since version 2013.
-# define FMT_USE_VARIADIC_TEMPLATES \
-   (FMT_HAS_FEATURE(cxx_variadic_templates) || \
-   (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800)
-#endif
-
-#ifndef FMT_USE_RVALUE_REFERENCES
-// Don't use rvalue references when compiling with clang and an old libstdc++
-// as the latter doesn't provide std::move.
-# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402
-#  define 

[1/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 7ecdafa98 -> 8389c8aa8


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc
--
diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc 
b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc
new file mode 100644
index 000..bcb67fe
--- /dev/null
+++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.cc
@@ -0,0 +1,43 @@
+/*
+ Formatting library for C++ - std::ostream support
+
+ Copyright (c) 2012 - 2016, Victor Zverovich
+ All rights reserved.
+
+ For the license information refer to format.h.
+ */
+
+#include "ostream.h"
+
+namespace fmt {
+
+namespace {
+// Write the content of w to os.
+void write(std::ostream , Writer ) {
+  const char *data = w.data();
+  typedef internal::MakeUnsigned::Type UnsignedStreamSize;
+  UnsignedStreamSize size = w.size();
+  UnsignedStreamSize max_size =
+  internal::to_unsigned((std::numeric_limits::max)());
+  do {
+UnsignedStreamSize n = size <= max_size ? size : max_size;
+os.write(data, static_cast(n));
+data += n;
+size -= n;
+  } while (size != 0);
+}
+}
+
+FMT_FUNC void print(std::ostream , CStringRef format_str, ArgList args) {
+  MemoryWriter w;
+  w.write(format_str, args);
+  write(os, w);
+}
+
+FMT_FUNC int fprintf(std::ostream , CStringRef format, ArgList args) {
+  MemoryWriter w;
+  printf(w, format, args);
+  write(os, w);
+  return static_cast(w.size());
+}
+}  // namespace fmt

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h
--
diff --git a/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h 
b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h
new file mode 100644
index 000..c52646d
--- /dev/null
+++ b/thirdparty/spdlog-20170710/include/spdlog/fmt/bundled/ostream.h
@@ -0,0 +1,126 @@
+/*
+ Formatting library for C++ - std::ostream support
+
+ Copyright (c) 2012 - 2016, Victor Zverovich
+ All rights reserved.
+
+ For the license information refer to format.h.
+ */
+
+#ifndef FMT_OSTREAM_H_
+#define FMT_OSTREAM_H_
+
+#include "format.h"
+#include 
+
+namespace fmt
+{
+
+namespace internal
+{
+
+template 
+class FormatBuf : public std::basic_streambuf
+{
+private:
+typedef typename std::basic_streambuf::int_type int_type;
+typedef typename std::basic_streambuf::traits_type traits_type;
+
+Buffer _;
+Char *start_;
+
+public:
+FormatBuf(Buffer ) : buffer_(buffer), start_([0])
+{
+this->setp(start_, start_ + buffer_.capacity());
+}
+
+int_type overflow(int_type ch = traits_type::eof())
+{
+if (!traits_type::eq_int_type(ch, traits_type::eof()))
+{
+size_t buf_size = size();
+buffer_.resize(buf_size);
+buffer_.reserve(buf_size * 2);
+
+start_ = _[0];
+start_[buf_size] = traits_type::to_char_type(ch);
+this->setp(start_+ buf_size + 1, start_ + buf_size * 2);
+}
+return ch;
+}
+
+size_t size() const
+{
+return to_unsigned(this->pptr() - start_);
+}
+};
+
+Yes (std::ostream &);
+
+struct DummyStream : std::ostream
+{
+DummyStream();  // Suppress a bogus warning in MSVC.
+// Hide all operator<< overloads from std::ostream.
+void operator<<(Null<>);
+};
+
+No <<(std::ostream &, int);
+
+template
+struct ConvertToIntImpl
+{
+// Convert to int only if T doesn't have an overloaded operator<<.
+enum
+{
+value = sizeof(convert(get() << get())) == sizeof(No)
+};
+};
+}  // namespace internal
+
+// Formats a value.
+template 
+void format(BasicFormatter ,
+const Char *_str, const T )
+{
+internal::MemoryBuffer buffer;
+
+internal::FormatBuf format_buf(buffer);
+std::basic_ostream output(_buf);
+output << value;
+
+BasicStringRef str([0], format_buf.size());
+typedef internal::MakeArg< BasicFormatter > MakeArg;
+format_str = f.format(format_str, MakeArg(str));
+}
+
+/**
+  \rst
+  Prints formatted data to the stream *os*.
+
+  **Example**::
+
+print(cerr, "Don't {}!", "panic");
+  \endrst
+ */
+FMT_API void print(std::ostream , CStringRef format_str, ArgList args);
+FMT_VARIADIC(void, print, std::ostream &, CStringRef)
+
+/**
+  \rst
+  Prints formatted data to the stream *os*.
+
+  **Example**::
+
+fprintf(cerr, "Don't %s!", "panic");
+  \endrst
+ */
+FMT_API int fprintf(std::ostream , CStringRef format_str, ArgList args);
+FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef)
+}  // namespace fmt
+
+#ifdef FMT_HEADER_ONLY
+# include "ostream.cc"
+#endif
+
+#endif  // FMT_OSTREAM_H_


[7/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-0.13.0/include/spdlog/details/pattern_formatter_impl.h
--
diff --git 
a/thirdparty/spdlog-0.13.0/include/spdlog/details/pattern_formatter_impl.h 
b/thirdparty/spdlog-0.13.0/include/spdlog/details/pattern_formatter_impl.h
deleted file mode 100644
index 70b9dc8..000
--- a/thirdparty/spdlog-0.13.0/include/spdlog/details/pattern_formatter_impl.h
+++ /dev/null
@@ -1,670 +0,0 @@
-//
-// Copyright(c) 2015 Gabi Melman.
-// Distributed under the MIT License (http://opensource.org/licenses/MIT)
-//
-
-#pragma once
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-namespace spdlog
-{
-namespace details
-{
-class flag_formatter
-{
-public:
-virtual ~flag_formatter()
-{}
-virtual void format(details::log_msg& msg, const std::tm& tm_time) = 0;
-};
-
-///
-// name & level pattern appenders
-///
-namespace
-{
-class name_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm&) override
-{
-msg.formatted << *msg.logger_name;
-}
-};
-}
-
-// log level appender
-class level_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm&) override
-{
-msg.formatted << level::to_str(msg.level);
-}
-};
-
-// short log level appender
-class short_level_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm&) override
-{
-msg.formatted << level::to_short_str(msg.level);
-}
-};
-
-///
-// Date time pattern appenders
-///
-
-static const char* ampm(const tm& t)
-{
-return t.tm_hour >= 12 ? "PM" : "AM";
-}
-
-static int to12h(const tm& t)
-{
-return t.tm_hour > 12 ? t.tm_hour - 12 : t.tm_hour;
-}
-
-//Abbreviated weekday name
-using days_array = std::array;
-static const days_array& days()
-{
-static const days_array arr{ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", 
"Sat" } };
-return arr;
-}
-class a_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << days()[tm_time.tm_wday];
-}
-};
-
-//Full weekday name
-static const days_array& full_days()
-{
-static const days_array arr{ { "Sunday", "Monday", "Tuesday", "Wednesday", 
"Thursday", "Friday", "Saturday" } };
-return arr;
-}
-class A_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << full_days()[tm_time.tm_wday];
-}
-};
-
-//Abbreviated month
-using months_array = std::array;
-static const months_array& months()
-{
-static const months_array arr{ { "Jan", "Feb", "Mar", "Apr", "May", 
"June", "July", "Aug", "Sept", "Oct", "Nov", "Dec" } };
-return arr;
-}
-class b_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << months()[tm_time.tm_mon];
-}
-};
-
-//Full month name
-static const months_array& full_months()
-{
-static const months_array arr{ { "January", "February", "March", "April", 
"May", "June", "July", "August", "September", "October", "November", "December" 
} };
-return arr;
-}
-class B_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << full_months()[tm_time.tm_mon];
-}
-};
-
-
-//write 2 ints seperated by sep with padding of 2
-static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, 
char sep)
-{
-w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0');
-return w;
-}
-
-//write 3 ints seperated by sep with padding of 2
-static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, int 
v3, char sep)
-{
-w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0') << sep << 
fmt::pad(v3, 2, '0');
-return w;
-}
-
-
-//Date and time representation (Thu Aug 23 15:35:46 2014)
-class c_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << days()[tm_time.tm_wday] << ' ' << 
months()[tm_time.tm_mon] << ' ' << tm_time.tm_mday << ' ';
-pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, 
tm_time.tm_sec, ':') << ' ' << tm_time.tm_year + 1900;
-}
-};
-
-
-// year - 2 digit
-class C_formatter:public flag_formatter
-{
-void format(details::log_msg& msg, const std::tm& tm_time) override
-{
-msg.formatted << 

[3/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h
--
diff --git 
a/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h 
b/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h
new file mode 100644
index 000..c1ce719
--- /dev/null
+++ b/thirdparty/spdlog-20170710/include/spdlog/details/pattern_formatter_impl.h
@@ -0,0 +1,690 @@
+//
+// Copyright(c) 2015 Gabi Melman.
+// Distributed under the MIT License (http://opensource.org/licenses/MIT)
+//
+
+#pragma once
+
+#include "spdlog/formatter.h"
+#include "spdlog/details/log_msg.h"
+#include "spdlog/details/os.h"
+#include "spdlog/fmt/fmt.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace spdlog
+{
+namespace details
+{
+class flag_formatter
+{
+public:
+virtual ~flag_formatter()
+{}
+virtual void format(details::log_msg& msg, const std::tm& tm_time) = 0;
+};
+
+///
+// name & level pattern appenders
+///
+namespace
+{
+class name_formatter:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm&) override
+{
+msg.formatted << *msg.logger_name;
+}
+};
+}
+
+// log level appender
+class level_formatter:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm&) override
+{
+msg.formatted << level::to_str(msg.level);
+}
+};
+
+// short log level appender
+class short_level_formatter:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm&) override
+{
+msg.formatted << level::to_short_str(msg.level);
+}
+};
+
+///
+// Date time pattern appenders
+///
+
+static const char* ampm(const tm& t)
+{
+return t.tm_hour >= 12 ? "PM" : "AM";
+}
+
+static int to12h(const tm& t)
+{
+return t.tm_hour > 12 ? t.tm_hour - 12 : t.tm_hour;
+}
+
+//Abbreviated weekday name
+using days_array = std::array;
+static const days_array& days()
+{
+static const days_array arr{ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", 
"Sat" } };
+return arr;
+}
+class a_formatter:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm& tm_time) override
+{
+msg.formatted << days()[tm_time.tm_wday];
+}
+};
+// message counter formatter
+class i_formatter SPDLOG_FINAL:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm&) override
+{
+msg.formatted << '#' << msg.msg_id;
+}
+};
+//Full weekday name
+static const days_array& full_days()
+{
+static const days_array arr{ { "Sunday", "Monday", "Tuesday", "Wednesday", 
"Thursday", "Friday", "Saturday" } };
+return arr;
+}
+class A_formatter SPDLOG_FINAL :public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm& tm_time) override
+{
+msg.formatted << full_days()[tm_time.tm_wday];
+}
+};
+
+//Abbreviated month
+using months_array = std::array;
+static const months_array& months()
+{
+static const months_array arr{ { "Jan", "Feb", "Mar", "Apr", "May", 
"June", "July", "Aug", "Sept", "Oct", "Nov", "Dec" } };
+return arr;
+}
+class b_formatter:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm& tm_time) override
+{
+msg.formatted << months()[tm_time.tm_mon];
+}
+};
+
+//Full month name
+static const months_array& full_months()
+{
+static const months_array arr{ { "January", "February", "March", "April", 
"May", "June", "July", "August", "September", "October", "November", "December" 
} };
+return arr;
+}
+class B_formatter SPDLOG_FINAL :public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm& tm_time) override
+{
+msg.formatted << full_months()[tm_time.tm_mon];
+}
+};
+
+
+//write 2 ints seperated by sep with padding of 2
+static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, 
char sep)
+{
+w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0');
+return w;
+}
+
+//write 3 ints seperated by sep with padding of 2
+static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, int 
v3, char sep)
+{
+w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0') << sep << 
fmt::pad(v3, 2, '0');
+return w;
+}
+
+
+//Date and time representation (Thu Aug 23 15:35:46 2014)
+class c_formatter SPDLOG_FINAL:public flag_formatter
+{
+void format(details::log_msg& msg, const std::tm& tm_time) override
+{
+msg.formatted << days()[tm_time.tm_wday] << ' ' << 
months()[tm_time.tm_mon] << ' 

[8/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
MINIFI-311 upgraded spdlog to snapshot of master
MINIFI-311 ported dockerfile to alpine
MINIFI-311 allow warnings on Linux for compatibility with Alpine
MINIFI-311 fixed spdlog path in BuildTests cmake file
MINIFI-349 moved to multi-stage docker build
MINIFI-311 removed unneeded dirs from spdlog snapshot
MINIFI-312 Handle spdlog compilation failures in Alpine Linux

This closes #118.

Signed-off-by: Aldrin Piri 


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/8389c8aa
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/8389c8aa
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/8389c8aa

Branch: refs/heads/master
Commit: 8389c8aa827118e5a8d605f0def6b1e4727efa90
Parents: 7ecdafa
Author: Andrew Christianson 
Authored: Tue Jul 11 09:05:33 2017 -0700
Committer: Aldrin Piri 
Committed: Wed Aug 2 10:50:53 2017 -0400

--
 .gitignore  |1 +
 CMakeLists.txt  |2 +-
 cmake/BuildTests.cmake  |2 +-
 docker/Dockerfile   |   62 +-
 libminifi/CMakeLists.txt|4 +-
 main/CMakeLists.txt |2 +-
 thirdparty/civetweb-1.9.1/CMakeLists.txt|2 +-
 thirdparty/spdlog-0.13.0/.gitignore |   64 -
 thirdparty/spdlog-0.13.0/CMakeLists.txt |   87 -
 thirdparty/spdlog-0.13.0/INSTALL|   13 -
 thirdparty/spdlog-0.13.0/LICENSE|   22 -
 thirdparty/spdlog-0.13.0/README.md  |  218 -
 thirdparty/spdlog-0.13.0/astyle.sh  |5 -
 thirdparty/spdlog-0.13.0/cmake/Config.cmake.in  |   24 -
 thirdparty/spdlog-0.13.0/cmake/spdlog.pc.in |6 -
 .../spdlog-0.13.0/include/spdlog/async_logger.h |   82 -
 .../spdlog-0.13.0/include/spdlog/common.h   |  143 -
 .../include/spdlog/details/async_log_helper.h   |  391 --
 .../include/spdlog/details/async_logger_impl.h  |  102 -
 .../include/spdlog/details/file_helper.h|  118 -
 .../include/spdlog/details/log_msg.h|   46 -
 .../include/spdlog/details/logger_impl.h|  296 --
 .../include/spdlog/details/mpmc_bounded_q.h |  172 -
 .../include/spdlog/details/null_mutex.h |   45 -
 .../spdlog-0.13.0/include/spdlog/details/os.h   |  406 --
 .../spdlog/details/pattern_formatter_impl.h |  670 ---
 .../include/spdlog/details/registry.h   |  185 -
 .../include/spdlog/details/spdlog_impl.h|  245 -
 .../spdlog-0.13.0/include/spdlog/dummy.cpp  |   22 -
 .../include/spdlog/fmt/bundled/format.cc|  940 
 .../include/spdlog/fmt/bundled/format.h | 4501 --
 .../include/spdlog/fmt/bundled/ostream.cc   |   43 -
 .../include/spdlog/fmt/bundled/ostream.h|  126 -
 .../include/spdlog/fmt/bundled/posix.cc |  238 -
 .../include/spdlog/fmt/bundled/posix.h  |  443 --
 .../include/spdlog/fmt/bundled/time.h   |   58 -
 .../spdlog-0.13.0/include/spdlog/fmt/fmt.h  |   28 -
 .../spdlog-0.13.0/include/spdlog/fmt/ostr.h |   17 -
 .../spdlog-0.13.0/include/spdlog/formatter.h|   45 -
 .../spdlog-0.13.0/include/spdlog/logger.h   |   94 -
 .../include/spdlog/sinks/android_sink.h |   75 -
 .../include/spdlog/sinks/ansicolor_sink.h   |  116 -
 .../include/spdlog/sinks/base_sink.h|   45 -
 .../include/spdlog/sinks/dist_sink.h|   71 -
 .../include/spdlog/sinks/file_sinks.h   |  239 -
 .../include/spdlog/sinks/msvc_sink.h|   50 -
 .../include/spdlog/sinks/null_sink.h|   34 -
 .../include/spdlog/sinks/ostream_sink.h |   47 -
 .../spdlog-0.13.0/include/spdlog/sinks/sink.h   |   53 -
 .../include/spdlog/sinks/stdout_sinks.h |   77 -
 .../include/spdlog/sinks/syslog_sink.h  |   81 -
 .../include/spdlog/sinks/wincolor_sink.h|  116 -
 .../spdlog-0.13.0/include/spdlog/spdlog.h   |  178 -
 .../spdlog-0.13.0/include/spdlog/tweakme.h  |  108 -
 thirdparty/spdlog-20170710/.gitignore   |   64 +
 thirdparty/spdlog-20170710/CMakeLists.txt   |   87 +
 thirdparty/spdlog-20170710/INSTALL  |   13 +
 thirdparty/spdlog-20170710/LICENSE  |   22 +
 thirdparty/spdlog-20170710/README.md|  223 +
 thirdparty/spdlog-20170710/astyle.sh|5 +
 .../spdlog-20170710/cmake/Config.cmake.in   |   24 +
 thirdparty/spdlog-20170710/cmake/spdlog.pc.in   |6 +
 .../include/spdlog/async_logger.h   |   82 +
 .../spdlog-20170710/include/spdlog/common.h |  157 +
 .../include/spdlog/details/async_log_helper.h   |  399 ++
 .../include/spdlog/details/async_logger_impl.h  |  105 +
 .../include/spdlog/details/file_helper.h|  

[5/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.cc
--
diff --git a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.cc 
b/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.cc
deleted file mode 100644
index bcb67fe..000
--- a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- Formatting library for C++ - std::ostream support
-
- Copyright (c) 2012 - 2016, Victor Zverovich
- All rights reserved.
-
- For the license information refer to format.h.
- */
-
-#include "ostream.h"
-
-namespace fmt {
-
-namespace {
-// Write the content of w to os.
-void write(std::ostream , Writer ) {
-  const char *data = w.data();
-  typedef internal::MakeUnsigned::Type UnsignedStreamSize;
-  UnsignedStreamSize size = w.size();
-  UnsignedStreamSize max_size =
-  internal::to_unsigned((std::numeric_limits::max)());
-  do {
-UnsignedStreamSize n = size <= max_size ? size : max_size;
-os.write(data, static_cast(n));
-data += n;
-size -= n;
-  } while (size != 0);
-}
-}
-
-FMT_FUNC void print(std::ostream , CStringRef format_str, ArgList args) {
-  MemoryWriter w;
-  w.write(format_str, args);
-  write(os, w);
-}
-
-FMT_FUNC int fprintf(std::ostream , CStringRef format, ArgList args) {
-  MemoryWriter w;
-  printf(w, format, args);
-  write(os, w);
-  return static_cast(w.size());
-}
-}  // namespace fmt

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.h
--
diff --git a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.h 
b/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.h
deleted file mode 100644
index c52646d..000
--- a/thirdparty/spdlog-0.13.0/include/spdlog/fmt/bundled/ostream.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- Formatting library for C++ - std::ostream support
-
- Copyright (c) 2012 - 2016, Victor Zverovich
- All rights reserved.
-
- For the license information refer to format.h.
- */
-
-#ifndef FMT_OSTREAM_H_
-#define FMT_OSTREAM_H_
-
-#include "format.h"
-#include 
-
-namespace fmt
-{
-
-namespace internal
-{
-
-template 
-class FormatBuf : public std::basic_streambuf
-{
-private:
-typedef typename std::basic_streambuf::int_type int_type;
-typedef typename std::basic_streambuf::traits_type traits_type;
-
-Buffer _;
-Char *start_;
-
-public:
-FormatBuf(Buffer ) : buffer_(buffer), start_([0])
-{
-this->setp(start_, start_ + buffer_.capacity());
-}
-
-int_type overflow(int_type ch = traits_type::eof())
-{
-if (!traits_type::eq_int_type(ch, traits_type::eof()))
-{
-size_t buf_size = size();
-buffer_.resize(buf_size);
-buffer_.reserve(buf_size * 2);
-
-start_ = _[0];
-start_[buf_size] = traits_type::to_char_type(ch);
-this->setp(start_+ buf_size + 1, start_ + buf_size * 2);
-}
-return ch;
-}
-
-size_t size() const
-{
-return to_unsigned(this->pptr() - start_);
-}
-};
-
-Yes (std::ostream &);
-
-struct DummyStream : std::ostream
-{
-DummyStream();  // Suppress a bogus warning in MSVC.
-// Hide all operator<< overloads from std::ostream.
-void operator<<(Null<>);
-};
-
-No <<(std::ostream &, int);
-
-template
-struct ConvertToIntImpl
-{
-// Convert to int only if T doesn't have an overloaded operator<<.
-enum
-{
-value = sizeof(convert(get() << get())) == sizeof(No)
-};
-};
-}  // namespace internal
-
-// Formats a value.
-template 
-void format(BasicFormatter ,
-const Char *_str, const T )
-{
-internal::MemoryBuffer buffer;
-
-internal::FormatBuf format_buf(buffer);
-std::basic_ostream output(_buf);
-output << value;
-
-BasicStringRef str([0], format_buf.size());
-typedef internal::MakeArg< BasicFormatter > MakeArg;
-format_str = f.format(format_str, MakeArg(str));
-}
-
-/**
-  \rst
-  Prints formatted data to the stream *os*.
-
-  **Example**::
-
-print(cerr, "Don't {}!", "panic");
-  \endrst
- */
-FMT_API void print(std::ostream , CStringRef format_str, ArgList args);
-FMT_VARIADIC(void, print, std::ostream &, CStringRef)
-
-/**
-  \rst
-  Prints formatted data to the stream *os*.
-
-  **Example**::
-
-fprintf(cerr, "Don't %s!", "panic");
-  \endrst
- */
-FMT_API int fprintf(std::ostream , CStringRef format_str, ArgList args);
-FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef)
-}  // namespace fmt
-
-#ifdef FMT_HEADER_ONLY
-# include "ostream.cc"
-#endif
-
-#endif  // FMT_OSTREAM_H_


[4/8] nifi-minifi-cpp git commit: MINIFI-311 upgraded spdlog to snapshot of master MINIFI-311 ported dockerfile to alpine MINIFI-311 allow warnings on Linux for compatibility with Alpine MINIFI-311 fi

2017-08-02 Thread aldrin
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/8389c8aa/thirdparty/spdlog-20170710/README.md
--
diff --git a/thirdparty/spdlog-20170710/README.md 
b/thirdparty/spdlog-20170710/README.md
new file mode 100644
index 000..e3ae7e0
--- /dev/null
+++ b/thirdparty/spdlog-20170710/README.md
@@ -0,0 +1,223 @@
+# spdlog
+
+Very fast, header only, C++ logging library. [![Build 
Status](https://travis-ci.org/gabime/spdlog.svg?branch=master)](https://travis-ci.org/gabime/spdlog)
 [![Build 
status](https://ci.appveyor.com/api/projects/status/d2jnxclg20vd0o50?svg=true)](https://ci.appveyor.com/project/gabime/spdlog)
+
+
+## Install
+ Just copy the headers:
+
+* Copy the source 
[folder](https://github.com/gabime/spdlog/tree/master/include/spdlog) to your 
build tree and use a C++11 compiler.
+
+ Or use your favourite package manager:
+
+* Ubuntu: `apt-get install libspdlog-dev`
+* Homebrew: `brew install spdlog`
+* FreeBSD:  `cd /usr/ports/devel/spdlog/ && make install clean`
+* Fedora: `yum install spdlog`
+* Arch Linux: `pacman -S spdlog-git`
+* vcpkg: `vcpkg install spdlog`
+ 
+
+## Platforms
+ * Linux, FreeBSD, Solaris
+ * Windows (vc 2013+, cygwin/mingw)
+ * Mac OSX (clang 3.5+)
+ * Android
+
+## Features
+* Very fast - performance is the primary goal (see [benchmarks](#benchmarks) 
below).
+* Headers only, just copy and use.
+* Feature rich [call style](#usage-example) using the excellent 
[fmt](https://github.com/fmtlib/fmt) library.
+* Extremely fast asynchronous mode (optional) - using lockfree queues and 
other tricks to reach millions of calls/sec.
+* [Custom](https://github.com/gabime/spdlog/wiki/3.-Custom-formatting) 
formatting.
+* Conditional Logging
+* Multi/Single threaded loggers.
+* Various log targets:
+* Rotating log files.
+* Daily log files.
+* Console logging (colors supported).
+* syslog.
+* Windows debugger (```OutputDebugString(..)```)
+* Easily extendable with custom log targets  (just implement a single 
function in the [sink](include/spdlog/sinks/sink.h) interface).
+* Severity based filtering - threshold levels can be modified in runtime as 
well as in compile time.
+
+
+
+## Benchmarks
+
+Below are some [benchmarks](bench) comparing popular log libraries under 
Ubuntu 64 bit, Intel i7-4770 CPU @ 3.40GHz
+
+ Synchronous mode
+Time needed to log 1,000,000 lines in synchronous mode (in seconds, the best 
of 3 runs):
+
+|threads|boost log 1.54|glog   |easylogging |spdlog|
+|---|:---:|:-:|--:|--:|
+|1|   4.169s  |1.066s |0.975s |0.302s|
+|10| 6.180s   |3.032s |2.857s |0.968s|
+|100| 5.981s  |1.139s |4.512s |0.497s|
+
+
+ Asynchronous mode
+Time needed to log 1,000,000 lines in asynchronous mode, i.e. the time it 
takes to put them in the async queue (in seconds, the best of 3 runs):
+
+|threads|g2log async logger   |spdlog async mode|
+|:---|:-:|-:|
+|1|   1.850s |0.216s |
+|10|  0.943s  |0.173s|
+|100|  0.959s |0.202s|
+
+
+
+
+## Usage Example
+```c++
+
+#include "spdlog/spdlog.h"
+
+#include 
+#include 
+
+void async_example();
+void syslog_example();
+void user_defined_example();
+void err_handler_example();
+
+namespace spd = spdlog;
+int main(int, char*[])
+{
+try
+{
+// Console logger with color
+auto console = spd::stdout_color_mt("console");
+console->info("Welcome to spdlog!");
+console->error("Some error message with arg{}..", 1);
+
+   // Conditional logging example
+auto i = 2;
+console->warn_if(i != 0, "an important message");
+
+// Formatting examples
+console->warn("Easy padding in numbers like {:08d}", 12);
+console->critical("Support for int: {0:d};  hex: {0:x};  oct: {0:o}; 
bin: {0:b}", 42);
+console->info("Support for floats {:03.2f}", 1.23456);
+console->info("Positional args are {1} {0}..", "too", "supported");
+console->info("{:<30}", "left aligned");
+
+
+spd::get("console")->info("loggers can be retrieved from a global 
registry using the spdlog::get(logger_name) function");
+
+// Create basic file logger (not rotated)
+auto my_logger = spd::basic_logger_mt("basic_logger", 
"logs/basic.txt");
+my_logger->info("Some log message");
+
+// Create a file rotating logger with 5mb size max and 3 rotated files
+auto rotating_logger = spd::rotating_logger_mt("some_logger_name", 
"logs/mylogfile", 1048576 * 5, 3);
+for (int i = 0; i < 10; ++i)
+rotating_logger->info("{} * {} equals {:>10}", i, i, i*i);
+
+// Create a daily logger - a new file is created every day on 2:30am
+auto daily_logger = spd::daily_logger_mt("daily_logger", "logs/daily", 
2, 30);
+// trigger flush if the log severity is error or higher
+

[jira] [Updated] (MINIFI-312) spdlog compilation failure in Alpine linux

2017-08-02 Thread Aldrin Piri (JIRA)

 [ 
https://issues.apache.org/jira/browse/MINIFI-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aldrin Piri updated MINIFI-312:
---
Fix Version/s: cpp-0.3.0

> spdlog compilation failure in Alpine linux
> --
>
> Key: MINIFI-312
> URL: https://issues.apache.org/jira/browse/MINIFI-312
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> When trying to build an alpine-based minifi-cpp image, I ran into the 
> following:
> https://github.com/foonathan/standardese/issues/55
> We could probably mitigate this by upgrading to latest spdlog.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111035#comment-16111035
 ] 

ASF GitHub Bot commented on MINIFI-311:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/118
  
hey @achristianson,

everything looks good here. will get this merged in.  thanks for your 
adjustments!


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
> Fix For: cpp-0.3.0
>
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (MINIFI-312) spdlog compilation failure in Alpine linux

2017-08-02 Thread Aldrin Piri (JIRA)

 [ 
https://issues.apache.org/jira/browse/MINIFI-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aldrin Piri reassigned MINIFI-312:
--

Assignee: Andrew Christianson  (was: Aldrin Piri)

> spdlog compilation failure in Alpine linux
> --
>
> Key: MINIFI-312
> URL: https://issues.apache.org/jira/browse/MINIFI-312
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
>
> When trying to build an alpine-based minifi-cpp image, I ran into the 
> following:
> https://github.com/foonathan/standardese/issues/55
> We could probably mitigate this by upgrading to latest spdlog.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (MINIFI-312) spdlog compilation failure in Alpine linux

2017-08-02 Thread Aldrin Piri (JIRA)

 [ 
https://issues.apache.org/jira/browse/MINIFI-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aldrin Piri reassigned MINIFI-312:
--

Assignee: Aldrin Piri

> spdlog compilation failure in Alpine linux
> --
>
> Key: MINIFI-312
> URL: https://issues.apache.org/jira/browse/MINIFI-312
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: Bryan Rosander
>Assignee: Aldrin Piri
>Priority: Minor
>
> When trying to build an alpine-based minifi-cpp image, I ran into the 
> following:
> https://github.com/foonathan/standardese/issues/55
> We could probably mitigate this by upgrading to latest spdlog.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-311) Alpine Linux for MiNiFi CPP Docker images

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110967#comment-16110967
 ] 

ASF GitHub Bot commented on MINIFI-311:
---

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/118
  
reviewing changes


> Alpine Linux for MiNiFi CPP Docker images
> -
>
> Key: MINIFI-311
> URL: https://issues.apache.org/jira/browse/MINIFI-311
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>Reporter: Bryan Rosander
>Assignee: Andrew Christianson
>Priority: Minor
>
> With MiNiFi's goals including being lightweight, it seems logical to try to 
> keep its Docker images as small as feasible.  Moving to alpine-based images 
> is an easy step that reduces the image size quite a bit.
> Another thing that would make the images smaller would be to use an image 
> with build dependencies to perform the build and one without them for the 
> runnable image.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-359) Create tests for PutFile

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110959#comment-16110959
 ] 

ASF GitHub Bot commented on MINIFI-359:
---

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/122
  
+1


> Create tests for PutFile
> 
>
> Key: MINIFI-359
> URL: https://issues.apache.org/jira/browse/MINIFI-359
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: marco polo
>Assignee: marco polo
>
> Need tests for PutFile to avoid regression issues. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MINIFI-363) Set format macros before inclusion of inttypes.h

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110956#comment-16110956
 ] 

ASF GitHub Bot commented on MINIFI-363:
---

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/123
  
+1


> Set format macros before inclusion of inttypes.h
> 
>
> Key: MINIFI-363
> URL: https://issues.apache.org/jira/browse/MINIFI-363
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> Set format macros before inclusion of inttypes.h



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)