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 2018/09/20 15:14:56 UTC

[1/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 8dd5a09db -> 2b0a55e4a


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/tst_uuid.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/tst_uuid.c b/thirdparty/uuid/tst_uuid.c
deleted file mode 100644
index 88d928f..0000000
--- a/thirdparty/uuid/tst_uuid.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * tst_uuid.c --- test program from the UUID library
- *
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
- *
- * %Begin-Header%
- * 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, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * %End-Header%
- */
-
-#include "config.h"
-
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <uuid/uuid.h>
-
-static int test_uuid(const char * uuid, int isValid)
-{
-	static const char * validStr[2] = {"invalid", "valid"};
-	uuid_t uuidBits;
-	int parsedOk;
-
-	parsedOk = uuid_parse(uuid, uuidBits) == 0;
-
-	printf("%s is %s", uuid, validStr[isValid]);
-	if (parsedOk != isValid) {
-		printf(" but uuid_parse says %s\n", validStr[parsedOk]);
-		return 1;
-	}
-	printf(", OK\n");
-	return 0;
-}
-
-#ifdef __GNUC__
-#define ATTR(x) __attribute__(x)
-#else
-#define ATTR(x)
-#endif
-
-int
-main(int argc ATTR((unused)) , char **argv ATTR((unused)))
-{
-	uuid_t		buf, tst;
-	char		str[100];
-	struct timeval	tv;
-	time_t		time_reg, time_gen;
-	unsigned char	*cp;
-	int i;
-	int failed = 0;
-	int type, variant;
-
-	uuid_generate(buf);
-	uuid_unparse(buf, str);
-	printf("UUID generate = %s\n", str);
-	printf("UUID: ");
-	for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
-		printf("%02x", *cp++);
-	}
-	printf("\n");
-	type = uuid_type(buf); 	variant = uuid_variant(buf);
-	printf("UUID type = %d, UUID variant = %d\n", type, variant);
-	if (variant != UUID_VARIANT_DCE) {
-		printf("Incorrect UUID Variant; was expecting DCE!\n");
-		failed++;
-	}
-	printf("\n");
-
-	uuid_generate_random(buf);
-	uuid_unparse(buf, str);
-	printf("UUID random string = %s\n", str);
-	printf("UUID: ");
-	for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
-		printf("%02x", *cp++);
-	}
-	printf("\n");
-	type = uuid_type(buf);
-	variant = uuid_variant(buf);
-	printf("UUID type = %d, UUID variant = %d\n", type, variant);
-	if (variant != UUID_VARIANT_DCE) {
-		printf("Incorrect UUID Variant; was expecting DCE!\n");
-		failed++;
-	}
-	if (type != 4) {
-		printf("Incorrect UUID type; was expecting "
-		       "4 (random type)!\n");
-		failed++;
-	}
-	printf("\n");
-
-	time_gen = time(0);
-	uuid_generate_time(buf);
-	uuid_unparse(buf, str);
-	printf("UUID string = %s\n", str);
-	printf("UUID time: ");
-	for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
-		printf("%02x", *cp++);
-	}
-	printf("\n");
-	type = uuid_type(buf);
-	variant = uuid_variant(buf);
-	printf("UUID type = %d, UUID variant = %d\n", type, variant);
-	if (variant != UUID_VARIANT_DCE) {
-		printf("Incorrect UUID Variant; was expecting DCE!\n");
-		failed++;
-	}
-	if (type != 1) {
-		printf("Incorrect UUID type; was expecting "
-		       "1 (time-based type)!\\n");
-		failed++;
-	}
-
-	tv.tv_sec = 0;
-	tv.tv_usec = 0;
-	time_reg = uuid_time(buf, &tv);
-	printf("UUID generated at %lu reports %lu (%ld.%ld)\n",
-	       time_gen, time_reg, tv.tv_sec, (long)tv.tv_usec);
-	/* allow 1s margin in case of rollover between sampling
-	 * the current time and when the UUID is generated. */
-	if (time_reg > time_gen + 1) {
-		printf("UUID time comparison failed!\n");
-		failed++;
-	} else {
-		printf("UUID time comparison succeeded.\n");
-	}
-
-	if (uuid_parse(str, tst) < 0) {
-		printf("UUID parse failed\n");
-		failed++;
-	}
-	if (!uuid_compare(buf, tst)) {
-		printf("UUID parse and compare succeeded.\n");
-	} else {
-		printf("UUID parse and compare failed!\n");
-		failed++;
-	}
-	uuid_clear(tst);
-	if (uuid_is_null(tst))
-		printf("UUID clear and is null succeeded.\n");
-	else {
-		printf("UUID clear and is null failed!\n");
-		failed++;
-	}
-	uuid_copy(buf, tst);
-	if (!uuid_compare(buf, tst))
-		printf("UUID copy and compare succeeded.\n");
-	else {
-		printf("UUID copy and compare failed!\n");
-		failed++;
-	}
-
-	failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981b", 1);
-	failed += test_uuid("84949CC5-4701-4A84-895B-354C584A981B", 1);
-	failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981bc", 0);
-	failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981", 0);
-	failed += test_uuid("84949cc5x4701-4a84-895b-354c584a981b", 0);
-	failed += test_uuid("84949cc504701-4a84-895b-354c584a981b", 0);
-	failed += test_uuid("84949cc5-470104a84-895b-354c584a981b", 0);
-	failed += test_uuid("84949cc5-4701-4a840895b-354c584a981b", 0);
-	failed += test_uuid("84949cc5-4701-4a84-895b0354c584a981b", 0);
-	failed += test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", 0);
-	failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981g", 0);
-
-	if (failed) {
-		printf("%d failures.\n", failed);
-		exit(1);
-	}
-	return 0;
-}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/unpack.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/unpack.c b/thirdparty/uuid/unpack.c
index 2c8043d..bea3808 100644
--- a/thirdparty/uuid/unpack.c
+++ b/thirdparty/uuid/unpack.c
@@ -36,7 +36,7 @@
 #include <string.h>
 #include "uuidP.h"
 
-void uuid_unpack(const uuid_t in, struct uuid *uu)
+void uuid_unpack(const UUID_FIELD in, struct uuid *uu)
 {
 	const uint8_t	*ptr = in;
 	uint32_t		tmp;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/unparse.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/unparse.c b/thirdparty/uuid/unparse.c
index c556ae6..f695232 100644
--- a/thirdparty/uuid/unparse.c
+++ b/thirdparty/uuid/unparse.c
@@ -49,7 +49,7 @@ static const char *fmt_upper =
 #define FMT_DEFAULT fmt_lower
 #endif
 
-static void uuid_unparse_x(const uuid_t uu, char *out, const char *fmt)
+static void uuid_unparse_x(const UUID_FIELD uu, char *out, const char *fmt)
 {
 	struct uuid uuid;
 
@@ -61,17 +61,17 @@ static void uuid_unparse_x(const uuid_t uu, char *out, const char *fmt)
 		uuid.node[3], uuid.node[4], uuid.node[5]);
 }
 
-void uuid_unparse_lower(const uuid_t uu, char *out)
+void uuid_unparse_lower(const UUID_FIELD uu, char *out)
 {
 	uuid_unparse_x(uu, out,	fmt_lower);
 }
 
-void uuid_unparse_upper(const uuid_t uu, char *out)
+void uuid_unparse_upper(const UUID_FIELD uu, char *out)
 {
 	uuid_unparse_x(uu, out,	fmt_upper);
 }
 
-void uuid_unparse(const uuid_t uu, char *out)
+void uuid_unparse(const UUID_FIELD uu, char *out)
 {
 	uuid_unparse_x(uu, out, FMT_DEFAULT);
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/uuid_time.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/uuid_time.c b/thirdparty/uuid/uuid_time.c
index 97fd335..8061143 100644
--- a/thirdparty/uuid/uuid_time.c
+++ b/thirdparty/uuid/uuid_time.c
@@ -1,5 +1,5 @@
 /*
- * uuid_time.c --- Interpret the time field from a uuid.  This program
+ * m_uuidime.c --- Interpret the time field from a uuid.  This program
  * 	violates the UUID abstraction barrier by reaching into the guts
  *	of a UUID and interpreting it.
  *
@@ -55,9 +55,9 @@
 
 #include "uuidP.h"
 
-time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
+time_t m_uuidime(const UUID_FIELD uu, struct st_tm_val *ret_tv)
 {
-	struct timeval		tv;
+	struct st_tm_val		tv;
 	struct uuid		uuid;
 	uint32_t		high;
 	uint64_t		clock_reg;
@@ -77,7 +77,7 @@ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
 	return tv.tv_sec;
 }
 
-int uuid_type(const uuid_t uu)
+int m_uuidype(const UUID_FIELD uu)
 {
 	struct uuid		uuid;
 
@@ -85,7 +85,7 @@ int uuid_type(const uuid_t uu)
 	return ((uuid.time_hi_and_version >> 12) & 0xF);
 }
 
-int uuid_variant(const uuid_t uu)
+int uuid_variant(const UUID_FIELD uu)
 {
 	struct uuid		uuid;
 	int			var;
@@ -121,9 +121,9 @@ static const char *variant_string(int variant)
 int
 main(int argc, char **argv)
 {
-	uuid_t		buf;
+	UUID_FIELD		buf;
 	time_t		time_reg;
-	struct timeval	tv;
+	struct st_tm_val	tv;
 	int		type, variant;
 
 	if (argc != 2) {
@@ -135,8 +135,8 @@ main(int argc, char **argv)
 		exit(1);
 	}
 	variant = uuid_variant(buf);
-	type = uuid_type(buf);
-	time_reg = uuid_time(buf, &tv);
+	type = m_uuidype(buf);
+	time_reg = m_uuidime(buf, &tv);
 
 	printf("UUID variant is %d (%s)\n", variant, variant_string(variant));
 	if (variant != UUID_VARIANT_DCE) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/exceptions.h
----------------------------------------------------------------------
diff --git a/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/exceptions.h b/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/exceptions.h
index 9c96859..fdafb49 100644
--- a/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/exceptions.h
+++ b/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/exceptions.h
@@ -16,7 +16,7 @@
 // This is here for compatibility with older versions of Visual Studio
 // which don't support noexcept
 #ifdef _MSC_VER
-    #define YAML_CPP_NOEXCEPT _NOEXCEPT
+    #define YAML_CPP_NOEXCEPT 
 #else
     #define YAML_CPP_NOEXCEPT noexcept
 #endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/node/detail/iterator.h
----------------------------------------------------------------------
diff --git a/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/node/detail/iterator.h b/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/node/detail/iterator.h
index 65f8152..dd4bc2b 100644
--- a/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/node/detail/iterator.h
+++ b/thirdparty/yaml-cpp-yaml-cpp-20171024/include/yaml-cpp/node/detail/iterator.h
@@ -8,8 +8,9 @@
 #endif
 
 #include "yaml-cpp/dll.h"
-#include "yaml-cpp/node/ptr.h"
 #include "yaml-cpp/node/detail/node_iterator.h"
+#include "yaml-cpp/node/node.h"
+#include "yaml-cpp/node/ptr.h"
 #include <cstddef>
 #include <iterator>
 
@@ -18,9 +19,11 @@ namespace detail {
 struct iterator_value;
 
 template <typename V>
+class iterator_base  {
+/*
 class iterator_base : public std::iterator<std::forward_iterator_tag, V,
-                                           std::ptrdiff_t, V*, V> {
-
+std::ptrdiff_t, V*, V> {
+*/
  private:
   template <typename>
   friend class iterator_base;
@@ -36,7 +39,12 @@ class iterator_base : public std::iterator<std::forward_iterator_tag, V,
   };
 
  public:
-  typedef typename iterator_base::value_type value_type;
+	 using iterator_category = std::forward_iterator_tag;
+	 using value_type = V;
+	 using difference_type = std::ptrdiff_t;
+	 using pointer = V * ;
+	 using reference = V;
+  //typedef typename iterator_base::value_type value_type;
 
  public:
   iterator_base() : m_iterator(), m_pMemory() {}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/yaml-cpp-yaml-cpp-20171024/src/exceptions.cpp
----------------------------------------------------------------------
diff --git a/thirdparty/yaml-cpp-yaml-cpp-20171024/src/exceptions.cpp b/thirdparty/yaml-cpp-yaml-cpp-20171024/src/exceptions.cpp
index 9b6d891..8133def 100644
--- a/thirdparty/yaml-cpp-yaml-cpp-20171024/src/exceptions.cpp
+++ b/thirdparty/yaml-cpp-yaml-cpp-20171024/src/exceptions.cpp
@@ -3,7 +3,7 @@
 // This is here for compatibility with older versions of Visual Studio
 // which don't support noexcept
 #ifdef _MSC_VER
-    #define YAML_CPP_NOEXCEPT _NOEXCEPT
+    #define YAML_CPP_NOEXCEPT 
 #else
     #define YAML_CPP_NOEXCEPT noexcept
 #endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/zlib/include/zconf.h
----------------------------------------------------------------------
diff --git a/thirdparty/zlib/include/zconf.h b/thirdparty/zlib/include/zconf.h
index 995ad4f..a5e3452 100644
--- a/thirdparty/zlib/include/zconf.h
+++ b/thirdparty/zlib/include/zconf.h
@@ -474,7 +474,7 @@ typedef uLong FAR uLongf;
 #endif
 #ifndef Z_SOLO
 #  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+//#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
 #    ifdef VMS
 #      include <unixio.h>       /* for off_t */
 #    endif


[7/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/controllers/ThreadManagementService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/controllers/ThreadManagementService.h b/libminifi/include/controllers/ThreadManagementService.h
index b297834..76bda72 100644
--- a/libminifi/include/controllers/ThreadManagementService.h
+++ b/libminifi/include/controllers/ThreadManagementService.h
@@ -42,13 +42,13 @@ class ThreadManagementService : public core::controller::ControllerService {
         logger_(logging::LoggerFactory<ThreadManagementService>::getLogger()) {
   }
 
-  explicit ThreadManagementService(const std::string &name, uuid_t uuid = 0)
+  explicit ThreadManagementService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ControllerService(name, uuid),
         logger_(logging::LoggerFactory<ThreadManagementService>::getLogger()) {
   }
 
   explicit ThreadManagementService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : ControllerService(name, nullptr),
+      : ControllerService(name),
         logger_(logging::LoggerFactory<ThreadManagementService>::getLogger()) {
 
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/controllers/UpdatePolicyControllerService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/controllers/UpdatePolicyControllerService.h b/libminifi/include/controllers/UpdatePolicyControllerService.h
index 9ca0cf2..dd50a1c 100644
--- a/libminifi/include/controllers/UpdatePolicyControllerService.h
+++ b/libminifi/include/controllers/UpdatePolicyControllerService.h
@@ -47,7 +47,7 @@ class UpdatePolicyControllerService : public core::controller::ControllerService
         logger_(logging::LoggerFactory<UpdatePolicyControllerService>::getLogger()) {
   }
 
-  explicit UpdatePolicyControllerService(const std::string &name, uuid_t uuid = 0)
+  explicit UpdatePolicyControllerService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ControllerService(name, uuid),
         persist_updates_(false),
         policy_(new state::UpdatePolicy(false)),
@@ -55,7 +55,7 @@ class UpdatePolicyControllerService : public core::controller::ControllerService
   }
 
   explicit UpdatePolicyControllerService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : UpdatePolicyControllerService(name, nullptr) {
+      : UpdatePolicyControllerService(name) {
     setConfiguration(configuration);
     initialize();
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/ClassLoader.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/ClassLoader.h b/libminifi/include/core/ClassLoader.h
index cc8d322..1f5b6d2 100644
--- a/libminifi/include/core/ClassLoader.h
+++ b/libminifi/include/core/ClassLoader.h
@@ -22,7 +22,16 @@
 #include <vector>
 #include <map>
 #include "utils/StringUtils.h"
+#ifndef WIN32
 #include <dlfcn.h>
+#define DLL_EXPORT
+#else
+#define WIN32_LEAN_AND_MEAN 1
+#include <Windows.h>    // Windows specific libraries for collecting software metrics.
+#include <Psapi.h>
+#pragma comment( lib, "psapi.lib" )
+#define DLL_EXPORT __declspec(dllexport)  
+#endif
 #include "core/Core.h"
 #include "io/DataStream.h"
 
@@ -36,6 +45,14 @@ namespace core {
 
 #define RESOURCE_SUCCESS 1
 
+#ifdef WIN32
+#define RTLD_LAZY   0
+#define RTLD_NOW    0
+
+#define RTLD_GLOBAL (1 << 1)
+#define RTLD_LOCAL  (1 << 2)
+#endif
+
 /**
  * Factory that is used as an interface for
  * creating processors from shared objects.
@@ -75,14 +92,14 @@ class ObjectFactory {
   /**
    * Create a shared pointer to a new processor.
    */
-  virtual std::shared_ptr<CoreComponent> create(const std::string &name, uuid_t uuid) {
+  virtual std::shared_ptr<CoreComponent> create(const std::string &name, utils::Identifier & uuid) {
     return nullptr;
   }
 
   /**
    * Create a shared pointer to a new processor.
    */
-  virtual CoreComponent* createRaw(const std::string &name, uuid_t uuid) {
+  virtual CoreComponent* createRaw(const std::string &name, utils::Identifier & uuid) {
     return nullptr;
   }
 
@@ -146,7 +163,7 @@ class DefautObjectFactory : public ObjectFactory {
   /**
    * Create a shared pointer to a new processor.
    */
-  virtual std::shared_ptr<CoreComponent> create(const std::string &name, uuid_t uuid) {
+  virtual std::shared_ptr<CoreComponent> create(const std::string &name, utils::Identifier & uuid) {
     std::shared_ptr<T> ptr = std::make_shared<T>(name, uuid);
     return std::static_pointer_cast<CoreComponent>(ptr);
   }
@@ -162,7 +179,7 @@ class DefautObjectFactory : public ObjectFactory {
   /**
    * Create a shared pointer to a new processor.
    */
-  virtual CoreComponent* createRaw(const std::string &name, uuid_t uuid) {
+  virtual CoreComponent* createRaw(const std::string &name, utils::Identifier &uuid) {
     T *ptr = new T(name, uuid);
     return dynamic_cast<CoreComponent*>(ptr);
   }
@@ -238,12 +255,11 @@ class ClassLoader {
    * Register a class with the give ProcessorFactory
    */
   void registerClass(const std::string &name, std::unique_ptr<ObjectFactory> factory) {
+    std::lock_guard<std::mutex> lock(internal_mutex_);
     if (loaded_factories_.find(name) != loaded_factories_.end()) {
       return;
     }
 
-    std::lock_guard<std::mutex> lock(internal_mutex_);
-
     auto canonical_name = factory->getClassName();
 
     auto group_name = factory->getGroupName();
@@ -309,7 +325,7 @@ class ClassLoader {
    * @return nullptr or object created from class_name definition.
    */
   template<class T = CoreComponent>
-  std::shared_ptr<T> instantiate(const std::string &class_name, uuid_t uuid);
+  std::shared_ptr<T> instantiate(const std::string &class_name, utils::Identifier & uuid);
 
   /**
    * Instantiate object based on class_name
@@ -327,10 +343,147 @@ class ClassLoader {
    * @return nullptr or object created from class_name definition.
    */
   template<class T = CoreComponent>
-  T *instantiateRaw(const std::string &class_name, uuid_t uuid);
+  T *instantiateRaw(const std::string &class_name, utils::Identifier & uuid);
 
  protected:
 
+#ifdef WIN32
+
+  // base_object doesn't have a handle
+  std::map< HMODULE, std::string > resource_mapping_;
+
+  std::string error_str_;
+  std::string current_error_;
+
+  void store_error() {
+    auto error = GetLastError();
+
+    if (error == 0) {
+      error_str_ = "";
+      return;
+    }
+
+    LPSTR messageBuffer = nullptr;
+    size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+        NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL);
+
+    current_error_ = std::string(messageBuffer, size);
+
+    //Free the buffer.
+    LocalFree(messageBuffer);
+  }
+
+  void *dlsym(void *handle, const char *name)
+  {
+    FARPROC symbol;
+    HMODULE hModule;
+
+    symbol = GetProcAddress((HMODULE)handle, name);
+
+    if (symbol == nullptr) {
+      store_error();
+
+      for (auto hndl : resource_mapping_)
+      {
+        symbol = GetProcAddress((HMODULE)hndl.first, name);
+        if (symbol != nullptr) {
+          break;
+        }
+      }
+    }
+
+#ifdef _MSC_VER
+#pragma warning( suppress: 4054 )
+#endif
+    return (void*)symbol;
+  }
+
+  const char *dlerror(void)
+  {
+    std::lock_guard<std::mutex> lock(internal_mutex_);
+
+    error_str_ = current_error_;
+
+    current_error_ = "";
+
+    return error_str_.c_str();
+  }
+
+  void *dlopen(const char *file, int mode) {
+    std::lock_guard<std::mutex> lock(internal_mutex_);
+    HMODULE object;
+    char * current_error = NULL;
+    uint32_t uMode = SetErrorMode(SEM_FAILCRITICALERRORS);
+    if (nullptr == file)
+    {
+      HMODULE allModules[1024];
+      HANDLE current_process_id = GetCurrentProcess();
+      DWORD cbNeeded;
+      object = GetModuleHandle(NULL);
+
+      if (!object)
+      store_error();
+      if (EnumProcessModules(current_process_id, allModules,
+              sizeof(allModules), &cbNeeded) != 0)
+      {
+
+        for (uint32_t i = 0; i < cbNeeded / sizeof(HMODULE); i++)
+        {
+          TCHAR szModName[MAX_PATH];
+
+          // Get the full path to the module's file.
+          resource_mapping_.insert(std::make_pair(allModules[i], "minifi-system"));
+        }
+      }
+    }
+    else
+    {
+      char lpFileName[MAX_PATH];
+      int i;
+
+      for (i = 0; i < sizeof(lpFileName) - 1; i++)
+      {
+        if (!file[i])
+        break;
+        else if (file[i] == '/')
+        lpFileName[i] = '\\';
+        else
+        lpFileName[i] = file[i];
+      }
+      lpFileName[i] = '\0';
+      object = LoadLibraryEx(lpFileName, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH);
+      if (!object)
+      store_error();
+      else if ((mode & RTLD_GLOBAL))
+      resource_mapping_.insert(std::make_pair(object, lpFileName));
+    }
+
+    /* Return to previous state of the error-mode bit flags. */
+    SetErrorMode(uMode);
+
+    return (void *)object;
+
+  }
+
+  int dlclose(void *handle)
+  {
+    std::lock_guard<std::mutex> lock(internal_mutex_);
+
+    HMODULE object = (HMODULE)handle;
+    BOOL ret;
+
+    current_error_ = "";
+    ret = FreeLibrary(object);
+
+    resource_mapping_.erase(object);
+
+    ret = !ret;
+
+    return (int)ret;
+  }
+
+#endif
+
   std::map<std::string, std::vector<std::string>> module_mapping_;
 
   std::map<std::string, std::unique_ptr<ObjectFactory>> loaded_factories_;
@@ -355,7 +508,7 @@ std::shared_ptr<T> ClassLoader::instantiate(const std::string &class_name, const
 }
 
 template<class T>
-std::shared_ptr<T> ClassLoader::instantiate(const std::string &class_name, uuid_t uuid) {
+std::shared_ptr<T> ClassLoader::instantiate(const std::string &class_name, utils::Identifier &uuid) {
   std::lock_guard<std::mutex> lock(internal_mutex_);
   auto factory_entry = loaded_factories_.find(class_name);
   if (factory_entry != loaded_factories_.end()) {
@@ -379,7 +532,7 @@ T *ClassLoader::instantiateRaw(const std::string &class_name, const std::string
 }
 
 template<class T>
-T *ClassLoader::instantiateRaw(const std::string &class_name, uuid_t uuid) {
+T *ClassLoader::instantiateRaw(const std::string &class_name, utils::Identifier & uuid) {
   std::lock_guard<std::mutex> lock(internal_mutex_);
   auto factory_entry = loaded_factories_.find(class_name);
   if (factory_entry != loaded_factories_.end()) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/ConfigurableComponent.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/ConfigurableComponent.h b/libminifi/include/core/ConfigurableComponent.h
index 53835b4..9aff609 100644
--- a/libminifi/include/core/ConfigurableComponent.h
+++ b/libminifi/include/core/ConfigurableComponent.h
@@ -19,6 +19,7 @@
 #ifndef LIBMINIFI_INCLUDE_CORE_CONFIGURABLECOMPONENT_H_
 #define LIBMINIFI_INCLUDE_CORE_CONFIGURABLECOMPONENT_H_
 
+#include "Core.h"
 #include <mutex>
 #include <iostream>
 #include <map>
@@ -40,7 +41,7 @@ namespace core {
  * Represents a configurable component
  * Purpose: Extracts configuration items for all components and localized them
  */
-class __attribute__((visibility("default"))) ConfigurableComponent {
+class ConfigurableComponent {
  public:
 
   ConfigurableComponent();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Connectable.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Connectable.h b/libminifi/include/core/Connectable.h
index 1c1fd45..b1a5613 100644
--- a/libminifi/include/core/Connectable.h
+++ b/libminifi/include/core/Connectable.h
@@ -37,10 +37,13 @@ namespace core {
  * Purpose: As in NiFi, this represents a connection point and allows the derived
  * object to be connected to other connectables.
  */
-class __attribute__((visibility("default"))) Connectable : public CoreComponent {
+class Connectable : public CoreComponent {
  public:
 
-  explicit Connectable(std::string name, uuid_t uuid);
+
+  explicit Connectable(std::string name);
+
+  explicit Connectable(std::string name, utils::Identifier &uuid);
 
   explicit Connectable(const Connectable &&other);
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Core.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Core.h b/libminifi/include/core/Core.h
index 8109cd1..a379056 100644
--- a/libminifi/include/core/Core.h
+++ b/libminifi/include/core/Core.h
@@ -17,13 +17,48 @@
  */
 #ifndef LIBMINIFI_INCLUDE_CORE_CORE_H_
 #define LIBMINIFI_INCLUDE_CORE_CORE_H_
-
+#define WIN32_LEAN_AND_MEAN 1
 #include <cstdlib>
 #include <iostream>
 #include <memory>
 #include <string>
 #include <uuid/uuid.h>
+
+#ifdef WIN32
+#pragma comment(lib, "shlwapi.lib")
+#endif
+
+#if defined _WIN32 || defined __CYGWIN__
+#ifdef BUILDING_DLL
+#ifdef __GNUC__
+#define DLL_PUBLIC __attribute__ ((dllexport))
+#else
+#define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
+#endif
+#else
+#ifdef __GNUC__
+#define DLL_PUBLIC __attribute__ ((dllimport))
+#else
+#define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
+#endif
+#endif
+#define DLL_LOCAL
+#else
+#if __GNUC__ >= 4
+#define DLL_PUBLIC __attribute__ ((visibility ("default")))
+#define DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+#else
+#define DLL_PUBLIC
+#define DLL_LOCAL
+#endif
+#endif
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+// can't include cxxabi
+#else
 #include <cxxabi.h>
+#endif
 
 #include "utils/Id.h"
 
@@ -35,7 +70,7 @@ namespace apache {
 namespace nifi {
 namespace minifi {
 namespace utils {
-namespace file{
+namespace file {
 }
 }
 namespace processors {
@@ -47,12 +82,16 @@ namespace core {
 
 template<typename T>
 static inline std::string getClassName() {
+#ifndef WIN32
   char *b = abi::__cxa_demangle(typeid(T).name(), 0, 0, 0);
   if (b == nullptr)
     return std::string();
   std::string name = b;
   std::free(b);
   return name;
+#else
+  return typeid(T).name();
+#endif
 }
 
 template<typename T>
@@ -99,25 +138,52 @@ class CoreComponent {
   /**
    * Constructor that sets the name and uuid.
    */
-  explicit CoreComponent(const std::string name, uuid_t uuid = nullptr)
+
+  explicit CoreComponent(const std::string name, utils::Identifier uuid)
       : name_(name) {
-    if (nullptr == uuid)
+    if (uuid == nullptr) {
       // Generate the global UUID for the flow record
       id_generator_->generate(uuid_);
-    else
-      uuid_copy(uuid_, uuid);
+    } else {
+      uuid_ = uuid;
+    }
 
-    char uuidStr[37] = {0};
-    uuid_unparse_lower(uuid_, uuidStr);
-    uuidStr_ = uuidStr;
+    uuidStr_ = uuid_.to_string();
   }
 
+  explicit CoreComponent(const std::string name)
+      : name_(name) {
+
+    // Generate the global UUID for the flow record
+    id_generator_->generate(uuid_);
+
+    uuidStr_ = uuid_.to_string();
+  }
+  /*
+   #ifdef WIN32
+   #else
+
+   explicit CoreComponent(const std::string name, Identifier uuid = nullptr)
+   : name_(name) {
+   if (nullptr == uuid)
+   // Generate the global UUID for the flow record
+   id_generator_->generate(uuid_);
+   else
+   uuid_copy(uuid_, uuid);
+
+   char uuidStr[37] = { 0 };
+   uuid_unparse_lower(uuid_, uuidStr);
+   uuidStr_ = uuidStr;
+   }
+   #endif
+   */
   /**
    * Move Constructor.
    */
   explicit CoreComponent(const CoreComponent &&other)
       : name_(std::move(other.name_)) {
-    uuid_copy(uuid_, other.uuid_);
+    uuid_ = other.uuid_;
+    //uuid_copy(uuid_, other.uuid_);
   }
 
   virtual ~CoreComponent() {
@@ -137,7 +203,7 @@ class CoreComponent {
    * Set UUID in this instance
    * @param uuid uuid to apply to the internal representation.
    */
-  void setUUID(uuid_t uuid);
+  void setUUID(utils::Identifier &uuid);
 
   void setUUIDStr(const std::string uuidStr);
 
@@ -146,9 +212,10 @@ class CoreComponent {
    * @param uuid uuid struct to which we will copy the memory
    * @return success of request
    */
-  bool getUUID(uuid_t uuid);
+  //bool getUUID(m_uuid uuid);
+  bool getUUID(utils::Identifier &uuid);
 
-  unsigned const char *getUUID();
+  //unsigned const char *getUUID();
   /**
    * Return the UUID string
    * @param constant reference to the UUID str
@@ -162,7 +229,7 @@ class CoreComponent {
 
  protected:
   // A global unique identifier
-  uuid_t uuid_;
+  utils::Identifier uuid_;
   // UUID string
   std::string uuidStr_;
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/FlowConfiguration.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/FlowConfiguration.h b/libminifi/include/core/FlowConfiguration.h
index cf4c7f6..9d2562d 100644
--- a/libminifi/include/core/FlowConfiguration.h
+++ b/libminifi/include/core/FlowConfiguration.h
@@ -41,6 +41,14 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
+class static_initializers {
+ public:
+  std::vector<std::string> statics_sl_funcs_;
+  std::mutex atomic_initialization_;
+};
+
+extern static_initializers &get_static_functions();
+
 /**
  * Purpose: Flow configuration defines the mechanism
  * by which we will configure our flow controller
@@ -70,25 +78,25 @@ class FlowConfiguration : public CoreComponent {
   virtual ~FlowConfiguration();
 
   // Create Processor (Node/Input/Output Port) based on the name
-  std::shared_ptr<core::Processor> createProcessor(std::string name, uuid_t uuid);
+  std::shared_ptr<core::Processor> createProcessor(std::string name, utils::Identifier &uuid);
   // Create Root Processor Group
 
-  std::unique_ptr<core::ProcessGroup> createRootProcessGroup(std::string name, uuid_t uuid, int version);
+  std::unique_ptr<core::ProcessGroup> createRootProcessGroup(std::string name, utils::Identifier & uuid, int version);
 
-  std::shared_ptr<core::controller::ControllerServiceNode> createControllerService(const std::string &class_name, const std::string &name, uuid_t uuid);
+  std::shared_ptr<core::controller::ControllerServiceNode> createControllerService(const std::string &class_name, const std::string &name, utils::Identifier & uuid);
 
   // Create Remote Processor Group
-  std::unique_ptr<core::ProcessGroup> createRemoteProcessGroup(std::string name, uuid_t uuid);
+  std::unique_ptr<core::ProcessGroup> createRemoteProcessGroup(std::string name, utils::Identifier & uuid);
   // Create Connection
-  std::shared_ptr<minifi::Connection> createConnection(std::string name, uuid_t uuid);
+  std::shared_ptr<minifi::Connection> createConnection(std::string name, utils::Identifier & uuid);
   // Create Provenance Report Task
   std::shared_ptr<core::Processor> createProvenanceReportTask(void);
 
-  std::shared_ptr<state::response::FlowVersion> getFlowVersion() const{
+  std::shared_ptr<state::response::FlowVersion> getFlowVersion() const {
     return flow_version_;
   }
 
-  std::shared_ptr<Configure> getConfiguration() { // cannot be const as getters mutate the underlying map
+  std::shared_ptr<Configure> getConfiguration() {  // cannot be const as getters mutate the underlying map
     return configuration_;
   }
 
@@ -124,16 +132,17 @@ class FlowConfiguration : public CoreComponent {
   }
 
   static bool add_static_func(std::string functor) {
-    statics_sl_funcs_.push_back(functor);
+    std::lock_guard<std::mutex> lock(get_static_functions().atomic_initialization_);
+    get_static_functions().statics_sl_funcs_.push_back(functor);
     return true;
   }
 
   static void initialize_static_functions() {
-    std::lock_guard<std::mutex> lock(atomic_initialization_);
-    for (auto sl_func : statics_sl_funcs_) {
+    std::lock_guard<std::mutex> lock(get_static_functions().atomic_initialization_);
+    for (auto sl_func : get_static_functions().statics_sl_funcs_) {
       core::ClassLoader::getDefaultClassLoader().registerResource("", sl_func);
     }
-    statics_sl_funcs_.clear();
+    //get_static_functions().statics_sl_funcs_.clear();
   }
 
  protected:
@@ -162,8 +171,7 @@ class FlowConfiguration : public CoreComponent {
   std::shared_ptr<state::response::FlowVersion> flow_version_;
  private:
   std::shared_ptr<logging::Logger> logger_;
-  static std::mutex atomic_initialization_;
-  static std::vector<std::string> statics_sl_funcs_;
+
 };
 
 } /* namespace core */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/FlowFile.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/FlowFile.h b/libminifi/include/core/FlowFile.h
index 2116e6f..18d5034 100644
--- a/libminifi/include/core/FlowFile.h
+++ b/libminifi/include/core/FlowFile.h
@@ -206,8 +206,8 @@ class FlowFile : public core::Connectable {
    */
   uint64_t getOffset();
 
-  bool getUUID(uuid_t other) {
-    uuid_copy(other, uuid_);
+  bool getUUID(utils::Identifier &other) {
+    other = uuid_;
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/ProcessContext.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/ProcessContext.h b/libminifi/include/core/ProcessContext.h
index e1c42e4..5d2ca55 100644
--- a/libminifi/include/core/ProcessContext.h
+++ b/libminifi/include/core/ProcessContext.h
@@ -69,11 +69,11 @@ class ProcessContext : public controller::ControllerServiceLookup {
   bool getProperty(const std::string &name, std::string &value) {
     return processor_node_->getProperty(name, value);
   }
-  bool getProperty(const std::string &name, std::string &value, const std::shared_ptr<FlowFile> &flow_file);
+  bool getProperty(const Property &property, std::string &value, const std::shared_ptr<FlowFile> &flow_file);
   bool getDynamicProperty(const std::string &name, std::string &value) {
     return processor_node_->getDynamicProperty(name, value);
   }
-  bool getDynamicProperty(const std::string &name, std::string &value, const std::shared_ptr<FlowFile> &flow_file);
+  bool getDynamicProperty(const Property &property, std::string &value, const std::shared_ptr<FlowFile> &flow_file);
   std::vector<std::string> getDynamicPropertyKeys() {
     return processor_node_->getDynamicPropertyKeys();
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/ProcessGroup.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/ProcessGroup.h b/libminifi/include/core/ProcessGroup.h
index b5d437a..8c2c469 100644
--- a/libminifi/include/core/ProcessGroup.h
+++ b/libminifi/include/core/ProcessGroup.h
@@ -57,7 +57,11 @@ class ProcessGroup {
   /*!
    * Create a new process group
    */
-  ProcessGroup(ProcessGroupType type, std::string name, uuid_t uuid = NULL, int version = 0, ProcessGroup *parent = NULL);
+
+  ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid, int version, ProcessGroup *parent);
+  ProcessGroup(ProcessGroupType type, std::string name);
+  ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid);
+  ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid, int version);
   // Destructor
   virtual ~ProcessGroup();
   // Set Processor Name
@@ -92,8 +96,8 @@ class ProcessGroup {
     return timeOut_;
   }
   // setInterface
-  void setInterface(std::string &interface) {
-    local_network_interface_ = interface;
+  void setInterface(std::string &ifc) {
+    local_network_interface_ = ifc;
   }
   std::string getInterface() {
     return local_network_interface_;
@@ -140,16 +144,16 @@ class ProcessGroup {
     return (yield_period_msec_);
   }
   // Set UUID
-  void setUUID(uuid_t uuid) {
-    uuid_copy(uuid_, uuid);
+  void setUUID(utils::Identifier &uuid) {
+    uuid_ = uuid;
   }
   // Get UUID
-  bool getUUID(uuid_t uuid) {
-    if (uuid) {
-      uuid_copy(uuid, uuid_);
-      return true;
-    } else
+  bool getUUID(utils::Identifier &uuid) {
+    if (uuid_ == nullptr){
       return false;
+    }
+    uuid = uuid_;
+    return true;
   }
   // getVersion
   int getVersion() {
@@ -182,7 +186,7 @@ class ProcessGroup {
   // ! Add connections
   void addConnection(std::shared_ptr<Connection> connection);
   // findProcessor based on UUID
-  std::shared_ptr<Processor> findProcessor(uuid_t uuid);
+  std::shared_ptr<Processor> findProcessor(utils::Identifier &uuid);
   // findProcessor based on name
   std::shared_ptr<Processor> findProcessor(const std::string &processorName);
 
@@ -212,7 +216,7 @@ class ProcessGroup {
 
  protected:
   // A global unique identifier
-  uuid_t uuid_;
+  utils::Identifier uuid_;
   // Processor Group Name
   std::string name_;
   // version

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Processor.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Processor.h b/libminifi/include/core/Processor.h
index 459684d..8f09ffb 100644
--- a/libminifi/include/core/Processor.h
+++ b/libminifi/include/core/Processor.h
@@ -31,6 +31,8 @@
 #include <chrono>
 #include <functional>
 
+#include "Core.h"
+#include <utils/Id.h>
 #include "Connectable.h"
 #include "ConfigurableComponent.h"
 #include "io/StreamFactory.h"
@@ -55,15 +57,19 @@ namespace core {
 
 // Default penalization period in second
 
+#define BUILDING_DLL 1
 // Processor Class
-class __attribute__((visibility("default"))) Processor : public Connectable, public ConfigurableComponent, public std::enable_shared_from_this<Processor> {
+class Processor : public Connectable, public ConfigurableComponent, public std::enable_shared_from_this<Processor> {
 
  public:
   // Constructor
   /*!
    * Create a new processor
    */
-  Processor(std::string name, uuid_t uuid = NULL);
+
+  Processor(std::string name, utils::Identifier &uuid);
+
+  Processor(std::string name);
   // Destructor
   virtual ~Processor() {
     notifyStop();
@@ -95,7 +101,9 @@ class __attribute__((visibility("default"))) Processor : public Connectable, pub
   // Set Processor Scheduling Period in Nano Second
   void setSchedulingPeriodNano(uint64_t period) {
     uint64_t minPeriod = MINIMUM_SCHEDULING_NANOS;
-    scheduling_period_nano_ = std::max(period, minPeriod);
+	// std::max has some variances on c++11-c++14 and then c++14 onward.
+    // to avoid macro conditional checks we can use this simple conditional expr. 
+	scheduling_period_nano_ = period > minPeriod ? period : minPeriod; 
   }
   // Get Processor Scheduling Period in Nano Second
   uint64_t getSchedulingPeriodNano(void) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/ProcessorNode.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/ProcessorNode.h b/libminifi/include/core/ProcessorNode.h
index c64dbb0..f96899b 100644
--- a/libminifi/include/core/ProcessorNode.h
+++ b/libminifi/include/core/ProcessorNode.h
@@ -205,7 +205,7 @@ class ProcessorNode : public ConfigurableComponent, public Connectable {
    * Set UUID in this instance
    * @param uuid uuid to apply to the internal representation.
    */
-  void setUUID(uuid_t uuid) {
+  void setUUID(utils::Identifier &uuid) {
     Connectable::setUUID(uuid);
     processor_->setUUID(uuid);
   }
@@ -243,13 +243,14 @@ class ProcessorNode : public ConfigurableComponent, public Connectable {
    * @param uuid uuid struct to which we will copy the memory
    * @return success of request
    */
-  bool getUUID(uuid_t uuid) {
+  bool getUUID(utils::Identifier &uuid) {
     return processor_->getUUID(uuid);
   }
+  /*
 
   unsigned const char *getUUID() {
     return processor_->getUUID();
-  }
+  }*/
   /**
    * Return the UUID string
    * @param constant reference to the UUID str

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Property.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Property.h b/libminifi/include/core/Property.h
index 1b1b587..ff1a536 100644
--- a/libminifi/include/core/Property.h
+++ b/libminifi/include/core/Property.h
@@ -65,7 +65,8 @@ class Property {
         valid_regex_(std::move(valid_regex)),
         dependent_properties_(std::move(dependent_properties)),
         exclusive_of_properties_(std::move(exclusive_of_properties)),
-        is_collection_(false) {
+        is_collection_(false),
+        supports_el_(false) {
     values_.push_back(std::move(value));
   }
 
@@ -73,7 +74,8 @@ class Property {
       : name_(name),
         description_(description),
         is_required_(false),
-        is_collection_(false) {
+        is_collection_(false),
+        supports_el_(false) {
     values_.push_back(std::move(value));
   }
 
@@ -81,7 +83,8 @@ class Property {
       : name_(name),
         description_(description),
         is_required_(false),
-        is_collection_(true) {
+        is_collection_(true),
+        supports_el_(false) {
   }
 
   Property(Property &&other)
@@ -94,7 +97,8 @@ class Property {
         is_collection_(other.is_collection_),
         values_(std::move(other.values_)),
         display_name_(std::move(other.display_name_)),
-        types_(std::move(other.types_)){
+        types_(std::move(other.types_)),
+        supports_el_(other.supports_el_) {
   }
 
   Property(const Property &other)
@@ -107,14 +111,16 @@ class Property {
         is_collection_(other.is_collection_),
         values_(other.values_),
         display_name_(other.display_name_),
-        types_(other.types_){
+        types_(other.types_),
+        supports_el_(other.supports_el_) {
   }
 
   Property()
       : name_(""),
         description_(""),
         is_required_(false),
-        is_collection_(false) {
+        is_collection_(false),
+        supports_el_(false) {
   }
 
   virtual ~Property() = default;
@@ -125,12 +131,14 @@ class Property {
   std::string getDescription() const;
   std::string getValue() const;
   bool getRequired() const;
+  bool supportsExpressionLangauge() const;
   std::string getValidRegex() const;
   std::vector<std::string> getDependentProperties() const;
   std::vector<std::pair<std::string, std::string>> getExclusiveOfProperties() const;
   std::vector<std::string> &getValues();
 
   void setValue(std::string value);
+  void setSupportsExpressionLanguage(bool supportEl);
   /**
    * Add value to the collection of values.
    */
@@ -414,6 +422,7 @@ class Property {
   // types represents the allowable types for this property
   // these types should be the canonical name.
   std::vector<std::string> types_;
+  bool supports_el_;
  private:
 
   friend class PropertyBuilder;
@@ -440,7 +449,12 @@ class PropertyBuilder : public std::enable_shared_from_this<PropertyBuilder> {
   }
 
   std::shared_ptr<PropertyBuilder> isRequired(bool required) {
-    prop.is_required_ = false;
+    prop.is_required_ = required;
+    return shared_from_this();
+  }
+
+  std::shared_ptr<PropertyBuilder> supportsExpressionLanguage(bool sel) {
+    prop.supports_el_ = sel;
     return shared_from_this();
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Repository.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Repository.h b/libminifi/include/core/Repository.h
index 427a46d..5dd9cc0 100644
--- a/libminifi/include/core/Repository.h
+++ b/libminifi/include/core/Repository.h
@@ -20,7 +20,6 @@
 #ifndef __REPOSITORY_H__
 #define __REPOSITORY_H__
 
-#include <ftw.h>
 #include <uuid/uuid.h>
 #include <atomic>
 #include <cstdint>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/Resource.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/Resource.h b/libminifi/include/core/Resource.h
index 742d879..f72d1fe 100644
--- a/libminifi/include/core/Resource.h
+++ b/libminifi/include/core/Resource.h
@@ -18,6 +18,8 @@
 #ifndef LIBMINIFI_INCLUDE_CORE_RESOURCE_H_
 #define LIBMINIFI_INCLUDE_CORE_RESOURCE_H_
 
+#define WIN32_LEAN_AND_MEAN 1
+
 #include "ClassLoader.h"
 
 namespace org {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/SerializableComponent.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/SerializableComponent.h b/libminifi/include/core/SerializableComponent.h
index 2cf13b5..847dad3 100644
--- a/libminifi/include/core/SerializableComponent.h
+++ b/libminifi/include/core/SerializableComponent.h
@@ -35,7 +35,12 @@ class SerializableComponent : public core::Connectable, public minifi::io::Seria
 
  public:
 
-  SerializableComponent(const std::string name, uuid_t uuid = nullptr)
+  SerializableComponent(const std::string name)
+        : core::Connectable(name) {
+
+    }
+
+  SerializableComponent(const std::string name, utils::Identifier &uuid )
       : core::Connectable(name, uuid) {
 
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/controller/ControllerService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/controller/ControllerService.h b/libminifi/include/core/controller/ControllerService.h
index b754aa9..7bb5170 100644
--- a/libminifi/include/core/controller/ControllerService.h
+++ b/libminifi/include/core/controller/ControllerService.h
@@ -63,7 +63,7 @@ class ControllerService : public ConfigurableComponent, public Connectable {
    * Controller Service constructor.
    */
   explicit ControllerService()
-      : Connectable(core::getClassName<ControllerService>(), 0),
+      : Connectable(core::getClassName<ControllerService>()),
         configuration_(std::make_shared<Configure>()) {
     current_state_ = DISABLED;
   }
@@ -72,24 +72,31 @@ class ControllerService : public ConfigurableComponent, public Connectable {
    * Controller Service constructor.
    */
   explicit ControllerService(const std::string &name, const std::string &id)
-      : Connectable(name, 0),
+      : Connectable(name),
         configuration_(std::make_shared<Configure>()) {
     current_state_ = DISABLED;
-    uuid_parse(id.c_str(), uuid_);
-    char uuidStr[37];
-    uuid_unparse_lower(uuid_, uuidStr);
-    uuidStr_ = uuidStr;
+    uuid_ = id;
+    uuidStr_ = id;
   }
 
   /**
    * Controller Service constructor.
    */
-  explicit ControllerService(const std::string &name, uuid_t uuid)
+  explicit ControllerService(const std::string &name, utils::Identifier uuid)
       : Connectable(name, uuid),
         configuration_(std::make_shared<Configure>()) {
     current_state_ = DISABLED;
   }
 
+  /**
+     * Controller Service constructor.
+     */
+    explicit ControllerService(const std::string &name)
+        : Connectable(name),
+          configuration_(std::make_shared<Configure>()) {
+      current_state_ = DISABLED;
+    }
+
   virtual void initialize() {
     // set base supported properties
     Property property("Linked Services", "Referenced Controller Services");

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/controller/ControllerServiceMap.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/controller/ControllerServiceMap.h b/libminifi/include/core/controller/ControllerServiceMap.h
index b5e3599..d229364 100644
--- a/libminifi/include/core/controller/ControllerServiceMap.h
+++ b/libminifi/include/core/controller/ControllerServiceMap.h
@@ -66,7 +66,7 @@ class ControllerServiceMap {
    *
    */
   virtual bool removeControllerService(const std::shared_ptr<ControllerServiceNode> &serviceNode) {
-    if (IsNullOrEmpty(serviceNode.get()))
+    if (serviceNode == nullptr || serviceNode.get() == nullptr)
       return false;
     std::lock_guard<std::mutex> lock(mutex_);
     controller_services_[serviceNode->getName()] = nullptr;
@@ -81,7 +81,7 @@ class ControllerServiceMap {
    *
    */
   virtual bool put(const std::string &id, const std::shared_ptr<ControllerServiceNode> &serviceNode) {
-    if (IsNullOrEmpty(id) || IsNullOrEmpty(serviceNode.get()))
+    if (id.empty() || serviceNode == nullptr || serviceNode.get() == nullptr)
       return false;
     std::lock_guard<std::mutex> lock(mutex_);
     controller_services_[id] = serviceNode;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/controller/ControllerServiceNode.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/controller/ControllerServiceNode.h b/libminifi/include/core/controller/ControllerServiceNode.h
index 6da7537..0fd45e5 100644
--- a/libminifi/include/core/controller/ControllerServiceNode.h
+++ b/libminifi/include/core/controller/ControllerServiceNode.h
@@ -70,7 +70,7 @@ class ControllerServiceNode : public CoreComponent, public ConfigurableComponent
     controller_service_->setName(name);
   }
 
-  void setUUID(uuid_t uuid) {
+  void setUUID(utils::Identifier &uuid) {
     CoreComponent::setUUID(uuid);
     controller_service_->setUUID(uuid);
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/reporting/SiteToSiteProvenanceReportingTask.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/reporting/SiteToSiteProvenanceReportingTask.h b/libminifi/include/core/reporting/SiteToSiteProvenanceReportingTask.h
index 041e5ae..bf0fb01 100644
--- a/libminifi/include/core/reporting/SiteToSiteProvenanceReportingTask.h
+++ b/libminifi/include/core/reporting/SiteToSiteProvenanceReportingTask.h
@@ -45,7 +45,7 @@ class SiteToSiteProvenanceReportingTask : public minifi::RemoteProcessorGroupPor
    * Create a new processor
    */
   SiteToSiteProvenanceReportingTask(const std::shared_ptr<io::StreamFactory> &stream_factory, std::shared_ptr<Configure> configure)
-      : minifi::RemoteProcessorGroupPort(stream_factory, ReportTaskName, "", configure, NULL),
+      : minifi::RemoteProcessorGroupPort(stream_factory, ReportTaskName, "", configure),
         logger_(logging::LoggerFactory<SiteToSiteProvenanceReportingTask>::getLogger()) {
     this->setTriggerWhenEmpty(true);
     batch_size_ = 100;
@@ -69,8 +69,8 @@ class SiteToSiteProvenanceReportingTask : public minifi::RemoteProcessorGroupPor
   //! Initialize, over write by NiFi SiteToSiteProvenanceReportingTask
   virtual void initialize(void);
   //! Set Port UUID
-  void setPortUUID(uuid_t port_uuid) {
-    uuid_copy(protocol_uuid_, port_uuid);
+  void setPortUUID(utils::Identifier &port_uuid) {
+    protocol_uuid_ = port_uuid;
   }
 
   //! Set Batch Size
@@ -82,8 +82,8 @@ class SiteToSiteProvenanceReportingTask : public minifi::RemoteProcessorGroupPor
     return (batch_size_);
   }
   //! Get Port UUID
-  void getPortUUID(uuid_t port_uuid) {
-    uuid_copy(port_uuid, protocol_uuid_);
+  void getPortUUID(utils::Identifier & port_uuid) {
+    port_uuid = protocol_uuid_;
   }
 
  protected:

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/repository/VolatileContentRepository.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/repository/VolatileContentRepository.h b/libminifi/include/core/repository/VolatileContentRepository.h
index b26df0b..e203e96 100644
--- a/libminifi/include/core/repository/VolatileContentRepository.h
+++ b/libminifi/include/core/repository/VolatileContentRepository.h
@@ -43,7 +43,7 @@ class VolatileContentRepository : public core::ContentRepository, public virtual
   static const char *minimal_locking;
 
   explicit VolatileContentRepository(std::string name = getClassName<VolatileContentRepository>())
-      : core::SerializableComponent(name, 0),
+      : core::SerializableComponent(name),
         core::repository::VolatileRepository<std::shared_ptr<minifi::ResourceClaim>>(name),
         minimize_locking_(true),
         logger_(logging::LoggerFactory<VolatileContentRepository>::getLogger()) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/repository/VolatileFlowFileRepository.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/repository/VolatileFlowFileRepository.h b/libminifi/include/core/repository/VolatileFlowFileRepository.h
index 1a6be6b..70affa7 100644
--- a/libminifi/include/core/repository/VolatileFlowFileRepository.h
+++ b/libminifi/include/core/repository/VolatileFlowFileRepository.h
@@ -37,7 +37,7 @@ class VolatileFlowFileRepository : public VolatileRepository<std::string> {
   explicit VolatileFlowFileRepository(std::string repo_name = "", std::string dir = REPOSITORY_DIRECTORY, int64_t maxPartitionMillis = MAX_REPOSITORY_ENTRY_LIFE_TIME, int64_t maxPartitionBytes =
   MAX_REPOSITORY_STORAGE_SIZE,
                                       uint64_t purgePeriod = REPOSITORY_PURGE_PERIOD)
-      : core::SerializableComponent(repo_name, 0),
+      : core::SerializableComponent(repo_name),
         VolatileRepository(repo_name.length() > 0 ? repo_name : core::getClassName<VolatileRepository>(), "", maxPartitionMillis, maxPartitionBytes, purgePeriod)
 
   {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/repository/VolatileProvenanceRepository.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/repository/VolatileProvenanceRepository.h b/libminifi/include/core/repository/VolatileProvenanceRepository.h
index cabb76f..9baff76 100644
--- a/libminifi/include/core/repository/VolatileProvenanceRepository.h
+++ b/libminifi/include/core/repository/VolatileProvenanceRepository.h
@@ -36,7 +36,7 @@ class VolatileProvenanceRepository : public VolatileRepository<std::string> {
   explicit VolatileProvenanceRepository(std::string repo_name = "", std::string dir = REPOSITORY_DIRECTORY, int64_t maxPartitionMillis = MAX_REPOSITORY_ENTRY_LIFE_TIME, int64_t maxPartitionBytes =
   MAX_REPOSITORY_STORAGE_SIZE,
                                         uint64_t purgePeriod = REPOSITORY_PURGE_PERIOD)
-      : core::SerializableComponent(repo_name, 0),VolatileRepository(repo_name.length() > 0 ? repo_name : core::getClassName<VolatileRepository>(), "", maxPartitionMillis, maxPartitionBytes, purgePeriod)
+      : core::SerializableComponent(repo_name),VolatileRepository(repo_name.length() > 0 ? repo_name : core::getClassName<VolatileRepository>(), "", maxPartitionMillis, maxPartitionBytes, purgePeriod)
 
   {
     purge_required_ = false;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/repository/VolatileRepository.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/repository/VolatileRepository.h b/libminifi/include/core/repository/VolatileRepository.h
index 0f25b7f..4ba6fe7 100644
--- a/libminifi/include/core/repository/VolatileRepository.h
+++ b/libminifi/include/core/repository/VolatileRepository.h
@@ -56,7 +56,7 @@ class VolatileRepository : public core::Repository, public std::enable_shared_fr
   explicit VolatileRepository(std::string repo_name = "", std::string dir = REPOSITORY_DIRECTORY, int64_t maxPartitionMillis = MAX_REPOSITORY_ENTRY_LIFE_TIME, int64_t maxPartitionBytes =
   MAX_REPOSITORY_STORAGE_SIZE,
                               uint64_t purgePeriod = REPOSITORY_PURGE_PERIOD)
-      : core::SerializableComponent(repo_name, 0),
+      : core::SerializableComponent(repo_name),
         Repository(repo_name.length() > 0 ? repo_name : core::getClassName<VolatileRepository>(), "", maxPartitionMillis, maxPartitionBytes, purgePeriod),
         current_size_(0),
         current_index_(0),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/UpdateController.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/UpdateController.h b/libminifi/include/core/state/UpdateController.h
index d74143a..fec3cc1 100644
--- a/libminifi/include/core/state/UpdateController.h
+++ b/libminifi/include/core/state/UpdateController.h
@@ -69,6 +69,10 @@ class UpdateStatus {
 class Update {
  public:
 
+	Update()
+		: status_(UpdateStatus(UpdateState::INITIATE, 0)) {
+	}
+
   Update(UpdateStatus status)
       : status_(status) {
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/AgentInformation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/AgentInformation.h b/libminifi/include/core/state/nodes/AgentInformation.h
index 2f7d5a0..0a93149 100644
--- a/libminifi/include/core/state/nodes/AgentInformation.h
+++ b/libminifi/include/core/state/nodes/AgentInformation.h
@@ -19,10 +19,11 @@
 #define LIBMINIFI_INCLUDE_CORE_STATE_NODES_AGENTINFORMATION_H_
 
 #include "core/Resource.h"
+
+#ifndef WIN32
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <functional>
 #include <sys/ioctl.h>
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD)) 
 #include <net/if_dl.h>
@@ -32,13 +33,17 @@
 #include <net/if.h> 
 #include <unistd.h>
 #include <netinet/in.h>
-#include <string.h>
+
 #include <sys/socket.h>
 #include <netdb.h>
 #include <ifaddrs.h>
+#include <unistd.h>
+#endif
+#include <functional>
+#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
+#include <sstream>
 #include <sstream>
 #include <map>
 #include "core/state/nodes/MetricsBase.h"
@@ -62,12 +67,12 @@ namespace response {
 
 class ComponentManifest : public DeviceInformation {
  public:
-  ComponentManifest(std::string name, uuid_t uuid)
+  ComponentManifest(std::string name, utils::Identifier & uuid)
       : DeviceInformation(name, uuid) {
   }
 
   ComponentManifest(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
   }
 
   std::string getName() const {
@@ -116,6 +121,10 @@ class ComponentManifest : public DeviceInformation {
             descriptorDescription.name = "description";
             descriptorDescription.value = prop.second.getDescription();
 
+            SerializedResponseNode supportsExpressionLanguageScope;
+            supportsExpressionLanguageScope.name = "expressionLanguageScope";
+            supportsExpressionLanguageScope.value = prop.second.supportsExpressionLangauge() ? "FLOWFILE_ATTRIBUTES" : "NONE";
+
             SerializedResponseNode descriptorRequired;
             descriptorRequired.name = "required";
             descriptorRequired.value = prop.second.getRequired();
@@ -155,7 +164,7 @@ class ComponentManifest : public DeviceInformation {
                 SerializedResponseNode typeNode;
                 typeNode.name = "type";
                 std::string typeClazz = type;
-                utils::StringUtils::replaceAll(typeClazz,"::",".");
+                utils::StringUtils::replaceAll(typeClazz, "::", ".");
                 typeNode.value = typeClazz;
                 allowed_type.children.push_back(typeNode);
 
@@ -184,6 +193,7 @@ class ComponentManifest : public DeviceInformation {
             }
             child.children.push_back(descriptorDescription);
             child.children.push_back(descriptorRequired);
+            child.children.push_back(supportsExpressionLanguageScope);
             child.children.push_back(descriptorDefaultValue);
             child.children.push_back(descriptorValidRegex);
             child.children.push_back(descriptorDependentProperties);
@@ -240,13 +250,13 @@ class ComponentManifest : public DeviceInformation {
 
 class Bundles : public DeviceInformation {
  public:
-  Bundles(std::string name, uuid_t uuid)
+  Bundles(std::string name, utils::Identifier & uuid)
       : DeviceInformation(name, uuid) {
     setArray(true);
   }
 
   Bundles(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
     setArray(true);
   }
 
@@ -275,7 +285,7 @@ class Bundles : public DeviceInformation {
       bundle.children.push_back(artifact);
       bundle.children.push_back(version);
 
-      ComponentManifest compMan(group, nullptr);
+      ComponentManifest compMan(group);
       // serialize the component information.
       for (auto component : compMan.serialize()) {
         bundle.children.push_back(component);
@@ -294,13 +304,13 @@ class Bundles : public DeviceInformation {
 class AgentStatus : public StateMonitorNode {
  public:
 
-  AgentStatus(std::string name, uuid_t uuid)
+  AgentStatus(std::string name, utils::Identifier & uuid)
       : StateMonitorNode(name, uuid) {
 
   }
 
   AgentStatus(const std::string &name)
-      : StateMonitorNode(name, 0) {
+      : StateMonitorNode(name) {
   }
 
   std::string getName() const {
@@ -423,13 +433,13 @@ class AgentMonitor {
 class AgentManifest : public DeviceInformation {
  public:
 
-  AgentManifest(std::string name, uuid_t uuid)
+  AgentManifest(std::string name, utils::Identifier & uuid)
       : DeviceInformation(name, uuid) {
     //setArray(true);
   }
 
   AgentManifest(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
     //  setArray(true);
   }
 
@@ -485,7 +495,7 @@ class AgentManifest : public DeviceInformation {
     buildInfo.children.push_back(build_rev);
     buildInfo.children.push_back(build_date);
 
-    Bundles bundles("bundles", nullptr);
+    Bundles bundles("bundles");
 
     serialized.push_back(ident);
     serialized.push_back(type);
@@ -495,7 +505,7 @@ class AgentManifest : public DeviceInformation {
       serialized.push_back(bundle);
     }
 
-    SchedulingDefaults defaults("schedulingDefaults", nullptr);
+    SchedulingDefaults defaults("schedulingDefaults");
 
     for (auto defaultNode : defaults.serialize()) {
       serialized.push_back(defaultNode);
@@ -511,13 +521,13 @@ class AgentManifest : public DeviceInformation {
 class AgentInformation : public DeviceInformation, public AgentMonitor, public AgentIdentifier {
  public:
 
-  AgentInformation(std::string name, uuid_t uuid)
+  AgentInformation(std::string name, utils::Identifier & uuid)
       : DeviceInformation(name, uuid) {
     setArray(false);
   }
 
   AgentInformation(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
     setArray(false);
   }
 
@@ -537,7 +547,7 @@ class AgentInformation : public DeviceInformation, public AgentMonitor, public A
     agentClass.name = "agentClass";
     agentClass.value = agent_class_;
 
-    AgentManifest manifest("manifest", nullptr);
+    AgentManifest manifest("manifest");
 
     SerializedResponseNode agentManifest;
     agentManifest.name = "agentManifest";

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/BuildInformation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/BuildInformation.h b/libminifi/include/core/state/nodes/BuildInformation.h
index bd7e08c..7290a75 100644
--- a/libminifi/include/core/state/nodes/BuildInformation.h
+++ b/libminifi/include/core/state/nodes/BuildInformation.h
@@ -19,10 +19,11 @@
 #define LIBMINIFI_INCLUDE_CORE_STATE_METRICS_BuildInformation_H_
 
 #include "core/Resource.h"
+
+#ifndef WIN32
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <functional>
 #include <sys/ioctl.h>
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD)) 
 #include <net/if_dl.h>
@@ -32,13 +33,17 @@
 #include <net/if.h> 
 #include <unistd.h>
 #include <netinet/in.h>
-#include <string.h>
+
 #include <sys/socket.h>
 #include <netdb.h>
 #include <ifaddrs.h>
+#include <unistd.h>
+#endif
+#include <functional>
+#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
+
 #include <sstream>
 #include <map>
 #include "../nodes/MetricsBase.h"
@@ -61,12 +66,12 @@ namespace response {
 class BuildInformation : public DeviceInformation {
  public:
 
-  BuildInformation(std::string name, uuid_t uuid)
+  BuildInformation(std::string name, utils::Identifier &uuid)
       : DeviceInformation(name, uuid) {
   }
 
   BuildInformation(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
   }
 
   std::string getName() const {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/DeviceInformation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/DeviceInformation.h b/libminifi/include/core/state/nodes/DeviceInformation.h
index dfeb265..9859972 100644
--- a/libminifi/include/core/state/nodes/DeviceInformation.h
+++ b/libminifi/include/core/state/nodes/DeviceInformation.h
@@ -19,29 +19,31 @@
 #define LIBMINIFI_INCLUDE_CORE_STATE_NODES_DEVICEINFORMATION_H_
 
 #include "core/Resource.h"
+
+#ifndef WIN32
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <functional>
 #include <sys/ioctl.h>
+#include <sys/utsname.h>
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD)) 
 #include <net/if_dl.h>
 #include <net/if_types.h>
 #endif
-#ifndef _WIN32
-#include <sys/utsname.h>
-#endif
 #include <ifaddrs.h>
 #include <net/if.h> 
 #include <unistd.h>
 #include <netinet/in.h>
-#include <string.h>
+
 #include <sys/socket.h>
 #include <netdb.h>
 #include <ifaddrs.h>
+#include <unistd.h>
+#endif
+#include <functional>
+#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <sstream>
 #include <map>
 #include "../nodes/MetricsBase.h"
@@ -109,6 +111,7 @@ class Device {
 
   std::vector<std::string> getIpAddresses() {
     std::vector<std::string> ips;
+#ifndef WIN32
     struct ifaddrs *ifaddr, *ifa;
     if (getifaddrs(&ifaddr) == -1) {
       perror("getifaddrs");
@@ -124,6 +127,7 @@ class Device {
     }
 
     freeifaddrs(ifaddr);
+#endif
     return ips;
   }
 
@@ -254,7 +258,7 @@ class Device {
 class DeviceInfoNode : public DeviceInformation {
  public:
 
-  DeviceInfoNode(std::string name, uuid_t uuid)
+  DeviceInfoNode(std::string name, utils::Identifier &  uuid)
       : DeviceInformation(name, uuid) {
     static Device device;
     hostname_ = device.canonical_hostname_;
@@ -263,7 +267,7 @@ class DeviceInfoNode : public DeviceInformation {
   }
 
   DeviceInfoNode(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
     static Device device;
     hostname_ = device.canonical_hostname_;
     ip_ = device.ip_;
@@ -291,16 +295,18 @@ class DeviceInfoNode : public DeviceInformation {
     vcores.value = std::to_string(ncpus);
 
     systemInfo.children.push_back(vcores);
-
+#if defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
     SerializedResponseNode mem;
     mem.name = "physicalMem";
-#if defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
+
     size_t mema = (size_t) sysconf( _SC_PHYS_PAGES) * (size_t) sysconf( _SC_PAGESIZE);
-#endif
+
     mem.value = std::to_string(mema);
 
-    systemInfo.children.push_back(mem);
 
+    systemInfo.children.push_back(mem);
+#endif
+#ifndef WIN32
     SerializedResponseNode arch;
     arch.name = "machinearch";
 
@@ -313,7 +319,7 @@ class DeviceInfoNode : public DeviceInformation {
     }
 
     systemInfo.children.push_back(arch);
-
+#endif
     serialized.push_back(identifier);
     serialized.push_back(systemInfo);
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/FlowInformation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/FlowInformation.h b/libminifi/include/core/state/nodes/FlowInformation.h
index 022b9ce..4560ed3 100644
--- a/libminifi/include/core/state/nodes/FlowInformation.h
+++ b/libminifi/include/core/state/nodes/FlowInformation.h
@@ -19,26 +19,14 @@
 #define LIBMINIFI_INCLUDE_CORE_STATE_NODES_FLOWINFORMATION_H_
 
 #include "core/Resource.h"
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
 #include <functional>
-#include <sys/ioctl.h>
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD)) 
 #include <net/if_dl.h>
 #include <net/if_types.h>
 #endif
-#include <ifaddrs.h>
-#include <net/if.h> 
-#include <unistd.h>
-#include <netinet/in.h>
 #include <string.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <ifaddrs.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <sstream>
 #include <map>
 #include "../nodes/MetricsBase.h"
@@ -58,17 +46,17 @@ class FlowVersion : public DeviceInformation {
  public:
 
   explicit FlowVersion()
-      : DeviceInformation("FlowVersion", nullptr) {
+      : DeviceInformation("FlowVersion") {
     setFlowVersion("", "", getUUIDStr());
   }
 
   explicit FlowVersion(const std::string &registry_url, const std::string &bucket_id, const std::string &flow_id)
-      : DeviceInformation("FlowVersion", nullptr) {
+      : DeviceInformation("FlowVersion") {
     setFlowVersion(registry_url, bucket_id, flow_id.empty() ? getUUIDStr() : flow_id);
   }
 
   explicit FlowVersion(FlowVersion &&fv)
-      : DeviceInformation("FlowVersion", nullptr),
+      : DeviceInformation("FlowVersion"),
         identifier(std::move(fv.identifier)) {
   }
 
@@ -144,12 +132,12 @@ class FlowVersion : public DeviceInformation {
 class FlowMonitor : public StateMonitorNode {
  public:
 
-  FlowMonitor(std::string name, uuid_t uuid)
+  FlowMonitor(const std::string &name, utils::Identifier &uuid)
       : StateMonitorNode(name, uuid) {
   }
 
   FlowMonitor(const std::string &name)
-      : StateMonitorNode(name, 0) {
+      : StateMonitorNode(name) {
   }
 
   void addConnection(const std::shared_ptr<minifi::Connection> &connection) {
@@ -173,12 +161,12 @@ class FlowMonitor : public StateMonitorNode {
 class FlowInformation : public FlowMonitor {
  public:
 
-  FlowInformation(std::string name, uuid_t uuid)
+  FlowInformation(const std::string &name, utils::Identifier &uuid)
       : FlowMonitor(name, uuid) {
   }
 
   FlowInformation(const std::string &name)
-      : FlowMonitor(name, 0) {
+      : FlowMonitor(name) {
   }
 
   std::string getName() const {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/MetricsBase.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/MetricsBase.h b/libminifi/include/core/state/nodes/MetricsBase.h
index 6e5aaf6..f4d585e 100644
--- a/libminifi/include/core/state/nodes/MetricsBase.h
+++ b/libminifi/include/core/state/nodes/MetricsBase.h
@@ -32,19 +32,22 @@ namespace minifi {
 namespace state {
 namespace response {
 
-
-
 /**
  * Purpose: Defines a metric. Serialization is intended to be thread safe.
  */
 class ResponseNode : public core::Connectable {
  public:
   ResponseNode()
-      : core::Connectable("metric", 0),
+      : core::Connectable("metric"),
+        is_array_(false) {
+  }
+
+  ResponseNode(std::string name)
+      : core::Connectable(name),
         is_array_(false) {
   }
 
-  ResponseNode(std::string name, uuid_t uuid)
+  ResponseNode(std::string name, utils::Identifier & uuid)
       : core::Connectable(name, uuid),
         is_array_(false) {
   }
@@ -67,7 +70,7 @@ class ResponseNode : public core::Connectable {
     return is_array_;
   }
 
-  virtual bool isEmpty(){
+  virtual bool isEmpty() {
     return false;
   }
 
@@ -86,9 +89,12 @@ class ResponseNode : public core::Connectable {
  */
 class DeviceInformation : public ResponseNode {
  public:
-  DeviceInformation(std::string name, uuid_t uuid)
+  DeviceInformation(std::string name, utils::Identifier & uuid)
       : ResponseNode(name, uuid) {
   }
+  DeviceInformation(std::string name)
+      : ResponseNode(name) {
+  }
 };
 
 /**
@@ -96,7 +102,7 @@ class DeviceInformation : public ResponseNode {
  */
 class ObjectNode : public ResponseNode {
  public:
-  ObjectNode(std::string name, uuid_t uuid)
+  ObjectNode(std::string name, utils::Identifier uuid = utils::Identifier())
       : ResponseNode(name, uuid) {
   }
 
@@ -111,7 +117,7 @@ class ObjectNode : public ResponseNode {
   virtual std::vector<SerializedResponseNode> serialize() {
     std::vector<SerializedResponseNode> serialized;
 //    SerializedResponseNode outer_node;
-  //  outer_node.name = getName();
+    //  outer_node.name = getName();
     for (auto &node : nodes_) {
       SerializedResponseNode inner_node;
       inner_node.name = node->getName();
@@ -120,11 +126,11 @@ class ObjectNode : public ResponseNode {
       }
       serialized.push_back(std::move(inner_node));
     }
-   //serialized.push_back(std::move(outer_node));
+    //serialized.push_back(std::move(outer_node));
     return serialized;
   }
 
-  virtual bool isEmpty(){
+  virtual bool isEmpty() {
     return nodes_.empty();
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/ProcessMetrics.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/ProcessMetrics.h b/libminifi/include/core/state/nodes/ProcessMetrics.h
index ebef0d1..7d210cc 100644
--- a/libminifi/include/core/state/nodes/ProcessMetrics.h
+++ b/libminifi/include/core/state/nodes/ProcessMetrics.h
@@ -21,8 +21,9 @@
 #include "core/Resource.h"
 #include <sstream>
 #include <map>
-#include <sys/time.h>
+#ifndef WIN32
 #include <sys/resource.h>
+#endif
 
 #include "../nodes/DeviceInformation.h"
 #include "../nodes/MetricsBase.h"
@@ -42,12 +43,12 @@ namespace response {
 class ProcessMetrics : public ResponseNode {
  public:
 
-  ProcessMetrics(const std::string &name, uuid_t uuid)
+  ProcessMetrics(const std::string &name, utils::Identifier &uuid)
       : ResponseNode(name, uuid) {
   }
 
   ProcessMetrics(const std::string &name)
-      : ResponseNode(name, 0) {
+      : ResponseNode(name) {
   }
 
   ProcessMetrics() {
@@ -60,6 +61,7 @@ class ProcessMetrics : public ResponseNode {
   std::vector<SerializedResponseNode> serialize() {
     std::vector<SerializedResponseNode> serialized;
 
+#ifndef WIN32
     struct rusage my_usage;
     getrusage(RUSAGE_SELF, &my_usage);
 
@@ -84,6 +86,7 @@ class ProcessMetrics : public ResponseNode {
     cpu.children.push_back(ics);
     serialized.push_back(cpu);
 
+#endif
     return serialized;
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/QueueMetrics.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/QueueMetrics.h b/libminifi/include/core/state/nodes/QueueMetrics.h
index b4c0b64..4b79796 100644
--- a/libminifi/include/core/state/nodes/QueueMetrics.h
+++ b/libminifi/include/core/state/nodes/QueueMetrics.h
@@ -38,16 +38,16 @@ namespace response {
 class QueueMetrics : public ResponseNode {
  public:
 
-  QueueMetrics(const std::string &name, uuid_t uuid)
+  QueueMetrics(const std::string &name, utils::Identifier &  uuid)
       : ResponseNode(name, uuid) {
   }
 
   QueueMetrics(const std::string &name)
-      : ResponseNode(name, 0) {
+      : ResponseNode(name) {
   }
 
   QueueMetrics()
-      : ResponseNode("QueueMetrics", 0) {
+      : ResponseNode("QueueMetrics") {
   }
 
   virtual std::string getName() const{

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/RepositoryMetrics.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/RepositoryMetrics.h b/libminifi/include/core/state/nodes/RepositoryMetrics.h
index 5c2db2a..a375b17 100644
--- a/libminifi/include/core/state/nodes/RepositoryMetrics.h
+++ b/libminifi/include/core/state/nodes/RepositoryMetrics.h
@@ -38,16 +38,16 @@ namespace response {
 class RepositoryMetrics : public ResponseNode {
  public:
 
-  RepositoryMetrics(const std::string &name, uuid_t uuid)
+  RepositoryMetrics(const std::string &name, utils::Identifier &uuid)
       : ResponseNode(name, uuid) {
   }
 
   RepositoryMetrics(const std::string &name)
-      : ResponseNode(name, 0) {
+      : ResponseNode(name) {
   }
 
   RepositoryMetrics()
-      : ResponseNode("RepositoryMetrics", 0) {
+      : ResponseNode("RepositoryMetrics") {
   }
 
   virtual std::string getName() const {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/SchedulingNodes.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/SchedulingNodes.h b/libminifi/include/core/state/nodes/SchedulingNodes.h
index c1d18bc..edad122 100644
--- a/libminifi/include/core/state/nodes/SchedulingNodes.h
+++ b/libminifi/include/core/state/nodes/SchedulingNodes.h
@@ -32,12 +32,12 @@ namespace response {
 
 class SchedulingDefaults : public DeviceInformation {
  public:
-  SchedulingDefaults(std::string name, uuid_t uuid)
+  SchedulingDefaults(std::string name, utils::Identifier &uuid)
       : DeviceInformation(name, uuid) {
   }
 
   SchedulingDefaults(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
   }
 
   std::string getName() const {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/StateMonitor.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/StateMonitor.h b/libminifi/include/core/state/nodes/StateMonitor.h
index 1bf3e23..53cebdd 100644
--- a/libminifi/include/core/state/nodes/StateMonitor.h
+++ b/libminifi/include/core/state/nodes/StateMonitor.h
@@ -19,26 +19,9 @@
 #define LIBMINIFI_INCLUDE_CORE_STATE_NODES_STATEMONITOR_H_
 
 #include "core/Resource.h"
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <functional>
-#include <sys/ioctl.h>
-#if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD)) 
-#include <net/if_dl.h>
-#include <net/if_types.h>
-#endif
-#include <ifaddrs.h>
-#include <net/if.h> 
-#include <unistd.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <ifaddrs.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
+
 #include <sstream>
 #include <map>
 #include "../nodes/MetricsBase.h"
@@ -59,14 +42,14 @@ namespace response {
 class StateMonitorNode : public DeviceInformation {
  public:
 
-  StateMonitorNode(std::string name, uuid_t uuid)
+  StateMonitorNode(std::string name, utils::Identifier &uuid)
       : DeviceInformation(name, uuid),
         monitor_(nullptr) {
 
   }
 
   StateMonitorNode(const std::string &name)
-      : DeviceInformation(name, 0),
+      : DeviceInformation(name),
         monitor_(nullptr) {
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/state/nodes/SystemMetrics.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/state/nodes/SystemMetrics.h b/libminifi/include/core/state/nodes/SystemMetrics.h
index a7a3c9c..5668e8f 100644
--- a/libminifi/include/core/state/nodes/SystemMetrics.h
+++ b/libminifi/include/core/state/nodes/SystemMetrics.h
@@ -41,16 +41,16 @@ namespace response {
 class SystemInformation : public DeviceInformation {
  public:
 
-  SystemInformation(const std::string &name, uuid_t uuid)
+  SystemInformation(const std::string &name, utils::Identifier &  uuid)
       : DeviceInformation(name, uuid) {
   }
 
   SystemInformation(const std::string &name)
-      : DeviceInformation(name, 0) {
+      : DeviceInformation(name) {
   }
 
   SystemInformation()
-      : DeviceInformation("systeminfo", 0) {
+      : DeviceInformation("systeminfo") {
   }
 
   virtual std::string getName() const {
@@ -62,7 +62,7 @@ class SystemInformation : public DeviceInformation {
     SerializedResponseNode identifier;
     identifier.name = "identifier";
     identifier.value = "identifier";
-
+#ifndef WIN32
     SerializedResponseNode systemInfo;
     systemInfo.name = "systemInfo";
 
@@ -94,10 +94,11 @@ class SystemInformation : public DeviceInformation {
       arch.value = std::string(buf.machine);
     }
 
-    systemInfo.children.push_back(arch);
-
+	    systemInfo.children.push_back(arch);
+		serialized.push_back(systemInfo);
+#endif
     serialized.push_back(identifier);
-    serialized.push_back(systemInfo);
+    
 
     return serialized;
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/core/yaml/YamlConfiguration.h
----------------------------------------------------------------------
diff --git a/libminifi/include/core/yaml/YamlConfiguration.h b/libminifi/include/core/yaml/YamlConfiguration.h
index 6e22fe3..b60d384 100644
--- a/libminifi/include/core/yaml/YamlConfiguration.h
+++ b/libminifi/include/core/yaml/YamlConfiguration.h
@@ -34,7 +34,7 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-#define DEFAULT_FLOW_YAML_FILE_NAME "conf/flow.yml"
+#define DEFAULT_FLOW_YAML_FILE_NAME "conf/config.yml"
 #define CONFIG_YAML_FLOW_CONTROLLER_KEY "Flow Controller"
 #define CONFIG_YAML_PROCESSORS_KEY "Processors"
 #define CONFIG_YAML_CONNECTIONS_KEY "Connections"

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/io/CRCStream.h
----------------------------------------------------------------------
diff --git a/libminifi/include/io/CRCStream.h b/libminifi/include/io/CRCStream.h
index 0ca00ba..95e3a11 100644
--- a/libminifi/include/io/CRCStream.h
+++ b/libminifi/include/io/CRCStream.h
@@ -19,9 +19,12 @@
 #define LIBMINIFI_INCLUDE_IO_CRCSTREAM_H_
 
 #include <zlib.h>
-#include <arpa/inet.h>
 #include <memory>
-
+#ifdef WIN32
+#include <winsock2.h>
+#else
+#include <arpa/inet.h>
+#endif
 #include "BaseStream.h"
 #include "Serializable.h"
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/io/ClientSocket.h
----------------------------------------------------------------------
diff --git a/libminifi/include/io/ClientSocket.h b/libminifi/include/io/ClientSocket.h
deleted file mode 100644
index e4b7604..0000000
--- a/libminifi/include/io/ClientSocket.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef LIBMINIFI_INCLUDE_IO_CLIENTSOCKET_H_
-#define LIBMINIFI_INCLUDE_IO_CLIENTSOCKET_H_
-
-#include <cstdint>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <mutex>
-#include <atomic>
-#include "io/BaseStream.h"
-#include "core/Core.h"
-#include "core/logging/Logger.h"
-#include "io/validation.h"
-#include "properties/Configure.h"
-#include "io/NetworkPrioritizer.h"
-
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace io {
-
-/**
- * Context class for socket. This is currently only used as a parent class for TLSContext.  It is necessary so the Socket and TLSSocket constructors
- * can be the same.  It also gives us a common place to set timeouts, etc from the Configure object in the future.
- */
-class SocketContext {
- public:
-  SocketContext(const std::shared_ptr<Configure> &configure) {
-  }
-};
-/**
- * Socket class.
- * Purpose: Provides a general purpose socket interface that abstracts
- * connecting information from users
- * Design: Extends DataStream and allows us to perform most streaming
- * operations against a BSD socket
- *
- *
- */
-class Socket : public BaseStream {
- public:
-  /**
-   * Constructor that creates a client socket.
-   * @param context the SocketContext
-   * @param hostname hostname we are connecting to.
-   * @param port port we are connecting to.
-   */
-  explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port);
-
-  /**
-   * Move constructor.
-   */
-  explicit Socket(const Socket &&);
-
-  /**
-   * Static function to return the current machine's host name
-   */
-  static std::string getMyHostName() {
-    static std::string HOSTNAME = init_hostname();
-    return HOSTNAME;
-  }
-
-  /**
-   * Destructor
-   */
-
-  virtual ~Socket();
-
-  virtual void closeStream();
-  /**
-   * Initializes the socket
-   * @return result of the creation operation.
-   */
-  virtual int16_t initialize();
-
-  virtual void setInterface(io::NetworkInterface &&interface) {
-    local_network_interface_ = std::move(interface);
-  }
-
-  /**
-   * Sets the non blocking flag on the file descriptor.
-   */
-  void setNonBlocking();
-
-  std::string getHostname() const;
-
-  /**
-   * Return the port for this socket
-   * @returns port
-   */
-  uint16_t getPort();
-
-  // data stream extensions
-  /**
-   * Reads data and places it into buf
-   * @param buf buffer in which we extract data
-   * @param buflen
-   * @param retrieve_all_bytes determines if we should read all bytes before returning
-   */
-  virtual int readData(std::vector<uint8_t> &buf, int buflen) {
-    return readData(buf, buflen, true);
-  }
-  /**
-   * Reads data and places it into buf
-   * @param buf buffer in which we extract data
-   * @param buflen
-   * @param retrieve_all_bytes determines if we should read all bytes before returning
-   */
-  virtual int readData(uint8_t *buf, int buflen) {
-    return readData(buf, buflen, true);
-  }
-
-  /**
-   * Reads data and places it into buf
-   * @param buf buffer in which we extract data
-   * @param buflen
-   * @param retrieve_all_bytes determines if we should read all bytes before returning
-   */
-  virtual int readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes);
-  /**
-   * Reads data and places it into buf
-   * @param buf buffer in which we extract data
-   * @param buflen
-   * @param retrieve_all_bytes determines if we should read all bytes before returning
-   */
-  virtual int readData(uint8_t *buf, int buflen, bool retrieve_all_bytes);
-
-  /**
-   * Write value to the stream using std::vector
-   * @param buf incoming buffer
-   * @param buflen buffer to write
-   *
-   */
-  virtual int writeData(std::vector<uint8_t> &buf, int buflen);
-
-  /**
-   * writes value to stream
-   * @param value value to write
-   * @param size size of value
-   */
-  virtual int writeData(uint8_t *value, int size);
-
-  /**
-   * Writes a system word
-   * @param value value to write
-   */
-  virtual int write(uint64_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Writes a uint32_t
-   * @param value value to write
-   */
-  virtual int write(uint32_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Writes a system short
-   * @param value value to write
-   */
-  virtual int write(uint16_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Reads a system word
-   * @param value value to write
-   */
-  virtual int read(uint64_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Reads a uint32_t
-   * @param value value to write
-   */
-  virtual int read(uint32_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Reads a system short
-   * @param value value to write
-   */
-  virtual int read(uint16_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
-
-  /**
-   * Returns the underlying buffer
-   * @return vector's array
-   **/
-  const uint8_t *getBuffer() const {
-    return DataStream::getBuffer();
-  }
-
-  /**
-   * Retrieve size of data stream
-   * @return size of data stream
-   **/
-  const uint64_t getSize() const {
-    return DataStream::getSize();
-  }
-
- protected:
-
-  /**
-   * Constructor that accepts host name, port and listeners. With this
-   * contructor we will be creating a server socket
-   * @param context the SocketContext
-   * @param hostname our host name
-   * @param port connecting port
-   * @param listeners number of listeners in the queue
-   */
-  explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners);
-
-  /**
-   * Creates a vector and returns the vector using the provided
-   * type name.
-   * @param t incoming object
-   * @returns vector.
-   */
-  template<typename T>
-  std::vector<uint8_t> readBuffer(const T&);
-
-  /**
-   * Creates a connection using the address info object.
-   * @param p addrinfo structure.
-   * @returns fd.
-   */
-  virtual int8_t createConnection(const addrinfo *p, in_addr_t &addr);
-
-  /**
-   * Sets socket options depending on the instance.
-   * @param sock socket file descriptor.
-   */
-  virtual int16_t setSocketOptions(const int sock);
-
-  /**
-   * Attempt to select the socket file descriptor
-   * @param msec timeout interval to wait
-   * @returns file descriptor
-   */
-  virtual int16_t select_descriptor(const uint16_t msec);
-
-  addrinfo *addr_info_;
-
-  std::recursive_mutex selection_mutex_;
-
-  std::string requested_hostname_;
-  std::string canonical_hostname_;
-  uint16_t port_;
-
-  bool is_loopback_only_;
-  io::NetworkInterface local_network_interface_;
-
-  // connection information
-  int32_t socket_file_descriptor_;
-
-  fd_set total_list_;
-  fd_set read_fds_;
-  std::atomic<uint16_t> socket_max_;
-  std::atomic<uint64_t> total_written_;
-  std::atomic<uint64_t> total_read_;
-  uint16_t listeners_;
-
-
-  bool nonBlocking_;
- private:
-  std::shared_ptr<logging::Logger> logger_;
-  static std::string init_hostname() {
-    char hostname[1024];
-    gethostname(hostname, 1024);
-    Socket mySock(nullptr, hostname, 0);
-    mySock.initialize();
-    auto resolved_hostname = mySock.getHostname();
-    return !IsNullOrEmpty(resolved_hostname) ? resolved_hostname : hostname;
-  }
-};
-
-} /* namespace io */
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */
-#endif /* LIBMINIFI_INCLUDE_IO_CLIENTSOCKET_H_ */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/io/ServerSocket.h
----------------------------------------------------------------------
diff --git a/libminifi/include/io/ServerSocket.h b/libminifi/include/io/ServerSocket.h
index 3af2e4f..fefea0f 100644
--- a/libminifi/include/io/ServerSocket.h
+++ b/libminifi/include/io/ServerSocket.h
@@ -18,7 +18,7 @@
 #ifndef LIBMINIFI_INCLUDE_IO_SERVERSOCKET_H_
 #define LIBMINIFI_INCLUDE_IO_SERVERSOCKET_H_
 
-#include "ClientSocket.h"
+#include "io/ClientSocket.h"
 
 namespace org {
 namespace apache {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/io/Sockets.h
----------------------------------------------------------------------
diff --git a/libminifi/include/io/Sockets.h b/libminifi/include/io/Sockets.h
index 4552fe5..361988c 100644
--- a/libminifi/include/io/Sockets.h
+++ b/libminifi/include/io/Sockets.h
@@ -18,7 +18,7 @@
 #ifndef LIBMINIFI_INCLUDE_IO_SOCKET_H_
 #define LIBMINIFI_INCLUDE_IO_SOCKET_H_
 
-#include "ClientSocket.h"
+#include "io/ClientSocket.h"
 #include "ServerSocket.h"
 
 #ifdef OPENSSL_SUPPORT

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/io/validation.h
----------------------------------------------------------------------
diff --git a/libminifi/include/io/validation.h b/libminifi/include/io/validation.h
index 1cce663..40dd285 100644
--- a/libminifi/include/io/validation.h
+++ b/libminifi/include/io/validation.h
@@ -18,6 +18,7 @@
 
 #ifndef VALIDATION_H
 #define VALIDATION_H
+#include <functional>
 #include <type_traits>
 #include <string>
 #include <cstring>
@@ -41,14 +42,41 @@ class size_function_functor_checker {
   };
 };
 
+
+
+#ifdef WIN32
+
+static auto IsNullOrEmpty(std::string object) {
+	return object.empty();
+}
+
 /**
- * Determines if the variable is null or ::size() == 0
- */
+* Determines if the variable is null or ::size() == 0
+*/
+template<typename T>
+static auto IsNullOrEmpty(T *object) {
+	return (nullptr == object);
+}
+
+
+/**
+* Determines if the variable is null or ::size() == 0
+*/
 template<typename T>
-static auto IsNullOrEmpty(T &object) -> typename std::enable_if<size_function_functor_checker<T>::has_size_function==1, bool>::type {
-  return object.size() == 0;
+static auto IsNullOrEmpty(std::shared_ptr<T> object){
+	return (nullptr == object || nullptr == object.get());
 }
 
+
+#else
+
+/**
+* Determines if the variable is null or ::size() == 0
+*/
+template<typename T>
+static auto IsNullOrEmpty(T &object) -> typename std::enable_if<size_function_functor_checker<T>::has_size_function == 1, bool>::type {
+	return object.size() == 0;
+}
 /**
  * Determines if the variable is null or ::size() == 0
  */
@@ -65,12 +93,15 @@ static auto IsNullOrEmpty(T *object) -> typename std::enable_if<not size_functio
   return (nullptr == object);
 }
 
+
 /**
- * Determines if the variable is null or ::size() == 0
- */
+* Determines if the variable is null or ::size() == 0
+*/
 template<typename T>
-static auto IsNullOrEmpty(std::shared_ptr<T> object) -> typename std::enable_if<not size_function_functor_checker<T>::has_size_function , bool>::type {
-  return (nullptr == object || nullptr == object.get());
+static auto IsNullOrEmpty(std::shared_ptr<T> object) -> typename std::enable_if<not size_function_functor_checker<T>::has_size_function, bool>::type {
+	return (nullptr == object || nullptr == object.get());
 }
 
 #endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/AppendHostInfo.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/AppendHostInfo.h b/libminifi/include/processors/AppendHostInfo.h
index e7c90ac..17f6389 100644
--- a/libminifi/include/processors/AppendHostInfo.h
+++ b/libminifi/include/processors/AppendHostInfo.h
@@ -41,7 +41,7 @@ class AppendHostInfo : public core::Processor {
   /*!
    * Create a new processor
    */
-  AppendHostInfo(std::string name, uuid_t uuid = NULL)
+  AppendHostInfo(std::string name, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<AppendHostInfo>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/ExecuteProcess.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/ExecuteProcess.h b/libminifi/include/processors/ExecuteProcess.h
index 8cc7a25..cd3a371 100644
--- a/libminifi/include/processors/ExecuteProcess.h
+++ b/libminifi/include/processors/ExecuteProcess.h
@@ -21,16 +21,18 @@
 #define __EXECUTE_PROCESS_H__
 
 #include <stdio.h>
-#include <unistd.h>
 #include <string>
 #include <errno.h>
 #include <chrono>
 #include <thread>
-#include <unistd.h>
-#include <sys/wait.h>
 #include <iostream>
 #include <sys/types.h>
 #include <signal.h>
+#ifndef WIN32
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <signal.h>
+#endif
 #include "io/BaseStream.h"
 #include "FlowFileRecord.h"
 #include "core/Processor.h"
@@ -44,6 +46,7 @@ namespace apache {
 namespace nifi {
 namespace minifi {
 namespace processors {
+#ifndef WIN32
 
 // ExecuteProcess Class
 class ExecuteProcess : public core::Processor {
@@ -52,7 +55,7 @@ class ExecuteProcess : public core::Processor {
   /*!
    * Create a new processor
    */
-  ExecuteProcess(std::string name, uuid_t uuid = NULL)
+  ExecuteProcess(std::string name,  utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ExecuteProcess>::getLogger()) {
     _redirectErrorStream = false;
@@ -120,7 +123,7 @@ class ExecuteProcess : public core::Processor {
 };
 
 REGISTER_RESOURCE(ExecuteProcess);
-
+#endif
 } /* namespace processors */
 } /* namespace minifi */
 } /* namespace nifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/ExtractText.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/ExtractText.h b/libminifi/include/processors/ExtractText.h
index 2d7ba56..b01665e 100644
--- a/libminifi/include/processors/ExtractText.h
+++ b/libminifi/include/processors/ExtractText.h
@@ -40,7 +40,7 @@ public:
     /*!
      * Create a new processor
      */
-    explicit ExtractText(std::string name, uuid_t uuid = nullptr)
+    explicit ExtractText(std::string name,  utils::Identifier uuid = utils::Identifier())
     : Processor(name, uuid)
     {
         logger_ = logging::LoggerFactory<ExtractText>::getLogger();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/GenerateFlowFile.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/GenerateFlowFile.h b/libminifi/include/processors/GenerateFlowFile.h
index 660ff05..d3c4c44 100644
--- a/libminifi/include/processors/GenerateFlowFile.h
+++ b/libminifi/include/processors/GenerateFlowFile.h
@@ -38,7 +38,7 @@ class GenerateFlowFile : public core::Processor {
   /*!
    * Create a new processor
    */
-  GenerateFlowFile(std::string name, uuid_t uuid = NULL)
+  GenerateFlowFile(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid) {
     _data = NULL;
     _dataSize = 0;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/GetFile.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/GetFile.h b/libminifi/include/processors/GetFile.h
index 1c4d0db..fb1191e 100644
--- a/libminifi/include/processors/GetFile.h
+++ b/libminifi/include/processors/GetFile.h
@@ -50,13 +50,13 @@ struct GetFileRequest {
 class GetFileMetrics : public state::response::ResponseNode {
  public:
   GetFileMetrics()
-      : state::response::ResponseNode("GetFileMetrics", 0) {
+      : state::response::ResponseNode("GetFileMetrics") {
     iterations_ = 0;
     accepted_files_ = 0;
     input_bytes_ = 0;
   }
 
-  GetFileMetrics(std::string name, uuid_t uuid)
+  GetFileMetrics(std::string name, utils::Identifier &uuid)
       : state::response::ResponseNode(name, uuid) {
     iterations_ = 0;
     accepted_files_ = 0;
@@ -109,7 +109,7 @@ class GetFile : public core::Processor, public state::response::MetricsNodeSourc
   /*!
    * Create a new processor
    */
-  explicit GetFile(std::string name, uuid_t uuid = NULL)
+  explicit GetFile(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<GetFile>::getLogger()) {
     metrics_ = std::make_shared<GetFileMetrics>();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/GetTCP.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/GetTCP.h b/libminifi/include/processors/GetTCP.h
index 741d190..85b449f 100644
--- a/libminifi/include/processors/GetTCP.h
+++ b/libminifi/include/processors/GetTCP.h
@@ -119,13 +119,13 @@ class DataHandler {
 class GetTCPMetrics : public state::response::ResponseNode {
  public:
   GetTCPMetrics()
-      : state::response::ResponseNode("GetTCPMetrics", 0) {
+      : state::response::ResponseNode("GetTCPMetrics") {
     iterations_ = 0;
     accepted_files_ = 0;
     input_bytes_ = 0;
   }
 
-  GetTCPMetrics(std::string name, uuid_t uuid)
+  GetTCPMetrics(std::string name, utils::Identifier &uuid)
       : state::response::ResponseNode(name, uuid) {
     iterations_ = 0;
     accepted_files_ = 0;
@@ -178,7 +178,7 @@ class GetTCP : public core::Processor, public state::response::MetricsNodeSource
   /*!
    * Create a new processor
    */
-  explicit GetTCP(std::string name, uuid_t uuid = NULL)
+  explicit GetTCP(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         running_(false),
         stay_connected_(true),


[5/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/ProcessorNode.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/ProcessorNode.cpp b/libminifi/src/core/ProcessorNode.cpp
index 0a21f4d..81f8c9b 100644
--- a/libminifi/src/core/ProcessorNode.cpp
+++ b/libminifi/src/core/ProcessorNode.cpp
@@ -26,17 +26,17 @@ namespace core {
 
 ProcessorNode::ProcessorNode(const std::shared_ptr<Connectable> &processor)
     : processor_(processor),
-      Connectable(processor->getName(), 0),
+      Connectable(processor->getName()),
       ConfigurableComponent() {
-  uuid_t copy;
+  utils::Identifier copy;
   processor->getUUID(copy);
   setUUID(copy);
 }
 
 ProcessorNode::ProcessorNode(const ProcessorNode &other)
     : processor_(other.processor_),
-      Connectable(other.getName(), 0) {
-  uuid_t copy;
+      Connectable(other.getName()) {
+  utils::Identifier copy;
   processor_->getUUID(copy);
   setUUID(copy);
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/Property.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/Property.cpp b/libminifi/src/core/Property.cpp
index bb84e44..f3205d6 100644
--- a/libminifi/src/core/Property.cpp
+++ b/libminifi/src/core/Property.cpp
@@ -50,6 +50,10 @@ bool Property::getRequired() const {
   return is_required_;
 }
 
+bool Property::supportsExpressionLangauge() const {
+  return supports_el_;
+}
+
 std::string Property::getValidRegex() const {
   return valid_regex_;
 }
@@ -67,6 +71,10 @@ void Property::setValue(std::string value) {
   }
 }
 
+void Property::setSupportsExpressionLanguage(bool supportEl) {
+  supports_el_ = supportEl;
+}
+
 void Property::addValue(std::string value) {
   values_.push_back(std::move(value));
 }
@@ -86,6 +94,7 @@ const Property &Property::operator=(const Property &other) {
   valid_regex_ = other.valid_regex_;
   dependent_properties_ = other.dependent_properties_;
   exclusive_of_properties_ = other.exclusive_of_properties_;
+  supports_el_ = other.supports_el_;
   return *this;
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/Repository.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/Repository.cpp b/libminifi/src/core/Repository.cpp
index 1432d9e..8c5fa43 100644
--- a/libminifi/src/core/Repository.cpp
+++ b/libminifi/src/core/Repository.cpp
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 #include "core/Repository.h"
-#include <arpa/inet.h>
 #include <cstdint>
 #include <vector>
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/logging/LoggerConfiguration.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/logging/LoggerConfiguration.cpp b/libminifi/src/core/logging/LoggerConfiguration.cpp
index a0a207a..ef5be53 100644
--- a/libminifi/src/core/logging/LoggerConfiguration.cpp
+++ b/libminifi/src/core/logging/LoggerConfiguration.cpp
@@ -20,7 +20,6 @@
 
 #include "core/logging/LoggerConfiguration.h"
 #include <sys/stat.h>
-#include <unistd.h>
 #include <algorithm>
 #include <vector>
 #include <queue>
@@ -34,6 +33,13 @@
 #include "spdlog/spdlog.h"
 #include "spdlog/sinks/stdout_sinks.h"
 #include "spdlog/sinks/null_sink.h"
+#ifdef WIN32
+#define stat _stat
+#include <direct.h>
+#define _WINSOCKAPI_
+#include <windows.h>
+#include <tchar.h>
+#endif
 
 namespace org {
 namespace apache {
@@ -120,10 +126,17 @@ std::shared_ptr<internal::LoggerNamespace> LoggerConfiguration::initialize_names
         // Create the log directory if needed
         directory += "/logs";
         struct stat logDirStat;
+#ifdef WIN32
+        if (stat(directory.c_str(), &logDirStat) != 0) {
+          if (_mkdir(directory.c_str()) == -1) {
+            exit(1);
+          }
+#else
         if (stat(directory.c_str(), &logDirStat) != 0 || !S_ISDIR(logDirStat.st_mode)) {
           if (mkdir(directory.c_str(), 0777) == -1) {
             exit(1);
           }
+#endif
         }
         file_name = directory + "/" + file_name;
       }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/repository/VolatileContentRepository.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/repository/VolatileContentRepository.cpp b/libminifi/src/core/repository/VolatileContentRepository.cpp
index 0e99311..47c7ba6 100644
--- a/libminifi/src/core/repository/VolatileContentRepository.cpp
+++ b/libminifi/src/core/repository/VolatileContentRepository.cpp
@@ -17,6 +17,7 @@
  */
 
 #include "core/repository/VolatileContentRepository.h"
+#include "capi/expect.h"
 #include <cstdio>
 #include <string>
 #include <memory>
@@ -102,7 +103,7 @@ std::shared_ptr<io::BaseStream> VolatileContentRepository::write(const std::shar
   }
 
   int size = 0;
-  if (__builtin_expect(minimize_locking_ == true, 1)) {
+  if (LIKELY(minimize_locking_ == true)) {
     for (auto ent : value_vector_) {
       if (ent->testAndSetKey(claim, nullptr, nullptr, resource_claim_comparator_)) {
         std::lock_guard<std::mutex> lock(map_mutex_);
@@ -113,15 +114,15 @@ std::shared_ptr<io::BaseStream> VolatileContentRepository::write(const std::shar
       size++;
     }
   } else {
-    std::lock_guard < std::mutex > lock(map_mutex_);
+    std::lock_guard<std::mutex> lock(map_mutex_);
     auto claim_check = master_list_.find(claim->getContentFullPath());
     if (claim_check != master_list_.end()) {
-      return std::make_shared < io::AtomicEntryStream<std::shared_ptr<minifi::ResourceClaim>>>(claim, claim_check->second);
+      return std::make_shared<io::AtomicEntryStream<std::shared_ptr<minifi::ResourceClaim>>>(claim, claim_check->second);
     } else {
       AtomicEntry<std::shared_ptr<minifi::ResourceClaim>> *ent = new AtomicEntry<std::shared_ptr<minifi::ResourceClaim>>(&current_size_, &max_size_);
       if (ent->testAndSetKey(claim, nullptr, nullptr, resource_claim_comparator_)) {
         master_list_[claim->getContentFullPath()] = ent;
-        return std::make_shared< io::AtomicEntryStream<std::shared_ptr<minifi::ResourceClaim>>>(claim, ent);
+        return std::make_shared<io::AtomicEntryStream<std::shared_ptr<minifi::ResourceClaim>>>(claim, ent);
       }
     }
   }
@@ -158,7 +159,7 @@ std::shared_ptr<io::BaseStream> VolatileContentRepository::read(const std::share
 }
 
 bool VolatileContentRepository::remove(const std::shared_ptr<minifi::ResourceClaim> &claim) {
-  if (__builtin_expect(minimize_locking_ == true, 1)) {
+  if (LIKELY(minimize_locking_ == true)) {
     std::lock_guard<std::mutex> lock(map_mutex_);
     auto ent = master_list_.find(claim->getContentFullPath());
     if (ent != master_list_.end()) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/yaml/YamlConfiguration.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/yaml/YamlConfiguration.cpp b/libminifi/src/core/yaml/YamlConfiguration.cpp
index ef3a81f..af88082 100644
--- a/libminifi/src/core/yaml/YamlConfiguration.cpp
+++ b/libminifi/src/core/yaml/YamlConfiguration.cpp
@@ -35,7 +35,7 @@ namespace core {
 std::shared_ptr<utils::IdGenerator> YamlConfiguration::id_generator_ = utils::IdGenerator::getIdGenerator();
 
 core::ProcessGroup *YamlConfiguration::parseRootProcessGroupYaml(YAML::Node rootFlowNode) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   int version = 0;
 
   checkRequiredField(&rootFlowNode, "name",
@@ -50,7 +50,7 @@ core::ProcessGroup *YamlConfiguration::parseRootProcessGroupYaml(YAML::Node root
   }
 
   std::string id = getOrGenerateId(&rootFlowNode);
-  uuid_parse(id.c_str(), uuid);
+  uuid = id;
 
   if (rootFlowNode["version"]) {
     version = rootFlowNode["version"].as<int>();
@@ -69,7 +69,7 @@ void YamlConfiguration::parseProcessorNodeYaml(YAML::Node processorsNode, core::
   int64_t penalizationPeriod = -1;
   int64_t yieldPeriod = -1;
   int64_t runDurationNanos = -1;
-  uuid_t uuid;
+  utils::Identifier uuid;
   std::shared_ptr<core::Processor> processor = nullptr;
 
   if (!parentGroup) {
@@ -97,7 +97,7 @@ void YamlConfiguration::parseProcessorNodeYaml(YAML::Node processorsNode, core::
           registerResource(lib_location_str, lib_function_str);
         }
 
-        uuid_parse(procCfg.id.c_str(), uuid);
+        uuid = procCfg.id.c_str();
         logger_->log_debug("parseProcessorNode: name => [%s] id => [%s]", procCfg.name, procCfg.id);
         checkRequiredField(&procNode, "class", CONFIG_YAML_PROCESSORS_KEY);
         procCfg.javaClass = procNode["class"].as<std::string>();
@@ -130,6 +130,7 @@ void YamlConfiguration::parseProcessorNodeYaml(YAML::Node processorsNode, core::
 
         auto periodNode = getOptionalField(&procNode, "scheduling period", YAML::Node(DEFAULT_SCHEDULING_PERIOD_STR),
         CONFIG_YAML_PROCESSORS_KEY);
+
         procCfg.schedulingPeriod = periodNode.as<std::string>();
         logger_->log_debug("parseProcessorNode: scheduling period => [%s]", procCfg.schedulingPeriod);
 
@@ -235,7 +236,7 @@ void YamlConfiguration::parseProcessorNodeYaml(YAML::Node processorsNode, core::
 }
 
 void YamlConfiguration::parseRemoteProcessGroupYaml(YAML::Node *rpgNode, core::ProcessGroup *parentGroup) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   std::string id;
 
   if (!parentGroup) {
@@ -255,16 +256,17 @@ void YamlConfiguration::parseRemoteProcessGroupYaml(YAML::Node *rpgNode, core::P
 
         logger_->log_debug("parseRemoteProcessGroupYaml: name => [%s], id => [%s]", name, id);
 
-        checkRequiredField(&currRpgNode, "url",
+        auto urlNode = getOptionalField(&currRpgNode, "url", YAML::Node(""),
         CONFIG_YAML_REMOTE_PROCESS_GROUP_KEY);
-        std::string url = currRpgNode["url"].as<std::string>();
+
+        std::string url = urlNode.as<std::string>();
         logger_->log_debug("parseRemoteProcessGroupYaml: url => [%s]", url);
 
         core::ProcessGroup *group = NULL;
         core::TimeUnit unit;
         int64_t timeoutValue = -1;
         int64_t yieldPeriodValue = -1;
-        uuid_parse(id.c_str(), uuid);
+        uuid = id;
         group = this->createRemoteProcessGroup(name.c_str(), uuid).release();
         group->setParent(parentGroup);
         parentGroup->addProcessGroup(group);
@@ -355,7 +357,7 @@ void YamlConfiguration::parseRemoteProcessGroupYaml(YAML::Node *rpgNode, core::P
 }
 
 void YamlConfiguration::parseProvenanceReportingYaml(YAML::Node *reportNode, core::ProcessGroup *parentGroup) {
-  uuid_t port_uuid;
+  utils::Identifier port_uuid;
   int64_t schedulingPeriod = -1;
 
   if (!parentGroup) {
@@ -419,7 +421,7 @@ void YamlConfiguration::parseProvenanceReportingYaml(YAML::Node *reportNode, cor
   auto batchSizeStr = node["batch size"].as<std::string>();
 
   logger_->log_debug("ProvenanceReportingTask port uuid %s", portUUIDStr);
-  uuid_parse(portUUIDStr.c_str(), port_uuid);
+  port_uuid = portUUIDStr;
   reportTask->setPortUUID(port_uuid);
 
   if (core::Property::StringToInt(batchSizeStr, lvalue)) {
@@ -450,8 +452,8 @@ void YamlConfiguration::parseControllerServices(YAML::Node *controllerServicesNo
           auto id = controllerServiceNode["id"].as<std::string>();
           auto type = controllerServiceNode["class"].as<std::string>();
 
-          uuid_t uuid;
-          uuid_parse(id.c_str(), uuid);
+          utils::Identifier uuid;
+          uuid = id;
           auto controller_service_node = createControllerService(type, name, uuid);
           if (nullptr != controller_service_node) {
             logger_->log_debug("Created Controller Service with UUID %s and name %s", id, name);
@@ -488,7 +490,7 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
         std::shared_ptr<minifi::Connection> connection = nullptr;
 
         // Configure basic connection
-        uuid_t uuid;
+        utils::Identifier uuid;
         std::string id = getOrGenerateId(&connectionNode);
 
         // Default name to be same as ID
@@ -499,7 +501,7 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
           name = connectionNode["name"].as<std::string>();
         }
 
-        uuid_parse(id.c_str(), uuid);
+        uuid = id;
         connection = this->createConnection(name, uuid);
         logger_->log_debug("Created connection with UUID %s and name %s", id, name);
 
@@ -526,7 +528,7 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
           }
         }
 
-        uuid_t srcUUID;
+        utils::Identifier srcUUID;
 
         if (connectionNode["max work queue size"]) {
           auto max_work_queue_str = connectionNode["max work queue size"].as<std::string>();
@@ -548,7 +550,7 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
 
         if (connectionNode["source id"]) {
           std::string connectionSrcProcId = connectionNode["source id"].as<std::string>();
-          uuid_parse(connectionSrcProcId.c_str(), srcUUID);
+          srcUUID = connectionSrcProcId;
           logger_->log_debug("Using 'source id' to match source with same id for "
                              "connection '%s': source id => [%s]",
                              name, connectionSrcProcId);
@@ -557,10 +559,11 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
           checkRequiredField(&connectionNode, "source name",
           CONFIG_YAML_CONNECTIONS_KEY);
           std::string connectionSrcProcName = connectionNode["source name"].as<std::string>();
-          uuid_t tmpUUID;
-          if (!uuid_parse(connectionSrcProcName.c_str(), tmpUUID) && NULL != parent->findProcessor(tmpUUID)) {
+          utils::Identifier tmpUUID;
+          tmpUUID = connectionSrcProcName;
+          if (NULL != parent->findProcessor(tmpUUID)) {
             // the source name is a remote port id, so use that as the source id
-            uuid_copy(srcUUID, tmpUUID);
+            srcUUID = tmpUUID;
             logger_->log_debug("Using 'source name' containing a remote port id to match the source for "
                                "connection '%s': source name => [%s]",
                                name, connectionSrcProcName);
@@ -582,10 +585,10 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
         connection->setSourceUUID(srcUUID);
 
         // Configure connection destination
-        uuid_t destUUID;
+        utils::Identifier destUUID;
         if (connectionNode["destination id"]) {
           std::string connectionDestProcId = connectionNode["destination id"].as<std::string>();
-          uuid_parse(connectionDestProcId.c_str(), destUUID);
+          destUUID = connectionDestProcId;
           logger_->log_debug("Using 'destination id' to match destination with same id for "
                              "connection '%s': destination id => [%s]",
                              name, connectionDestProcId);
@@ -595,11 +598,11 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
           checkRequiredField(&connectionNode, "destination name",
           CONFIG_YAML_CONNECTIONS_KEY);
           std::string connectionDestProcName = connectionNode["destination name"].as<std::string>();
-          uuid_t tmpUUID;
-          if (!uuid_parse(connectionDestProcName.c_str(), tmpUUID) &&
-          NULL != parent->findProcessor(tmpUUID)) {
+          utils::Identifier tmpUUID;
+          tmpUUID = connectionDestProcName;
+          if (parent->findProcessor(tmpUUID)) {
             // the destination name is a remote port id, so use that as the dest id
-            uuid_copy(destUUID, tmpUUID);
+            destUUID = tmpUUID;
             logger_->log_debug("Using 'destination name' containing a remote port id to match the destination for "
                                "connection '%s': destination name => [%s]",
                                name, connectionDestProcName);
@@ -629,7 +632,7 @@ void YamlConfiguration::parseConnectionYaml(YAML::Node *connectionsNode, core::P
 }
 
 void YamlConfiguration::parsePortYaml(YAML::Node *portNode, core::ProcessGroup *parent, sitetosite::TransferDirection direction) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   std::shared_ptr<core::Processor> processor = NULL;
   std::shared_ptr<minifi::RemoteProcessorGroupPort> port = NULL;
 
@@ -652,7 +655,7 @@ void YamlConfiguration::parsePortYaml(YAML::Node *portNode, core::ProcessGroup *
                          "id should match the corresponding id specified in the NiFi configuration. "
                          "This is a UUID of the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.");
   auto portId = inputPortsObj["id"].as<std::string>();
-  uuid_parse(portId.c_str(), uuid);
+  uuid = portId;
 
   port = std::make_shared<minifi::RemoteProcessorGroupPort>(stream_factory_, nameStr, parent->getURL(), this->configuration_, uuid);
 
@@ -845,11 +848,9 @@ std::string YamlConfiguration::getOrGenerateId(YAML::Node *yamlNode, const std::
                                   "of YAML::NodeType::Scalar.");
     }
   } else {
-    uuid_t uuid;
+    utils::Identifier uuid;
     id_generator_->generate(uuid);
-    char uuid_str[37];
-    uuid_unparse(uuid, uuid_str);
-    id = uuid_str;
+    id = uuid.to_string();
     logger_->log_debug("Generating random ID: id => [%s]", id);
   }
   return id;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/ClientSocket.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/ClientSocket.cpp b/libminifi/src/io/ClientSocket.cpp
deleted file mode 100644
index 113f914..0000000
--- a/libminifi/src/io/ClientSocket.cpp
+++ /dev/null
@@ -1,484 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "io/ClientSocket.h"
-#include <netinet/tcp.h>
-#include <sys/types.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <ifaddrs.h>
-#include <unistd.h>
-#include <cstdio>
-#include <memory>
-#include <utility>
-#include <vector>
-#include <cerrno>
-#include <iostream>
-#include <string>
-#include "io/validation.h"
-#include "core/logging/LoggerConfiguration.h"
-
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace io {
-
-Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners = -1)
-    : requested_hostname_(hostname),
-      port_(port),
-      addr_info_(0),
-      socket_file_descriptor_(-1),
-      socket_max_(0),
-      total_written_(0),
-      total_read_(0),
-      is_loopback_only_(false),
-      listeners_(listeners),
-      canonical_hostname_(""),
-      nonBlocking_(false),
-      logger_(logging::LoggerFactory<Socket>::getLogger()) {
-  FD_ZERO(&total_list_);
-  FD_ZERO(&read_fds_);
-}
-
-Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port)
-    : Socket(context, hostname, port, 0) {
-}
-
-Socket::Socket(const Socket &&other)
-    : requested_hostname_(std::move(other.requested_hostname_)),
-      port_(std::move(other.port_)),
-      is_loopback_only_(false),
-      addr_info_(std::move(other.addr_info_)),
-      socket_file_descriptor_(other.socket_file_descriptor_),
-      socket_max_(other.socket_max_.load()),
-      listeners_(other.listeners_),
-      total_list_(other.total_list_),
-      read_fds_(other.read_fds_),
-      canonical_hostname_(std::move(other.canonical_hostname_)),
-      nonBlocking_(false),
-      logger_(std::move(other.logger_)) {
-  total_written_ = other.total_written_.load();
-  total_read_ = other.total_read_.load();
-}
-
-Socket::~Socket() {
-  closeStream();
-}
-
-void Socket::closeStream() {
-  if (0 != addr_info_) {
-    freeaddrinfo(addr_info_);
-    addr_info_ = 0;
-  }
-  if (socket_file_descriptor_ >= 0) {
-    logging::LOG_DEBUG(logger_) << "Closing " << socket_file_descriptor_;
-    close(socket_file_descriptor_);
-    socket_file_descriptor_ = -1;
-  }
-  if (total_written_ > 0) {
-    local_network_interface_.log_write(total_written_);
-    total_written_ = 0;
-  }
-  if (total_read_ > 0) {
-    local_network_interface_.log_read(total_read_);
-    total_read_ = 0;
-  }
-}
-
-void Socket::setNonBlocking() {
-  if (listeners_ <= 0) {
-    nonBlocking_ = true;
-  }
-}
-
-int8_t Socket::createConnection(const addrinfo *p, in_addr_t &addr) {
-  if ((socket_file_descriptor_ = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
-    logger_->log_error("error while connecting to server socket");
-    return -1;
-  }
-
-  setSocketOptions(socket_file_descriptor_);
-
-  if (listeners_ <= 0 && !local_network_interface_.getInterface().empty()) {
-    // bind to local network interface
-    ifaddrs* list = NULL;
-    ifaddrs* item = NULL;
-    ifaddrs* itemFound = NULL;
-    int result = getifaddrs(&list);
-    if (result == 0) {
-      item = list;
-      while (item) {
-        if ((item->ifa_addr != NULL) && (item->ifa_name != NULL) && (AF_INET == item->ifa_addr->sa_family)) {
-          if (strcmp(item->ifa_name, local_network_interface_.getInterface().c_str()) == 0) {
-            itemFound = item;
-            break;
-          }
-        }
-        item = item->ifa_next;
-      }
-
-      if (itemFound != NULL) {
-        result = bind(socket_file_descriptor_, itemFound->ifa_addr, sizeof(struct sockaddr_in));
-        if (result < 0)
-          logger_->log_info("Bind to interface %s failed %s", local_network_interface_.getInterface(), strerror(errno));
-        else
-          logger_->log_info("Bind to interface %s", local_network_interface_.getInterface());
-      }
-      freeifaddrs(list);
-    }
-  }
-
-  if (listeners_ > 0) {
-    struct sockaddr_in *sa_loc = (struct sockaddr_in*) p->ai_addr;
-    sa_loc->sin_family = AF_INET;
-    sa_loc->sin_port = htons(port_);
-    if (is_loopback_only_) {
-      sa_loc->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-    } else {
-      sa_loc->sin_addr.s_addr = htonl(INADDR_ANY);
-    }
-    if (bind(socket_file_descriptor_, p->ai_addr, p->ai_addrlen) == -1) {
-      logger_->log_error("Could not bind to socket, reason %s", strerror(errno));
-      return -1;
-    }
-  }
-  {
-    if (listeners_ <= 0) {
-      struct sockaddr_in *sa_loc = (struct sockaddr_in*) p->ai_addr;
-      sa_loc->sin_family = AF_INET;
-      sa_loc->sin_port = htons(port_);
-      // use any address if you are connecting to the local machine for testing
-      // otherwise we must use the requested hostname
-      if (IsNullOrEmpty(requested_hostname_) || requested_hostname_ == "localhost") {
-        if (is_loopback_only_) {
-          sa_loc->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-        } else {
-          sa_loc->sin_addr.s_addr = htonl(INADDR_ANY);
-        }
-      } else {
-        sa_loc->sin_addr.s_addr = addr;
-      }
-      if (connect(socket_file_descriptor_, p->ai_addr, p->ai_addrlen) == -1) {
-        close(socket_file_descriptor_);
-        socket_file_descriptor_ = -1;
-        return -1;
-      }
-    }
-  }
-
-  // listen
-  if (listeners_ > 0) {
-    if (listen(socket_file_descriptor_, listeners_) == -1) {
-      return -1;
-    } else {
-      logger_->log_debug("Created connection with %d listeners", listeners_);
-    }
-  }
-  // add the listener to the total set
-  FD_SET(socket_file_descriptor_, &total_list_);
-  socket_max_ = socket_file_descriptor_;
-  logger_->log_debug("Created connection with file descriptor %d", socket_file_descriptor_);
-  return 0;
-}
-
-int16_t Socket::initialize() {
-  addrinfo hints = { sizeof(addrinfo) };
-  memset(&hints, 0, sizeof hints);  // make sure the struct is empty
-  hints.ai_family = AF_UNSPEC;
-  hints.ai_socktype = SOCK_STREAM;
-  hints.ai_flags = AI_CANONNAME;
-  if (listeners_ > 0)
-    hints.ai_flags |= AI_PASSIVE;
-  hints.ai_protocol = 0; /* any protocol */
-
-  int errcode = getaddrinfo(requested_hostname_.c_str(), 0, &hints, &addr_info_);
-
-  if (errcode != 0) {
-    logger_->log_error("Saw error during getaddrinfo, error: %s", strerror(errno));
-    return -1;
-  }
-
-  socket_file_descriptor_ = -1;
-
-  in_addr_t addr;
-  struct hostent *h;
-#ifdef __MACH__
-  h = gethostbyname(requested_hostname_.c_str());
-#else
-  const char *host;
-
-  host = requested_hostname_.c_str();
-  char buf[1024];
-  struct hostent he;
-  int hh_errno;
-  gethostbyname_r(host, &he, buf, sizeof(buf), &h, &hh_errno);
-#endif
-  if (h == nullptr) {
-    return -1;
-  }
-  memcpy(reinterpret_cast<char*>(&addr), h->h_addr_list[0], h->h_length);
-
-  auto p = addr_info_;
-  for (; p != NULL; p = p->ai_next) {
-    if (IsNullOrEmpty(canonical_hostname_)) {
-      if (!IsNullOrEmpty(p) && !IsNullOrEmpty(p->ai_canonname))
-        canonical_hostname_ = p->ai_canonname;
-    }
-    // we've successfully connected
-    if (port_ > 0 && createConnection(p, addr) >= 0) {
-      // Put the socket in non-blocking mode:
-      if (nonBlocking_) {
-        if (fcntl(socket_file_descriptor_, F_SETFL, O_NONBLOCK) < 0) {
-          // handle error
-          logger_->log_error("Could not create non blocking to socket", strerror(errno));
-        } else {
-          logger_->log_debug("Successfully applied O_NONBLOCK to fd");
-        }
-      }
-      logger_->log_debug("Successfully created connection");
-      return 0;
-      break;
-    }
-  }
-
-  logger_->log_debug("Could not find device for our connection");
-  return -1;
-}
-
-int16_t Socket::select_descriptor(const uint16_t msec) {
-  if (listeners_ == 0) {
-    return socket_file_descriptor_;
-  }
-
-  struct timeval tv;
-
-  read_fds_ = total_list_;
-
-  tv.tv_sec = msec / 1000;
-  tv.tv_usec = (msec % 1000) * 1000;
-
-  std::lock_guard<std::recursive_mutex> guard(selection_mutex_);
-
-  if (msec > 0)
-    select(socket_max_ + 1, &read_fds_, NULL, NULL, &tv);
-  else
-    select(socket_max_ + 1, &read_fds_, NULL, NULL, NULL);
-
-  for (int i = 0; i <= socket_max_; i++) {
-    if (FD_ISSET(i, &read_fds_)) {
-      if (i == socket_file_descriptor_) {
-        if (listeners_ > 0) {
-          struct sockaddr_storage remoteaddr;  // client address
-          socklen_t addrlen = sizeof remoteaddr;
-          int newfd = accept(socket_file_descriptor_, (struct sockaddr *) &remoteaddr, &addrlen);
-          FD_SET(newfd, &total_list_);  // add to master set
-          if (newfd > socket_max_) {    // keep track of the max
-            socket_max_ = newfd;
-          }
-          return newfd;
-
-        } else {
-          return socket_file_descriptor_;
-        }
-        // we have a new connection
-      } else {
-        // data to be received on i
-        return i;
-      }
-    }
-  }
-
-  logger_->log_debug("Could not find a suitable file descriptor or select timed out");
-
-  return -1;
-}
-
-int16_t Socket::setSocketOptions(const int sock) {
-  int opt = 1;
-#ifndef __MACH__
-  if (setsockopt(sock, SOL_TCP, TCP_NODELAY, static_cast<void*>(&opt), sizeof(opt)) < 0) {
-    logger_->log_error("setsockopt() TCP_NODELAY failed");
-    close(sock);
-    return -1;
-  }
-  if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&opt), sizeof(opt)) < 0) {
-    logger_->log_error("setsockopt() SO_REUSEADDR failed");
-    close(sock);
-    return -1;
-  }
-
-  int sndsize = 256 * 1024;
-  if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char *>(&sndsize), sizeof(sndsize)) < 0) {
-    logger_->log_error("setsockopt() SO_SNDBUF failed");
-    close(sock);
-    return -1;
-  }
-
-#else
-  if (listeners_ > 0) {
-    // lose the pesky "address already in use" error message
-    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&opt), sizeof(opt)) < 0) {
-      logger_->log_error("setsockopt() SO_REUSEADDR failed");
-      close(sock);
-      return -1;
-    }
-  }
-#endif
-  return 0;
-}
-
-std::string Socket::getHostname() const {
-  return canonical_hostname_;
-}
-
-int Socket::writeData(std::vector<uint8_t> &buf, int buflen) {
-  if (static_cast<int>(buf.capacity()) < buflen)
-    return -1;
-  return writeData(reinterpret_cast<uint8_t *>(&buf[0]), buflen);
-}
-
-// data stream overrides
-
-int Socket::writeData(uint8_t *value, int size) {
-  int ret = 0, bytes = 0;
-
-  int fd = select_descriptor(1000);
-  while (bytes < size) {
-    ret = send(fd, value + bytes, size - bytes, 0);
-    // check for errors
-    if (ret <= 0) {
-      close(fd);
-      logger_->log_error("Could not send to %d, error: %s", fd, strerror(errno));
-      return ret;
-    }
-    bytes += ret;
-  }
-
-  if (ret)
-    logger_->log_trace("Send data size %d over socket %d", size, fd);
-  total_written_ += bytes;
-  return bytes;
-}
-
-template<typename T>
-inline std::vector<uint8_t> Socket::readBuffer(const T& t) {
-  std::vector<uint8_t> buf;
-  buf.resize(sizeof t);
-  readData(reinterpret_cast<uint8_t *>(&buf[0]), sizeof(t));
-  return buf;
-}
-
-int Socket::write(uint64_t base_value, bool is_little_endian) {
-  return Serializable::write(base_value, this, is_little_endian);
-}
-
-int Socket::write(uint32_t base_value, bool is_little_endian) {
-  return Serializable::write(base_value, this, is_little_endian);
-}
-
-int Socket::write(uint16_t base_value, bool is_little_endian) {
-  return Serializable::write(base_value, this, is_little_endian);
-}
-
-int Socket::read(uint64_t &value, bool is_little_endian) {
-  auto buf = readBuffer(value);
-
-  if (is_little_endian) {
-    value = ((uint64_t) buf[0] << 56) | ((uint64_t) (buf[1] & 255) << 48) | ((uint64_t) (buf[2] & 255) << 40) | ((uint64_t) (buf[3] & 255) << 32) | ((uint64_t) (buf[4] & 255) << 24)
-        | ((uint64_t) (buf[5] & 255) << 16) | ((uint64_t) (buf[6] & 255) << 8) | ((uint64_t) (buf[7] & 255) << 0);
-  } else {
-    value = ((uint64_t) buf[0] << 0) | ((uint64_t) (buf[1] & 255) << 8) | ((uint64_t) (buf[2] & 255) << 16) | ((uint64_t) (buf[3] & 255) << 24) | ((uint64_t) (buf[4] & 255) << 32)
-        | ((uint64_t) (buf[5] & 255) << 40) | ((uint64_t) (buf[6] & 255) << 48) | ((uint64_t) (buf[7] & 255) << 56);
-  }
-  return sizeof(value);
-}
-
-int Socket::read(uint32_t &value, bool is_little_endian) {
-  auto buf = readBuffer(value);
-
-  if (is_little_endian) {
-    value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
-  } else {
-    value = buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24;
-  }
-  return sizeof(value);
-}
-
-int Socket::read(uint16_t &value, bool is_little_endian) {
-  auto buf = readBuffer(value);
-
-  if (is_little_endian) {
-    value = (buf[0] << 8) | buf[1];
-  } else {
-    value = buf[0] | buf[1] << 8;
-  }
-  return sizeof(value);
-}
-
-int Socket::readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes) {
-  if (static_cast<int>(buf.capacity()) < buflen) {
-    buf.resize(buflen);
-  }
-  return readData(reinterpret_cast<uint8_t*>(&buf[0]), buflen, retrieve_all_bytes);
-}
-
-int Socket::readData(uint8_t *buf, int buflen, bool retrieve_all_bytes) {
-  int32_t total_read = 0;
-  while (buflen) {
-    int16_t fd = select_descriptor(1000);
-    if (fd < 0) {
-      if (listeners_ <= 0) {
-        logger_->log_debug("fd %d close %i", fd, buflen);
-        close(socket_file_descriptor_);
-      }
-      return -1;
-    }
-    int bytes_read = recv(fd, buf, buflen, 0);
-    logger_->log_trace("Recv call %d", bytes_read);
-    if (bytes_read <= 0) {
-      if (bytes_read == 0) {
-        logger_->log_debug("Other side hung up on %d", fd);
-      } else {
-        if (errno == EAGAIN || errno == EWOULDBLOCK) {
-          // continue
-          return -2;
-        }
-        logger_->log_error("Could not recv on %d ( port %d), error: %s", fd, port_, strerror(errno));
-      }
-      return -1;
-    }
-    buflen -= bytes_read;
-    buf += bytes_read;
-    total_read += bytes_read;
-    if (!retrieve_all_bytes) {
-      break;
-    }
-  }
-  total_read_ += total_read;
-  return total_read;
-}
-
-} /* namespace io */
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/DataStream.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/DataStream.cpp b/libminifi/src/io/DataStream.cpp
index 656bcdb..871e21a 100644
--- a/libminifi/src/io/DataStream.cpp
+++ b/libminifi/src/io/DataStream.cpp
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 #include "io/DataStream.h"
-#include <arpa/inet.h>
 #include <vector>
 #include <iostream>
 #include <cstdint>
@@ -24,6 +23,7 @@
 #include <cstring>
 #include <string>
 #include <algorithm>
+#include <iterator>
 
 namespace org {
 namespace apache {
@@ -95,9 +95,14 @@ int DataStream::readData(std::vector<uint8_t> &buf, int buflen) {
   }
 
   if (static_cast<int>(buf.capacity()) < buflen)
-    buf.resize(buflen);
+    buf.resize(buflen+1);
 
-  buf.insert(buf.begin(), &buffer[readBuffer], &buffer[readBuffer + buflen]);
+#ifdef WIN32
+  // back inserter works differently on win32 versions
+  buf.insert(buf.begin(), &buffer[readBuffer], &buffer[(readBuffer + buflen-1)]);
+#else
+  buf.insert(buf.begin(), &buffer[readBuffer], &buffer[(readBuffer + buflen)]);
+#endif
 
   readBuffer += buflen;
   return buflen;
@@ -108,9 +113,12 @@ int DataStream::readData(uint8_t *buf, int buflen) {
     // if read exceed
     return -1;
   }
-
-  std::copy(&buffer[readBuffer], &buffer[readBuffer + buflen], buf);
-
+#ifdef WIN32
+  // back inserter works differently on win32 versions
+  std::copy(&buffer[readBuffer], &buffer[(readBuffer + buflen-1)], buf);
+#else
+  std::copy(&buffer[readBuffer], &buffer[(readBuffer + buflen)], buf);
+#endif
   readBuffer += buflen;
   return buflen;
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/DescriptorStream.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/DescriptorStream.cpp b/libminifi/src/io/DescriptorStream.cpp
index d50a39f..38e1c85 100644
--- a/libminifi/src/io/DescriptorStream.cpp
+++ b/libminifi/src/io/DescriptorStream.cpp
@@ -18,7 +18,6 @@
 
 #include "io/DescriptorStream.h"
 #include <fstream>
-#include <unistd.h>
 #include <vector>
 #include <memory>
 #include <string>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/Serializable.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/Serializable.cpp b/libminifi/src/io/Serializable.cpp
index 7d3c79a..081f3db 100644
--- a/libminifi/src/io/Serializable.cpp
+++ b/libminifi/src/io/Serializable.cpp
@@ -16,13 +16,17 @@
  * limitations under the License.
  */
 #include "io/Serializable.h"
-#include <arpa/inet.h>
 #include <cstdio>
 #include <iostream>
 #include <vector>
 #include <string>
 #include <algorithm>
 #include "io/DataStream.h"
+#ifdef WIN32
+#include "Winsock2.h"
+#else
+#include <arpa/inet.h>
+#endif
 namespace org {
 namespace apache {
 namespace nifi {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/ServerSocket.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/ServerSocket.cpp b/libminifi/src/io/ServerSocket.cpp
index bfb098f..cf79e0c 100644
--- a/libminifi/src/io/ServerSocket.cpp
+++ b/libminifi/src/io/ServerSocket.cpp
@@ -17,13 +17,16 @@
  */
 #include "io/ServerSocket.h"
 #include "io/DescriptorStream.h"
-#include <netinet/tcp.h>
+
 #include <sys/types.h>
+#ifndef WIN32
+#include <netinet/tcp.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <unistd.h>
+#endif
 #include <cstdio>
 #include <memory>
 #include <utility>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/StreamFactory.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/StreamFactory.cpp b/libminifi/src/io/StreamFactory.cpp
index a66e4c1..bb021ae 100644
--- a/libminifi/src/io/StreamFactory.cpp
+++ b/libminifi/src/io/StreamFactory.cpp
@@ -98,7 +98,11 @@ StreamFactory::StreamFactory(const std::shared_ptr<Configure> &configure) {
   std::string secureStr;
   bool is_secure = false;
   if (configure->get(Configure::nifi_remote_input_secure, secureStr) && org::apache::nifi::minifi::utils::StringUtils::StringToBool(secureStr, is_secure)) {
+#ifdef OPENSSL_SUPPORT
     delegate_ = std::make_shared<SocketCreator<TLSSocket, TLSContext>>(configure);
+#else
+    delegate_ = std::make_shared<SocketCreator<Socket, SocketContext>>(configure);
+#endif
   } else {
     delegate_ = std::make_shared<SocketCreator<Socket, SocketContext>>(configure);
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/posix/ClientSocket.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/posix/ClientSocket.cpp b/libminifi/src/io/posix/ClientSocket.cpp
new file mode 100644
index 0000000..113f914
--- /dev/null
+++ b/libminifi/src/io/posix/ClientSocket.cpp
@@ -0,0 +1,484 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "io/ClientSocket.h"
+#include <netinet/tcp.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+#include <unistd.h>
+#include <cstdio>
+#include <memory>
+#include <utility>
+#include <vector>
+#include <cerrno>
+#include <iostream>
+#include <string>
+#include "io/validation.h"
+#include "core/logging/LoggerConfiguration.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace io {
+
+Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners = -1)
+    : requested_hostname_(hostname),
+      port_(port),
+      addr_info_(0),
+      socket_file_descriptor_(-1),
+      socket_max_(0),
+      total_written_(0),
+      total_read_(0),
+      is_loopback_only_(false),
+      listeners_(listeners),
+      canonical_hostname_(""),
+      nonBlocking_(false),
+      logger_(logging::LoggerFactory<Socket>::getLogger()) {
+  FD_ZERO(&total_list_);
+  FD_ZERO(&read_fds_);
+}
+
+Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port)
+    : Socket(context, hostname, port, 0) {
+}
+
+Socket::Socket(const Socket &&other)
+    : requested_hostname_(std::move(other.requested_hostname_)),
+      port_(std::move(other.port_)),
+      is_loopback_only_(false),
+      addr_info_(std::move(other.addr_info_)),
+      socket_file_descriptor_(other.socket_file_descriptor_),
+      socket_max_(other.socket_max_.load()),
+      listeners_(other.listeners_),
+      total_list_(other.total_list_),
+      read_fds_(other.read_fds_),
+      canonical_hostname_(std::move(other.canonical_hostname_)),
+      nonBlocking_(false),
+      logger_(std::move(other.logger_)) {
+  total_written_ = other.total_written_.load();
+  total_read_ = other.total_read_.load();
+}
+
+Socket::~Socket() {
+  closeStream();
+}
+
+void Socket::closeStream() {
+  if (0 != addr_info_) {
+    freeaddrinfo(addr_info_);
+    addr_info_ = 0;
+  }
+  if (socket_file_descriptor_ >= 0) {
+    logging::LOG_DEBUG(logger_) << "Closing " << socket_file_descriptor_;
+    close(socket_file_descriptor_);
+    socket_file_descriptor_ = -1;
+  }
+  if (total_written_ > 0) {
+    local_network_interface_.log_write(total_written_);
+    total_written_ = 0;
+  }
+  if (total_read_ > 0) {
+    local_network_interface_.log_read(total_read_);
+    total_read_ = 0;
+  }
+}
+
+void Socket::setNonBlocking() {
+  if (listeners_ <= 0) {
+    nonBlocking_ = true;
+  }
+}
+
+int8_t Socket::createConnection(const addrinfo *p, in_addr_t &addr) {
+  if ((socket_file_descriptor_ = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
+    logger_->log_error("error while connecting to server socket");
+    return -1;
+  }
+
+  setSocketOptions(socket_file_descriptor_);
+
+  if (listeners_ <= 0 && !local_network_interface_.getInterface().empty()) {
+    // bind to local network interface
+    ifaddrs* list = NULL;
+    ifaddrs* item = NULL;
+    ifaddrs* itemFound = NULL;
+    int result = getifaddrs(&list);
+    if (result == 0) {
+      item = list;
+      while (item) {
+        if ((item->ifa_addr != NULL) && (item->ifa_name != NULL) && (AF_INET == item->ifa_addr->sa_family)) {
+          if (strcmp(item->ifa_name, local_network_interface_.getInterface().c_str()) == 0) {
+            itemFound = item;
+            break;
+          }
+        }
+        item = item->ifa_next;
+      }
+
+      if (itemFound != NULL) {
+        result = bind(socket_file_descriptor_, itemFound->ifa_addr, sizeof(struct sockaddr_in));
+        if (result < 0)
+          logger_->log_info("Bind to interface %s failed %s", local_network_interface_.getInterface(), strerror(errno));
+        else
+          logger_->log_info("Bind to interface %s", local_network_interface_.getInterface());
+      }
+      freeifaddrs(list);
+    }
+  }
+
+  if (listeners_ > 0) {
+    struct sockaddr_in *sa_loc = (struct sockaddr_in*) p->ai_addr;
+    sa_loc->sin_family = AF_INET;
+    sa_loc->sin_port = htons(port_);
+    if (is_loopback_only_) {
+      sa_loc->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+    } else {
+      sa_loc->sin_addr.s_addr = htonl(INADDR_ANY);
+    }
+    if (bind(socket_file_descriptor_, p->ai_addr, p->ai_addrlen) == -1) {
+      logger_->log_error("Could not bind to socket, reason %s", strerror(errno));
+      return -1;
+    }
+  }
+  {
+    if (listeners_ <= 0) {
+      struct sockaddr_in *sa_loc = (struct sockaddr_in*) p->ai_addr;
+      sa_loc->sin_family = AF_INET;
+      sa_loc->sin_port = htons(port_);
+      // use any address if you are connecting to the local machine for testing
+      // otherwise we must use the requested hostname
+      if (IsNullOrEmpty(requested_hostname_) || requested_hostname_ == "localhost") {
+        if (is_loopback_only_) {
+          sa_loc->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+        } else {
+          sa_loc->sin_addr.s_addr = htonl(INADDR_ANY);
+        }
+      } else {
+        sa_loc->sin_addr.s_addr = addr;
+      }
+      if (connect(socket_file_descriptor_, p->ai_addr, p->ai_addrlen) == -1) {
+        close(socket_file_descriptor_);
+        socket_file_descriptor_ = -1;
+        return -1;
+      }
+    }
+  }
+
+  // listen
+  if (listeners_ > 0) {
+    if (listen(socket_file_descriptor_, listeners_) == -1) {
+      return -1;
+    } else {
+      logger_->log_debug("Created connection with %d listeners", listeners_);
+    }
+  }
+  // add the listener to the total set
+  FD_SET(socket_file_descriptor_, &total_list_);
+  socket_max_ = socket_file_descriptor_;
+  logger_->log_debug("Created connection with file descriptor %d", socket_file_descriptor_);
+  return 0;
+}
+
+int16_t Socket::initialize() {
+  addrinfo hints = { sizeof(addrinfo) };
+  memset(&hints, 0, sizeof hints);  // make sure the struct is empty
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_CANONNAME;
+  if (listeners_ > 0)
+    hints.ai_flags |= AI_PASSIVE;
+  hints.ai_protocol = 0; /* any protocol */
+
+  int errcode = getaddrinfo(requested_hostname_.c_str(), 0, &hints, &addr_info_);
+
+  if (errcode != 0) {
+    logger_->log_error("Saw error during getaddrinfo, error: %s", strerror(errno));
+    return -1;
+  }
+
+  socket_file_descriptor_ = -1;
+
+  in_addr_t addr;
+  struct hostent *h;
+#ifdef __MACH__
+  h = gethostbyname(requested_hostname_.c_str());
+#else
+  const char *host;
+
+  host = requested_hostname_.c_str();
+  char buf[1024];
+  struct hostent he;
+  int hh_errno;
+  gethostbyname_r(host, &he, buf, sizeof(buf), &h, &hh_errno);
+#endif
+  if (h == nullptr) {
+    return -1;
+  }
+  memcpy(reinterpret_cast<char*>(&addr), h->h_addr_list[0], h->h_length);
+
+  auto p = addr_info_;
+  for (; p != NULL; p = p->ai_next) {
+    if (IsNullOrEmpty(canonical_hostname_)) {
+      if (!IsNullOrEmpty(p) && !IsNullOrEmpty(p->ai_canonname))
+        canonical_hostname_ = p->ai_canonname;
+    }
+    // we've successfully connected
+    if (port_ > 0 && createConnection(p, addr) >= 0) {
+      // Put the socket in non-blocking mode:
+      if (nonBlocking_) {
+        if (fcntl(socket_file_descriptor_, F_SETFL, O_NONBLOCK) < 0) {
+          // handle error
+          logger_->log_error("Could not create non blocking to socket", strerror(errno));
+        } else {
+          logger_->log_debug("Successfully applied O_NONBLOCK to fd");
+        }
+      }
+      logger_->log_debug("Successfully created connection");
+      return 0;
+      break;
+    }
+  }
+
+  logger_->log_debug("Could not find device for our connection");
+  return -1;
+}
+
+int16_t Socket::select_descriptor(const uint16_t msec) {
+  if (listeners_ == 0) {
+    return socket_file_descriptor_;
+  }
+
+  struct timeval tv;
+
+  read_fds_ = total_list_;
+
+  tv.tv_sec = msec / 1000;
+  tv.tv_usec = (msec % 1000) * 1000;
+
+  std::lock_guard<std::recursive_mutex> guard(selection_mutex_);
+
+  if (msec > 0)
+    select(socket_max_ + 1, &read_fds_, NULL, NULL, &tv);
+  else
+    select(socket_max_ + 1, &read_fds_, NULL, NULL, NULL);
+
+  for (int i = 0; i <= socket_max_; i++) {
+    if (FD_ISSET(i, &read_fds_)) {
+      if (i == socket_file_descriptor_) {
+        if (listeners_ > 0) {
+          struct sockaddr_storage remoteaddr;  // client address
+          socklen_t addrlen = sizeof remoteaddr;
+          int newfd = accept(socket_file_descriptor_, (struct sockaddr *) &remoteaddr, &addrlen);
+          FD_SET(newfd, &total_list_);  // add to master set
+          if (newfd > socket_max_) {    // keep track of the max
+            socket_max_ = newfd;
+          }
+          return newfd;
+
+        } else {
+          return socket_file_descriptor_;
+        }
+        // we have a new connection
+      } else {
+        // data to be received on i
+        return i;
+      }
+    }
+  }
+
+  logger_->log_debug("Could not find a suitable file descriptor or select timed out");
+
+  return -1;
+}
+
+int16_t Socket::setSocketOptions(const int sock) {
+  int opt = 1;
+#ifndef __MACH__
+  if (setsockopt(sock, SOL_TCP, TCP_NODELAY, static_cast<void*>(&opt), sizeof(opt)) < 0) {
+    logger_->log_error("setsockopt() TCP_NODELAY failed");
+    close(sock);
+    return -1;
+  }
+  if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&opt), sizeof(opt)) < 0) {
+    logger_->log_error("setsockopt() SO_REUSEADDR failed");
+    close(sock);
+    return -1;
+  }
+
+  int sndsize = 256 * 1024;
+  if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char *>(&sndsize), sizeof(sndsize)) < 0) {
+    logger_->log_error("setsockopt() SO_SNDBUF failed");
+    close(sock);
+    return -1;
+  }
+
+#else
+  if (listeners_ > 0) {
+    // lose the pesky "address already in use" error message
+    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&opt), sizeof(opt)) < 0) {
+      logger_->log_error("setsockopt() SO_REUSEADDR failed");
+      close(sock);
+      return -1;
+    }
+  }
+#endif
+  return 0;
+}
+
+std::string Socket::getHostname() const {
+  return canonical_hostname_;
+}
+
+int Socket::writeData(std::vector<uint8_t> &buf, int buflen) {
+  if (static_cast<int>(buf.capacity()) < buflen)
+    return -1;
+  return writeData(reinterpret_cast<uint8_t *>(&buf[0]), buflen);
+}
+
+// data stream overrides
+
+int Socket::writeData(uint8_t *value, int size) {
+  int ret = 0, bytes = 0;
+
+  int fd = select_descriptor(1000);
+  while (bytes < size) {
+    ret = send(fd, value + bytes, size - bytes, 0);
+    // check for errors
+    if (ret <= 0) {
+      close(fd);
+      logger_->log_error("Could not send to %d, error: %s", fd, strerror(errno));
+      return ret;
+    }
+    bytes += ret;
+  }
+
+  if (ret)
+    logger_->log_trace("Send data size %d over socket %d", size, fd);
+  total_written_ += bytes;
+  return bytes;
+}
+
+template<typename T>
+inline std::vector<uint8_t> Socket::readBuffer(const T& t) {
+  std::vector<uint8_t> buf;
+  buf.resize(sizeof t);
+  readData(reinterpret_cast<uint8_t *>(&buf[0]), sizeof(t));
+  return buf;
+}
+
+int Socket::write(uint64_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::write(uint32_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::write(uint16_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::read(uint64_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = ((uint64_t) buf[0] << 56) | ((uint64_t) (buf[1] & 255) << 48) | ((uint64_t) (buf[2] & 255) << 40) | ((uint64_t) (buf[3] & 255) << 32) | ((uint64_t) (buf[4] & 255) << 24)
+        | ((uint64_t) (buf[5] & 255) << 16) | ((uint64_t) (buf[6] & 255) << 8) | ((uint64_t) (buf[7] & 255) << 0);
+  } else {
+    value = ((uint64_t) buf[0] << 0) | ((uint64_t) (buf[1] & 255) << 8) | ((uint64_t) (buf[2] & 255) << 16) | ((uint64_t) (buf[3] & 255) << 24) | ((uint64_t) (buf[4] & 255) << 32)
+        | ((uint64_t) (buf[5] & 255) << 40) | ((uint64_t) (buf[6] & 255) << 48) | ((uint64_t) (buf[7] & 255) << 56);
+  }
+  return sizeof(value);
+}
+
+int Socket::read(uint32_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+  } else {
+    value = buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24;
+  }
+  return sizeof(value);
+}
+
+int Socket::read(uint16_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = (buf[0] << 8) | buf[1];
+  } else {
+    value = buf[0] | buf[1] << 8;
+  }
+  return sizeof(value);
+}
+
+int Socket::readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes) {
+  if (static_cast<int>(buf.capacity()) < buflen) {
+    buf.resize(buflen);
+  }
+  return readData(reinterpret_cast<uint8_t*>(&buf[0]), buflen, retrieve_all_bytes);
+}
+
+int Socket::readData(uint8_t *buf, int buflen, bool retrieve_all_bytes) {
+  int32_t total_read = 0;
+  while (buflen) {
+    int16_t fd = select_descriptor(1000);
+    if (fd < 0) {
+      if (listeners_ <= 0) {
+        logger_->log_debug("fd %d close %i", fd, buflen);
+        close(socket_file_descriptor_);
+      }
+      return -1;
+    }
+    int bytes_read = recv(fd, buf, buflen, 0);
+    logger_->log_trace("Recv call %d", bytes_read);
+    if (bytes_read <= 0) {
+      if (bytes_read == 0) {
+        logger_->log_debug("Other side hung up on %d", fd);
+      } else {
+        if (errno == EAGAIN || errno == EWOULDBLOCK) {
+          // continue
+          return -2;
+        }
+        logger_->log_error("Could not recv on %d ( port %d), error: %s", fd, port_, strerror(errno));
+      }
+      return -1;
+    }
+    buflen -= bytes_read;
+    buf += bytes_read;
+    total_read += bytes_read;
+    if (!retrieve_all_bytes) {
+      break;
+    }
+  }
+  total_read_ += total_read;
+  return total_read;
+}
+
+} /* namespace io */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/tls/SecureDescriptorStream.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/tls/SecureDescriptorStream.cpp b/libminifi/src/io/tls/SecureDescriptorStream.cpp
index c1ddd8a..9e1334f 100644
--- a/libminifi/src/io/tls/SecureDescriptorStream.cpp
+++ b/libminifi/src/io/tls/SecureDescriptorStream.cpp
@@ -18,7 +18,6 @@
 
 #include "io/tls/SecureDescriptorStream.h"
 #include <fstream>
-#include <unistd.h>
 #include <vector>
 #include <memory>
 #include <string>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/tls/TLSServerSocket.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/tls/TLSServerSocket.cpp b/libminifi/src/io/tls/TLSServerSocket.cpp
index f7901d3..22b01a3 100644
--- a/libminifi/src/io/tls/TLSServerSocket.cpp
+++ b/libminifi/src/io/tls/TLSServerSocket.cpp
@@ -17,13 +17,16 @@
  */
 #include "io/tls/SecureDescriptorStream.h"
 #include "io/tls/TLSServerSocket.h"
-#include <netinet/tcp.h>
+
 #include <sys/types.h>
+#ifndef WIN32
+#include <netinet/tcp.h>
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <unistd.h>
+#endif
 #include <cstdio>
 #include <memory>
 #include <chrono>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/io/win/ClientSocket.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/io/win/ClientSocket.cpp b/libminifi/src/io/win/ClientSocket.cpp
new file mode 100644
index 0000000..261c2af
--- /dev/null
+++ b/libminifi/src/io/win/ClientSocket.cpp
@@ -0,0 +1,538 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "io/ClientSocket.h"
+#ifndef WIN32
+#include <netinet/tcp.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+
+#include <cstdio>
+#include <memory>
+#include <utility>
+#include <vector>
+#include <cerrno>
+#include <iostream>
+#include <string>
+#include "io/validation.h"
+#include "core/logging/LoggerConfiguration.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace io {
+
+Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners = -1)
+    : requested_hostname_(hostname),
+      port_(port),
+      addr_info_(0),
+      socket_file_descriptor_(-1),
+      socket_max_(0),
+      total_written_(0),
+      total_read_(0),
+      is_loopback_only_(false),
+      listeners_(listeners),
+      canonical_hostname_(""),
+      nonBlocking_(false),
+      logger_(logging::LoggerFactory<Socket>::getLogger()) {
+  FD_ZERO(&total_list_);
+  FD_ZERO(&read_fds_);
+  initialize_socket();
+}
+
+Socket::Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port)
+    : Socket(context, hostname, port, 0) {
+  initialize_socket();
+}
+
+Socket::Socket(const Socket &&other)
+    : requested_hostname_(std::move(other.requested_hostname_)),
+      port_(std::move(other.port_)),
+      is_loopback_only_(false),
+      addr_info_(std::move(other.addr_info_)),
+      socket_file_descriptor_(other.socket_file_descriptor_),
+      socket_max_(other.socket_max_.load()),
+      listeners_(other.listeners_),
+      total_list_(other.total_list_),
+      read_fds_(other.read_fds_),
+      canonical_hostname_(std::move(other.canonical_hostname_)),
+      nonBlocking_(false),
+      logger_(std::move(other.logger_)) {
+  total_written_ = other.total_written_.load();
+  total_read_ = other.total_read_.load();
+}
+
+Socket::~Socket() {
+  closeStream();
+}
+
+void Socket::closeStream() {
+  if (0 != addr_info_) {
+    freeaddrinfo(addr_info_);
+    addr_info_ = 0;
+  }
+  if (socket_file_descriptor_ >= 0 && socket_file_descriptor_ != INVALID_SOCKET) {
+    logging::LOG_DEBUG(logger_) << "Closing " << socket_file_descriptor_;
+#ifdef WIN32
+    closesocket(socket_file_descriptor_);
+#else
+    close(socket_file_descriptor_);
+#endif
+    socket_file_descriptor_ = -1;
+  }
+  if (total_written_ > 0) {
+    local_network_interface_.log_write(total_written_);
+    total_written_ = 0;
+  }
+  if (total_read_ > 0) {
+    local_network_interface_.log_read(total_read_);
+    total_read_ = 0;
+  }
+}
+
+void Socket::setNonBlocking() {
+  if (listeners_ <= 0) {
+    nonBlocking_ = true;
+  }
+}
+#ifdef WIN32
+int8_t Socket::createConnection(const addrinfo *p, struct in_addr &addr) {
+#else
+int8_t Socket::createConnection(const addrinfo *p, in_addr_t &addr) {
+#endif
+  if ((socket_file_descriptor_ = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == INVALID_SOCKET) {
+    logger_->log_error("error while connecting to server socket");
+    return -1;
+  }
+
+  setSocketOptions(socket_file_descriptor_);
+
+  if (listeners_ <= 0 && !local_network_interface_.getInterface().empty()) {
+    // bind to local network interface
+#ifndef WIN32
+    ifaddrs* list = NULL;
+    ifaddrs* item = NULL;
+    ifaddrs* itemFound = NULL;
+    int result = getifaddrs(&list);
+    if (result == 0) {
+      item = list;
+      while (item) {
+        if ((item->ifa_addr != NULL) && (item->ifa_name != NULL) && (AF_INET == item->ifa_addr->sa_family)) {
+          if (strcmp(item->ifa_name, local_network_interface_.getInterface().c_str()) == 0) {
+            itemFound = item;
+            break;
+          }
+        }
+        item = item->ifa_next;
+      }
+
+      if (itemFound != NULL) {
+        result = bind(socket_file_descriptor_, itemFound->ifa_addr, sizeof(struct sockaddr_in));
+        if (result < 0)
+          logger_->log_info("Bind to interface %s failed %s", local_network_interface_.getInterface(), strerror(errno));
+        else
+          logger_->log_info("Bind to interface %s", local_network_interface_.getInterface());
+      }
+      freeifaddrs(list);
+    }
+#endif
+  }
+
+  if (listeners_ > 0) {
+    struct sockaddr_in *sa_loc = (struct sockaddr_in*) p->ai_addr;
+    sa_loc->sin_family = AF_INET;
+    sa_loc->sin_port = htons(port_);
+    if (is_loopback_only_) {
+      sa_loc->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+    } else {
+      sa_loc->sin_addr.s_addr = htonl(INADDR_ANY);
+    }
+    if (bind(socket_file_descriptor_, p->ai_addr, p->ai_addrlen) == -1) {
+      logger_->log_error("Could not bind to socket, reason %s", strerror(errno));
+      return -1;
+    }
+  }
+  {
+    if (listeners_ <= 0) {
+      struct sockaddr_in sa_loc;
+      memset(&sa_loc, 0x00, sizeof(sa_loc));
+      sa_loc.sin_family = AF_INET;
+      sa_loc.sin_port = htons(port_);
+
+      // use any address if you are connecting to the local machine for testing
+      // otherwise we must use the requested hostname
+      if (IsNullOrEmpty(requested_hostname_) || requested_hostname_ == "localhost") {
+        if (is_loopback_only_) {
+          sa_loc.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+        } else {
+          sa_loc.sin_addr.s_addr = htonl(INADDR_ANY);
+        }
+      } else {
+#ifdef WIN32
+        sa_loc.sin_addr.s_addr = addr.s_addr;
+#else
+        sa_loc.sin_addr.s_addr = addr;
+#endif
+      }
+      if (connect(socket_file_descriptor_, (struct sockaddr*) &sa_loc, sizeof(sa_loc)) == -1) {
+#ifdef WIN32
+        int err = WSAGetLastError();
+        if (err == WSAEADDRNOTAVAIL) {
+          logger_->log_error("invalid or unknown IP");
+        } else if (err == WSAECONNREFUSED) {
+          logger_->log_error("Connection refused");
+        } else {
+          logger_->log_error("Unknown error");
+        }
+
+#endif
+        closeStream();
+        socket_file_descriptor_ = -1;
+        return -1;
+      }
+    }
+  }
+
+  // listen
+  if (listeners_ > 0) {
+    if (listen(socket_file_descriptor_, listeners_) == -1) {
+      return -1;
+    } else {
+      logger_->log_debug("Created connection with %d listeners", listeners_);
+    }
+  }
+  // add the listener to the total set
+  FD_SET(socket_file_descriptor_, &total_list_);
+  socket_max_ = socket_file_descriptor_;
+  logger_->log_debug("Created connection with file descriptor %d", socket_file_descriptor_);
+  return 0;
+}
+
+int16_t Socket::initialize() {
+  addrinfo hints = { sizeof(addrinfo) };
+  memset(&hints, 0, sizeof hints);  // make sure the struct is empty
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_CANONNAME;
+  if (listeners_ > 0)
+    hints.ai_flags |= AI_PASSIVE;
+  hints.ai_protocol = 0; /* any protocol */
+
+  int errcode = getaddrinfo(requested_hostname_.c_str(), 0, &hints, &addr_info_);
+
+  if (errcode != 0) {
+    logger_->log_error("Saw error during getaddrinfo, error: %s", strerror(errno));
+    return -1;
+  }
+
+  socket_file_descriptor_ = -1;
+
+#ifndef WIN32
+  in_addr_t addr;
+#else
+  in_addr addr;
+#endif
+  struct hostent *h;
+#if defined( __MACH__ ) || defined(WIN32)
+  h = gethostbyname(requested_hostname_.c_str());
+#else
+  const char *host;
+
+  host = requested_hostname_.c_str();
+  char buf[1024];
+  struct hostent he;
+  int hh_errno;
+  gethostbyname_r(host, &he, buf, sizeof(buf), &h, &hh_errno);
+#endif
+  if (h == nullptr) {
+    return -1;
+  }
+  memcpy(reinterpret_cast<char*>(&addr), h->h_addr_list[0], h->h_length);
+
+  auto p = addr_info_;
+  for (; p != NULL; p = p->ai_next) {
+    if (IsNullOrEmpty(canonical_hostname_)) {
+      if (!IsNullOrEmpty(p) && !IsNullOrEmpty(p->ai_canonname))
+        canonical_hostname_ = p->ai_canonname;
+    }
+    // we've successfully connected
+    if (port_ > 0 && createConnection(p, addr) >= 0) {
+      // Put the socket in non-blocking mode:
+      if (nonBlocking_) {
+#ifndef WIN32
+        if (fcntl(socket_file_descriptor_, F_SETFL, O_NONBLOCK) < 0) {
+          // handle error
+          logger_->log_error("Could not create non blocking to socket", strerror(errno));
+        } else {
+          logger_->log_debug("Successfully applied O_NONBLOCK to fd");
+        }
+#else
+        u_long iMode = 1;
+        if (ioctlsocket(socket_file_descriptor_, FIONBIO, &iMode) == NO_ERROR) {
+          logger_->log_debug("Successfully applied O_NONBLOCK to fd");
+        }
+#endif
+      }
+      logger_->log_debug("Successfully created connection");
+      return 0;
+      break;
+    }
+  }
+
+  logger_->log_debug("Could not find device for our connection");
+  return -1;
+}
+
+int16_t Socket::select_descriptor(const uint16_t msec) {
+  if (listeners_ == 0) {
+    return socket_file_descriptor_;
+  }
+
+  struct timeval tv;
+
+  read_fds_ = total_list_;
+
+  tv.tv_sec = msec / 1000;
+  tv.tv_usec = (msec % 1000) * 1000;
+
+  std::lock_guard<std::recursive_mutex> guard(selection_mutex_);
+
+  if (msec > 0)
+    select(socket_max_ + 1, &read_fds_, NULL, NULL, &tv);
+  else
+    select(socket_max_ + 1, &read_fds_, NULL, NULL, NULL);
+
+  for (int i = 0; i <= socket_max_; i++) {
+    if (FD_ISSET(i, &read_fds_)) {
+      if (i == socket_file_descriptor_) {
+        if (listeners_ > 0) {
+          struct sockaddr_storage remoteaddr;  // client address
+          socklen_t addrlen = sizeof remoteaddr;
+          int newfd = accept(socket_file_descriptor_, (struct sockaddr *) &remoteaddr, &addrlen);
+          FD_SET(newfd, &total_list_);  // add to master set
+          if (newfd > socket_max_) {    // keep track of the max
+            socket_max_ = newfd;
+          }
+          return newfd;
+
+        } else {
+          return socket_file_descriptor_;
+        }
+        // we have a new connection
+      } else {
+        // data to be received on i
+        return i;
+      }
+    }
+  }
+
+  logger_->log_debug("Could not find a suitable file descriptor or select timed out");
+
+  return -1;
+}
+
+int16_t Socket::setSocketOptions(const SocketDescriptor sock) {
+  int opt = 1;
+#ifndef WIN32
+#ifndef __MACH__
+  if (setsockopt(sock, SOL_TCP, TCP_NODELAY, static_cast<void*>(&opt), sizeof(opt)) < 0) {
+    logger_->log_error("setsockopt() TCP_NODELAY failed");
+    close(sock);
+    return -1;
+  }
+  if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&opt), sizeof(opt)) < 0) {
+    logger_->log_error("setsockopt() SO_REUSEADDR failed");
+    close(sock);
+    return -1;
+  }
+
+  int sndsize = 256 * 1024;
+  if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char *>(&sndsize), sizeof(sndsize)) < 0) {
+    logger_->log_error("setsockopt() SO_SNDBUF failed");
+    close(sock);
+    return -1;
+  }
+
+#else
+  if (listeners_ > 0) {
+    // lose the pesky "address already in use" error message
+    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&opt), sizeof(opt)) < 0) {
+      logger_->log_error("setsockopt() SO_REUSEADDR failed");
+      close(sock);
+      return -1;
+    }
+  }
+#endif
+#endif
+  return 0;
+}
+
+std::string Socket::getHostname() const {
+  return canonical_hostname_;
+}
+
+int Socket::writeData(std::vector<uint8_t> &buf, int buflen) {
+  if (static_cast<int>(buf.capacity()) < buflen)
+    return -1;
+  return writeData(reinterpret_cast<uint8_t *>(&buf[0]), buflen);
+}
+
+// data stream overrides
+
+int Socket::writeData(uint8_t *value, int size) {
+  int ret = 0, bytes = 0;
+
+  int fd = select_descriptor(1000);
+  while (bytes < size) {
+#ifdef WIN32
+    const char *vts = (const char*)value;
+    ret = send(fd, vts + bytes, size - bytes, 0);
+#else
+    ret = send(fd, value + bytes, size - bytes, 0);
+#endif
+    // check for errors
+    if (ret <= 0) {
+      close(fd);
+      logger_->log_error("Could not send to %d, error: %s", fd, strerror(errno));
+      return ret;
+    }
+    bytes += ret;
+  }
+
+  if (ret)
+    logger_->log_trace("Send data size %d over socket %d", size, fd);
+  total_written_ += bytes;
+  return bytes;
+}
+
+template<typename T>
+inline std::vector<uint8_t> Socket::readBuffer(const T& t) {
+  std::vector<uint8_t> buf;
+  buf.resize(sizeof t);
+  readData(reinterpret_cast<uint8_t *>(&buf[0]), sizeof(t));
+  return buf;
+}
+
+int Socket::write(uint64_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::write(uint32_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::write(uint16_t base_value, bool is_little_endian) {
+  return Serializable::write(base_value, this, is_little_endian);
+}
+
+int Socket::read(uint64_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = ((uint64_t) buf[0] << 56) | ((uint64_t) (buf[1] & 255) << 48) | ((uint64_t) (buf[2] & 255) << 40) | ((uint64_t) (buf[3] & 255) << 32) | ((uint64_t) (buf[4] & 255) << 24)
+        | ((uint64_t) (buf[5] & 255) << 16) | ((uint64_t) (buf[6] & 255) << 8) | ((uint64_t) (buf[7] & 255) << 0);
+  } else {
+    value = ((uint64_t) buf[0] << 0) | ((uint64_t) (buf[1] & 255) << 8) | ((uint64_t) (buf[2] & 255) << 16) | ((uint64_t) (buf[3] & 255) << 24) | ((uint64_t) (buf[4] & 255) << 32)
+        | ((uint64_t) (buf[5] & 255) << 40) | ((uint64_t) (buf[6] & 255) << 48) | ((uint64_t) (buf[7] & 255) << 56);
+  }
+  return sizeof(value);
+}
+
+int Socket::read(uint32_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+  } else {
+    value = buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24;
+  }
+  return sizeof(value);
+}
+
+int Socket::read(uint16_t &value, bool is_little_endian) {
+  auto buf = readBuffer(value);
+
+  if (is_little_endian) {
+    value = (buf[0] << 8) | buf[1];
+  } else {
+    value = buf[0] | buf[1] << 8;
+  }
+  return sizeof(value);
+}
+
+int Socket::readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes) {
+  if (static_cast<int>(buf.capacity()) < buflen) {
+    buf.resize(buflen);
+  }
+  return readData(reinterpret_cast<uint8_t*>(&buf[0]), buflen, retrieve_all_bytes);
+}
+
+int Socket::readData(uint8_t *buf, int buflen, bool retrieve_all_bytes) {
+  int32_t total_read = 0;
+  while (buflen) {
+    int16_t fd = select_descriptor(1000);
+    if (fd < 0) {
+      if (listeners_ <= 0) {
+        logger_->log_debug("fd %d close %i", fd, buflen);
+        close(socket_file_descriptor_);
+      }
+      return -1;
+    }
+#ifdef WIN32
+    char *bfs = reinterpret_cast<char*>(buf);
+    int bytes_read = recv(fd, bfs, buflen, 0);
+#else
+    int bytes_read = recv(fd, buf, buflen, 0);
+#endif
+    logger_->log_trace("Recv call %d", bytes_read);
+    if (bytes_read <= 0) {
+      if (bytes_read == 0) {
+        logger_->log_debug("Other side hung up on %d", fd);
+      } else {
+        if (errno == EAGAIN || errno == EWOULDBLOCK) {
+          // continue
+          return -2;
+        }
+        logger_->log_error("Could not recv on %d, error: %s", fd, strerror(errno));
+      }
+      return -1;
+    }
+    buflen -= bytes_read;
+    buf += bytes_read;
+    total_read += bytes_read;
+    if (!retrieve_all_bytes) {
+      break;
+    }
+  }
+  total_read_ += total_read;
+  return total_read;
+}
+
+} /* namespace io */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/AppendHostInfo.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/AppendHostInfo.cpp b/libminifi/src/processors/AppendHostInfo.cpp
index bbc86a5..8769de2 100644
--- a/libminifi/src/processors/AppendHostInfo.cpp
+++ b/libminifi/src/processors/AppendHostInfo.cpp
@@ -20,14 +20,7 @@
 #include "processors/AppendHostInfo.h"
 #define __USE_POSIX
 #include <limits.h>
-#include <sys/time.h>
 #include <string.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <arpa/inet.h>
 #include <memory>
 #include <string>
 #include <set>
@@ -42,6 +35,15 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
+#ifndef WIN32
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <arpa/inet.h>
+#endif
+
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX 255
 #endif
@@ -80,6 +82,7 @@ void AppendHostInfo::onTrigger(core::ProcessContext *context, core::ProcessSessi
   std::string iface;
   context->getProperty(InterfaceName.getName(), iface);
   // Confirm the specified interface name exists on this device
+#ifndef WIN32
   if (if_nametoindex(iface.c_str()) != 0) {
     struct ifreq ifr;
     int fd = socket(AF_INET, SOCK_DGRAM, 0);
@@ -94,6 +97,7 @@ void AppendHostInfo::onTrigger(core::ProcessContext *context, core::ProcessSessi
     context->getProperty(IPAttribute.getName(), ipAttribute);
     flow->addAttribute(ipAttribute.c_str(), inet_ntoa(((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr));
   }
+#endif
 
   // Transfer to the relationship
   session->transfer(flow, Success);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/ExecuteProcess.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/ExecuteProcess.cpp b/libminifi/src/processors/ExecuteProcess.cpp
index db4399e..6f43e8a 100644
--- a/libminifi/src/processors/ExecuteProcess.cpp
+++ b/libminifi/src/processors/ExecuteProcess.cpp
@@ -42,14 +42,17 @@ namespace apache {
 namespace nifi {
 namespace minifi {
 namespace processors {
-
-core::Property ExecuteProcess::Command("Command", "Specifies the command to be executed; if just the name of an executable"
-                                       " is provided, it must be in the user's environment PATH.",
-                                       "");
-core::Property ExecuteProcess::CommandArguments("Command Arguments", "The arguments to supply to the executable delimited by white space. White "
-                                                "space can be escaped by enclosing it in double-quotes.",
-                                                "");
-core::Property ExecuteProcess::WorkingDir("Working Directory", "The directory to use as the current working directory when executing the command", "");
+#ifndef WIN32
+core::Property ExecuteProcess::Command(
+    core::PropertyBuilder::createProperty("Command")->withDescription("Specifies the command to be executed; if just the name of an executable"
+                                                                      " is provided, it must be in the user's environment PATH.")->supportsExpressionLanguage(true)->withDefaultValue("")->build());
+core::Property ExecuteProcess::CommandArguments(
+    core::PropertyBuilder::createProperty("Command Arguments")->withDescription("The arguments to supply to the executable delimited by white space. White "
+                                                                                "space can be escaped by enclosing it in "
+                                                                                "double-quotes.")->supportsExpressionLanguage(true)->withDefaultValue("")->build());
+core::Property ExecuteProcess::WorkingDir(
+    core::PropertyBuilder::createProperty("Working Directory")->withDescription("The directory to use as the current working directory when executing the command")->supportsExpressionLanguage(true)
+        ->withDefaultValue("")->build());
 core::Property ExecuteProcess::BatchDuration("Batch Duration", "If the process is expected to be long-running and produce textual output, a "
                                              "batch duration can be specified.",
                                              "0");
@@ -74,13 +77,13 @@ void ExecuteProcess::initialize() {
 void ExecuteProcess::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
   std::string value;
   std::shared_ptr<core::FlowFile> flow_file;
-  if (context->getProperty(Command.getName(), value, flow_file)) {
+  if (context->getProperty(Command, value, flow_file)) {
     this->_command = value;
   }
-  if (context->getProperty(CommandArguments.getName(), value, flow_file)) {
+  if (context->getProperty(CommandArguments, value, flow_file)) {
     this->_commandArgument = value;
   }
-  if (context->getProperty(WorkingDir.getName(), value, flow_file)) {
+  if (context->getProperty(WorkingDir, value, flow_file)) {
     this->_workingDir = value;
   }
   if (context->getProperty(BatchDuration.getName(), value)) {
@@ -229,7 +232,7 @@ void ExecuteProcess::onTrigger(core::ProcessContext *context, core::ProcessSessi
     }
   }
 }
-
+#endif
 } /* namespace processors */
 } /* namespace minifi */
 } /* namespace nifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/ExtractText.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/ExtractText.cpp b/libminifi/src/processors/ExtractText.cpp
index 2175415..328a476 100644
--- a/libminifi/src/processors/ExtractText.cpp
+++ b/libminifi/src/processors/ExtractText.cpp
@@ -41,78 +41,78 @@ core::Property ExtractText::SizeLimit("Size Limit", "Maximum number of bytes to
 core::Relationship ExtractText::Success("success", "success operational on the flow record");
 
 void ExtractText::initialize() {
-    //! Set the supported properties
-    std::set<core::Property> properties;
-    properties.insert(Attribute);
-    setSupportedProperties(properties);
-    //! Set the supported relationships
-    std::set<core::Relationship> relationships;
-    relationships.insert(Success);
-    setSupportedRelationships(relationships);
+  //! Set the supported properties
+  std::set<core::Property> properties;
+  properties.insert(Attribute);
+  setSupportedProperties(properties);
+  //! Set the supported relationships
+  std::set<core::Relationship> relationships;
+  relationships.insert(Success);
+  setSupportedRelationships(relationships);
 }
 
 void ExtractText::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
-    std::shared_ptr<core::FlowFile> flowFile = session->get();
+  std::shared_ptr<core::FlowFile> flowFile = session->get();
 
-    if (!flowFile) {
-        return;
-    }
+  if (!flowFile) {
+    return;
+  }
 
-    ReadCallback cb(flowFile, context);
-    session->read(flowFile, &cb);
-    session->transfer(flowFile, Success);
+  ReadCallback cb(flowFile, context);
+  session->read(flowFile, &cb);
+  session->transfer(flowFile, Success);
 }
 
 int64_t ExtractText::ReadCallback::process(std::shared_ptr<io::BaseStream> stream) {
-    int64_t ret = 0;
-    uint64_t size_limit = flowFile_->getSize();
-    uint64_t read_size = 0;
-    uint64_t loop_read = max_read_;
-
-    std::string attrKey, sizeLimitStr;
-    ctx_->getProperty(Attribute.getName(), attrKey);
-    ctx_->getProperty(SizeLimit.getName(), sizeLimitStr);
-
-    if (sizeLimitStr == "")
-        size_limit = DEFAULT_SIZE_LIMIT;
-    else if (sizeLimitStr != "0")
-        size_limit = std::stoi(sizeLimitStr);
-
-    std::ostringstream contentStream;
-    std::string contentStr;
-
-    while (read_size < size_limit) {
-        if (size_limit - read_size < (uint64_t)max_read_)
-            loop_read = size_limit - read_size;
-
-        ret = stream->readData(buffer_, loop_read);
-        buffer_.resize(ret);
-
-        if (ret < 0) {
-            return -1;
-        }
-
-        if (ret > 0) {
-            contentStream.write(reinterpret_cast<const char*>(&buffer_[0]), ret);
-            if (contentStream.fail()) {
-                return -1;
-            }
-        } else {
-            break;
-        }
+  int64_t ret = 0;
+  uint64_t size_limit = flowFile_->getSize();
+  uint64_t read_size = 0;
+  uint64_t loop_read = max_read_;
+
+  std::string attrKey, sizeLimitStr;
+  ctx_->getProperty(Attribute.getName(), attrKey);
+  ctx_->getProperty(SizeLimit.getName(), sizeLimitStr);
+
+  if (sizeLimitStr == "")
+    size_limit = DEFAULT_SIZE_LIMIT;
+  else if (sizeLimitStr != "0")
+    size_limit = std::stoi(sizeLimitStr);
+
+  std::ostringstream contentStream;
+  std::string contentStr;
+
+  while (read_size < size_limit) {
+    if (size_limit - read_size < (uint64_t) max_read_)
+      loop_read = size_limit - read_size;
+
+    ret = stream->readData(buffer_, loop_read);
+    buffer_.resize(ret);
+
+    if (ret < 0) {
+      return -1;
+    }
+
+    if (ret > 0) {
+      contentStream.write(reinterpret_cast<const char*>(&buffer_[0]), ret);
+      if (contentStream.fail()) {
+        return -1;
+      }
+    } else {
+      break;
     }
+  }
 
-    contentStr = contentStream.str();
-    flowFile_->setAttribute(attrKey, contentStr);
-    return read_size;
+  contentStr = contentStream.str();
+  flowFile_->setAttribute(attrKey, contentStr);
+  return read_size;
 }
 
 ExtractText::ReadCallback::ReadCallback(std::shared_ptr<core::FlowFile> flowFile, core::ProcessContext *ctx)
-    : max_read_(getpagesize()),
+    : max_read_(4096),
       flowFile_(flowFile),
       ctx_(ctx) {
-          buffer_.resize(max_read_);
-      }
+  buffer_.resize(max_read_);
+}
 
 } /* namespace processors */
 } /* namespace minifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/GenerateFlowFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/GenerateFlowFile.cpp b/libminifi/src/processors/GenerateFlowFile.cpp
index 82abe82..223346f 100644
--- a/libminifi/src/processors/GenerateFlowFile.cpp
+++ b/libminifi/src/processors/GenerateFlowFile.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "processors/GenerateFlowFile.h"
-#include <sys/time.h>
 #include <time.h>
 #include <vector>
 #include <queue>
@@ -29,6 +28,10 @@
 #include <chrono>
 #include <thread>
 #include <random>
+#ifdef WIN32
+#define srandom srand
+#define random rand
+#endif
 #include "utils/StringUtils.h"
 #include "core/ProcessContext.h"
 #include "core/ProcessSession.h"
@@ -46,7 +49,7 @@ core::Property GenerateFlowFile::DataFormat("Data Format", "Specifies whether th
 core::Property GenerateFlowFile::UniqueFlowFiles("Unique FlowFiles", "If true, each FlowFile that is generated will be unique. If false, a random value will be generated and all FlowFiles", "true");
 core::Relationship GenerateFlowFile::Success("success", "success operational on the flow record");
 const unsigned int TEXT_LEN = 90;
-static const char TEXT_CHARS[TEXT_LEN+1] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+/?.,';:\"?<>\n\t ";
+static const char TEXT_CHARS[TEXT_LEN + 1] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+/?.,';:\"?<>\n\t ";
 
 void GenerateFlowFile::initialize() {
   // Set the supported properties

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/GetFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/GetFile.cpp b/libminifi/src/processors/GetFile.cpp
index 4261d1a..89e50fc 100644
--- a/libminifi/src/processors/GetFile.cpp
+++ b/libminifi/src/processors/GetFile.cpp
@@ -16,15 +16,16 @@
  * limitations under the License.
  */
 #include "processors/GetFile.h"
-#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
 #include <stdio.h>
-#include <dirent.h>
 #include <limits.h>
-#include <unistd.h>
+#ifndef WIN32
 #include <regex.h>
+#else
+#include <regex>
+#endif
 #include <vector>
 #include <queue>
 #include <map>
@@ -34,10 +35,18 @@
 #include <string>
 #include <iostream>
 #include "utils/StringUtils.h"
+#include "utils/file/FileUtils.h"
 #include "utils/TimeUtil.h"
 #include "core/ProcessContext.h"
 #include "core/ProcessSession.h"
 
+#ifndef S_ISDIR
+#define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
+#endif
+#define R_OK    4       /* Test for read permission.  */
+#define W_OK    2       /* Test for write permission.  */
+#define F_OK    0       /* Test for existence.  */
+
 namespace org {
 namespace apache {
 namespace nifi {
@@ -45,7 +54,9 @@ namespace minifi {
 namespace processors {
 
 core::Property GetFile::BatchSize("Batch Size", "The maximum number of files to pull in each iteration", "10");
-core::Property GetFile::Directory("Input Directory", "The input directory from which to pull files", ".", true, "", {}, {});
+core::Property GetFile::Directory(
+    core::PropertyBuilder::createProperty("Input Directory")->withDescription("The input directory from which to pull files")->isRequired(true)->supportsExpressionLanguage(true)->withDefaultValue(".")
+        ->build());
 core::Property GetFile::IgnoreHiddenFile("Ignore Hidden Files", "Indicates whether or not hidden files should be ignored", "true");
 core::Property GetFile::KeepSourceFile("Keep Source File", "If true, the file is not deleted after it has been copied to the Content Repository", "false");
 core::Property GetFile::MaxAge("Maximum File Age", "The minimum age that a file must be in order to be pulled;"
@@ -137,7 +148,7 @@ void GetFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
     if (request_.pollInterval == 0 || (getTimeMillis() - last_listing_time_) > request_.pollInterval) {
       std::string directory;
       const std::shared_ptr<core::FlowFile> flow_file;
-      if (!context->getProperty(Directory.getName(), directory, flow_file)) {
+      if (!context->getProperty(Directory, directory, flow_file)) {
         logger_->log_warn("Resolved missing Input Directory property value");
       }
       performListing(directory, request_);
@@ -203,10 +214,10 @@ bool GetFile::acceptFile(std::string fullName, std::string name, const GetFileRe
   struct stat statbuf;
 
   if (stat(fullName.c_str(), &statbuf) == 0) {
-    if (request.minSize > 0 && statbuf.st_size < (int32_t)request.minSize)
+    if (request.minSize > 0 && statbuf.st_size < (int32_t) request.minSize)
       return false;
 
-    if (request.maxSize > 0 && statbuf.st_size > (int32_t)request.maxSize)
+    if (request.maxSize > 0 && statbuf.st_size > (int32_t) request.maxSize)
       return false;
 
     uint64_t modifiedTime = ((uint64_t) (statbuf.st_mtime) * 1000);
@@ -224,7 +235,7 @@ bool GetFile::acceptFile(std::string fullName, std::string name, const GetFileRe
 
     if (request.keepSourceFile == false && access(fullName.c_str(), W_OK) != 0)
       return false;
-
+#ifndef WIN32
     regex_t regex;
     int ret = regcomp(&regex, request.fileFilter.c_str(), 0);
     if (ret)
@@ -233,6 +244,12 @@ bool GetFile::acceptFile(std::string fullName, std::string name, const GetFileRe
     regfree(&regex);
     if (ret)
       return false;
+#else
+    std::regex regex(request.fileFilter);
+    if (!std::regex_match(name, regex)) {
+      return false;
+    }
+#endif
     metrics_->input_bytes_ += statbuf.st_size;
     metrics_->accepted_files_++;
     return true;
@@ -242,6 +259,7 @@ bool GetFile::acceptFile(std::string fullName, std::string name, const GetFileRe
 }
 
 void GetFile::performListing(std::string dir, const GetFileRequest &request) {
+#ifndef WIN32
   DIR *d;
   d = opendir(dir.c_str());
   if (!d)
@@ -255,7 +273,7 @@ void GetFile::performListing(std::string dir, const GetFileRequest &request) {
       break;
     std::string d_name = entry->d_name;
     std::string path = dir + "/" + d_name;
-    struct stat statbuf{};
+    struct stat statbuf { };
     if (stat(path.c_str(), &statbuf) != 0) {
       logger_->log_warn("Failed to stat %s", path);
       break;
@@ -273,6 +291,33 @@ void GetFile::performListing(std::string dir, const GetFileRequest &request) {
     }
   }
   closedir(d);
+#else
+  HANDLE hFind;
+  WIN32_FIND_DATA FindFileData;
+
+  if ((hFind = FindFirstFile(dir.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE) {
+    do {
+      struct stat statbuf {};
+      if (stat(FindFileData.cFileName, &statbuf) != 0) {
+        logger_->log_warn("Failed to stat %s", FindFileData.cFileName);
+        break;
+      }
+
+      std::string path = dir + "/" + FindFileData.cFileName;
+      if (S_ISDIR(statbuf.st_mode)) {
+        if (request.recursive && strcmp(FindFileData.cFileName, "..") != 0 && strcmp(FindFileData.cFileName, ".") != 0) {
+          performListing(path, request);
+        }
+      } else {
+        if (acceptFile(path, FindFileData.cFileName, request)) {
+          // check whether we can take this file
+          putListing(path);
+        }
+      }
+    }while (FindNextFile(hFind, &FindFileData));
+    FindClose(hFind);
+  }
+#endif
 }
 
 int16_t GetFile::getMetricNodes(std::vector<std::shared_ptr<state::response::ResponseNode>> &metric_vector) {


[4/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/GetTCP.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/GetTCP.cpp b/libminifi/src/processors/GetTCP.cpp
index 0932ebd..2b3b93c 100644
--- a/libminifi/src/processors/GetTCP.cpp
+++ b/libminifi/src/processors/GetTCP.cpp
@@ -16,15 +16,17 @@
  * limitations under the License.
  */
 #include "processors/GetTCP.h"
-#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
 #include <stdio.h>
-#include <dirent.h>
+
 #include <limits.h>
+#ifndef WIN32
+#include <dirent.h>
 #include <unistd.h>
 #include <regex.h>
+#endif
 #include <vector>
 #include <queue>
 #include <map>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/ListenSyslog.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/ListenSyslog.cpp b/libminifi/src/processors/ListenSyslog.cpp
index e820bd5..aab3c67 100644
--- a/libminifi/src/processors/ListenSyslog.cpp
+++ b/libminifi/src/processors/ListenSyslog.cpp
@@ -34,7 +34,7 @@ namespace apache {
 namespace nifi {
 namespace minifi {
 namespace processors {
-
+#ifndef WIN32
 core::Property ListenSyslog::RecvBufSize("Receive Buffer Size", "The size of each buffer used to receive Syslog messages.", "65507 B");
 core::Property ListenSyslog::MaxSocketBufSize("Max Size of Socket Buffer", "The maximum size of the socket buffer that should be used.", "1 MB");
 core::Property ListenSyslog::MaxConnections("Max Number of TCP Connections", "The maximum number of concurrent connections to accept Syslog messages in TCP mode.", "2");
@@ -153,7 +153,7 @@ void ListenSyslog::runThread() {
         clilen = sizeof(cli_addr);
         int newsockfd = accept(_serverSocket, reinterpret_cast<struct sockaddr *>(&cli_addr), &clilen);
         if (newsockfd > 0) {
-          if (_clientSockets.size() < (uint64_t)_maxConnections) {
+          if (_clientSockets.size() < (uint64_t) _maxConnections) {
             _clientSockets.push_back(newsockfd);
             logger_->log_info("ListenSysLog new client socket %d connection", newsockfd);
             continue;
@@ -166,7 +166,7 @@ void ListenSyslog::runThread() {
         struct sockaddr_in cli_addr;
         clilen = sizeof(cli_addr);
         int recvlen = recvfrom(_serverSocket, _buffer, sizeof(_buffer), 0, (struct sockaddr *) &cli_addr, &clilen);
-        if (recvlen > 0 && (uint64_t)(recvlen + getEventQueueByteSize()) <= _recvBufSize) {
+        if (recvlen > 0 && (uint64_t) (recvlen + getEventQueueByteSize()) <= _recvBufSize) {
           uint8_t *payload = new uint8_t[recvlen];
           memcpy(payload, _buffer, recvlen);
           putEvent(payload, recvlen);
@@ -183,7 +183,7 @@ void ListenSyslog::runThread() {
           logger_->log_debug("ListenSysLog client socket %d close", clientSocket);
           it = _clientSockets.erase(it);
         } else {
-          if ((uint64_t)(recvlen + getEventQueueByteSize()) <= _recvBufSize) {
+          if ((uint64_t) (recvlen + getEventQueueByteSize()) <= _recvBufSize) {
             uint8_t *payload = new uint8_t[recvlen];
             memcpy(payload, _buffer, recvlen);
             putEvent(payload, recvlen);
@@ -296,7 +296,7 @@ void ListenSyslog::onTrigger(core::ProcessContext *context, core::ProcessSession
   flowFile->addAttribute("syslog.port", std::to_string(_port));
   session->transfer(flowFile, Success);
 }
-
+#endif
 } /* namespace processors */
 } /* namespace minifi */
 } /* namespace nifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/LogAttribute.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/LogAttribute.cpp b/libminifi/src/processors/LogAttribute.cpp
index 65f45c6..cec9191 100644
--- a/libminifi/src/processors/LogAttribute.cpp
+++ b/libminifi/src/processors/LogAttribute.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "processors/LogAttribute.h"
-#include <sys/time.h>
 #include <time.h>
 #include <string.h>
 #include <memory>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/PutFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/PutFile.cpp b/libminifi/src/processors/PutFile.cpp
index 0a45c68..fa461d4 100644
--- a/libminifi/src/processors/PutFile.cpp
+++ b/libminifi/src/processors/PutFile.cpp
@@ -19,10 +19,8 @@
  */
 
 #include "processors/PutFile.h"
-
+#include "utils/file/FileUtils.h"
 #include <sys/stat.h>
-#include <dirent.h>
-#include <unistd.h>
 #include <uuid/uuid.h>
 #include <cstdint>
 #include <cstdio>
@@ -30,6 +28,13 @@
 #include <memory>
 #include <string>
 #include <set>
+#ifdef WIN32
+#include <Windows.h>
+#endif
+
+#ifndef S_ISDIR
+#define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
+#endif
 
 namespace org {
 namespace apache {
@@ -40,33 +45,16 @@ namespace processors {
 std::shared_ptr<utils::IdGenerator> PutFile::id_generator_ = utils::IdGenerator::getIdGenerator();
 
 core::Property PutFile::Directory(
-    "Directory",
-    "The output directory to which to put files",
-    ".");
-core::Property PutFile::ConflictResolution(
-    "Conflict Resolution Strategy",
-    "Indicates what should happen when a file with the same name already exists in the output directory",
-    CONFLICT_RESOLUTION_STRATEGY_FAIL);
-core::Property PutFile::CreateDirs(
-    "Create Missing Directories",
-    "If true, then missing destination directories will be created. "
-        "If false, flowfiles are penalized and sent to failure.",
-    "true",
-    true,
-    "",
-    {"Directory"},
-    {});
-core::Property PutFile::MaxDestFiles(
-    "Maximum File Count",
-    "Specifies the maximum number of files that can exist in the output directory",
-    "-1");
-
-core::Relationship PutFile::Success(
-    "success",
-    "All files are routed to success");
-core::Relationship PutFile::Failure(
-    "failure",
-    "Failed files (conflict, write failure, etc.) are transferred to failure");
+    core::PropertyBuilder::createProperty("Directory")->withDescription("The output directory to which to put files")->supportsExpressionLanguage(true)->withDefaultValue(".")->build());
+core::Property PutFile::ConflictResolution("Conflict Resolution Strategy", "Indicates what should happen when a file with the same name already exists in the output directory",
+                                           CONFLICT_RESOLUTION_STRATEGY_FAIL);
+core::Property PutFile::CreateDirs("Create Missing Directories", "If true, then missing destination directories will be created. "
+                                   "If false, flowfiles are penalized and sent to failure.",
+                                   "true", true, "", { "Directory" }, { });
+core::Property PutFile::MaxDestFiles("Maximum File Count", "Specifies the maximum number of files that can exist in the output directory", "-1");
+
+core::Relationship PutFile::Success("success", "All files are routed to success");
+core::Relationship PutFile::Failure("failure", "Failed files (conflict, write failure, etc.) are transferred to failure");
 
 void PutFile::initialize() {
   // Set the supported properties
@@ -113,7 +101,7 @@ void PutFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
 
   std::string directory;
 
-  if (!context->getProperty(Directory.getName(), directory, flowFile)) {
+  if (!context->getProperty(Directory, directory, flowFile)) {
     logger_->log_error("Directory attribute is missing or invalid");
   }
 
@@ -143,6 +131,8 @@ void PutFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
     // something exists at directory path
     if (S_ISDIR(statResult.st_mode)) {
       // it's a directory, count the files
+      int64_t ct = 0;
+#ifndef WIN32
       DIR *myDir = opendir(directory.c_str());
       if (!myDir) {
         logger_->log_warn("Could not open %s", directory);
@@ -151,13 +141,13 @@ void PutFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
       }
       struct dirent* entry = nullptr;
 
-      int64_t ct = 0;
       while ((entry = readdir(myDir)) != nullptr) {
         if ((strcmp(entry->d_name, ".") != 0) && (strcmp(entry->d_name, "..") != 0)) {
           ct++;
           if (ct >= max_dest_files_) {
             logger_->log_warn("Routing to failure because the output directory %s has at least %u files, which exceeds the "
-                "configured max number of files", directory, max_dest_files_);
+                              "configured max number of files",
+                              directory, max_dest_files_);
             session->transfer(flowFile, Failure);
             closedir(myDir);
             return;
@@ -165,13 +155,31 @@ void PutFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
         }
       }
       closedir(myDir);
+#else
+      HANDLE hFind;
+      WIN32_FIND_DATA FindFileData;
+
+      if ((hFind = FindFirstFile(directory.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE) {
+        do {
+          if ((strcmp(FindFileData.cFileName, ".") != 0) && (strcmp(FindFileData.cFileName, "..") != 0)) {
+            ct++;
+            if (ct >= max_dest_files_) {
+              logger_->log_warn("Routing to failure because the output directory %s has at least %u files, which exceeds the "
+                  "configured max number of files", directory, max_dest_files_);
+              session->transfer(flowFile, Failure);
+              FindClose(hFind);
+              return;
+            }
+          }
+        }while (FindNextFile(hFind, &FindFileData));
+        FindClose(hFind);
+      }
+#endif
     }
   }
 
   if (stat(destFile.c_str(), &statResult) == 0) {
-    logger_->log_warn("Destination file %s exists; applying Conflict Resolution Strategy: %s",
-                      destFile,
-                      conflict_resolution_);
+    logger_->log_warn("Destination file %s exists; applying Conflict Resolution Strategy: %s", destFile, conflict_resolution_);
 
     if (conflict_resolution_ == CONFLICT_RESOLUTION_STRATEGY_REPLACE) {
       putFile(session, flowFile, tmpFile, destFile, directory);
@@ -186,10 +194,8 @@ void PutFile::onTrigger(core::ProcessContext *context, core::ProcessSession *ses
 }
 
 std::string PutFile::tmpWritePath(const std::string &filename, const std::string &directory) const {
-  char tmpFileUuidStr[37];
-  uuid_t tmpFileUuid;
+  utils::Identifier tmpFileUuid;
   id_generator_->generate(tmpFileUuid);
-  uuid_unparse_lower(tmpFileUuid, tmpFileUuidStr);
   std::stringstream tmpFileSs;
   tmpFileSs << directory;
   auto lastSeparatorPos = filename.find_last_of("/");
@@ -197,22 +203,15 @@ std::string PutFile::tmpWritePath(const std::string &filename, const std::string
   if (lastSeparatorPos == std::string::npos) {
     tmpFileSs << "/." << filename;
   } else {
-    tmpFileSs << "/"
-              << filename.substr(0, lastSeparatorPos)
-              << "/."
-              << filename.substr(lastSeparatorPos + 1);
+    tmpFileSs << "/" << filename.substr(0, lastSeparatorPos) << "/." << filename.substr(lastSeparatorPos + 1);
   }
 
-  tmpFileSs << "." << tmpFileUuidStr;
+  tmpFileSs << "." << tmpFileUuid.to_string();
   std::string tmpFile = tmpFileSs.str();
   return tmpFile;
 }
 
-bool PutFile::putFile(core::ProcessSession *session,
-                      std::shared_ptr<FlowFileRecord> flowFile,
-                      const std::string &tmpFile,
-                      const std::string &destFile,
-                      const std::string &destDir) {
+bool PutFile::putFile(core::ProcessSession *session, std::shared_ptr<FlowFileRecord> flowFile, const std::string &tmpFile, const std::string &destFile, const std::string &destDir) {
   struct stat dir_stat;
 
   if (stat(destDir.c_str(), &dir_stat) && try_mkdirs_) {
@@ -230,7 +229,7 @@ bool PutFile::putFile(core::ProcessSession *session,
 
       if (!dir_path_component.empty()) {
         logger_->log_debug("Attempting to create directory if it does not already exist: %s", dir_path);
-        mkdir(dir_path.c_str(), 0700);
+        utils::file::FileUtils::create_dir(dir_path);
         dir_path_stream << '/';
       } else if (pos == 0) {
         // Support absolute paths
@@ -255,8 +254,7 @@ bool PutFile::putFile(core::ProcessSession *session,
   return false;
 }
 
-PutFile::ReadCallback::ReadCallback(const std::string &tmp_file,
-                                    const std::string &dest_file)
+PutFile::ReadCallback::ReadCallback(const std::string &tmp_file, const std::string &dest_file)
     : tmp_file_(tmp_file),
       dest_file_(dest_file),
       logger_(logging::LoggerFactory<PutFile::ReadCallback>::getLogger()) {
@@ -304,8 +302,7 @@ bool PutFile::ReadCallback::commit() {
 
   if (write_succeeded_) {
     if (rename(tmp_file_.c_str(), dest_file_.c_str())) {
-      logger_->log_info("PutFile commit put file operation to %s failed because rename() call failed",
-                        dest_file_);
+      logger_->log_info("PutFile commit put file operation to %s failed because rename() call failed", dest_file_);
     } else {
       success = true;
       logger_->log_info("PutFile commit put file operation to %s succeeded", dest_file_);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/RouteOnAttribute.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/RouteOnAttribute.cpp b/libminifi/src/processors/RouteOnAttribute.cpp
index 6e78b6f..3e2bf61 100644
--- a/libminifi/src/processors/RouteOnAttribute.cpp
+++ b/libminifi/src/processors/RouteOnAttribute.cpp
@@ -30,32 +30,25 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
-core::Relationship RouteOnAttribute::Unmatched(
-    "unmatched",
-    "Files which do not match any expression are routed here");
-core::Relationship RouteOnAttribute::Failure(
-    "failure",
-    "Failed files are transferred to failure");
+core::Relationship RouteOnAttribute::Unmatched("unmatched", "Files which do not match any expression are routed here");
+core::Relationship RouteOnAttribute::Failure("failure", "Failed files are transferred to failure");
 
 void RouteOnAttribute::initialize() {
   std::set<core::Property> properties;
   setSupportedProperties(properties);
 }
 
-void RouteOnAttribute::onDynamicPropertyModified(const core::Property &orig_property,
-                                                 const core::Property &new_property) {
+void RouteOnAttribute::onDynamicPropertyModified(const core::Property &orig_property, const core::Property &new_property) {
   // Update the routing table when routes are added via dynamic properties.
   route_properties_[new_property.getName()] = new_property;
 
   std::set<core::Relationship> relationships;
 
   for (const auto &route : route_properties_) {
-    core::Relationship route_rel{route.first, "Dynamic route"};
+    core::Relationship route_rel { route.first, "Dynamic route" };
     route_rels_[route.first] = route_rel;
     relationships.insert(route_rel);
-    logger_->log_info("RouteOnAttribute registered route '%s' with expression '%s'",
-                      route.first,
-                      route.second.getValue());
+    logger_->log_info("RouteOnAttribute registered route '%s' with expression '%s'", route.first, route.second.getValue());
   }
 
   relationships.insert(Unmatched);
@@ -63,8 +56,7 @@ void RouteOnAttribute::onDynamicPropertyModified(const core::Property &orig_prop
   setSupportedRelationships(relationships);
 }
 
-void RouteOnAttribute::onTrigger(core::ProcessContext *context,
-                                 core::ProcessSession *session) {
+void RouteOnAttribute::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
   auto flow_file = session->get();
 
   // Do nothing if there are no incoming files
@@ -78,7 +70,7 @@ void RouteOnAttribute::onTrigger(core::ProcessContext *context,
     // Perform dynamic routing logic
     for (const auto &route : route_properties_) {
       std::string do_route;
-      context->getDynamicProperty(route.second.getName(), do_route, flow_file);
+      context->getDynamicProperty(route.second, do_route, flow_file);
 
       if (do_route == "true") {
         did_match = true;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/TailFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/TailFile.cpp b/libminifi/src/processors/TailFile.cpp
index 61aa86b..df0afc4 100644
--- a/libminifi/src/processors/TailFile.cpp
+++ b/libminifi/src/processors/TailFile.cpp
@@ -17,14 +17,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
 #include <stdio.h>
-#include <dirent.h>
+
 #include <limits.h>
+#ifndef WIN32
+#include <dirent.h>
 #include <unistd.h>
+#endif
 #include <vector>
 #include <queue>
 #include <map>
@@ -40,6 +42,10 @@
 #include "core/ProcessContext.h"
 #include "core/ProcessSession.h"
 
+#ifndef S_ISDIR
+#define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
+#endif
+
 #if defined(__clang__)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wsign-compare"
@@ -173,6 +179,7 @@ void TailFile::checkRollOver(const std::string &fileLocation, const std::string
     std::size_t found = fileName.find_last_of(".");
     if (found != std::string::npos)
       pattern = fileName.substr(0, found);
+#ifndef WIN32
     DIR *d;
     d = opendir(fileLocation.c_str());
     if (!d)
@@ -197,6 +204,33 @@ void TailFile::checkRollOver(const std::string &fileLocation, const std::string
       }
     }
     closedir(d);
+#else
+
+    HANDLE hFind;
+    WIN32_FIND_DATA FindFileData;
+
+    if ((hFind = FindFirstFile(fileLocation.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE) {
+      do {
+        struct stat statbuf {};
+        if (stat(FindFileData.cFileName, &statbuf) != 0) {
+          logger_->log_warn("Failed to stat %s", FindFileData.cFileName);
+          break;
+        }
+
+        std::string fileFullName = fileLocation + "/" + FindFileData.cFileName;
+
+        if (fileFullName.find(pattern) != std::string::npos && stat(fileFullName.c_str(), &statbuf) == 0) {
+          if (((uint64_t)(statbuf.st_mtime) * 1000) >= modifiedTimeCurrentTailFile) {
+            TailMatchedFileItem item;
+            item.fileName = fileName;
+            item.modifiedTime = ((uint64_t)(statbuf.st_mtime) * 1000);
+            matchedFiles.push_back(item);
+          }
+        }
+      }while (FindNextFile(hFind, &FindFileData));
+      FindClose(hFind);
+    }
+#endif
 
     // Sort the list based on modified time
     std::sort(matchedFiles.begin(), matchedFiles.end(), sortTailMatchedFileItem);
@@ -244,7 +278,7 @@ void TailFile::onTrigger(core::ProcessContext *context, core::ProcessSession *se
   struct stat statbuf;
 
   if (stat(fullPath.c_str(), &statbuf) == 0) {
-    if ((uint64_t)statbuf.st_size <= this->_currentTailFilePosition) {
+    if ((uint64_t) statbuf.st_size <= this->_currentTailFilePosition) {
       // there are no new input for the current tail file
       context->yield();
       return;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/processors/UpdateAttribute.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/UpdateAttribute.cpp b/libminifi/src/processors/UpdateAttribute.cpp
index f431012..80b0215 100644
--- a/libminifi/src/processors/UpdateAttribute.cpp
+++ b/libminifi/src/processors/UpdateAttribute.cpp
@@ -30,12 +30,8 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
-core::Relationship UpdateAttribute::Success(
-    "success",
-    "All files are routed to success");
-core::Relationship UpdateAttribute::Failure(
-    "failure",
-    "Failed files are transferred to failure");
+core::Relationship UpdateAttribute::Success("success", "All files are routed to success");
+core::Relationship UpdateAttribute::Failure("failure", "Failed files are transferred to failure");
 
 void UpdateAttribute::initialize() {
   std::set<core::Property> properties;
@@ -47,20 +43,18 @@ void UpdateAttribute::initialize() {
   setSupportedRelationships(relationships);
 }
 
-void UpdateAttribute::onSchedule(core::ProcessContext *context,
-                                 core::ProcessSessionFactory *sessionFactory) {
+void UpdateAttribute::onSchedule(core::ProcessContext *context, core::ProcessSessionFactory *sessionFactory) {
   attributes_.clear();
   const auto &dynamic_prop_keys = context->getDynamicPropertyKeys();
   logger_->log_info("UpdateAttribute registering %d keys", dynamic_prop_keys.size());
 
   for (const auto &key : dynamic_prop_keys) {
-    attributes_.emplace_back(key);
+    attributes_.emplace_back(core::PropertyBuilder::createProperty(key)->withDescription("auto generated")->supportsExpressionLanguage(true)->build());
     logger_->log_info("UpdateAttribute registered attribute '%s'", key);
   }
 }
 
-void UpdateAttribute::onTrigger(core::ProcessContext *context,
-                                core::ProcessSession *session) {
+void UpdateAttribute::onTrigger(core::ProcessContext *context, core::ProcessSession *session) {
   auto flow_file = session->get();
 
   // Do nothing if there are no incoming files
@@ -72,10 +66,8 @@ void UpdateAttribute::onTrigger(core::ProcessContext *context,
     for (const auto &attribute : attributes_) {
       std::string value;
       context->getDynamicProperty(attribute, value, flow_file);
-      flow_file->setAttribute(attribute, value);
-      logger_->log_info("Set attribute '%s' of flow file '%s' with value '%s'",
-                        attribute,
-                        flow_file->getUUIDStr(), value);
+      flow_file->setAttribute(attribute.getName(), value);
+      logger_->log_info("Set attribute '%s' of flow file '%s' with value '%s'", attribute.getName(), flow_file->getUUIDStr(), value);
     }
     session->transfer(flow_file, Success);
   } catch (const std::exception &e) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/provenance/Provenance.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/provenance/Provenance.cpp b/libminifi/src/provenance/Provenance.cpp
index 1edb191..9c43361 100644
--- a/libminifi/src/provenance/Provenance.cpp
+++ b/libminifi/src/provenance/Provenance.cpp
@@ -17,7 +17,6 @@
  */
 
 #include "provenance/Provenance.h"
-#include <arpa/inet.h>
 #include <cstdint>
 #include <memory>
 #include <string>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/sitetosite/Peer.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/sitetosite/Peer.cpp b/libminifi/src/sitetosite/Peer.cpp
index 385f991..5505b0c 100644
--- a/libminifi/src/sitetosite/Peer.cpp
+++ b/libminifi/src/sitetosite/Peer.cpp
@@ -17,9 +17,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <sys/time.h>
 #include <stdio.h>
-#include <time.h>
 #include <chrono>
 #include <thread>
 #include <random>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/sitetosite/RawSocketProtocol.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/sitetosite/RawSocketProtocol.cpp b/libminifi/src/sitetosite/RawSocketProtocol.cpp
index 2bccb0b..9b17db1 100644
--- a/libminifi/src/sitetosite/RawSocketProtocol.cpp
+++ b/libminifi/src/sitetosite/RawSocketProtocol.cpp
@@ -16,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <sys/time.h>
 #include <stdio.h>
 #include <time.h>
 #include <chrono>
@@ -241,12 +240,10 @@ bool RawSiteToSiteClient::handShake() {
     return false;
   }
   logger_->log_debug("Site2Site Protocol Perform hand shake with destination port %s", port_id_str_);
-  uuid_t uuid;
+  utils::Identifier uuid;
   // Generate the global UUID for the com identify
   id_generator_->generate(uuid);
-  char uuidStr[37];
-  uuid_unparse_lower(uuid, uuidStr);
-  _commsIdentifier = uuidStr;
+  _commsIdentifier = uuid.to_string();
 
   int ret = peer_->writeUTF(_commsIdentifier);
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/utils/Id.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/utils/Id.cpp b/libminifi/src/utils/Id.cpp
index da0fea9..8994771 100644
--- a/libminifi/src/utils/Id.cpp
+++ b/libminifi/src/utils/Id.cpp
@@ -35,10 +35,92 @@ namespace nifi {
 namespace minifi {
 namespace utils {
 
+Identifier::Identifier(UUID_FIELD u)
+    : IdentifierBase(u) {
+  build_string();
+}
+
+Identifier::Identifier()
+    : IdentifierBase() {
+}
+
+Identifier::Identifier(const Identifier &other) {
+  if (!other.convert().empty()) {
+    copyInto(other);
+    build_string();
+  }
+}
+
+Identifier::Identifier(const IdentifierBase &other) {
+  if (!other.convert().empty()) {
+    copyInto(other);
+    build_string();
+  }
+}
+
+Identifier &Identifier::operator=(const Identifier &other) {
+  if (!other.convert().empty()) {
+    IdentifierBase::operator =(other);
+    build_string();
+  }
+  return *this;
+}
+
+Identifier &Identifier::operator=(const IdentifierBase &other) {
+  if (!other.convert().empty()) {
+    IdentifierBase::operator =(other);
+    build_string();
+  }
+  return *this;
+}
+
+Identifier &Identifier::operator=(UUID_FIELD o) {
+  IdentifierBase::operator=(o);
+  build_string();
+  return *this;
+}
+
+Identifier &Identifier::operator=(std::string id) {
+  uuid_parse(id.c_str(), id_);
+  converted_ = id;
+  return *this;
+}
+
+bool Identifier::operator==(std::nullptr_t nullp) {
+  return converted_.empty();
+}
+
+bool Identifier::operator!=(std::nullptr_t nullp) {
+  return !converted_.empty();
+}
+
+bool Identifier::operator!=(const Identifier &other) {
+  return converted_ != other.converted_;
+}
+
+bool Identifier::operator==(const Identifier &other) {
+  return converted_ == other.converted_;
+}
+
+std::string Identifier::to_string() {
+  return convert();
+}
+
+unsigned char *Identifier::toArray() {
+  return id_;
+}
+
+void Identifier::build_string() {
+  char uuidStr[37] = { 0 };
+  uuid_unparse_lower(id_, uuidStr);
+  converted_ = uuidStr;
+}
+
 uint64_t timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
 
 NonRepeatingStringGenerator::NonRepeatingStringGenerator()
-    : prefix_((std::to_string(timestamp) + "-")), incrementor_(0) {
+    : prefix_((std::to_string(timestamp) + "-")),
+      incrementor_(0) {
 }
 
 IdGenerator::IdGenerator()
@@ -69,7 +151,7 @@ uint64_t IdGenerator::getDeviceSegmentFromString(const std::string& str, int num
 
 uint64_t IdGenerator::getRandomDeviceSegment(int numBits) {
   uint64_t deviceSegment = 0;
-  uuid_t random_uuid;
+  UUID_FIELD random_uuid;
   for (int word = 0; word < 2; word++) {
     uuid_generate_random(random_uuid);
     for (int i = 0; i < 4; i++) {
@@ -122,14 +204,21 @@ void IdGenerator::initialize(const std::shared_ptr<Properties> & properties) {
     } else if ("time" == implementation_str) {
       logging::LOG_DEBUG(logger_) << "Using uuid_generate_time implementation for uids.";
     } else {
-      logging::LOG_DEBUG(logger_) << "Invalid value for uid.implementation ("  << implementation_str << "). Using uuid_generate_time implementation for uids.";
+      logging::LOG_DEBUG(logger_) << "Invalid value for uid.implementation (" << implementation_str << "). Using uuid_generate_time implementation for uids.";
     }
   } else {
     logging::LOG_DEBUG(logger_) << "Using uuid_generate_time implementation for uids.";
   }
 }
 
-void IdGenerator::generate(uuid_t output) {
+Identifier IdGenerator::generate() {
+  Identifier ident;
+  generate(ident);
+  return ident;
+}
+
+void IdGenerator::generate(Identifier &ident) {
+  UUID_FIELD output;
   switch (implementation_) {
     case UUID_RANDOM_IMPL:
       uuid_generate_random(output);
@@ -149,6 +238,7 @@ void IdGenerator::generate(uuid_t output) {
       uuid_generate_time(output);
       break;
   }
+  ident = output;
 }
 
 } /* namespace utils */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/TestBase.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/TestBase.cpp b/libminifi/test/TestBase.cpp
index a97bc99..57ef71d 100644
--- a/libminifi/test/TestBase.cpp
+++ b/libminifi/test/TestBase.cpp
@@ -37,8 +37,9 @@ std::shared_ptr<core::Processor> TestPlan::addProcessor(const std::shared_ptr<co
   }
   std::lock_guard<std::recursive_mutex> guard(mutex);
 
-  uuid_t uuid;
-  uuid_generate(uuid);
+  utils::Identifier uuid;
+
+  utils::IdGenerator::getIdGenerator()->generate(uuid);
 
   processor->setStreamFactory(stream_factory);
   // initialize the processor
@@ -67,7 +68,7 @@ std::shared_ptr<core::Processor> TestPlan::addProcessor(const std::shared_ptr<co
     connection->setSource(last);
     connection->setDestination(processor);
 
-    uuid_t uuid_copy, uuid_copy_next;
+    utils::Identifier uuid_copy, uuid_copy_next;
     last->getUUID(uuid_copy);
     connection->setSourceUUID(uuid_copy);
     processor->getUUID(uuid_copy_next);
@@ -97,8 +98,11 @@ std::shared_ptr<core::Processor> TestPlan::addProcessor(const std::string &proce
   }
   std::lock_guard<std::recursive_mutex> guard(mutex);
 
-  uuid_t uuid;
-  uuid_generate(uuid);
+  utils::Identifier uuid;
+
+  utils::IdGenerator::getIdGenerator()->generate(uuid);
+
+  std::cout << "generated " << uuid.to_string() << std::endl;
 
   auto ptr = core::ClassLoader::getDefaultClassLoader().instantiate(processor_name, uuid);
   if (nullptr == ptr) {
@@ -194,7 +198,7 @@ std::shared_ptr<minifi::Connection> TestPlan::buildFinalConnection(std::shared_p
   if (setDest)
     connection->setDestination(processor);
 
-  uuid_t uuid_copy;
+  utils::Identifier uuid_copy;
   last->getUUID(uuid_copy);
   connection->setSourceUUID(uuid_copy);
   if (setDest)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/archive-tests/CompressContentTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/archive-tests/CompressContentTests.cpp b/libminifi/test/archive-tests/CompressContentTests.cpp
index 3c51277..2417cad 100644
--- a/libminifi/test/archive-tests/CompressContentTests.cpp
+++ b/libminifi/test/archive-tests/CompressContentTests.cpp
@@ -113,9 +113,9 @@ TEST_CASE("CompressFileGZip", "[compressfiletest1]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -214,9 +214,9 @@ TEST_CASE("DecompressFileGZip", "[compressfiletest2]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -316,9 +316,9 @@ TEST_CASE("CompressFileBZip", "[compressfiletest3]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -418,9 +418,9 @@ TEST_CASE("DecompressFileBZip", "[compressfiletest4]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -520,9 +520,9 @@ TEST_CASE("CompressFileLZMA", "[compressfiletest5]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -628,9 +628,9 @@ TEST_CASE("DecompressFileLZMA", "[compressfiletest6]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -737,9 +737,9 @@ TEST_CASE("CompressFileXYLZMA", "[compressfiletest7]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -845,9 +845,9 @@ TEST_CASE("DecompressFileXYLZMA", "[compressfiletest8]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::CompressContent>("compresscontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/archive-tests/FocusArchiveTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/archive-tests/FocusArchiveTests.cpp b/libminifi/test/archive-tests/FocusArchiveTests.cpp
index 0934208..2d5cd84 100644
--- a/libminifi/test/archive-tests/FocusArchiveTests.cpp
+++ b/libminifi/test/archive-tests/FocusArchiveTests.cpp
@@ -55,7 +55,7 @@ TEST_CASE("Test Creation of UnfocusArchiveEntry", "[getfileCreate]") {
     TestController testController;
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::UnfocusArchiveEntry>("processorname");
     REQUIRE(processor->getName() == "processorname");
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/archive-tests/ManipulateArchiveTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/archive-tests/ManipulateArchiveTests.cpp b/libminifi/test/archive-tests/ManipulateArchiveTests.cpp
index 3bc23b7..c254a39 100644
--- a/libminifi/test/archive-tests/ManipulateArchiveTests.cpp
+++ b/libminifi/test/archive-tests/ManipulateArchiveTests.cpp
@@ -111,7 +111,7 @@ TEST_CASE("Test creation of ManipulateArchive", "[manipulatearchiveCreate]") {
   TestController testController;
   std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::ManipulateArchive>("processorname");
   REQUIRE(processor->getName() == "processorname");
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/archive-tests/MergeFileTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/archive-tests/MergeFileTests.cpp b/libminifi/test/archive-tests/MergeFileTests.cpp
index d1b42c6..b919370 100644
--- a/libminifi/test/archive-tests/MergeFileTests.cpp
+++ b/libminifi/test/archive-tests/MergeFileTests.cpp
@@ -134,9 +134,9 @@ TEST_CASE("MergeFileDefragment", "[mergefiletest1]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -306,9 +306,9 @@ TEST_CASE("MergeFileDefragmentDelimiter", "[mergefiletest2]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -469,9 +469,9 @@ TEST_CASE("MergeFileDefragmentDropFlow", "[mergefiletest3]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -634,9 +634,9 @@ TEST_CASE("MergeFileBinPack", "[mergefiletest4]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -782,9 +782,9 @@ TEST_CASE("MergeFileTar", "[mergefiletest4]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -939,9 +939,9 @@ TEST_CASE("MergeFileZip", "[mergefiletest5]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::MergeContent>("mergecontent");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/bustache-tests/ApplyTemplateTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/bustache-tests/ApplyTemplateTests.cpp b/libminifi/test/bustache-tests/ApplyTemplateTests.cpp
index 02cc61a..e83167e 100644
--- a/libminifi/test/bustache-tests/ApplyTemplateTests.cpp
+++ b/libminifi/test/bustache-tests/ApplyTemplateTests.cpp
@@ -50,7 +50,7 @@ TEST_CASE("Test Creation of ApplyTemplate", "[ApplyTemplateCreate]") {
     TestController testController;
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::ApplyTemplate>("processorname");
     REQUIRE(processor->getName() == "processorname");
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(processor->getUUID(processoruuid));
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/expression-language-tests/RouteOnAttributeTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/expression-language-tests/RouteOnAttributeTests.cpp b/libminifi/test/expression-language-tests/RouteOnAttributeTests.cpp
index d8b4560..329ffe0 100644
--- a/libminifi/test/expression-language-tests/RouteOnAttributeTests.cpp
+++ b/libminifi/test/expression-language-tests/RouteOnAttributeTests.cpp
@@ -32,32 +32,19 @@ TEST_CASE("RouteOnAttributeMatchedTest", "[routeOnAttributeMatchedTest]") {
 
   std::shared_ptr<TestPlan> plan = testController.createPlan();
 
-  const auto &generate_proc = plan->addProcessor("GenerateFlowFile",
-                                                 "generate");
+  const auto &generate_proc = plan->addProcessor("GenerateFlowFile", "generate");
 
-  const auto &update_proc = plan->addProcessor("UpdateAttribute",
-                                               "update",
-                                               core::Relationship("success", "description"),
-                                               true);
+  const auto &update_proc = plan->addProcessor("UpdateAttribute", "update", core::Relationship("success", "description"), true);
   plan->setProperty(update_proc, "route_condition_attr", "true", true);
 
-  const auto &route_proc = plan->addProcessor("RouteOnAttribute",
-                                              "route",
-                                              core::Relationship("success", "description"),
-                                              true);
-  route_proc->setAutoTerminatedRelationships({{core::Relationship("unmatched", "description")}});
+  const auto &route_proc = plan->addProcessor("RouteOnAttribute", "route", core::Relationship("success", "description"), true);
+  route_proc->setAutoTerminatedRelationships({ { core::Relationship("unmatched", "description") } });
   plan->setProperty(route_proc, "route_matched", "${route_condition_attr}", true);
 
-  const auto &update_matched_proc = plan->addProcessor("UpdateAttribute",
-                                                       "update_matched",
-                                                       core::Relationship("route_matched", "description"),
-                                                       true);
+  const auto &update_matched_proc = plan->addProcessor("UpdateAttribute", "update_matched", core::Relationship("route_matched", "description"), true);
   plan->setProperty(update_matched_proc, "route_check_attr", "good", true);
 
-  const auto &log_proc = plan->addProcessor("LogAttribute",
-                                            "log",
-                                            core::Relationship("success", "description"),
-                                            true);
+  const auto &log_proc = plan->addProcessor("LogAttribute", "log", core::Relationship("success", "description"), true);
 
   testController.runSession(plan, false);  // generate
   testController.runSession(plan, false);  // update
@@ -80,31 +67,18 @@ TEST_CASE("RouteOnAttributeUnmatchedTest", "[routeOnAttributeUnmatchedTest]") {
 
   std::shared_ptr<TestPlan> plan = testController.createPlan();
 
-  const auto &generate_proc = plan->addProcessor("GenerateFlowFile",
-                                                 "generate");
+  const auto &generate_proc = plan->addProcessor("GenerateFlowFile", "generate");
 
-  const auto &update_proc = plan->addProcessor("UpdateAttribute",
-                                               "update",
-                                               core::Relationship("success", "description"),
-                                               true);
+  const auto &update_proc = plan->addProcessor("UpdateAttribute", "update", core::Relationship("success", "description"), true);
   plan->setProperty(update_proc, "route_condition_attr", "false", true);
 
-  const auto &route_proc = plan->addProcessor("RouteOnAttribute",
-                                              "route",
-                                              core::Relationship("success", "description"),
-                                              true);
+  const auto &route_proc = plan->addProcessor("RouteOnAttribute", "route", core::Relationship("success", "description"), true);
   plan->setProperty(route_proc, "route_matched", "${route_condition_attr}", true);
 
-  const auto &update_matched_proc = plan->addProcessor("UpdateAttribute",
-                                                       "update_matched",
-                                                       core::Relationship("unmatched", "description"),
-                                                       true);
+  const auto &update_matched_proc = plan->addProcessor("UpdateAttribute", "update_matched", core::Relationship("unmatched", "description"), true);
   plan->setProperty(update_matched_proc, "route_check_attr", "good", true);
 
-  const auto &log_proc = plan->addProcessor("LogAttribute",
-                                            "log",
-                                            core::Relationship("success", "description"),
-                                            true);
+  const auto &log_proc = plan->addProcessor("LogAttribute", "log", core::Relationship("success", "description"), true);
 
   testController.runSession(plan, false);  // generate
   testController.runSession(plan, false);  // update

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/integration/TestExecuteProcess.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/integration/TestExecuteProcess.cpp b/libminifi/test/integration/TestExecuteProcess.cpp
index 5f2c6e2..f4f28d9 100644
--- a/libminifi/test/integration/TestExecuteProcess.cpp
+++ b/libminifi/test/integration/TestExecuteProcess.cpp
@@ -56,7 +56,7 @@ int main(int argc, char **argv) {
   std::shared_ptr<minifi::FlowController> controller = std::make_shared<
       TestFlowController>(test_repo, test_repo, content_repo);
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   assert(true == processor->getUUID(processoruuid));
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(test_repo, content_repo, "executeProcessConnection");
   connection->setRelationship(core::Relationship("success", "description"));

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/rocksdb-tests/RepoTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/rocksdb-tests/RepoTests.cpp b/libminifi/test/rocksdb-tests/RepoTests.cpp
index c92133a..bf9f51c 100644
--- a/libminifi/test/rocksdb-tests/RepoTests.cpp
+++ b/libminifi/test/rocksdb-tests/RepoTests.cpp
@@ -30,6 +30,9 @@
 #include "properties/Configure.h"
 
 TEST_CASE("Test Repo Empty Value Attribute", "[TestFFR1]") {
+  LogTestController::getInstance().setDebug<core::ContentRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
   char format[] = "/tmp/testRepo.XXXXXX";
   char *dir = testController.createTempDirectory(format);
@@ -44,10 +47,15 @@ TEST_CASE("Test Repo Empty Value Attribute", "[TestFFR1]") {
 
   REQUIRE(true == record.Serialize());
 
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
+
   repository->stop();
 }
 
 TEST_CASE("Test Repo Empty Key Attribute ", "[TestFFR2]") {
+  LogTestController::getInstance().setDebug<core::ContentRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
   char format[] = "/tmp/testRepo.XXXXXX";
   char *dir = testController.createTempDirectory(format);
@@ -63,10 +71,15 @@ TEST_CASE("Test Repo Empty Key Attribute ", "[TestFFR2]") {
 
   REQUIRE(true == record.Serialize());
 
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
+
   repository->stop();
 }
 
 TEST_CASE("Test Repo Key Attribute Verify ", "[TestFFR3]") {
+  LogTestController::getInstance().setDebug<core::ContentRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
+  LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
   char format[] = "/tmp/testRepo.XXXXXX";
   char *dir = testController.createTempDirectory(format);
@@ -108,6 +121,8 @@ TEST_CASE("Test Repo Key Attribute Verify ", "[TestFFR3]") {
 
   REQUIRE(true == record2.getAttribute("keyB", value));
   REQUIRE("" == value);
+
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
 }
 
 TEST_CASE("Test Delete Content ", "[TestFFR4]") {
@@ -159,16 +174,19 @@ TEST_CASE("Test Delete Content ", "[TestFFR4]") {
   std::ifstream fileopen(ss.str());
   REQUIRE(false == fileopen.good());
 
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
+
   LogTestController::getInstance().reset();
 }
 
-
 TEST_CASE("Test Validate Checkpoint ", "[TestFFR5]") {
   TestController testController;
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
   char format[] = "/tmp/testRepo.XXXXXX";
   LogTestController::getInstance().setDebug<core::ContentRepository>();
-  LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
-  LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
+  LogTestController::getInstance().setTrace<core::repository::FileSystemRepository>();
+  LogTestController::getInstance().setTrace<minifi::ResourceClaim>();
+  LogTestController::getInstance().setTrace<minifi::FlowFileRecord>();
 
   char *dir = testController.createTempDirectory(format);
 
@@ -190,30 +208,37 @@ TEST_CASE("Test Validate Checkpoint ", "[TestFFR5]") {
   repository->loadComponent(content_repo);
 
   std::shared_ptr<minifi::ResourceClaim> claim = std::make_shared<minifi::ResourceClaim>(ss.str(), content_repo);
+  {
+    minifi::FlowFileRecord record(repository, content_repo, attributes, claim);
 
-  minifi::FlowFileRecord record(repository, content_repo, attributes, claim);
+    record.addAttribute("keyA", "hasdgasdgjsdgasgdsgsadaskgasd");
 
-  record.addAttribute("keyA", "hasdgasdgjsdgasgdsgsadaskgasd");
+    record.addAttribute("", "hasdgasdgjsdgasgdsgsadaskgasd");
 
-  record.addAttribute("", "hasdgasdgjsdgasgdsgsadaskgasd");
+    REQUIRE(true == record.Serialize());
 
-  REQUIRE(true == record.Serialize());
-
-  repository->flush();
+    repository->flush();
 
-  repository->stop();
+    repository->stop();
 
-  repository->loadComponent(content_repo);
+    repository->loadComponent(content_repo);
 
-  repository->start();
+    repository->start();
 
-  // sleep for 100 ms to let the delete work.
-  std::this_thread::sleep_for(std::chrono::milliseconds(100));
+    std::this_thread::sleep_for(std::chrono::milliseconds(500));
+    repository->stop();
+    claim = nullptr;
+    // sleep for 100 ms to let the delete work.
 
-  repository->stop();
+    std::this_thread::sleep_for(std::chrono::milliseconds(500));
+  }
 
   std::ifstream fileopen(ss.str());
-  REQUIRE(false == fileopen.good());
+
+  REQUIRE(true == fileopen.fail());
+
+  utils::file::FileUtils::delete_dir(FLOWFILE_CHECKPOINT_DIRECTORY, true);
 
   LogTestController::getInstance().reset();
 }
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/C2MetricsTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/C2MetricsTests.cpp b/libminifi/test/unit/C2MetricsTests.cpp
index 231e634..b21b3ee 100644
--- a/libminifi/test/unit/C2MetricsTests.cpp
+++ b/libminifi/test/unit/C2MetricsTests.cpp
@@ -46,8 +46,8 @@ TEST_CASE("TestSystemMetrics", "[c2m5]") {
 
   REQUIRE(2 == metrics.serialize().size());
 
-  REQUIRE("identifier" == metrics.serialize().at(0).name);
-  REQUIRE("systemInfo" == metrics.serialize().at(1).name);
+  REQUIRE("systemInfo" == metrics.serialize().at(0).name);
+  REQUIRE("identifier" == metrics.serialize().at(1).name);
 }
 
 TEST_CASE("QueueMetricsTestNoConnections", "[c2m2]") {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/ExtractTextTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/ExtractTextTests.cpp b/libminifi/test/unit/ExtractTextTests.cpp
index 545996e..5931210 100644
--- a/libminifi/test/unit/ExtractTextTests.cpp
+++ b/libminifi/test/unit/ExtractTextTests.cpp
@@ -46,7 +46,7 @@ TEST_CASE("Test Creation of ExtractText", "[extracttextCreate]") {
     TestController testController;
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::ExtractText>("processorname");
     REQUIRE(processor->getName() == "processorname");
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(processor->getUUID(processoruuid));
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/GetTCPTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/GetTCPTests.cpp b/libminifi/test/unit/GetTCPTests.cpp
index 34765e7..777ffd5 100644
--- a/libminifi/test/unit/GetTCPTests.cpp
+++ b/libminifi/test/unit/GetTCPTests.cpp
@@ -36,6 +36,10 @@
 #include "core/reporting/SiteToSiteProvenanceReportingTask.h"
 
 TEST_CASE("GetTCPWithoutEOM", "[GetTCP1]") {
+  utils::Identifier ident = utils::Identifier();
+
+  std::cout << (ident == nullptr) << std::endl;
+  std::cout << ident.to_string() << std::endl;
   TestController testController;
   std::vector<uint8_t> buffer;
   for (auto c : "Hello World\nHello Warld\nGoodByte Cruel world") {
@@ -64,12 +68,14 @@ TEST_CASE("GetTCPWithoutEOM", "[GetTCP1]") {
   processor->setStreamFactory(stream_factory);
   processor->initialize();
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 
-  uuid_t logattribute_uuid;
+  utils::Identifier logattribute_uuid;
   REQUIRE(true == logAttribute->getUUID(logattribute_uuid));
 
+  REQUIRE(processoruuid.to_string() != logattribute_uuid.to_string());
+
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(repo, content_repo, "gettcpexampleConnection");
   connection->setRelationship(core::Relationship("success", "description"));
 
@@ -176,10 +182,10 @@ TEST_CASE("GetTCPWithOEM", "[GetTCP2]") {
   processor->setStreamFactory(stream_factory);
   processor->initialize();
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 
-  uuid_t logattribute_uuid;
+  utils::Identifier logattribute_uuid;
   REQUIRE(true == logAttribute->getUUID(logattribute_uuid));
 
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(repo, content_repo, "gettcpexampleConnection");
@@ -301,10 +307,10 @@ TEST_CASE("GetTCPWithOnlyOEM", "[GetTCP3]") {
   processor->setStreamFactory(stream_factory);
   processor->initialize();
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 
-  uuid_t logattribute_uuid;
+  utils::Identifier logattribute_uuid;
   REQUIRE(true == logAttribute->getUUID(logattribute_uuid));
 
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(repo, content_repo, "gettcpexampleConnection");

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/IdTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/IdTests.cpp b/libminifi/test/unit/IdTests.cpp
index c60aedb..90ddcd2 100644
--- a/libminifi/test/unit/IdTests.cpp
+++ b/libminifi/test/unit/IdTests.cpp
@@ -100,13 +100,15 @@ TEST_CASE("Test Hex Device Segment 16 bits correct digits", "[id]") {
   std::shared_ptr<utils::IdGenerator> generator = utils::IdGenerator::getIdGenerator();
   generator->initialize(id_props);
 
-  uuid_t uid;
-  generator->generate(uid);
+  utils::Identifier uuid;
+  generator->generate(uuid);
+  auto uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(0 == uid[15]);
 
-  generator->generate(uid);
+  generator->generate(uuid);
+  uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(1 == uid[15]);
@@ -126,14 +128,16 @@ TEST_CASE("Test Hex Device Segment 16 bits too many digits", "[id]") {
   std::shared_ptr<utils::IdGenerator> generator = utils::IdGenerator::getIdGenerator();
   generator->initialize(id_props);
 
-  uuid_t uid;
-  generator->generate(uid);
+  utils::Identifier uuid;
+  generator->generate(uuid);
+  auto uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(0 == (uid[2] & 128));
   REQUIRE(0 == uid[15]);
 
-  generator->generate(uid);
+  generator->generate(uuid);
+  uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(0 == (uid[2] & 128));
@@ -155,19 +159,27 @@ TEST_CASE("Test Hex Device Segment 18 bits", "[id]") {
   std::shared_ptr<utils::IdGenerator> generator = utils::IdGenerator::getIdGenerator();
   generator->initialize(id_props);
 
-  uuid_t uid;
-  generator->generate(uid);
+  utils::Identifier uuid;
+  generator->generate(uuid);
+  auto uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(128 == (uid[2] & 192));
   REQUIRE(0 == uid[15]);
 
-  generator->generate(uid);
+  generator->generate(uuid);
+  uid = uuid.toArray();
   REQUIRE(0x09 == uid[0]);
   REQUIRE(0xaf == uid[1]);
   REQUIRE(128 == (uid[2] & 192));
   REQUIRE(1 == uid[15]);
 
+
+  utils::Identifier uuid2;
+  generator->generate(uuid2);
+  REQUIRE(uuid.to_string() != uuid2.to_string());
+  REQUIRE(uuid != uuid2);
+
   REQUIRE(true == LogTestController::getInstance().contains("Using minifi uid prefix: 9af8"));
   LogTestController::getInstance().reset();
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/ManifestTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/ManifestTests.cpp b/libminifi/test/unit/ManifestTests.cpp
index 83811a2..7e463dd 100644
--- a/libminifi/test/unit/ManifestTests.cpp
+++ b/libminifi/test/unit/ManifestTests.cpp
@@ -59,8 +59,10 @@ TEST_CASE("Test Valid Regex", "[validRegex]") {
   const auto &prop_0 = prop_descriptors.children[0];
   REQUIRE(prop_0.children.size() >= 3);
   const auto &df = prop_0.children[3];
-  REQUIRE("defaultValue" == df.name);
-  const auto &prop_0_valid_regex = prop_0.children[4];
+  REQUIRE("expressionLanguageScope" == df.name);
+  const auto &prop_0_defv = prop_0.children[4];
+  REQUIRE("defaultValue" == prop_0_defv.name);
+  const auto &prop_0_valid_regex = prop_0.children[5];
   REQUIRE("validRegex" == prop_0_valid_regex.name);
 }
 
@@ -110,8 +112,8 @@ TEST_CASE("Test Dependent", "[dependent]") {
   REQUIRE(prop_descriptors.children.size() > 0);
   const auto &prop_0 = prop_descriptors.children[1];
   REQUIRE(prop_0.children.size() >= 3);
-  REQUIRE("defaultValue" == prop_0.children[3].name);
-  REQUIRE("validRegex" == prop_0.children[4].name);
+  REQUIRE("expressionLanguageScope" == prop_0.children[3].name);
+  REQUIRE("defaultValue" == prop_0.children[4].name);
   const auto &prop_0_dependent_0 = prop_descriptors.children[2];
   REQUIRE("Directory" == prop_0_dependent_0.name);
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/MockClasses.h
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/MockClasses.h b/libminifi/test/unit/MockClasses.h
index 00eaf82..7f0bd88 100644
--- a/libminifi/test/unit/MockClasses.h
+++ b/libminifi/test/unit/MockClasses.h
@@ -33,13 +33,13 @@ class MockControllerService : public core::controller::ControllerService {
 
   }
 
-  explicit MockControllerService(const std::string &name, uuid_t uuid)
+  explicit MockControllerService(const std::string &name, utils::Identifier &  uuid)
       : ControllerService(name, uuid) {
 
   }
 
   explicit MockControllerService(const std::string &name)
-      : ControllerService(name, 0) {
+      : ControllerService(name) {
 
   }
   MockControllerService() {
@@ -81,13 +81,13 @@ class MockControllerService : public core::controller::ControllerService {
 class MockProcessor : public core::Processor {
  public:
 
-  explicit MockProcessor(const std::string &name, uuid_t uuid)
+  explicit MockProcessor(const std::string &name, utils::Identifier uuid)
       : Processor(name, uuid) {
     setTriggerWhenEmpty(true);
   }
 
   explicit MockProcessor(const std::string &name)
-      : Processor(name, 0) {
+      : Processor(name) {
     setTriggerWhenEmpty(true);
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/ProcessorTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/ProcessorTests.cpp b/libminifi/test/unit/ProcessorTests.cpp
index 8810763..32ba181 100644
--- a/libminifi/test/unit/ProcessorTests.cpp
+++ b/libminifi/test/unit/ProcessorTests.cpp
@@ -53,7 +53,7 @@ TEST_CASE("Test GetFileMultiple", "[getfileCreate3]") {
   char format[] = "/tmp/gt.XXXXXX";
   char *dir = testController.createTempDirectory(format);
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(test_repo, content_repo, "getfileCreate2Connection");
@@ -137,7 +137,7 @@ TEST_CASE("Test GetFile Ignore", "[getfileCreate3]") {
   char format[] = "/tmp/gt.XXXXXX";
   char *dir = testController.createTempDirectory(format);
 
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == processor->getUUID(processoruuid));
 
   std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(test_repo, content_repo, "getfileCreate2Connection");
@@ -332,7 +332,7 @@ TEST_CASE("Test Find file", "[getfileCreate3]") {
 
 class TestProcessorNoContent : public minifi::core::Processor {
  public:
-  explicit TestProcessorNoContent(std::string name, uuid_t uuid = NULL)
+  explicit TestProcessorNoContent(std::string name, utils::Identifier uuid = NULL)
       : Processor(name, uuid),
         Success("success", "All files are routed to success") {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/ProvenanceTestHelper.h
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/ProvenanceTestHelper.h b/libminifi/test/unit/ProvenanceTestHelper.h
index db7b35a..00547af 100644
--- a/libminifi/test/unit/ProvenanceTestHelper.h
+++ b/libminifi/test/unit/ProvenanceTestHelper.h
@@ -46,7 +46,7 @@
 class TestRepository : public core::Repository {
  public:
   TestRepository()
-      : core::SerializableComponent("repo_name", 0),
+      : core::SerializableComponent("repo_name"),
         Repository("repo_name", "./dir", 1000, 100, 0) {
   }
   // initialize
@@ -155,7 +155,7 @@ class TestRepository : public core::Repository {
 class TestFlowRepository : public core::Repository {
  public:
   TestFlowRepository()
-      : core::SerializableComponent("ff", 0),
+      : core::SerializableComponent("ff"),
         core::Repository("ff", "./dir", 1000, 100, 0) {
   }
   // initialize
@@ -256,19 +256,19 @@ class TestFlowController : public minifi::FlowController {
     return true;
   }
 
-  std::shared_ptr<core::Processor> createProcessor(std::string name, uuid_t uuid) {
+  std::shared_ptr<core::Processor> createProcessor(std::string name, utils::Identifier &  uuid) {
     return 0;
   }
 
-  core::ProcessGroup *createRootProcessGroup(std::string name, uuid_t uuid) {
+  core::ProcessGroup *createRootProcessGroup(std::string name, utils::Identifier &  uuid) {
     return 0;
   }
 
-  core::ProcessGroup *createRemoteProcessGroup(std::string name, uuid_t uuid) {
+  core::ProcessGroup *createRemoteProcessGroup(std::string name, utils::Identifier &  uuid) {
     return 0;
   }
 
-  std::shared_ptr<minifi::Connection> createConnection(std::string name, uuid_t uuid) {
+  std::shared_ptr<minifi::Connection> createConnection(std::string name, utils::Identifier &  uuid) {
     return 0;
   }
  protected:

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/Site2SiteTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/Site2SiteTests.cpp b/libminifi/test/unit/Site2SiteTests.cpp
index ff2b44a..732df70 100644
--- a/libminifi/test/unit/Site2SiteTests.cpp
+++ b/libminifi/test/unit/Site2SiteTests.cpp
@@ -38,9 +38,9 @@ TEST_CASE("TestSetPortId", "[S2S1]") {
 
   std::string uuid_str = "c56a4180-65aa-42ec-a945-5fd21dec0538";
 
-  uuid_t fakeUUID;
+  utils::Identifier fakeUUID;
 
-  uuid_parse(uuid_str.c_str(), fakeUUID);
+  fakeUUID = uuid_str;
 
   protocol.setPortId(fakeUUID);
 
@@ -55,9 +55,9 @@ TEST_CASE("TestSetPortIdUppercase", "[S2S2]") {
 
   std::string uuid_str = "C56A4180-65AA-42EC-A945-5FD21DEC0538";
 
-  uuid_t fakeUUID;
+  utils::Identifier fakeUUID;
 
-  uuid_parse(uuid_str.c_str(), fakeUUID);
+  fakeUUID = uuid_str;
 
   protocol.setPortId(fakeUUID);
 
@@ -100,9 +100,9 @@ TEST_CASE("TestSiteToSiteVerifySend", "[S2S3]") {
 
   std::string uuid_str = "C56A4180-65AA-42EC-A945-5FD21DEC0538";
 
-  uuid_t fakeUUID;
+  utils::Identifier fakeUUID;
 
-  uuid_parse(uuid_str.c_str(), fakeUUID);
+  fakeUUID = uuid_str;
 
   protocol.setPortId(fakeUUID);
 
@@ -124,7 +124,7 @@ TEST_CASE("TestSiteToSiteVerifySend", "[S2S3]") {
   collector->get_next_client_response();
   REQUIRE(collector->get_next_client_response() == "PORT_IDENTIFIER");
   collector->get_next_client_response();
-  REQUIRE(collector->get_next_client_response() == "c56a4180-65aa-42ec-a945-5fd21dec0538");
+  REQUIRE(utils::StringUtils::equalsIgnoreCase(collector->get_next_client_response(), "c56a4180-65aa-42ec-a945-5fd21dec0538"));
   collector->get_next_client_response();
   REQUIRE(collector->get_next_client_response() == "REQUEST_EXPIRATION_MILLIS");
   collector->get_next_client_response();
@@ -169,9 +169,9 @@ TEST_CASE("TestSiteToSiteVerifyNegotiationFail", "[S2S4]") {
 
   std::string uuid_str = "C56A4180-65AA-42EC-A945-5FD21DEC0538";
 
-  uuid_t fakeUUID;
+  utils::Identifier fakeUUID;
 
-  uuid_parse(uuid_str.c_str(), fakeUUID);
+  fakeUUID = uuid_str;
 
   protocol.setPortId(fakeUUID);
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/TailFileTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/TailFileTests.cpp b/libminifi/test/unit/TailFileTests.cpp
index 62cb0eb..379ee40 100644
--- a/libminifi/test/unit/TailFileTests.cpp
+++ b/libminifi/test/unit/TailFileTests.cpp
@@ -50,7 +50,7 @@ TEST_CASE("TailFileWithDelimiter", "[tailfiletest1]") {
       tmpfile.close();
 
   TestController testController;
-  LogTestController::getInstance().setDebug<minifi::processors::TailFile>();
+  LogTestController::getInstance().setTrace<minifi::processors::TailFile>();
   LogTestController::getInstance().setDebug<core::ProcessSession>();
   LogTestController::getInstance().setDebug<minifi::processors::LogAttribute>();
 
@@ -134,9 +134,9 @@ TEST_CASE("TailFileWithDelimiter", "[tailfiletest1]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::TailFile>("tailfile");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -203,9 +203,9 @@ TEST_CASE("TailFileWithoutDelimiter", "[tailfiletest2]") {
     std::shared_ptr<core::Processor> processor = std::make_shared<org::apache::nifi::minifi::processors::TailFile>("tailfile");
     std::shared_ptr<core::Processor> logAttributeProcessor = std::make_shared<org::apache::nifi::minifi::processors::LogAttribute>("logattribute");
 
-    uuid_t processoruuid;
+    utils::Identifier processoruuid;
     REQUIRE(true == processor->getUUID(processoruuid));
-    uuid_t logAttributeuuid;
+    utils::Identifier logAttributeuuid;
     REQUIRE(true == logAttributeProcessor->getUUID(logAttributeuuid));
 
     std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();


[9/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
MINIFICPP-595: Provide basic support for windows.
MINIFICPP-32: Add windows event log reader
MINIFICPP-596: Build core and libminifi artifacts. Must abstract
features that are operating system dependent, such as uuid

Make update for appveyor

MINIFICPP-595: Add bustache loader to facilitate windows

MINIFICPP-595: Add lean and mean to avoid appveyor build failures

Adding cmake def to avoid redef errors

MINIFICPP-596: Add el support

MINIFICPP-596: Change supportsExpressionLangauge to expressionLanguageScope

This closes #394.

Signed-off-by: Aldrin Piri <al...@apache.org>


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

Branch: refs/heads/master
Commit: 2b0a55e4a6725750aa07a41b6632fe016259e77e
Parents: 8dd5a09
Author: Marc Parisi <ph...@apache.org>
Authored: Thu Aug 2 10:36:20 2018 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Thu Sep 20 11:14:10 2018 -0400

----------------------------------------------------------------------
 .gitignore                                      |   3 +
 CMakeLists.txt                                  | 262 +++---
 CMakeSettings.json                              | 137 +++
 LICENSE                                         | 204 +++++
 LibExample/CMakeLists.txt                       |  43 +-
 LibExample/generate_flow.c                      |   2 -
 appveyor.yml                                    |  34 +-
 cmake/BuildTests.cmake                          |  12 +
 controller/CMakeLists.txt                       |  14 +
 extensions/ExtensionHeader.txt                  |   6 +
 extensions/bustache/ApplyTemplate.h             |   4 +-
 extensions/bustache/TemplateLoader.h            |   6 +-
 extensions/civetweb/processors/ListenHTTP.h     |   2 +-
 extensions/expression-language/CMakeLists.txt   |   1 -
 extensions/expression-language/Expression.cpp   |   6 +-
 .../expression-language/ProcessContextExpr.cpp  |  19 +-
 .../noop/ProcessContextExprNoOp.cpp             |  10 +-
 extensions/gps/GetGPS.h                         |   2 +-
 extensions/gps/GetGPSLoader.h                   |   4 +-
 extensions/http-curl/HTTPCurlLoader.cpp         |   2 +
 extensions/http-curl/HTTPCurlLoader.h           |  13 +-
 extensions/http-curl/client/HTTPClient.cpp      |  17 +-
 extensions/http-curl/client/HTTPClient.h        |  15 +-
 extensions/http-curl/processors/InvokeHTTP.cpp  |  16 +-
 extensions/http-curl/processors/InvokeHTTP.h    |   3 +-
 extensions/http-curl/protocols/AgentPrinter.cpp |   2 +-
 extensions/http-curl/protocols/AgentPrinter.h   |   2 +-
 extensions/http-curl/protocols/RESTReceiver.cpp |   2 +-
 extensions/http-curl/protocols/RESTReceiver.h   |   2 +-
 extensions/http-curl/protocols/RESTSender.cpp   |   2 +-
 extensions/http-curl/protocols/RESTSender.h     |   2 +-
 .../http-curl/sitetosite/HTTPProtocol.cpp       |   2 -
 extensions/http-curl/sitetosite/HTTPProtocol.h  |   8 +-
 extensions/http-curl/sitetosite/PeersEntity.h   |   2 +-
 .../http-curl/tests/unit/InvokeHTTPTests.cpp    |   8 +-
 extensions/libarchive/ArchiveLoader.h           |   2 +-
 extensions/libarchive/BinFiles.h                |   8 +-
 extensions/libarchive/CMakeLists.txt            |   5 +-
 extensions/libarchive/CompressContent.h         |   2 +-
 extensions/libarchive/FocusArchiveEntry.cpp     |   8 +-
 extensions/libarchive/FocusArchiveEntry.h       |   2 +-
 extensions/libarchive/ManipulateArchive.h       |   4 +-
 extensions/libarchive/MergeContent.h            |   6 +-
 extensions/libarchive/UnfocusArchiveEntry.h     |   2 +-
 extensions/librdkafka/CMakeLists.txt            |   6 +-
 extensions/librdkafka/PublishKafka.h            |   2 +-
 extensions/librdkafka/RdKafkaLoader.h           |   4 +-
 extensions/mqtt/CMakeLists.txt                  |   4 +-
 extensions/mqtt/MQTTLoader.h                    |   4 +-
 .../controllerservice/MQTTControllerService.h   |   4 +-
 .../mqtt/processors/AbstractMQTTProcessor.h     |   2 +-
 extensions/mqtt/processors/ConsumeMQTT.h        |  25 +-
 extensions/mqtt/processors/ConvertBase.h        |   2 +-
 extensions/mqtt/processors/ConvertHeartBeat.h   |   2 +-
 extensions/mqtt/processors/ConvertJSONAck.h     |   2 +-
 extensions/mqtt/processors/ConvertUpdate.h      |   2 +-
 extensions/mqtt/processors/PublishMQTT.h        |  36 +-
 extensions/mqtt/protocol/MQTTC2Protocol.cpp     |   2 +-
 extensions/mqtt/protocol/MQTTC2Protocol.h       |   2 +-
 extensions/pcap/CMakeLists.txt                  |   4 +-
 extensions/pcap/CapturePacket.cpp               |   6 +-
 extensions/pcap/CapturePacket.h                 |   2 +-
 extensions/pcap/PcapLoader.h                    |   4 +-
 extensions/rocksdb-repos/CMakeLists.txt         |   8 +-
 .../rocksdb-repos/DatabaseContentRepository.h   |   2 +-
 extensions/rocksdb-repos/FlowFileRepository.cpp |   3 +-
 extensions/rocksdb-repos/FlowFileRepository.h   |   9 +-
 extensions/rocksdb-repos/ProvenanceRepository.h |   4 +-
 extensions/rocksdb-repos/RocksDBLoader.h        |   4 +-
 extensions/rocksdb-repos/RocksDbStream.h        |   2 +-
 extensions/script/CMakeLists.txt                |   5 +-
 extensions/script/ExecuteScript.h               |   2 +-
 extensions/script/python/PyProcessSession.h     |   4 +-
 extensions/script/python/PythonScriptEngine.h   |   4 +-
 extensions/sensors/GetEnvironmentalSensors.h    |   2 +-
 extensions/sensors/GetMovementSensors.h         |   2 +-
 extensions/sensors/SensorBase.h                 |   2 +-
 extensions/sensors/SensorLoader.h               |   4 +-
 extensions/sqlite/CMakeLists.txt                |   7 +-
 extensions/sqlite/ExecuteSQL.h                  |   2 +-
 extensions/sqlite/PutSQL.h                      |   2 +-
 extensions/tensorflow/TFApplyGraph.h            |   2 +-
 extensions/tensorflow/TFConvertImageToTensor.h  |   2 +-
 extensions/tensorflow/TFExtractTopLabels.h      |   2 +-
 extensions/usb-camera/CMakeLists.txt            |   4 +-
 extensions/usb-camera/GetUSBCamera.h            |   2 +-
 extensions/windows-event-log/CMakeLists.txt     |  60 ++
 extensions/windows-event-log/TailEventLog.cpp   | 144 ++++
 extensions/windows-event-log/TailEventLog.h     | 165 ++++
 generateVersion.bat                             | 106 +++
 libminifi/CMakeLists.txt                        |  62 +-
 libminifi/include/Connection.h                  |  29 +-
 libminifi/include/FlowControlProtocol.h         |   6 +-
 libminifi/include/RemoteProcessorGroupPort.h    |  12 +-
 libminifi/include/agent/build_description.h     |   8 +-
 libminifi/include/c2/C2Protocol.h               |   2 +-
 libminifi/include/c2/ControllerSocketProtocol.h |   2 +-
 libminifi/include/c2/HeartBeatReporter.h        |   2 +-
 libminifi/include/capi/Instance.h               |   4 +-
 libminifi/include/capi/Plan.h                   |   5 +-
 .../controllers/LinuxPowerManagementService.h   |   4 +-
 .../controllers/NetworkPrioritizerService.h     |  12 +-
 .../include/controllers/SSLContextService.h     |  21 +-
 .../controllers/ThreadManagementService.h       |   4 +-
 .../controllers/UpdatePolicyControllerService.h |   4 +-
 libminifi/include/core/ClassLoader.h            | 173 +++-
 libminifi/include/core/ConfigurableComponent.h  |   3 +-
 libminifi/include/core/Connectable.h            |   7 +-
 libminifi/include/core/Core.h                   |  95 ++-
 libminifi/include/core/FlowConfiguration.h      |  34 +-
 libminifi/include/core/FlowFile.h               |   4 +-
 libminifi/include/core/ProcessContext.h         |   4 +-
 libminifi/include/core/ProcessGroup.h           |  28 +-
 libminifi/include/core/Processor.h              |  14 +-
 libminifi/include/core/ProcessorNode.h          |   7 +-
 libminifi/include/core/Property.h               |  28 +-
 libminifi/include/core/Repository.h             |   1 -
 libminifi/include/core/Resource.h               |   2 +
 libminifi/include/core/SerializableComponent.h  |   7 +-
 .../include/core/controller/ControllerService.h |  21 +-
 .../core/controller/ControllerServiceMap.h      |   4 +-
 .../core/controller/ControllerServiceNode.h     |   2 +-
 .../SiteToSiteProvenanceReportingTask.h         |  10 +-
 .../core/repository/VolatileContentRepository.h |   2 +-
 .../repository/VolatileFlowFileRepository.h     |   2 +-
 .../repository/VolatileProvenanceRepository.h   |   2 +-
 .../core/repository/VolatileRepository.h        |   2 +-
 libminifi/include/core/state/UpdateController.h |   4 +
 .../include/core/state/nodes/AgentInformation.h |  46 +-
 .../include/core/state/nodes/BuildInformation.h |  15 +-
 .../core/state/nodes/DeviceInformation.h        |  32 +-
 .../include/core/state/nodes/FlowInformation.h  |  26 +-
 .../include/core/state/nodes/MetricsBase.h      |  26 +-
 .../include/core/state/nodes/ProcessMetrics.h   |   9 +-
 .../include/core/state/nodes/QueueMetrics.h     |   6 +-
 .../core/state/nodes/RepositoryMetrics.h        |   6 +-
 .../include/core/state/nodes/SchedulingNodes.h  |   4 +-
 .../include/core/state/nodes/StateMonitor.h     |  23 +-
 .../include/core/state/nodes/SystemMetrics.h    |  15 +-
 libminifi/include/core/yaml/YamlConfiguration.h |   2 +-
 libminifi/include/io/CRCStream.h                |   7 +-
 libminifi/include/io/ClientSocket.h             | 295 -------
 libminifi/include/io/ServerSocket.h             |   2 +-
 libminifi/include/io/Sockets.h                  |   2 +-
 libminifi/include/io/validation.h               |  47 +-
 libminifi/include/processors/AppendHostInfo.h   |   2 +-
 libminifi/include/processors/ExecuteProcess.h   |  13 +-
 libminifi/include/processors/ExtractText.h      |   2 +-
 libminifi/include/processors/GenerateFlowFile.h |   2 +-
 libminifi/include/processors/GetFile.h          |   6 +-
 libminifi/include/processors/GetTCP.h           |   6 +-
 libminifi/include/processors/ListenSyslog.h     |  14 +-
 libminifi/include/processors/LogAttribute.h     |   2 +-
 libminifi/include/processors/PutFile.h          |   2 +-
 libminifi/include/processors/RouteOnAttribute.h |   2 +-
 libminifi/include/processors/TailFile.h         |   2 +-
 libminifi/include/processors/UpdateAttribute.h  |   4 +-
 libminifi/include/provenance/Provenance.h       |   1 -
 libminifi/include/sitetosite/Peer.h             |  32 +-
 .../include/sitetosite/RawSocketProtocol.h      |   6 -
 libminifi/include/sitetosite/SiteToSite.h       |  15 +-
 libminifi/include/sitetosite/SiteToSiteClient.h |  25 +-
 .../include/sitetosite/SiteToSiteFactory.h      |   7 +-
 libminifi/include/utils/HTTPClient.h            |   2 +-
 libminifi/include/utils/Id.h                    |  87 +-
 libminifi/include/utils/StringUtils.h           |  13 +-
 libminifi/include/utils/TimeUtil.h              |   3 -
 libminifi/include/utils/file/DiffUtils.h        |   2 -
 libminifi/include/utils/file/FileManager.h      |   1 -
 libminifi/include/utils/file/FileUtils.h        |  73 +-
 libminifi/opsys/posix/io/ClientSocket.h         | 296 +++++++
 libminifi/opsys/win/io/ClientSocket.h           | 343 ++++++++
 libminifi/src/Connection.cpp                    |  60 +-
 libminifi/src/FlowControlProtocol.cpp           |  92 +-
 libminifi/src/FlowController.cpp                |  21 +-
 libminifi/src/FlowFileRecord.cpp                |   1 -
 libminifi/src/Properties.cpp                    |   4 +
 libminifi/src/RemoteProcessorGroupPort.cpp      |   6 +-
 libminifi/src/c2/C2Agent.cpp                    |   1 -
 libminifi/src/c2/protocols/RESTProtocol.cpp     |   2 +
 libminifi/src/capi/C2CallbackAgent.cpp          |   1 -
 libminifi/src/capi/Plan.cpp                     |  14 +-
 .../controllers/LinuxPowerManagementService.cpp |   2 +-
 .../controllers/NetworkPrioritizerService.cpp   |  13 +-
 libminifi/src/controllers/SSLContextService.cpp |  12 +
 .../UpdatePolicyControllerService.cpp           |   7 -
 libminifi/src/core/ClassLoader.cpp              |   5 +-
 libminifi/src/core/ConfigurableComponent.cpp    |   3 +
 libminifi/src/core/Connectable.cpp              |  10 +-
 libminifi/src/core/Core.cpp                     |  26 +-
 libminifi/src/core/FlowConfiguration.cpp        |  58 +-
 libminifi/src/core/FlowFile.cpp                 |   4 +-
 libminifi/src/core/ProcessGroup.cpp             |  53 +-
 libminifi/src/core/ProcessSession.cpp           |  26 +-
 libminifi/src/core/Processor.cpp                |  49 +-
 libminifi/src/core/ProcessorNode.cpp            |   8 +-
 libminifi/src/core/Property.cpp                 |   9 +
 libminifi/src/core/Repository.cpp               |   1 -
 .../src/core/logging/LoggerConfiguration.cpp    |  15 +-
 .../repository/VolatileContentRepository.cpp    |  11 +-
 libminifi/src/core/yaml/YamlConfiguration.cpp   |  63 +-
 libminifi/src/io/ClientSocket.cpp               | 484 -----------
 libminifi/src/io/DataStream.cpp                 |  20 +-
 libminifi/src/io/DescriptorStream.cpp           |   1 -
 libminifi/src/io/Serializable.cpp               |   6 +-
 libminifi/src/io/ServerSocket.cpp               |   5 +-
 libminifi/src/io/StreamFactory.cpp              |   4 +
 libminifi/src/io/posix/ClientSocket.cpp         | 484 +++++++++++
 libminifi/src/io/tls/SecureDescriptorStream.cpp |   1 -
 libminifi/src/io/tls/TLSServerSocket.cpp        |   5 +-
 libminifi/src/io/win/ClientSocket.cpp           | 538 ++++++++++++
 libminifi/src/processors/AppendHostInfo.cpp     |  18 +-
 libminifi/src/processors/ExecuteProcess.cpp     |  27 +-
 libminifi/src/processors/ExtractText.cpp        | 114 +--
 libminifi/src/processors/GenerateFlowFile.cpp   |   7 +-
 libminifi/src/processors/GetFile.cpp            |  63 +-
 libminifi/src/processors/GetTCP.cpp             |   6 +-
 libminifi/src/processors/ListenSyslog.cpp       |  10 +-
 libminifi/src/processors/LogAttribute.cpp       |   1 -
 libminifi/src/processors/PutFile.cpp            | 105 ++-
 libminifi/src/processors/RouteOnAttribute.cpp   |  22 +-
 libminifi/src/processors/TailFile.cpp           |  40 +-
 libminifi/src/processors/UpdateAttribute.cpp    |  22 +-
 libminifi/src/provenance/Provenance.cpp         |   1 -
 libminifi/src/sitetosite/Peer.cpp               |   2 -
 libminifi/src/sitetosite/RawSocketProtocol.cpp  |   7 +-
 libminifi/src/utils/Id.cpp                      |  98 ++-
 libminifi/test/TestBase.cpp                     |  16 +-
 .../test/archive-tests/CompressContentTests.cpp |  32 +-
 .../test/archive-tests/FocusArchiveTests.cpp    |   2 +-
 .../archive-tests/ManipulateArchiveTests.cpp    |   2 +-
 libminifi/test/archive-tests/MergeFileTests.cpp |  24 +-
 .../test/bustache-tests/ApplyTemplateTests.cpp  |   2 +-
 .../RouteOnAttributeTests.cpp                   |  48 +-
 .../test/integration/TestExecuteProcess.cpp     |   2 +-
 libminifi/test/rocksdb-tests/RepoTests.cpp      |  57 +-
 libminifi/test/unit/C2MetricsTests.cpp          |   4 +-
 libminifi/test/unit/ExtractTextTests.cpp        |   2 +-
 libminifi/test/unit/GetTCPTests.cpp             |  18 +-
 libminifi/test/unit/IdTests.cpp                 |  30 +-
 libminifi/test/unit/ManifestTests.cpp           |  10 +-
 libminifi/test/unit/MockClasses.h               |   8 +-
 libminifi/test/unit/ProcessorTests.cpp          |   6 +-
 libminifi/test/unit/ProvenanceTestHelper.h      |  12 +-
 libminifi/test/unit/Site2SiteTests.cpp          |  18 +-
 libminifi/test/unit/TailFileTests.cpp           |  10 +-
 libminifi/test/unit/YamlConfigurationTests.cpp  | 392 ++++-----
 main/CMakeLists.txt                             |  82 +-
 main/Main.h                                     |  28 +-
 main/MiNiFiMain.cpp                             |  49 +-
 .../CMakeLists.txt                              |  24 +
 .../Simple-Windows-Posix-Semaphore/semaphore.c  | 371 ++++++++
 .../Simple-Windows-Posix-Semaphore/semaphore.h  | 129 +++
 thirdparty/librdkafka-0.11.4/CMakeLists.txt     |   3 +-
 thirdparty/librdkafka-0.11.4/src/CMakeLists.txt |   6 +-
 thirdparty/rocksdb/CMakeLists.txt               |  35 +-
 thirdparty/uuid/CMakeLists.txt                  |   7 +-
 thirdparty/uuid/clear.c                         |   2 +-
 thirdparty/uuid/compare.c                       |   2 +-
 thirdparty/uuid/copy.c                          |   2 +-
 thirdparty/uuid/gen_uuid.c                      | 521 +++++-------
 thirdparty/uuid/include/posix/uuid/config.h     | 847 +++++++++++++++++++
 thirdparty/uuid/include/posix/uuid/uuid.h       | 112 +++
 thirdparty/uuid/include/posix/uuid/uuidP.h      |  63 ++
 thirdparty/uuid/include/posix/uuid/uuidd.h      |  54 ++
 thirdparty/uuid/include/uuid/config.h           | 845 ------------------
 thirdparty/uuid/include/uuid/uuid.h             | 103 ---
 thirdparty/uuid/include/uuid/uuidP.h            |  63 --
 thirdparty/uuid/include/uuid/uuidd.h            |  54 --
 thirdparty/uuid/include/win32/uuid/config.h     |  88 ++
 thirdparty/uuid/include/win32/uuid/uuid.h       | 115 +++
 thirdparty/uuid/include/win32/uuid/uuidP.h      |  63 ++
 thirdparty/uuid/include/win32/uuid/uuidd.h      |  54 ++
 thirdparty/uuid/isnull.c                        |   6 +-
 thirdparty/uuid/makefile                        |   2 +-
 thirdparty/uuid/pack.c                          |   2 +-
 thirdparty/uuid/parse.c                         |   2 +-
 thirdparty/uuid/tst_uuid.c                      | 199 -----
 thirdparty/uuid/unpack.c                        |   2 +-
 thirdparty/uuid/unparse.c                       |   8 +-
 thirdparty/uuid/uuid_time.c                     |  18 +-
 .../include/yaml-cpp/exceptions.h               |   2 +-
 .../include/yaml-cpp/node/detail/iterator.h     |  16 +-
 .../src/exceptions.cpp                          |   2 +-
 thirdparty/zlib/include/zconf.h                 |   2 +-
 285 files changed, 7182 insertions(+), 3901 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index e0a931f..eb28306 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,9 +55,12 @@ thirdparty/apache-rat/apache-rat*
 
 # Ignore source files that have been placed in the docker directory during build
 docker/minificppsource
+.vs/**
 *.swp
 .cache
 .cproject
 .settings
 *.pyc
 /cmake-build-*
+.vs/VSWorkspaceState.json
+.vs/slnx.sqlite

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 728042e..e70d9f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,9 +26,15 @@ set(PROJECT_VERSION_PATCH 0)
 option(SKIP_TESTS "Skips building all tests." OFF)
 option(PORTABLE "Instructs the compiler to remove architecture specific optimizations" ON)
 option(USE_SYSTEM_OPENSSL "Instructs the build system to search for and use an SSL library available in the host system" ON)
-option(USE_SYSTEM_UUID "Instructs the build system to search for and use an UUID library available in the host system" ON)
+option(OPENSSL_OFF "Disables OpenSSL" OFF)
+option(USE_SYSTEM_UUID "Instructs the build system to search for and use an UUID library available in the host system" OFF)
 option(USE_SYSTEM_CURL "Instructs the build system to search for and use a cURL library available in the host system" ON)
+if (WIN32)
+option(USE_SYSTEM_ZLIB "Instructs the build system to search for and use a zlib library available in the host system" OFF)
+else()
 option(USE_SYSTEM_ZLIB "Instructs the build system to search for and use a zlib library available in the host system" ON)
+endif()
+
 option(USE_SYSTEM_BZIP2 "Instructs the build system to search for and use a bzip2 library available in the host system" ON)
 option(BUILD_ROCKSDB "Instructs the build system to use RocksDB from the third party directory" ON)
 
@@ -64,19 +70,28 @@ endif(CCACHE_FOUND)
 #### Establish Project Configuration ####
 # Enable usage of the VERSION specifier
 include(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG("-std=c++11 " COMPILER_SUPPORTS_CXX11)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x " COMPILER_SUPPORTS_CXX0X)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
-SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+if (WIN32)
+	add_definitions(-DWIN32_LEAN_AND_MEAN)
+  if ((MSVC_VERSION GREATER "1900") OR (MSVC_VERSION EQUAL "1900"))
+    CHECK_CXX_COMPILER_FLAG("/std:c++14" _cpp_latest_flag_supported)
+    if (_cpp_latest_flag_supported)
+        add_compile_options("/std:c++14")
+    endif()
+  endif()
+else()
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 if(COMPILER_SUPPORTS_CXX11)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 elseif(COMPILER_SUPPORTS_CXX0X)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 else()
-    message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+endif()
+
 endif()
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 
 if (NOT PORTABLE)
   if(MSVC)
@@ -92,59 +107,82 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
 # Search for threads
 find_package(Threads REQUIRED)
 
+if (WIN32)
+  	add_subdirectory("thirdparty/Simple-Windows-Posix-Semaphore")
+endif()
+
 # Provide custom modules for the project
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
-if(NOT USE_SYSTEM_OPENSSL)
-  message("Using bundled LibreSSL")
-  
-  ExternalProject_Add(
-    libressl-portable
-    GIT_REPOSITORY "https://github.com/libressl-portable/portable.git"
-    GIT_TAG "190bd346e75575b9436a2e9e14b28618f0234e1b"
-    SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-src"
-    CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS}
-               "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install"
-    PATCH_COMMAND ./autogen.sh
-  )
-
-  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl")
-  add_library(crypto STATIC IMPORTED)
-  set_target_properties(crypto PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libcrypto.a")
-  add_dependencies(crypto libressl-portable)
-  add_library(ssl STATIC IMPORTED)
-  set_target_properties(ssl PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libssl.a")
-  set_target_properties(ssl PROPERTIES INTERFACE_LINK_LIBRARIES crypto)
-  add_dependencies(ssl libressl-portable)
-  add_library(tls STATIC IMPORTED)
-  set_target_properties(tls PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libtls.a")
-  set_target_properties(tls PROPERTIES INTERFACE_LINK_LIBRARIES crypto)
-  add_dependencies(tls libressl-portable)
-
-  set(OPENSSL_FOUND "YES")
-  set(OPENSSL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libressl/include")
-  set(OPENSSL_LIBRARIES tls ssl crypto)
+if (OPENSSL_OFF STREQUAL "OFF")
+if(USE_SYSTEM_OPENSSL STREQUAL "OFF")
+	message("Using bundled LibreSSL")
+	set(BUILD_ARGS "")
+	if (WIN32)
+	set(BUILD_ARGS " -GVisual Studio 15 2017")
+	endif(WIN32)
+	ExternalProject_Add(
+	libressl-portable
+	GIT_REPOSITORY "https://github.com/libressl-portable/portable.git"
+	GIT_TAG "190bd346e75575b9436a2e9e14b28618f0234e1b"
+	SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-src"
+	CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS}
+	            "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install"
+				"${BUILD_ARGS}"
+	PATCH_COMMAND ./autogen.sh
+	)
+	
+	list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl")
+	add_library(crypto STATIC IMPORTED)
+	set_target_properties(crypto PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libcrypto.a")
+	add_dependencies(crypto libressl-portable)
+	add_library(ssl STATIC IMPORTED)
+	set_target_properties(ssl PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libssl.a")
+	set_target_properties(ssl PROPERTIES INTERFACE_LINK_LIBRARIES crypto)
+	add_dependencies(ssl libressl-portable)
+	add_library(tls STATIC IMPORTED)
+	set_target_properties(tls PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libressl-install/lib/libtls.a")
+	set_target_properties(tls PROPERTIES INTERFACE_LINK_LIBRARIES crypto)
+	add_dependencies(tls libressl-portable)
+	
+	set(OPENSSL_FOUND "YES")
+	set(OPENSSL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libressl/include")
+	set(OPENSSL_LIBRARIES tls ssl crypto)
 else()
-  # Set the right openssl root path
-  if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl/")
-  else()
-    set(OPENSSL_ROOT_DIR "/usr/lib/x86_64-linux-gnu")
-  endif()
-
-  # Include OpenSSL
-  find_package (OpenSSL REQUIRED)
+	# Set the right openssl root path
+	if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+	set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl/")
+	elseif(NOT WIN32)
+	set(OPENSSL_ROOT_DIR "/usr/lib/x86_64-linux-gnu")
+	else()
+		#set(OPENSSL_ROOT_DIR "/usr/lib/x86_64-linux-gnu")
+	endif()
+	
+	# Include OpenSSL
+	find_package (OpenSSL REQUIRED)
+	
+	if (OPENSSL_FOUND)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENSSL_SUPPORT")
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL_SUPPORT")
+	endif()
 endif()
-
 if (OPENSSL_FOUND)
   include_directories(${OPENSSL_INCLUDE_DIR})
+  MESSAGE("OpenSSL found at ${OPENSSL_LIBRARIES}")
 else ()
   message( FATAL_ERROR "OpenSSL was not found. Please install OpenSSL" )
 endif (OPENSSL_FOUND)
-
-if(NOT USE_SYSTEM_ZLIB)
+else()
+	list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl")
+endif()
+if(USE_SYSTEM_ZLIB STREQUAL "OFF")
   message("Using bundled zlib")
 
+  if (WIN32)
+  set(BYPRODUCT "thirdparty/zlib-install/lib/zlibstaticd.lib")
+  else()
+  set(BYPRODUCT "thirdparty/zlib-install/lib/libz.a")
+  endif()
   ExternalProject_Add(
     zlib-external
     GIT_REPOSITORY "https://github.com/madler/zlib.git"
@@ -152,16 +190,19 @@ if(NOT USE_SYSTEM_ZLIB)
     SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/zlib-src"
     CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS}
                "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/thirdparty/zlib-install"
-    BUILD_BYPRODUCTS "thirdparty/curl-install/lib/libz.a"
+    BUILD_BYPRODUCTS ${BYPRODUCT}
   )
 
   list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/zlib/dummy")
   add_library(z STATIC IMPORTED)
-  set_target_properties(z PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/zlib-install/lib/libz.a")
+  set_target_properties(z PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${BYPRODUCT}")
   add_dependencies(z zlib-external)
-  set(ZLIB_FOUND "YES")
-  set(ZLIB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/include")
-  set(ZLIB_LIBRARIES z)
+  set(ZLIB_FOUND "YES" CACHE STRING "" FORCE)
+  set(ZLIB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/include" CACHE STRING "" FORCE)
+  set(ZLIB_LIBRARIES z CACHE STRING "" FORCE)
+  set(ZLIB_LIBRARY z CACHE STRING "" FORCE)
+  set(ZLIB_LIBRARY z CACHE STRING "" FORCE)
+  message("ZLIBV LIBR is ${ZLIB_LIBRARIES}")
 else()
   find_package (ZLIB REQUIRED)
 endif()
@@ -170,51 +211,20 @@ if (ZLIB_FOUND)
   include_directories(${ZLIB_INCLUDE_DIRS})
 endif()
 
-if(NOT USE_SYSTEM_BZIP2)
-  message("Using bundled bzip2")
-
-  ExternalProject_Add(
-    bzip2-external
-    URL http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
-    URL_MD5 00b516f4704d4a7cb50a1d97e6e8e15b
-    SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/bzip2-src"
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND make libbz2.a CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
-    BUILD_IN_SOURCE 1
-    BUILD_BYPRODUCTS "thirdparty/bzip2-src/libbz2.a"
-    INSTALL_COMMAND ""
-  )
-
-  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bzip2/dummy")
-  add_library(bz2 STATIC IMPORTED)
-  set_target_properties(bz2 PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/bzip2-src/libbz2.a")
-  add_dependencies(bz2 bzip2-external)
-  set(BZIP2_FOUND "YES")
-  set(BZIP2_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/bzip2-src")
-  set(BZIP2_LIBRARY bz2)
-  set(BZIP2_LIBRARIES ${BZIP2_LIBRARY})
-else()
-  find_package (BZip2 REQUIRED)
-endif()
-
-if (BZIP2_FOUND)
-  include_directories(${BZIP2_INCLUDE_DIRS})
-endif()
-
 SET(TEST_DIR ${CMAKE_SOURCE_DIR}/libminifi/test)
 
 include(Extensions)
 
-if (USE_SYSTEM_UUID)
-  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uuid/sys")
-  find_package(UUID REQUIRED)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uuid/dummy")
+if (WIN32)
+	include_directories("thirdparty/uuid/include/win32/")
 else()
-  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uuid/dummy")
-  include_directories("thirdparty/uuid/include")
-  add_subdirectory("thirdparty/uuid")
-  set(UUID_FOUND "YES")
-  set(UUID_LIBRARIES "uuid")
+	include_directories("thirdparty/uuid/include/posix")
 endif()
+add_subdirectory("thirdparty/uuid")
+set(UUID_FOUND "YES" CACHE STRING "" FORCE)
+set(UUID_LIBRARIES "uuid" CACHE STRING "" FORCE)
+
 
 if (DISABLE_CURL)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDISABLE_CURL")
@@ -226,6 +236,17 @@ if(NOT DISABLE_CURL AND (NOT USE_SYSTEM_CURL))
   set(CURL_C_FLAGS "-I${OPENSSL_INCLUDE_DIR}")
   set(CURL_CXX_FLAGS "${CURL_C_FLAGS}")
 
+  if (WIN32)
+  set(BYPRODUCT "thirdparty/curl-install/lib/libcurl-d.lib")
+  else()
+  set(BYPRODUCT "thirdparty/curl-install/lib/libcurl.a")
+  endif()
+
+  if (WIN32)
+  set (PC "PATCH_COMMAND ./buildconf.bat")
+  else()
+  endif()
+
   ExternalProject_Add(
     curl-external
     GIT_REPOSITORY "https://github.com/curl/curl.git"
@@ -248,7 +269,8 @@ if(NOT DISABLE_CURL AND (NOT USE_SYSTEM_CURL))
                "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl"
                "-DCMAKE_C_FLAGS=${CURL_C_FLAGS}"
                "-DCMAKE_CXX_FLAGS=${CURL_CXX_FLAGS}"
-    BUILD_BYPRODUCTS "thirdparty/curl-install/lib/libcurl.a"
+	${PC}
+    BUILD_BYPRODUCTS "thirdparty/${BYPRODUCT}"
   )
 
   if(NOT USE_SYSTEM_OPENSSL)
@@ -257,13 +279,15 @@ if(NOT DISABLE_CURL AND (NOT USE_SYSTEM_CURL))
 
   list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/curl/dummy")
   add_library(curl STATIC IMPORTED)
-  set_target_properties(curl PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/curl-install/lib/libcurl.a")
+  set_target_properties(curl PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${BYPRODUCT}")
+  if (OPENSSL_FOUND)
   set_target_properties(curl PROPERTIES INTERFACE_LINK_LIBRARIES ${OPENSSL_LIBRARIES})
+  endif(OPENSSL_FOUND)
   add_dependencies(curl curl-external)
   set(CURL_FOUND "YES")
   set(CURL_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curl/include")
-  set(CURL_LIBRARY curl CACHE STRING "")
-  set(CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
+  set(CURL_LIBRARY curl CACHE STRING "" FORCE)
+  set(CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "" FORCE)
 endif()
 
 if (CURL_FOUND)
@@ -276,6 +300,8 @@ include(ExternalProject)
 
 set(CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING OFF CACHE BOOL "Disable dynamic SSL library loading")
 set(CIVETWEB_ENABLE_CXX ON CACHE BOOL "Enable civet C++ library")
+set(CIVETWEB_ENABLE_SSL OFF CACHE BOOL "DISABLE SSL")
+
 SET(WITH_TOOLS OFF CACHE BOOL "Do not build RocksDB tools")
 SET(WITH_TESTS OFF CACHE BOOL "Build RocksDB library (not repo) tests")
 set(CIVET_THIRDPARTY_ROOT "${CMAKE_SOURCE_DIR}/thirdparty/civetweb-1.10/" CACHE STRING "Path to CivetWeb root")
@@ -304,7 +330,7 @@ add_subdirectory(libminifi)
 
 #### EXTENSIONS
 option(DISABLE_CURL "Disables libCurl Properties." OFF)
-if (NOT DISABLE_CURL AND NOT DISABLE_CIVET)
+if ((DISABLE_CURL STREQUAL "OFF" OR NOT DISABLE_CURL) AND NOT DISABLE_CIVET)
 	createExtension(HTTP-CURL "HTTP CURL" "This enables RESTProtocol, InvokeHTTP, and the HTTPClient for Site to Site" "extensions/http-curl" "extensions/http-curl/tests/")
 endif()
 
@@ -324,7 +350,7 @@ if (NOT ROCKSDB_FOUND OR BUILD_ROCKSDB)
 endif()
 
 option(DISABLE_ROCKSDB "Disables the RocksDB extension." OFF)
-if (NOT DISABLE_ROCKSDB)
+if (DISABLE_ROCKSDB STREQUAL "OFF" OR NOT DISABLE_ROCKSDB)
 	createExtension(ROCKSDB-REPOS "ROCKSDB REPOS" "This Enables persistent provenance, flowfile, and content repositories using RocksDB" "extensions/rocksdb-repos" "${TEST_DIR}/rocksdb-tests" BUILD_RD "${ROCKSDB_THIRDPARTY_ROOT}")
 endif()
 
@@ -342,6 +368,13 @@ if (ENABLE_ALL OR ENABLE_GPS)
 	createExtension(GPS-EXTENSION "GPS EXTENSIONS" "Enables LibGPS Functionality and the GetGPS processor." "extensions/gps" "${TEST_DIR}/gps-tests")
 endif()
 
+if (WIN32)
+option(ENABLE_WEL "Enables the suite of Windows Event Log extensions." OFF)
+if (ENABLE_ALL OR ENABLE_WEL)
+	createExtension(WEL-EXTENSION "WEL EXTENSIONS" "Enables the suite of Windows Event Log extensions." "extensions/windows-event-log" "${TEST_DIR}/windows-event-log-tests")
+endif()
+endif(WIN32)
+
 ## Create MQTT Extension
 option(ENABLE_MQTT "Enables the mqtt extension." OFF)
 if(ENABLE_ALL OR ENABLE_MQTT)
@@ -392,11 +425,6 @@ if (ENABLE_TENSORFLOW)
 endif()
 
 
-find_package(bzip2)
-include_directories("thirdparty/bsdiff/")
-add_subdirectory("thirdparty/bsdiff")
-
-
 ## Bustache/template extensions
 option(ENABLE_BUSTACHE "Enables Bustache (ApplyTemplate) support." OFF)
 if (ENABLE_BUSTACHE)
@@ -406,9 +434,7 @@ endif()
 ## NOW WE CAN ADD LIBRARIES AND EXTENSIONS TO MAIN
 
 add_subdirectory(main)
-if (NOT DISABLE_CURL)
-  add_subdirectory(LibExample)
-endif()
+add_subdirectory(LibExample)
 
 get_property(selected_extensions GLOBAL PROPERTY EXTENSION-OPTIONS)
 
@@ -420,7 +446,28 @@ endif()
 
 message("BUILD_IDENTIFIER is ${BUILD_IDENTIFIER}")
 
-execute_process(COMMAND 
+if (WIN32)
+
+# Get the latest abbreviated commit hash of the working branch
+execute_process(
+  COMMAND git log -1 --format=%h
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  OUTPUT_VARIABLE BUILD_REV
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+	execute_process(COMMAND 
+			"${CMAKE_CURRENT_SOURCE_DIR}/generateVersion.bat" 
+			"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" 
+			${CMAKE_CURRENT_SOURCE_DIR} 
+			${CMAKE_CURRENT_SOURCE_DIR}/libminifi/include/agent/ 
+			"${CMAKE_CXX_COMPILER}"
+			"${CMAKE_CXX_COMPILER_VERSION}" 
+			"${CMAKE_CXX_FLAGS}" 
+			\"${selected_extensions}\"
+			"${BUILD_IDENTIFIER}"
+			"${BUILD_REV}")
+else()
+	execute_process(COMMAND 
 		"${CMAKE_CURRENT_SOURCE_DIR}/generateVersion.sh" 
 		"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" 
 		${CMAKE_CURRENT_SOURCE_DIR} 
@@ -431,6 +478,7 @@ execute_process(COMMAND
 		"${selected_extensions}" 
 		"${BUILD_IDENTIFIER}")
 
+endif()
 # Generate source assembly
 set(ASSEMBLY_BASE_NAME "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
 set(CPACK_SOURCE_GENERATOR "TGZ")

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/CMakeSettings.json
----------------------------------------------------------------------
diff --git a/CMakeSettings.json b/CMakeSettings.json
new file mode 100644
index 0000000..bc10fcd
--- /dev/null
+++ b/CMakeSettings.json
@@ -0,0 +1,137 @@
+{
+  // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
+  "configurations": [
+       {
+      "name": "x64-Debug",
+      "generator": "Visual Studio 14 2015 Win64",
+      "configurationType": "Debug",
+      "inheritEnvironments": [ "msvc_x64_x64" ],
+      "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
+      "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
+      "cmakeCommandArgs": "",
+      "buildCommandArgs": "-v:minimal -m:8",
+      "variables": [
+        {
+          "name": "OPENSSL_OFF",
+          "value": "ON"
+        },
+        {
+          "name": "USE_SYSTEM_ZLIB",
+          "value": "OFF"
+        },
+        {
+          "name": "USE_SYSTEM_CURL",
+          "value": "OFF"
+        },
+        {
+          "name": "USE_SYSTEM_UUID",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_ROCKSDB",
+          "value": "FALSE"
+        },
+        {
+          "name": "ENABLE_WEL",
+          "value": "TRUE"
+        },
+        {
+          "name": "ENABLE_LIBRDKAFKA",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_CURL",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_LIBARCHIVE",
+          "value": "TRUE"
+        },
+        {
+          "name": "DISABLE_SCRIPTING",
+          "value": "TRUE"
+        },
+        {
+          "name": "EXCLUDE_BOOST",
+          "value": "TRUE"
+        },
+        {
+          "name": "DISABLE_EXPRESSION_LANGUAGE",
+          "value": "TRUE"
+        },
+        {
+          "name": "SKIP_TESTS",
+          "value": "TRUE"
+        }
+
+      ],
+      "ctestCommandArgs": ""
+    },
+    {
+      "name": "x64-Release",
+      "generator": "Ninja",
+      "configurationType": "RelWithDebInfo",
+      "inheritEnvironments": [ "msvc_x64_x64" ],
+      "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
+      "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
+      "cmakeCommandArgs": "",
+      "buildCommandArgs": "-v",
+      "variables": [
+        {
+          "name": "OPENSSL_OFF",
+          "value": "ON"
+        },
+        {
+          "name": "USE_SYSTEM_ZLIB",
+          "value": "OFF"
+        },
+        {
+          "name": "USE_SYSTEM_CURL",
+          "value": "OFF"
+        },
+        {
+          "name": "USE_SYSTEM_UUID",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_ROCKSDB",
+          "value": "FALSE"
+        },
+        {
+          "name": "ENABLE_WEL",
+          "value": "TRUE"
+        },
+        {
+          "name": "ENABLE_LIBRDKAFKA",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_CURL",
+          "value": "OFF"
+        },
+        {
+          "name": "DISABLE_LIBARCHIVE",
+          "value": "TRUE"
+        },
+        {
+          "name": "DISABLE_SCRIPTING",
+          "value": "TRUE"
+        },
+        {
+          "name": "EXCLUDE_BOOST",
+          "value": "TRUE"
+        },
+        {
+          "name": "DISABLE_EXPRESSION_LANGUAGE",
+          "value": "TRUE"
+        },
+        {
+          "name": "SKIP_TESTS",
+          "value": "TRUE"
+        }
+
+      ],
+      "ctestCommandArgs": ""
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index e89e620..d762e8f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1401,6 +1401,30 @@ 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.
 
+This product bundles a portion of batchfunctionlibrary, under a MIT license:
+
+	The MIT License (MIT)
+
+	Copyright (c) 2013 Ritchie Lawrence
+
+	Permission is hereby granted, free of charge, to any person obtaining a copy
+	of this software and associated documentation files (the "Software"), to deal
+	in the Software without restriction, including without limitation the rights
+	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+	copies of the Software, and to permit persons to whom the Software is
+	furnished to do so, subject to the following conditions:
+
+	The above copyright notice and this permission notice shall be included in all
+	copies or substantial portions of the Software.
+
+	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+	SOFTWARE.
+
 This product bundles 'bsdiff' which is available under a "2-clause BSD" license.
 
 	 Copyright 2003-2005 Colin Percival
@@ -1427,3 +1451,183 @@ This product bundles 'bsdiff' which is available under a "2-clause BSD" license.
 	 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.
+
+ This product bundles 'Simple-Windows-Posix-Semaphore' which is available under an Apache v2 License.
+ 
+    Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/LibExample/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/LibExample/CMakeLists.txt b/LibExample/CMakeLists.txt
index 0421da7..ff076b0 100644
--- a/LibExample/CMakeLists.txt
+++ b/LibExample/CMakeLists.txt
@@ -26,44 +26,43 @@ ENDIF(POLICY CMP0048)
 include_directories(../blocks/ ../libminifi/include  ../libminifi/include/c2  ../libminifi/include/c2/protocols/  ../libminifi/include/core/state ./libminifi/include/core/statemanagement/metrics  ../libminifi/include/core/yaml  ../libminifi/include/core  ../thirdparty/spdlog-20170710/include ../thirdparty/concurrentqueue ../thirdparty/yaml-cpp-yaml-cpp-20171024/include ../thirdparty/civetweb-1.9.1/include ../thirdparty/)
 
 include(CheckCXXCompilerFlag)
+if (WIN32)
+  if ((MSVC_VERSION GREATER "1900") OR (MSVC_VERSION EQUAL "1900"))
+	    CHECK_CXX_COMPILER_FLAG("/std:c++14" _cpp_latest_flag_supported)
+	    if (_cpp_latest_flag_supported)
+	        add_compile_options("/std:c++14")
+	    endif()
+	endif()
+else()
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
 CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 if(COMPILER_SUPPORTS_CXX11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Os")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 elseif(COMPILER_SUPPORTS_CXX0X)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Os")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 else()
  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
 endif()
 
-add_executable(transmit_flow transmit_flow.c)
+endif()
 
-target_link_libraries(transmit_flow capi core-minifi minifi)
 
-if (APPLE)
-	target_link_libraries (transmit_flow -Wl,-all_load minifi-http-curl)
-else ()
-	target_link_libraries (transmit_flow -Wl,--whole-archive minifi-http-curl -Wl,--no-whole-archive)
-endif ()
+add_executable(generate_flow generate_flow.c)
 
+target_link_libraries(generate_flow capi core-minifi minifi  ${CMAKE_THREAD_LIBS_INIT})
+
+if (NOT WIN32)
+
+add_executable(transmit_flow transmit_flow.c)
+
+target_link_libraries(transmit_flow capi core-minifi minifi  ${CMAKE_THREAD_LIBS_INIT})
 
-add_executable(generate_flow generate_flow.c)
 
-target_link_libraries(generate_flow capi core-minifi minifi)
 
-if (APPLE)
-	target_link_libraries (generate_flow -Wl,-all_load minifi-http-curl)
-else ()
-	target_link_libraries (generate_flow -Wl,--whole-archive minifi-http-curl -Wl,--no-whole-archive)
-endif ()
 
 
 add_executable(monitor_directory monitor_directory.c)
 
-target_link_libraries(monitor_directory capi core-minifi minifi)
+target_link_libraries(monitor_directory capi core-minifi minifi  ${CMAKE_THREAD_LIBS_INIT})
 
-if (APPLE)
-	target_link_libraries (monitor_directory -Wl,-all_load minifi-http-curl)
-else ()
-	target_link_libraries (monitor_directory -Wl,--whole-archive minifi-http-curl -Wl,--no-whole-archive)
-endif ()
+endif()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/LibExample/generate_flow.c
----------------------------------------------------------------------
diff --git a/LibExample/generate_flow.c b/LibExample/generate_flow.c
index 62a8a8c..923ddb4 100644
--- a/LibExample/generate_flow.c
+++ b/LibExample/generate_flow.c
@@ -20,8 +20,6 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
 #include "capi/api.h"
 
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index 8901cf0..57ff435 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1 +1,33 @@
-build_script: echo NOOP
+image: Visual Studio 2015
+
+environment:
+  MSVC_DEFAULT_OPTIONS: ON
+  APPVEYOR_SAVE_CACHE_ON_ERROR: true
+  GENERATOR: Ninja
+  MAKE_PROGRAM: ninja
+  
+cache: 
+- build\curl-install\ -> appveyor.yml
+- build\libressl-install\ -> appveyor.yml
+- build\zlib-install\ -> appveyor.yml
+- build\thirdparty\civetweb-1.10 -> appveyor.yml
+- build\thirdparty\cxxopts -> appveyor.yml
+- build\thirdparty\rocksdb -> appveyor.yml
+- build\thirdparty\ -> appveyor.yml
+- build\thirdparty\yaml-cpp-yaml-cpp-20171024 -> appveyor.yml
+
+branches:
+ only: 
+  - windows
+  
+clone_folder: C:\projects\nifi-minifi-cpp
+  
+build_script:
+   - cd C:\projects\nifi-minifi-cpp
+   - mkdir build & exit 0
+   - cd build
+   - cmake -g"Ninja" -DWIN32=WIN32 -DOPENSSL_OFF=ON -DUSE_SYSTEM_ZLIB=OFF -DUSE_SYSTEM_CURL=OFF -DUSE_SYSTEM_UUID=OFF -DDISABLE_ROCKSDB=ON -DDISABLE_CURL=ON -DDISABLE_LIBARCHIVE=ON -DDISABLE_SCRIPTING=ON -DEXCLUDE_BOOST=ON -DDISABLE_EXPRESSION_LANGUAGE=ON  -DENABLE_WEL=TRUE -DSKIP_TESTS=ON ..
+   
+    set msbuild_platform=x64 
+   - msbuild nifi-minifi-cpp.sln
+   

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/cmake/BuildTests.cmake
----------------------------------------------------------------------
diff --git a/cmake/BuildTests.cmake b/cmake/BuildTests.cmake
index 28ab029..3896dd9 100644
--- a/cmake/BuildTests.cmake
+++ b/cmake/BuildTests.cmake
@@ -50,6 +50,13 @@ function(createTests testName)
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/core/statemanagement")
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/core/statemanagement/metrics")
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/io")
+    if(WIN32)
+    	target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/win")
+    	target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/win/io")
+    else()
+    	target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/posix")
+    	target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/posix/io")
+    endif()
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/utils")
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/processors")
     target_include_directories(${testName} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/provenance")
@@ -85,6 +92,11 @@ target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/
 target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/include/")
 target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/thirdparty/spdlog-20170710/include")
 target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CIVET_THIRDPARTY_ROOT}/include")
+if(WIN32)
+   	target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/win")
+else()
+   	target_include_directories(${TEST_BASE_LIB} BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/libminifi/opsys/posix")
+endif()
  
 SET(CATCH_MAIN_LIB catch_main)
 add_library(${CATCH_MAIN_LIB} STATIC "${TEST_DIR}/CatchMain.cpp")

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/controller/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/controller/CMakeLists.txt b/controller/CMakeLists.txt
index da6f499..3142434 100644
--- a/controller/CMakeLists.txt
+++ b/controller/CMakeLists.txt
@@ -23,8 +23,18 @@ IF(POLICY CMP0048)
   CMAKE_POLICY(SET CMP0048 OLD)
 ENDIF(POLICY CMP0048)
 
+
+
 include_directories(../main/ ../libminifi/include  ../libminifi/include/c2  ../libminifi/include/c2/protocols/  ../libminifi/include/core/state ./libminifi/include/core/statemanagement/metrics  ../libminifi/include/core/yaml  ../libminifi/include/core  ../thirdparty/spdlog-20170710/include ../thirdparty/concurrentqueue ../thirdparty/yaml-cpp-yaml-cpp-20171024/include ${CIVET_THIRDPARTY_ROOT}/include ../thirdparty/cxxopts/include  ../thirdparty/)
 
+
+if(WIN32)
+	include_directories(../libminifi/opsys/win)
+else()
+	include_directories(../libminifi/opsys/posix)
+endif()
+
+
 include(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
 CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
@@ -60,6 +70,10 @@ else ()
 	target_link_libraries (minificontroller -Wl,--whole-archive minifi -Wl,--no-whole-archive)
 endif ()
 
+if (WIN32)
+	include_directories("../thirdparty/Simple-Windows-Posix-Semaphore")
+  	target_link_libraries(minificontroller semaphore)
+endif()
 
 target_link_libraries(minificontroller yaml-cpp c-library civetweb-cpp ${JSON_CPP_LIB} ${UUID_LIBRARIES} cxxopts)
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/ExtensionHeader.txt
----------------------------------------------------------------------
diff --git a/extensions/ExtensionHeader.txt b/extensions/ExtensionHeader.txt
index 328e3be..aed1d0e 100644
--- a/extensions/ExtensionHeader.txt
+++ b/extensions/ExtensionHeader.txt
@@ -24,3 +24,9 @@ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
 
 include_directories(../../libminifi/include  ../../libminifi/include/core/yaml  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ${CIVET_THIRDPARTY_ROOT}/include ../../thirdparty/)
+
+if(WIN32)
+	include_directories(../../libminifi/opsys/win)
+else()
+	include_directories(../../libminifi/opsys/posix)
+endif()

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/bustache/ApplyTemplate.h
----------------------------------------------------------------------
diff --git a/extensions/bustache/ApplyTemplate.h b/extensions/bustache/ApplyTemplate.h
index 1e890ff..9da0cca 100644
--- a/extensions/bustache/ApplyTemplate.h
+++ b/extensions/bustache/ApplyTemplate.h
@@ -41,7 +41,7 @@ class ApplyTemplate : public core::Processor {
   /*!
    * Create a new processor
    */
-  ApplyTemplate(std::string name, uuid_t uuid = NULL)
+  ApplyTemplate(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ApplyTemplate>::getLogger()) {}
   ~ApplyTemplate() {}
@@ -81,4 +81,4 @@ REGISTER_RESOURCE(ApplyTemplate);
 } /* namespace apache */
 } /* namespace org */
 
-#endif
\ No newline at end of file
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/bustache/TemplateLoader.h
----------------------------------------------------------------------
diff --git a/extensions/bustache/TemplateLoader.h b/extensions/bustache/TemplateLoader.h
index 4a0bf23..e16d973 100644
--- a/extensions/bustache/TemplateLoader.h
+++ b/extensions/bustache/TemplateLoader.h
@@ -21,7 +21,7 @@
 #include "ApplyTemplate.h"
 #include "core/ClassLoader.h"
 
-class __attribute__((visibility("default"))) TemplateFactory : public core::ObjectFactory {
+class TemplateFactory : public core::ObjectFactory {
  public:
   TemplateFactory() {
 
@@ -61,6 +61,6 @@ class __attribute__((visibility("default"))) TemplateFactory : public core::Obje
 };
 
 extern "C" {
-void *createTemplateFactory(void);
+DLL_EXPORT void *createTemplateFactory(void);
 }
-#endif /* EXTENSION_TEMPLATELOADER_H */
\ No newline at end of file
+#endif /* EXTENSION_TEMPLATELOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/civetweb/processors/ListenHTTP.h
----------------------------------------------------------------------
diff --git a/extensions/civetweb/processors/ListenHTTP.h b/extensions/civetweb/processors/ListenHTTP.h
index 9a0a203..d7e5531 100644
--- a/extensions/civetweb/processors/ListenHTTP.h
+++ b/extensions/civetweb/processors/ListenHTTP.h
@@ -47,7 +47,7 @@ class ListenHTTP : public core::Processor {
   /*!
    * Create a new processor
    */
-  ListenHTTP(std::string name, uuid_t uuid = NULL)
+  ListenHTTP(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ListenHTTP>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/expression-language/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/expression-language/CMakeLists.txt b/extensions/expression-language/CMakeLists.txt
index cf1afbf..c5789a8 100644
--- a/extensions/expression-language/CMakeLists.txt
+++ b/extensions/expression-language/CMakeLists.txt
@@ -58,7 +58,6 @@ endif()
 
 target_link_libraries(minifi-expression-language-extensions ${LIBMINIFI} tz)
 
-find_package(UUID REQUIRED)
 target_link_libraries(minifi-expression-language-extensions ${LIBMINIFI} ${UUID_LIBRARIES})
 if (NOT DISABLE_CURL)
 find_package(CURL REQUIRED)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/expression-language/Expression.cpp
----------------------------------------------------------------------
diff --git a/extensions/expression-language/Expression.cpp b/extensions/expression-language/Expression.cpp
index daeb09f..b031b04 100644
--- a/extensions/expression-language/Expression.cpp
+++ b/extensions/expression-language/Expression.cpp
@@ -144,11 +144,9 @@ Value expr_ip(const std::vector<Value> &args) {
 }
 
 Value expr_uuid(const std::vector<Value> &args) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   utils::IdGenerator::getIdGenerator()->generate(uuid);
-  char uuid_str[37];
-  uuid_unparse_lower(uuid, uuid_str);
-  return Value(std::string(uuid_str));
+  return Value(std::string(uuid.to_string()));
 }
 
 Value expr_toUpper(const std::vector<Value> &args) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/expression-language/ProcessContextExpr.cpp
----------------------------------------------------------------------
diff --git a/extensions/expression-language/ProcessContextExpr.cpp b/extensions/expression-language/ProcessContextExpr.cpp
index 68cdc54..5cceb77 100644
--- a/extensions/expression-language/ProcessContextExpr.cpp
+++ b/extensions/expression-language/ProcessContextExpr.cpp
@@ -23,8 +23,10 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-bool ProcessContext::getProperty(const std::string &name, std::string &value,
-                                 const std::shared_ptr<FlowFile> &flow_file) {
+bool ProcessContext::getProperty(const Property &property, std::string &value, const std::shared_ptr<FlowFile> &flow_file) {
+  if (!property.supportsExpressionLangauge())
+    return getProperty(property.getName(), value);
+  auto name = property.getName();
   if (expressions_.find(name) == expressions_.end()) {
     std::string expression_str;
     getProperty(name, expression_str);
@@ -32,12 +34,15 @@ bool ProcessContext::getProperty(const std::string &name, std::string &value,
     expressions_.emplace(name, expression::compile(expression_str));
   }
 
-  value = expressions_[name]({flow_file}).asString();
+  value = expressions_[name]( { flow_file }).asString();
   return true;
 }
 
-bool ProcessContext::getDynamicProperty(const std::string &name, std::string &value,
-                                 const std::shared_ptr<FlowFile> &flow_file) {
+bool ProcessContext::getDynamicProperty(const Property &property, std::string &value, const std::shared_ptr<FlowFile> &flow_file) {
+
+  if (!property.supportsExpressionLangauge())
+    return getDynamicProperty(property.getName(), value);
+  auto name = property.getName();
   if (dynamic_property_expressions_.find(name) == dynamic_property_expressions_.end()) {
     std::string expression_str;
     getDynamicProperty(name, expression_str);
@@ -45,7 +50,7 @@ bool ProcessContext::getDynamicProperty(const std::string &name, std::string &va
     dynamic_property_expressions_.emplace(name, expression::compile(expression_str));
   }
 
-  value = dynamic_property_expressions_[name]({flow_file}).asString();
+  value = dynamic_property_expressions_[name]( { flow_file }).asString();
   return true;
 }
 
@@ -53,4 +58,4 @@ bool ProcessContext::getDynamicProperty(const std::string &name, std::string &va
 } /* namespace minifi */
 } /* namespace nifi */
 } /* namespace apache */
-} /* namespace org */
\ No newline at end of file
+} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/expression-language/noop/ProcessContextExprNoOp.cpp
----------------------------------------------------------------------
diff --git a/extensions/expression-language/noop/ProcessContextExprNoOp.cpp b/extensions/expression-language/noop/ProcessContextExprNoOp.cpp
index 6d70577..0063c41 100644
--- a/extensions/expression-language/noop/ProcessContextExprNoOp.cpp
+++ b/extensions/expression-language/noop/ProcessContextExprNoOp.cpp
@@ -23,18 +23,18 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-bool ProcessContext::getProperty(const std::string &name, std::string &value,
+bool ProcessContext::getProperty(const Property &property, std::string &value,
                                  const std::shared_ptr<FlowFile> &flow_file) {
-  return getProperty(name, value);
+  return getProperty(property.getName(), value);
 }
 
-bool ProcessContext::getDynamicProperty(const std::string &name, std::string &value,
+bool ProcessContext::getDynamicProperty(const Property &property, std::string &value,
                                  const std::shared_ptr<FlowFile> &flow_file) {
-  return getDynamicProperty(name, value);
+  return getDynamicProperty(property.getName(), value);
 }
 
 } /* namespace core */
 } /* namespace minifi */
 } /* namespace nifi */
 } /* namespace apache */
-} /* namespace org */
\ No newline at end of file
+} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/gps/GetGPS.h
----------------------------------------------------------------------
diff --git a/extensions/gps/GetGPS.h b/extensions/gps/GetGPS.h
index 809f7c7..b7df0a3 100644
--- a/extensions/gps/GetGPS.h
+++ b/extensions/gps/GetGPS.h
@@ -38,7 +38,7 @@ public:
 	/*!
 	 * Create a new processor
 	 */
-	GetGPS(std::string name, uuid_t uuid = NULL)
+	GetGPS(std::string name, utils::Identifier uuid = utils::Identifier())
 	: core::Processor(name, uuid), logger_(logging::LoggerFactory<GetGPS>::getLogger())
 	{
 		gpsdHost_ = "localhost";

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/gps/GetGPSLoader.h
----------------------------------------------------------------------
diff --git a/extensions/gps/GetGPSLoader.h b/extensions/gps/GetGPSLoader.h
index 8db3a6d..c4c597c 100644
--- a/extensions/gps/GetGPSLoader.h
+++ b/extensions/gps/GetGPSLoader.h
@@ -22,7 +22,7 @@
 #include "core/ClassLoader.h"
 #include "utils/StringUtils.h"
 
-class __attribute__((visibility("default"))) GpsFactory : public core::ObjectFactory {
+class GpsFactory : public core::ObjectFactory {
  public:
   GpsFactory() {
 
@@ -62,6 +62,6 @@ class __attribute__((visibility("default"))) GpsFactory : public core::ObjectFac
 };
 
 extern "C" {
-void *createGPSFactory(void);
+DLL_EXPORT void *createGPSFactory(void);
 }
 #endif /* EXTENSIONS_ROCKSDBLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/HTTPCurlLoader.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/HTTPCurlLoader.cpp b/extensions/http-curl/HTTPCurlLoader.cpp
index 010888a..4e9e579 100644
--- a/extensions/http-curl/HTTPCurlLoader.cpp
+++ b/extensions/http-curl/HTTPCurlLoader.cpp
@@ -22,6 +22,8 @@
 bool HttpCurlObjectFactory::added = core::FlowConfiguration::add_static_func("createHttpCurlFactory");
 extern "C" {
 
+
+
 void *createHttpCurlFactory(void) {
   return new HttpCurlObjectFactory();
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/HTTPCurlLoader.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/HTTPCurlLoader.h b/extensions/http-curl/HTTPCurlLoader.h
index 23dcb44..d01f822 100644
--- a/extensions/http-curl/HTTPCurlLoader.h
+++ b/extensions/http-curl/HTTPCurlLoader.h
@@ -18,6 +18,15 @@
 #ifndef EXTENSIONS_HTTPCURLLOADER_H_
 #define EXTENSIONS_HTTPCURLLOADER_H_
 
+#ifdef WIN32
+#pragma comment(lib, "wldap32.lib" )
+#pragma comment(lib, "crypt32.lib" )
+#pragma comment(lib, "Ws2_32.lib")
+
+#define CURL_STATICLIB 
+#include <curl/curl.h>
+#endif
+
 #include "c2/protocols/RESTProtocol.h"
 #include "protocols/RESTSender.h"
 #include "processors/InvokeHTTP.h"
@@ -26,7 +35,7 @@
 #include "sitetosite/HTTPProtocol.h"
 #include "utils/StringUtils.h"
 
-class __attribute__((visibility("default"))) HttpCurlObjectFactory : public core::ObjectFactory {
+class HttpCurlObjectFactory : public core::ObjectFactory {
  public:
   HttpCurlObjectFactory() {
 
@@ -76,6 +85,6 @@ class __attribute__((visibility("default"))) HttpCurlObjectFactory : public core
 };
 
 extern "C" {
-void *createHttpCurlFactory(void);
+	DLL_EXPORT void *createHttpCurlFactory(void);
 }
 #endif /* EXTENSIONS_HTTPCURLLOADER_H_ */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/client/HTTPClient.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/client/HTTPClient.cpp b/extensions/http-curl/client/HTTPClient.cpp
index 8f7ca42..7940c6e 100644
--- a/extensions/http-curl/client/HTTPClient.cpp
+++ b/extensions/http-curl/client/HTTPClient.cpp
@@ -31,7 +31,7 @@ namespace minifi {
 namespace utils {
 
 HTTPClient::HTTPClient(const std::string &url, const std::shared_ptr<minifi::controllers::SSLContextService> ssl_context_service)
-    : core::Connectable("HTTPClient", 0),
+    : core::Connectable("HTTPClient"),
       ssl_context_service_(ssl_context_service),
       url_(url),
       connect_timeout_(0),
@@ -50,7 +50,7 @@ HTTPClient::HTTPClient(const std::string &url, const std::shared_ptr<minifi::con
   http_session_ = curl_easy_init();
 }
 
-HTTPClient::HTTPClient(std::string name, uuid_t uuid)
+HTTPClient::HTTPClient(std::string name, utils::Identifier uuid)
     : core::Connectable(name, uuid),
       ssl_context_service_(nullptr),
       url_(),
@@ -71,7 +71,7 @@ HTTPClient::HTTPClient(std::string name, uuid_t uuid)
 }
 
 HTTPClient::HTTPClient()
-    : core::Connectable("HTTPClient", 0),
+    : core::Connectable("HTTPClient"),
       ssl_context_service_(nullptr),
       url_(),
       connect_timeout_(0),
@@ -324,6 +324,10 @@ bool HTTPClient::matches(const std::string &value, const std::string &sregex) {
   if (sregex == ".*")
     return true;
 
+#ifdef WIN32
+  std::regex rgx(sregex);
+  return std::regex_match(value, rgx);
+#else
   regex_t regex;
   int ret = regcomp(&regex, sregex.c_str(), 0);
   if (ret)
@@ -332,7 +336,7 @@ bool HTTPClient::matches(const std::string &value, const std::string &sregex) {
   regfree(&regex);
   if (ret)
     return false;
-
+#endif
   return true;
 }
 
@@ -375,6 +379,11 @@ bool HTTPClient::isSecure(const std::string &url) {
   return false;
 }
 
+void HTTPClient::setInterface(const std::string &ifc) {
+	curl_easy_setopt(http_session_, CURLOPT_INTERFACE, ifc.c_str());
+}
+
+
 } /* namespace utils */
 } /* namespace minifi */
 } /* namespace nifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/client/HTTPClient.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/client/HTTPClient.h b/extensions/http-curl/client/HTTPClient.h
index 5b04723..32370e5 100644
--- a/extensions/http-curl/client/HTTPClient.h
+++ b/extensions/http-curl/client/HTTPClient.h
@@ -25,7 +25,11 @@
 #include <string>
 #include <curl/easy.h>
 #include <uuid/uuid.h>
+#ifdef WIN32
+#include <regex>
+#else
 #include <regex.h>
+#endif
 #include <vector>
 
 #include "utils/ByteArrayCallback.h"
@@ -75,7 +79,7 @@ class HTTPClient : public BaseHTTPClient, public core::Connectable {
 
   HTTPClient();
 
-  HTTPClient(std::string name, uuid_t uuid);
+  HTTPClient(std::string name, utils::Identifier uuid);
 
   HTTPClient(const std::string &url, const std::shared_ptr<minifi::controllers::SSLContextService> ssl_context_service = nullptr);
 
@@ -131,15 +135,14 @@ class HTTPClient : public BaseHTTPClient, public core::Connectable {
     return url_;
   }
 
-  void setInterface(const std::string &interface) {
-    curl_easy_setopt(http_session_, CURLOPT_INTERFACE, interface.c_str());
-  }
 
   const std::vector<std::string> &getHeaders() override {
     return header_response_.header_tokens_;
 
   }
 
+  void setInterface(const std::string &);
+
   virtual const std::map<std::string, std::string> &getParsedHeaders() override {
     return header_response_.header_mapping_;
   }
@@ -189,11 +192,15 @@ class HTTPClient : public BaseHTTPClient, public core::Connectable {
   inline bool matches(const std::string &value, const std::string &sregex) override;
 
   static CURLcode configure_ssl_context(CURL *curl, void *ctx, void *param) {
+#ifdef OPENSSL_SUPPORT
     minifi::controllers::SSLContextService *ssl_context_service = static_cast<minifi::controllers::SSLContextService*>(param);
     if (!ssl_context_service->configure_ssl_context(static_cast<SSL_CTX*>(ctx))) {
       return CURLE_FAILED_INIT;
     }
     return CURLE_OK;
+#else
+	  return CURLE_FAILED_INIT;
+#endif
   }
 
   void configure_secure_connection(CURL *http_session);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/processors/InvokeHTTP.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/processors/InvokeHTTP.cpp b/extensions/http-curl/processors/InvokeHTTP.cpp
index 9cff5aa..188b40f 100644
--- a/extensions/http-curl/processors/InvokeHTTP.cpp
+++ b/extensions/http-curl/processors/InvokeHTTP.cpp
@@ -17,7 +17,11 @@
  */
 
 #include "InvokeHTTP.h"
+#ifdef WIN32
+#include <regex>
+#else
 #include <regex.h>
+#endif
 #include <curl/easy.h>
 #include <uuid/uuid.h>
 #include <memory>
@@ -57,7 +61,9 @@ std::string InvokeHTTP::DefaultContentType = "application/octet-stream";
 core::Property InvokeHTTP::Method("HTTP Method", "HTTP request method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). "
                                   "Arbitrary methods are also supported. Methods other than POST, PUT and PATCH will be sent without a message body.",
                                   "GET");
-core::Property InvokeHTTP::URL("Remote URL", "Remote URL which will be connected to, including scheme, host, port, path.", "");
+core::Property InvokeHTTP::URL(
+    core::PropertyBuilder::createProperty("Remote URL")->withDescription("Remote URL which will be connected to, including scheme, host, port, path.")->isRequired(false)->supportsExpressionLanguage(
+        true)->build());
 core::Property InvokeHTTP::ConnectTimeout("Connection Timeout", "Max wait time for connection to remote service.", "5 secs");
 core::Property InvokeHTTP::ReadTimeout("Read Timeout", "Max wait time for response from remote service.", "15 secs");
 core::Property InvokeHTTP::DateHeader("Include Date Header", "Include an RFC-2616 Date header in the request.", "True");
@@ -234,11 +240,9 @@ InvokeHTTP::~InvokeHTTP() {
 }
 
 std::string InvokeHTTP::generateId() {
-  uuid_t txId;
+  utils::Identifier txId;
   id_generator_->generate(txId);
-  char uuidStr[37];
-  uuid_unparse_lower(txId, uuidStr);
-  return uuidStr;
+  return txId.to_string();
 }
 
 bool InvokeHTTP::emitFlowFile(const std::string &method) {
@@ -259,7 +263,7 @@ void InvokeHTTP::onTrigger(const std::shared_ptr<core::ProcessContext> &context,
       return;
     }
   } else {
-    context->getProperty(URL.getName(), url, flowFile);
+    context->getProperty(URL, url, flowFile);
     logger_->log_debug("InvokeHTTP -- Received flowfile");
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/processors/InvokeHTTP.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/processors/InvokeHTTP.h b/extensions/http-curl/processors/InvokeHTTP.h
index 446cefe..3019c9c 100644
--- a/extensions/http-curl/processors/InvokeHTTP.h
+++ b/extensions/http-curl/processors/InvokeHTTP.h
@@ -21,7 +21,6 @@
 
 #include <memory>
 #include <string>
-#include <regex>
 
 #include <curl/curl.h>
 #include "utils/ByteArrayCallback.h"
@@ -50,7 +49,7 @@ class InvokeHTTP : public core::Processor {
   /*!
    * Create a new processor
    */
-  InvokeHTTP(std::string name, uuid_t uuid = NULL)
+  InvokeHTTP(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         ssl_context_service_(nullptr),
         date_header_include_(true),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/AgentPrinter.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/AgentPrinter.cpp b/extensions/http-curl/protocols/AgentPrinter.cpp
index efcf195..b22331e 100644
--- a/extensions/http-curl/protocols/AgentPrinter.cpp
+++ b/extensions/http-curl/protocols/AgentPrinter.cpp
@@ -31,7 +31,7 @@ namespace nifi {
 namespace minifi {
 namespace c2 {
 
-AgentPrinter::AgentPrinter(std::string name, uuid_t uuid)
+AgentPrinter::AgentPrinter(std::string name, utils::Identifier uuid)
     : HeartBeatReporter(name, uuid),
       logger_(logging::LoggerFactory<AgentPrinter>::getLogger()) {
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/AgentPrinter.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/AgentPrinter.h b/extensions/http-curl/protocols/AgentPrinter.h
index e1f7480..6a9f12d 100644
--- a/extensions/http-curl/protocols/AgentPrinter.h
+++ b/extensions/http-curl/protocols/AgentPrinter.h
@@ -40,7 +40,7 @@ namespace c2 {
  */
 class AgentPrinter : public RESTProtocol, public HeartBeatReporter {
  public:
-  AgentPrinter(std::string name, uuid_t uuid = nullptr);
+  AgentPrinter(std::string name, utils::Identifier uuid = utils::Identifier());
 
   /**
    * Initialize agent printer.

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/RESTReceiver.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/RESTReceiver.cpp b/extensions/http-curl/protocols/RESTReceiver.cpp
index fe4092c..eec0ebb 100644
--- a/extensions/http-curl/protocols/RESTReceiver.cpp
+++ b/extensions/http-curl/protocols/RESTReceiver.cpp
@@ -39,7 +39,7 @@ int ssl_protocol_en(void *ssl_context, void *user_data) {
   return 0;
 }
 
-RESTReceiver::RESTReceiver(std::string name, uuid_t uuid)
+RESTReceiver::RESTReceiver(std::string name, utils::Identifier uuid)
     : HeartBeatReporter(name, uuid),
       logger_(logging::LoggerFactory<RESTReceiver>::getLogger()) {
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/RESTReceiver.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/RESTReceiver.h b/extensions/http-curl/protocols/RESTReceiver.h
index de97eae..37258b0 100644
--- a/extensions/http-curl/protocols/RESTReceiver.h
+++ b/extensions/http-curl/protocols/RESTReceiver.h
@@ -46,7 +46,7 @@ int ssl_protocol_en(void *ssl_context, void *user_data);
  */
 class RESTReceiver : public RESTProtocol, public HeartBeatReporter {
  public:
-  RESTReceiver(std::string name, uuid_t uuid = nullptr);
+  RESTReceiver(std::string name, utils::Identifier uuid = utils::Identifier());
 
   virtual void initialize(const std::shared_ptr<core::controller::ControllerServiceProvider> &controller, const std::shared_ptr<state::StateMonitor> &updateSink,
                           const std::shared_ptr<Configure> &configure) override;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/RESTSender.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/RESTSender.cpp b/extensions/http-curl/protocols/RESTSender.cpp
index c2fd56e..7db998a 100644
--- a/extensions/http-curl/protocols/RESTSender.cpp
+++ b/extensions/http-curl/protocols/RESTSender.cpp
@@ -36,7 +36,7 @@ namespace nifi {
 namespace minifi {
 namespace c2 {
 
-RESTSender::RESTSender(std::string name, uuid_t uuid)
+RESTSender::RESTSender(std::string name, utils::Identifier uuid)
     : C2Protocol(name, uuid),
       logger_(logging::LoggerFactory<Connectable>::getLogger()) {
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/protocols/RESTSender.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/protocols/RESTSender.h b/extensions/http-curl/protocols/RESTSender.h
index bc9102b..44fdae8 100644
--- a/extensions/http-curl/protocols/RESTSender.h
+++ b/extensions/http-curl/protocols/RESTSender.h
@@ -45,7 +45,7 @@ namespace c2 {
 class RESTSender : public RESTProtocol, public C2Protocol {
  public:
 
-  explicit RESTSender(std::string name, uuid_t uuid = nullptr);
+  explicit RESTSender(std::string name, utils::Identifier uuid = utils::Identifier());
 
   virtual C2Payload consumePayload(const std::string &url, const C2Payload &payload, Direction direction, bool async) override;
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/sitetosite/HTTPProtocol.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/sitetosite/HTTPProtocol.cpp b/extensions/http-curl/sitetosite/HTTPProtocol.cpp
index 0f4a605..c37b4d6 100644
--- a/extensions/http-curl/sitetosite/HTTPProtocol.cpp
+++ b/extensions/http-curl/sitetosite/HTTPProtocol.cpp
@@ -17,9 +17,7 @@
  */
 #include "HTTPProtocol.h"
 
-#include <sys/time.h>
 #include <stdio.h>
-#include <time.h>
 #include <chrono>
 #include <map>
 #include <string>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/sitetosite/HTTPProtocol.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/sitetosite/HTTPProtocol.h b/extensions/http-curl/sitetosite/HTTPProtocol.h
index 4423017..f31db8f 100644
--- a/extensions/http-curl/sitetosite/HTTPProtocol.h
+++ b/extensions/http-curl/sitetosite/HTTPProtocol.h
@@ -19,13 +19,7 @@
 #define __SITE2SITE_CLIENT_PROTOCOL_H__
 
 #include <stdio.h>
-#include <unistd.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <netdb.h>
 #include <string>
 #include <errno.h>
 #include <chrono>
@@ -71,7 +65,7 @@ class HttpSiteToSiteClient : public sitetosite::SiteToSiteClient {
   /*!
    * Create a new http protocol
    */
-  HttpSiteToSiteClient(std::string name, uuid_t uuid = 0)
+  HttpSiteToSiteClient(std::string name, utils::Identifier uuid = utils::Identifier())
       : SiteToSiteClient(),
         current_code(UNRECOGNIZED_RESPONSE_CODE),
         logger_(logging::LoggerFactory<HttpSiteToSiteClient>::getLogger()) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/sitetosite/PeersEntity.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/sitetosite/PeersEntity.h b/extensions/http-curl/sitetosite/PeersEntity.h
index 62cf20a..93496b3 100644
--- a/extensions/http-curl/sitetosite/PeersEntity.h
+++ b/extensions/http-curl/sitetosite/PeersEntity.h
@@ -40,7 +40,7 @@ namespace sitetosite {
 class PeersEntity {
  public:
 
-  static bool parse(const std::shared_ptr<logging::Logger> &logger, const std::string &entity, uuid_t id, std::vector<PeerStatus> &peer_statuses) {
+  static bool parse(const std::shared_ptr<logging::Logger> &logger, const std::string &entity, utils::Identifier id, std::vector<PeerStatus> &peer_statuses) {
     try {
       rapidjson::Document root;
       rapidjson::ParseResult ok = root.Parse(entity.c_str());

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/http-curl/tests/unit/InvokeHTTPTests.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/tests/unit/InvokeHTTPTests.cpp b/extensions/http-curl/tests/unit/InvokeHTTPTests.cpp
index 81d2714..68671cf 100644
--- a/extensions/http-curl/tests/unit/InvokeHTTPTests.cpp
+++ b/extensions/http-curl/tests/unit/InvokeHTTPTests.cpp
@@ -58,10 +58,10 @@ TEST_CASE("HTTPTestsWithNoResourceClaimPOST", "[httptest1]") {
   std::shared_ptr<core::Processor> listenhttp = std::make_shared<org::apache::nifi::minifi::processors::ListenHTTP>("listenhttp");
 
   std::shared_ptr<core::Processor> invokehttp = std::make_shared<org::apache::nifi::minifi::processors::InvokeHTTP>("invokehttp");
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == listenhttp->getUUID(processoruuid));
 
-  uuid_t invokehttp_uuid;
+  utils::Identifier invokehttp_uuid;
   REQUIRE(true == invokehttp->getUUID(invokehttp_uuid));
 
   std::shared_ptr<minifi::Connection> gcConnection = std::make_shared<minifi::Connection>(repo, content_repo, "getfileCreate2Connection");
@@ -175,10 +175,10 @@ TEST_CASE("HTTPTestsWithResourceClaimPOST", "[httptest1]") {
   std::shared_ptr<core::Processor> listenhttp = std::make_shared<org::apache::nifi::minifi::processors::ListenHTTP>("listenhttp");
 
   std::shared_ptr<core::Processor> invokehttp = std::make_shared<org::apache::nifi::minifi::processors::InvokeHTTP>("invokehttp");
-  uuid_t processoruuid;
+  utils::Identifier processoruuid;
   REQUIRE(true == listenhttp->getUUID(processoruuid));
 
-  uuid_t invokehttp_uuid;
+  utils::Identifier invokehttp_uuid;
   REQUIRE(true == invokehttp->getUUID(invokehttp_uuid));
 
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();


[2/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/posix/uuid/config.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/posix/uuid/config.h b/thirdparty/uuid/include/posix/uuid/config.h
new file mode 100644
index 0000000..333ee12
--- /dev/null
+++ b/thirdparty/uuid/include/posix/uuid/config.h
@@ -0,0 +1,847 @@
+/* lib/config.h.  Generated from config.h.in by configure.  */
+/* lib/config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define to 1 if debugging the blkid library */
+/* #undef CONFIG_BLKID_DEBUG */
+
+/* Define to 1 to compile findfs */
+#define CONFIG_BUILD_FINDFS 1
+
+/* Define to 1 if debugging ext3/4 journal code */
+/* #undef CONFIG_JBD_DEBUG */
+
+/* Define to 1 to enable quota support */
+/* #undef CONFIG_QUOTA */
+
+/* Define to 1 if the testio I/O manager should be enabled */
+#define CONFIG_TESTIO_DEBUG 1
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 to disable use of backtrace */
+/* #undef DISABLE_BACKTRACE */
+
+/* Define to 1 if ext2 compression enabled */
+/* #undef ENABLE_COMPRESSION */
+
+/* Define to 1 if ext3/4 htree support enabled */
+#define ENABLE_HTREE 1
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#define ENABLE_NLS 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `argz_count' function. */
+#define HAVE_ARGZ_COUNT 1
+
+/* Define to 1 if you have the <argz.h> header file. */
+#define HAVE_ARGZ_H 1
+
+/* Define to 1 if you have the `argz_next' function. */
+#define HAVE_ARGZ_NEXT 1
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#define HAVE_ARGZ_STRINGIFY 1
+
+/* Define to 1 if you have the `asprintf' function. */
+#define HAVE_ASPRINTF 1
+
+/* Define to 1 if you have the `backtrace' function. */
+#define HAVE_BACKTRACE 1
+
+/* Define to 1 if you have the `blkid_probe_enable_partitions' function. */
+/* #undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS */
+
+/* Define to 1 if you have the `blkid_probe_get_topology' function. */
+/* #undef HAVE_BLKID_PROBE_GET_TOPOLOGY */
+
+/* Define to 1 if the compiler understands __builtin_expect. */
+#define HAVE_BUILTIN_EXPECT 1
+
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+/* #undef HAVE_CFLOCALECOPYCURRENT */
+
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
+
+/* Define to 1 if you have the `chflags' function. */
+/* #undef HAVE_CHFLAGS */
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#define HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#define HAVE_DECL_FEOF_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#define HAVE_DECL_FGETS_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#define HAVE_DECL_GETC_UNLOCKED 1
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL__SNPRINTF 0
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#define HAVE_DECL__SNWPRINTF 0
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if dlopen/libdl exists */
+#define HAVE_DLOPEN 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define HAVE_EXECINFO_H 1
+
+/* Define to 1 if Ext2 ioctls present */
+#define HAVE_EXT2_IOCTLS 1
+
+/* Define to 1 if you have the `fadvise64' function. */
+/* #undef HAVE_FADVISE64 */
+
+/* Define to 1 if you have the `fallocate' function. */
+#define HAVE_FALLOCATE 1
+
+/* Define to 1 if you have the `fallocate64' function. */
+#define HAVE_FALLOCATE64 1
+
+/* Define to 1 if you have the `fchown' function. */
+#define HAVE_FCHOWN 1
+
+/* Define to 1 if you have the `fdatasync' function. */
+#define HAVE_FDATASYNC 1
+
+/* Define to 1 if you have the <features.h> header file. */
+#define HAVE_FEATURES_H 1
+
+/* Define to 1 if you have the `fstat64' function. */
+#define HAVE_FSTAT64 1
+
+/* Define to 1 if you have the `ftruncate64' function. */
+#define HAVE_FTRUNCATE64 1
+
+/* Define to 1 if you have the `futimes' function. */
+#define HAVE_FUTIMES 1
+
+/* Define to 1 if you have the `fwprintf' function. */
+#define HAVE_FWPRINTF 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#define HAVE_GETDTABLESIZE 1
+
+/* Define to 1 if you have the `getegid' function. */
+#define HAVE_GETEGID 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#define HAVE_GETEUID 1
+
+/* Define to 1 if you have the `getgid' function. */
+#define HAVE_GETGID 1
+
+/* Define to 1 if you have the `getmntinfo' function. */
+/* #undef HAVE_GETMNTINFO */
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getpwuid_r' function. */
+#define HAVE_GETPWUID_R 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+#define HAVE_GETRLIMIT 1
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#define HAVE_GETTEXT 1
+
+/* Define to 1 if you have the `getuid' function. */
+#define HAVE_GETUID 1
+
+/* Define if you have the iconv() function and it works. */
+#define HAVE_ICONV 1
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#define HAVE_INTMAX_T 1
+
+/* Define to 1 if the system has the type `intptr_t'. */
+#define HAVE_INTPTR_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the `jrand48' function. */
+#define HAVE_JRAND48 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#define HAVE_LANGINFO_CODESET 1
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#define HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <linux/falloc.h> header file. */
+#define HAVE_LINUX_FALLOC_H 1
+
+/* Define to 1 if you have the <linux/fd.h> header file. */
+#define HAVE_LINUX_FD_H 1
+
+/* Define to 1 if you have the <linux/loop.h> header file. */
+#define HAVE_LINUX_LOOP_H 1
+
+/* Define to 1 if you have the <linux/major.h> header file. */
+#define HAVE_LINUX_MAJOR_H 1
+
+/* Define to 1 if you have the `llseek' function. */
+#define HAVE_LLSEEK 1
+
+/* Define to 1 if llseek declared in unistd.h */
+/* #undef HAVE_LLSEEK_PROTOTYPE */
+
+/* Define to 1 if the system has the type 'long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `lseek64' function. */
+#define HAVE_LSEEK64 1
+
+/* Define to 1 if lseek64 declared in unistd.h */
+#define HAVE_LSEEK64_PROTOTYPE 1
+
+/* Define to 1 if you have the `mallinfo' function. */
+#define HAVE_MALLINFO 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `mbstowcs' function. */
+#define HAVE_MBSTOWCS 1
+
+/* Define to 1 if you have the `memalign' function. */
+#define HAVE_MEMALIGN 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#define HAVE_MEMPCPY 1
+
+/* Define to 1 if you have the `mmap' function. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the <mntent.h> header file. */
+#define HAVE_MNTENT_H 1
+
+/* Define to 1 if you have the `msync' function. */
+#define HAVE_MSYNC 1
+
+/* Define to 1 if you have the `munmap' function. */
+#define HAVE_MUNMAP 1
+
+/* Define to 1 if you have the `nanosleep' function. */
+#define HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+/* #undef HAVE_NET_IF_DL_H */
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if you have the `newlocale' function. */
+#define HAVE_NEWLOCALE 1
+
+/* Define to 1 if you have the `open64' function. */
+#define HAVE_OPEN64 1
+
+/* Define to 1 if optreset for getopt is present */
+/* #undef HAVE_OPTRESET */
+
+/* Define to 1 if you have the `pathconf' function. */
+#define HAVE_PATHCONF 1
+
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#define HAVE_POSIX_FADVISE 1
+
+/* Define to 1 if you have the `posix_fadvise64' function. */
+#define HAVE_POSIX_FADVISE64 1
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#define HAVE_POSIX_MEMALIGN 1
+
+/* Define if your printf() function supports format strings with positions. */
+#define HAVE_POSIX_PRINTF 1
+
+/* Define to 1 if you have the `prctl' function. */
+#define HAVE_PRCTL 1
+
+/* Define to 1 if you have the `pread' function. */
+#define HAVE_PREAD 1
+
+/* Define to 1 if you have the `pread64' function. */
+#define HAVE_PREAD64 1
+
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#define HAVE_PTHREAD_RWLOCK 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the `pwrite' function. */
+#define HAVE_PWRITE 1
+
+/* Define to 1 if you have the `pwrite64' function. */
+#define HAVE_PWRITE64 1
+
+/* Define to 1 if dirent has d_reclen */
+#define HAVE_RECLEN_DIRENT 1
+
+/* Define to 1 if if struct sockaddr contains sa_len */
+/* #undef HAVE_SA_LEN */
+
+/* Define to 1 if you have the `secure_getenv' function. */
+#define HAVE_SECURE_GETENV 1
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#define HAVE_SEMAPHORE_H 1
+
+/* Define to 1 if sem_init() exists */
+#define HAVE_SEM_INIT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#define HAVE_SETJMP_H 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the `setmntent' function. */
+#define HAVE_SETMNTENT 1
+
+/* Define to 1 if you have the `setresgid' function. */
+#define HAVE_SETRESGID 1
+
+/* Define to 1 if you have the `setresuid' function. */
+#define HAVE_SETRESUID 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `srandom' function. */
+#define HAVE_SRANDOM 1
+
+/* Define to 1 if struct stat has st_flags */
+/* #undef HAVE_STAT_FLAGS */
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#define HAVE_STPCPY 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strnlen' function. */
+#define HAVE_STRNLEN 1
+
+/* Define to 1 if you have the `strptime' function. */
+#define HAVE_STRPTIME 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the `strtoull' function. */
+#define HAVE_STRTOULL 1
+
+/* Define to 1 if `st_atim' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_ATIM 1
+
+/* Define to 1 if you have the `symlink' function. */
+#define HAVE_SYMLINK 1
+
+/* Define to 1 if you have the `sync_file_range' function. */
+#define HAVE_SYNC_FILE_RANGE 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/disklabel.h> header file. */
+/* #undef HAVE_SYS_DISKLABEL_H */
+
+/* Define to 1 if you have the <sys/disk.h> header file. */
+/* #undef HAVE_SYS_DISK_H */
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/mkdev.h> header file. */
+/* #undef HAVE_SYS_MKDEV_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#define HAVE_SYS_MOUNT_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/prctl.h> header file. */
+#define HAVE_SYS_PRCTL_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#define HAVE_SYS_SYSCALL_H 1
+
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#define HAVE_SYS_SYSMACROS_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#define HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the <termio.h> header file. */
+#define HAVE_TERMIO_H 1
+
+/* Define to 1 if you have the `tsearch' function. */
+#define HAVE_TSEARCH 1
+
+/* Define to 1 if ssize_t declared */
+#define HAVE_TYPE_SSIZE_T 1
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#define HAVE_UINTMAX_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type 'unsigned long long int'. */
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `uselocale' function. */
+#define HAVE_USELOCALE 1
+
+/* Define to 1 if you have the `usleep' function. */
+#define HAVE_USLEEP 1
+
+/* Define to 1 if you have the `utime' function. */
+#define HAVE_UTIME 1
+
+/* Define to 1 if you have the `utimes' function. */
+#define HAVE_UTIMES 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if you have the `valloc' function. */
+#define HAVE_VALLOC 1
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#define HAVE_VISIBILITY 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#define HAVE_WCRTOMB 1
+
+/* Define to 1 if you have the `wcslen' function. */
+#define HAVE_WCSLEN 1
+
+/* Define to 1 if you have the `wcsnlen' function. */
+#define HAVE_WCSNLEN 1
+
+/* Define if you have the 'wint_t' type. */
+#define HAVE_WINT_T 1
+
+/* Define to 1 if O_NOATIME works. */
+#define HAVE_WORKING_O_NOATIME 1
+
+/* Define to 1 if O_NOFOLLOW works. */
+#define HAVE_WORKING_O_NOFOLLOW 1
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#define HAVE___FSETLOCKING 1
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+/* #undef HAVE___SECURE_GETENV */
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST 
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#define INTDIV0_RAISES_SIGFPE 1
+
+/* package name for gettext */
+#define PACKAGE "e2fsprogs"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+/* #undef PRI_MACROS_BROKEN */
+
+/* Define if the pthread_in_use() detection is hard. */
+/* #undef PTHREAD_IN_USE_DETECTION_HARD */
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#ifndef SIZE_MAX
+/* # undef SIZE_MAX */
+#endif
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* If the compiler supports a TLS storage class define it to that here */
+#define TLS __thread
+
+/* Define if the POSIX multithreading library can be used. */
+#define USE_POSIX_THREADS 1
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#define USE_POSIX_THREADS_WEAK 1
+
+/* Define if the GNU Pth multithreading library can be used. */
+/* #undef USE_PTH_THREADS */
+
+/* Define if references to the GNU Pth multithreading library should be made
+   weak. */
+/* #undef USE_PTH_THREADS_WEAK */
+
+/* Define if the old Solaris multithreading library can be used. */
+/* #undef USE_SOLARIS_THREADS */
+
+/* Define if references to the old Solaris multithreading library should be
+   made weak. */
+/* #undef USE_SOLARIS_THREADS_WEAK */
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define to 1 to build uuidd */
+#define USE_UUIDD 1
+
+/* Define if the native Windows multithreading API can be used. */
+/* #undef USE_WINDOWS_THREADS */
+
+/* version for gettext */
+#define VERSION "0.14.1"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Define to 1 if Apple Darwin libintl workaround is needed */
+/* #undef _INTL_REDIRECT_MACROS */
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress the use of extern inline on Apple's platforms, as Libc at least
+   through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
+   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+   Perhaps Apple will fix this some day.  */
+#if ((__GNUC__ \
+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined __APPLE__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined __APPLE__)
+# if __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+  /* Suppress GCC's bogus "no previous prototype for 'FOO'"
+     and "no previous declaration for 'FOO'"  diagnostics,
+     when FOO is an inline function in the header; see
+     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.  */
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+/* #undef ptrdiff_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+/* #undef uintmax_t */
+
+
+
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init_func     libintl_lock_init_func
+#define glthread_lock_lock_func     libintl_lock_lock_func
+#define glthread_lock_unlock_func   libintl_lock_unlock_func
+#define glthread_lock_destroy_func  libintl_lock_destroy_func
+#define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
+#define glthread_rwlock_init_func              libintl_rwlock_init_func
+#define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
+#define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
+#define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
+#define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
+#define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
+#define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
+#define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
+#define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
+#define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
+#define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
+#define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
+#define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
+#define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
+#define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
+#define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
+#define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
+#define glthread_once_func            libintl_once_func
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+#define glthread_once_multithreaded   libintl_once_multithreaded
+
+
+#define LIBUUID_CLOCK_FILE "/var/lib/libuuid/clock.txt"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/posix/uuid/uuid.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/posix/uuid/uuid.h b/thirdparty/uuid/include/posix/uuid/uuid.h
new file mode 100644
index 0000000..7966427
--- /dev/null
+++ b/thirdparty/uuid/include/posix/uuid/uuid.h
@@ -0,0 +1,112 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+typedef unsigned char uuid_t[16];
+
+/* UUID Variant definitions */
+#define UUID_VARIANT_NCS 	0
+#define UUID_VARIANT_DCE 	1
+#define UUID_VARIANT_MICROSOFT	2
+#define UUID_VARIANT_OTHER	3
+
+/* UUID Type definitions */
+#define UUID_TYPE_DCE_TIME   1
+#define UUID_TYPE_DCE_RANDOM 4
+
+/* Allow UUID constants to be defined */
+#ifdef __GNUC__
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+	static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#else
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+	static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#endif
+
+#define UUID_FIELD uuid_t
+
+struct st_tm_val {
+  long    tv_sec;         /* seconds */
+  long    tv_usec;        /* and microseconds */
+};
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* clear.c */
+void uuid_clear(UUID_FIELD uu);
+
+/* compare.c */
+int uuid_compare(const UUID_FIELD uu1, const UUID_FIELD uu2);
+
+/* copy.c */
+void uuid_copy(UUID_FIELD dst, const UUID_FIELD src);
+
+/* gen_uuid.c */
+void uuid_generate(UUID_FIELD out);
+void uuid_generate_random(UUID_FIELD out);
+void uuid_generate_time(UUID_FIELD out);
+
+/* isnull.c */
+int uuid_is_null(const UUID_FIELD uu);
+
+/* parse.c */
+int uuid_parse(const char *in, UUID_FIELD uu);
+
+/* unparse.c */
+void uuid_unparse(const UUID_FIELD uu, char *out);
+void uuid_unparse_lower(const UUID_FIELD uu, char *out);
+void uuid_unparse_upper(const UUID_FIELD uu, char *out);
+
+/* m_uuidime.c */
+time_t m_uuidime(const UUID_FIELD uu, struct st_tm_val *ret_tv);
+int m_uuidype(const UUID_FIELD uu);
+int uuid_variant(const UUID_FIELD uu);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/posix/uuid/uuidP.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/posix/uuid/uuidP.h b/thirdparty/uuid/include/posix/uuid/uuidP.h
new file mode 100644
index 0000000..5f0d24c
--- /dev/null
+++ b/thirdparty/uuid/include/posix/uuid/uuidP.h
@@ -0,0 +1,63 @@
+/*
+ * uuid.h -- private header file for uuids
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <uuid/m_uuidypes.h>
+#endif
+#include <sys/types.h>
+
+#include "uuid.h"
+
+/*
+ * Offset between 15-Oct-1582 and 1-Jan-70
+ */
+#define TIME_OFFSET_HIGH 0x01B21DD2
+#define TIME_OFFSET_LOW  0x13814000
+
+struct uuid {
+	uint32_t	time_low;
+	uint16_t	time_mid;
+	uint16_t	time_hi_and_version;
+	uint16_t	clock_seq;
+	uint8_t	node[6];
+};
+
+
+/*
+ * prototypes
+ */
+void uuid_pack(const struct uuid *uu, UUID_FIELD ptr);
+void uuid_unpack(const UUID_FIELD in, struct uuid *uu);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/posix/uuid/uuidd.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/posix/uuid/uuidd.h b/thirdparty/uuid/include/posix/uuid/uuidd.h
new file mode 100644
index 0000000..c71f4b7
--- /dev/null
+++ b/thirdparty/uuid/include/posix/uuid/uuidd.h
@@ -0,0 +1,54 @@
+/*
+ * Definitions used by the uuidd daemon
+ *
+ * Copyright (C) 2007 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUIDD_H
+#define _UUID_UUIDD_H
+
+#define UUIDD_DIR		"/var/lib/libuuid"
+#define UUIDD_SOCKET_PATH	UUIDD_DIR "/request"
+#define UUIDD_PIDFILE_PATH	UUIDD_DIR "/uuidd.pid"
+#define UUIDD_PATH		"/usr/sbin/uuidd"
+
+#define UUIDD_OP_GETPID			0
+#define UUIDD_OP_GET_MAXOP		1
+#define UUIDD_OP_TIME_UUID		2
+#define UUIDD_OP_RANDOM_UUID		3
+#define UUIDD_OP_BULK_TIME_UUID		4
+#define UUIDD_OP_BULK_RANDOM_UUID	5
+#define UUIDD_MAX_OP			UUIDD_OP_BULK_RANDOM_UUID
+
+extern void uuid__generate_time(uuid_t out, int *num);
+extern void uuid__generate_random(uuid_t out, int *num);
+
+#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/uuid/config.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/uuid/config.h b/thirdparty/uuid/include/uuid/config.h
deleted file mode 100644
index ecb681b..0000000
--- a/thirdparty/uuid/include/uuid/config.h
+++ /dev/null
@@ -1,845 +0,0 @@
-/* lib/config.h.  Generated from config.h.in by configure.  */
-/* lib/config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define to 1 if debugging the blkid library */
-/* #undef CONFIG_BLKID_DEBUG */
-
-/* Define to 1 to compile findfs */
-#define CONFIG_BUILD_FINDFS 1
-
-/* Define to 1 if debugging ext3/4 journal code */
-/* #undef CONFIG_JBD_DEBUG */
-
-/* Define to 1 to enable quota support */
-/* #undef CONFIG_QUOTA */
-
-/* Define to 1 if the testio I/O manager should be enabled */
-#define CONFIG_TESTIO_DEBUG 1
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
-/* #undef C_ALLOCA */
-
-/* Define to 1 to disable use of backtrace */
-/* #undef DISABLE_BACKTRACE */
-
-/* Define to 1 if ext2 compression enabled */
-/* #undef ENABLE_COMPRESSION */
-
-/* Define to 1 if ext3/4 htree support enabled */
-#define ENABLE_HTREE 1
-
-/* Define to 1 if translation of program messages to the user's native
-   language is requested. */
-#define ENABLE_NLS 1
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
-#define HAVE_ALLOCA_H 1
-
-/* Define to 1 if you have the `argz_count' function. */
-#define HAVE_ARGZ_COUNT 1
-
-/* Define to 1 if you have the <argz.h> header file. */
-#define HAVE_ARGZ_H 1
-
-/* Define to 1 if you have the `argz_next' function. */
-#define HAVE_ARGZ_NEXT 1
-
-/* Define to 1 if you have the `argz_stringify' function. */
-#define HAVE_ARGZ_STRINGIFY 1
-
-/* Define to 1 if you have the `asprintf' function. */
-#define HAVE_ASPRINTF 1
-
-/* Define to 1 if you have the `backtrace' function. */
-#define HAVE_BACKTRACE 1
-
-/* Define to 1 if you have the `blkid_probe_enable_partitions' function. */
-/* #undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS */
-
-/* Define to 1 if you have the `blkid_probe_get_topology' function. */
-/* #undef HAVE_BLKID_PROBE_GET_TOPOLOGY */
-
-/* Define to 1 if the compiler understands __builtin_expect. */
-#define HAVE_BUILTIN_EXPECT 1
-
-/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
-   CoreFoundation framework. */
-/* #undef HAVE_CFLOCALECOPYCURRENT */
-
-/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
-   the CoreFoundation framework. */
-/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
-
-/* Define to 1 if you have the `chflags' function. */
-/* #undef HAVE_CHFLAGS */
-
-/* Define if the GNU dcgettext() function is already present or preinstalled.
-   */
-#define HAVE_DCGETTEXT 1
-
-/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
-   don't. */
-#define HAVE_DECL_FEOF_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
-   you don't. */
-#define HAVE_DECL_FGETS_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
-   don't. */
-#define HAVE_DECL_GETC_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL__SNPRINTF 0
-
-/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL__SNWPRINTF 0
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define to 1 if dlopen/libdl exists */
-#define HAVE_DLOPEN 1
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-/* #undef HAVE_DOPRNT */
-
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if you have the <execinfo.h> header file. */
-#define HAVE_EXECINFO_H 1
-
-/* Define to 1 if Ext2 ioctls present */
-#define HAVE_EXT2_IOCTLS 1
-
-/* Define to 1 if you have the `fadvise64' function. */
-/* #undef HAVE_FADVISE64 */
-
-/* Define to 1 if you have the `fallocate' function. */
-#define HAVE_FALLOCATE 1
-
-/* Define to 1 if you have the `fallocate64' function. */
-#define HAVE_FALLOCATE64 1
-
-/* Define to 1 if you have the `fchown' function. */
-#define HAVE_FCHOWN 1
-
-/* Define to 1 if you have the `fdatasync' function. */
-#define HAVE_FDATASYNC 1
-
-/* Define to 1 if you have the <features.h> header file. */
-#define HAVE_FEATURES_H 1
-
-/* Define to 1 if you have the `fstat64' function. */
-#define HAVE_FSTAT64 1
-
-/* Define to 1 if you have the `ftruncate64' function. */
-#define HAVE_FTRUNCATE64 1
-
-/* Define to 1 if you have the `futimes' function. */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the `fwprintf' function. */
-#define HAVE_FWPRINTF 1
-
-/* Define to 1 if you have the `getcwd' function. */
-#define HAVE_GETCWD 1
-
-/* Define to 1 if you have the `getdtablesize' function. */
-#define HAVE_GETDTABLESIZE 1
-
-/* Define to 1 if you have the `getegid' function. */
-#define HAVE_GETEGID 1
-
-/* Define to 1 if you have the `geteuid' function. */
-#define HAVE_GETEUID 1
-
-/* Define to 1 if you have the `getgid' function. */
-#define HAVE_GETGID 1
-
-/* Define to 1 if you have the `getmntinfo' function. */
-/* #undef HAVE_GETMNTINFO */
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define to 1 if you have the `getpagesize' function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define to 1 if you have the `getpwuid_r' function. */
-#define HAVE_GETPWUID_R 1
-
-/* Define to 1 if you have the `getrlimit' function. */
-#define HAVE_GETRLIMIT 1
-
-/* Define to 1 if you have the `getrusage' function. */
-#define HAVE_GETRUSAGE 1
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#define HAVE_GETTEXT 1
-
-/* Define to 1 if you have the `getuid' function. */
-#define HAVE_GETUID 1
-
-/* Define if you have the iconv() function and it works. */
-#define HAVE_ICONV 1
-
-/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-#define HAVE_INTMAX_T 1
-
-/* Define to 1 if the system has the type `intptr_t'. */
-#define HAVE_INTPTR_T 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
-   declares uintmax_t. */
-#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-
-/* Define to 1 if you have the `jrand48' function. */
-#define HAVE_JRAND48 1
-
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-#define HAVE_LANGINFO_CODESET 1
-
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <linux/falloc.h> header file. */
-#define HAVE_LINUX_FALLOC_H 1
-
-/* Define to 1 if you have the <linux/fd.h> header file. */
-#define HAVE_LINUX_FD_H 1
-
-/* Define to 1 if you have the <linux/loop.h> header file. */
-#define HAVE_LINUX_LOOP_H 1
-
-/* Define to 1 if you have the <linux/major.h> header file. */
-#define HAVE_LINUX_MAJOR_H 1
-
-/* Define to 1 if you have the `llseek' function. */
-#define HAVE_LLSEEK 1
-
-/* Define to 1 if llseek declared in unistd.h */
-/* #undef HAVE_LLSEEK_PROTOTYPE */
-
-/* Define to 1 if the system has the type 'long long int'. */
-#define HAVE_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `lseek64' function. */
-#define HAVE_LSEEK64 1
-
-/* Define to 1 if lseek64 declared in unistd.h */
-#define HAVE_LSEEK64_PROTOTYPE 1
-
-/* Define to 1 if you have the `mallinfo' function. */
-#define HAVE_MALLINFO 1
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the `mbrtowc' function. */
-#define HAVE_MBRTOWC 1
-
-/* Define to 1 if you have the `mbstowcs' function. */
-#define HAVE_MBSTOWCS 1
-
-/* Define to 1 if you have the `memalign' function. */
-#define HAVE_MEMALIGN 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mempcpy' function. */
-#define HAVE_MEMPCPY 1
-
-/* Define to 1 if you have the `mmap' function. */
-#define HAVE_MMAP 1
-
-/* Define to 1 if you have the <mntent.h> header file. */
-#define HAVE_MNTENT_H 1
-
-/* Define to 1 if you have the `msync' function. */
-#define HAVE_MSYNC 1
-
-/* Define to 1 if you have the `munmap' function. */
-#define HAVE_MUNMAP 1
-
-/* Define to 1 if you have the `nanosleep' function. */
-#define HAVE_NANOSLEEP 1
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* Define to 1 if you have the <net/if_dl.h> header file. */
-/* #undef HAVE_NET_IF_DL_H */
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H 1
-
-/* Define to 1 if you have the `newlocale' function. */
-#define HAVE_NEWLOCALE 1
-
-/* Define to 1 if you have the `open64' function. */
-#define HAVE_OPEN64 1
-
-/* Define to 1 if optreset for getopt is present */
-/* #undef HAVE_OPTRESET */
-
-/* Define to 1 if you have the `pathconf' function. */
-#define HAVE_PATHCONF 1
-
-/* Define to 1 if you have the <paths.h> header file. */
-#define HAVE_PATHS_H 1
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#define HAVE_POSIX_FADVISE 1
-
-/* Define to 1 if you have the `posix_fadvise64' function. */
-#define HAVE_POSIX_FADVISE64 1
-
-/* Define to 1 if you have the `posix_memalign' function. */
-#define HAVE_POSIX_MEMALIGN 1
-
-/* Define if your printf() function supports format strings with positions. */
-#define HAVE_POSIX_PRINTF 1
-
-/* Define to 1 if you have the `prctl' function. */
-#define HAVE_PRCTL 1
-
-/* Define to 1 if you have the `pread' function. */
-#define HAVE_PREAD 1
-
-/* Define to 1 if you have the `pread64' function. */
-#define HAVE_PREAD64 1
-
-/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
-#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
-
-/* Define if the POSIX multithreading library has read/write locks. */
-#define HAVE_PTHREAD_RWLOCK 1
-
-/* Define to 1 if you have the `putenv' function. */
-#define HAVE_PUTENV 1
-
-/* Define to 1 if you have the `pwrite' function. */
-#define HAVE_PWRITE 1
-
-/* Define to 1 if you have the `pwrite64' function. */
-#define HAVE_PWRITE64 1
-
-/* Define to 1 if dirent has d_reclen */
-#define HAVE_RECLEN_DIRENT 1
-
-/* Define to 1 if if struct sockaddr contains sa_len */
-/* #undef HAVE_SA_LEN */
-
-/* Define to 1 if you have the `secure_getenv' function. */
-#define HAVE_SECURE_GETENV 1
-
-/* Define to 1 if you have the <semaphore.h> header file. */
-#define HAVE_SEMAPHORE_H 1
-
-/* Define to 1 if sem_init() exists */
-#define HAVE_SEM_INIT 1
-
-/* Define to 1 if you have the `setenv' function. */
-#define HAVE_SETENV 1
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
-/* Define to 1 if you have the `setmntent' function. */
-#define HAVE_SETMNTENT 1
-
-/* Define to 1 if you have the `setresgid' function. */
-#define HAVE_SETRESGID 1
-
-/* Define to 1 if you have the `setresuid' function. */
-#define HAVE_SETRESUID 1
-
-/* Define to 1 if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the `srandom' function. */
-#define HAVE_SRANDOM 1
-
-/* Define to 1 if struct stat has st_flags */
-/* #undef HAVE_STAT_FLAGS */
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#define HAVE_STDARG_H 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
-   uintmax_t. */
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `stpcpy' function. */
-#define HAVE_STPCPY 1
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#define HAVE_STRCASECMP 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strnlen' function. */
-#define HAVE_STRNLEN 1
-
-/* Define to 1 if you have the `strptime' function. */
-#define HAVE_STRPTIME 1
-
-/* Define to 1 if you have the `strtoul' function. */
-#define HAVE_STRTOUL 1
-
-/* Define to 1 if you have the `strtoull' function. */
-#define HAVE_STRTOULL 1
-
-/* Define to 1 if `st_atim' is a member of `struct stat'. */
-#define HAVE_STRUCT_STAT_ST_ATIM 1
-
-/* Define to 1 if you have the `symlink' function. */
-#define HAVE_SYMLINK 1
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#define HAVE_SYNC_FILE_RANGE 1
-
-/* Define to 1 if you have the `sysconf' function. */
-#define HAVE_SYSCONF 1
-
-/* Define to 1 if you have the <sys/disklabel.h> header file. */
-/* #undef HAVE_SYS_DISKLABEL_H */
-
-/* Define to 1 if you have the <sys/disk.h> header file. */
-/* #undef HAVE_SYS_DISK_H */
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#define HAVE_SYS_FILE_H 1
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <sys/mkdev.h> header file. */
-/* #undef HAVE_SYS_MKDEV_H */
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#define HAVE_SYS_MOUNT_H 1
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#define HAVE_SYS_PRCTL_H 1
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#define HAVE_SYS_RESOURCE_H 1
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-/* #undef HAVE_SYS_SOCKIO_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#define HAVE_SYS_SYSCALL_H 1
-
-/* Define to 1 if you have the <sys/sysmacros.h> header file. */
-#define HAVE_SYS_SYSMACROS_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#define HAVE_SYS_UN_H 1
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define to 1 if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define to 1 if you have the <termio.h> header file. */
-#define HAVE_TERMIO_H 1
-
-/* Define to 1 if you have the `tsearch' function. */
-#define HAVE_TSEARCH 1
-
-/* Define to 1 if ssize_t declared */
-#define HAVE_TYPE_SSIZE_T 1
-
-/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
-#define HAVE_UINTMAX_T 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if the system has the type 'unsigned long long int'. */
-#define HAVE_UNSIGNED_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `uselocale' function. */
-#define HAVE_USELOCALE 1
-
-/* Define to 1 if you have the `usleep' function. */
-#define HAVE_USLEEP 1
-
-/* Define to 1 if you have the `utime' function. */
-#define HAVE_UTIME 1
-
-/* Define to 1 if you have the `utimes' function. */
-#define HAVE_UTIMES 1
-
-/* Define to 1 if you have the <utime.h> header file. */
-#define HAVE_UTIME_H 1
-
-/* Define to 1 if you have the `valloc' function. */
-#define HAVE_VALLOC 1
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
-   declarations. */
-#define HAVE_VISIBILITY 1
-
-/* Define to 1 if you have the `vprintf' function. */
-#define HAVE_VPRINTF 1
-
-/* Define if you have the 'wchar_t' type. */
-#define HAVE_WCHAR_T 1
-
-/* Define to 1 if you have the `wcrtomb' function. */
-#define HAVE_WCRTOMB 1
-
-/* Define to 1 if you have the `wcslen' function. */
-#define HAVE_WCSLEN 1
-
-/* Define to 1 if you have the `wcsnlen' function. */
-#define HAVE_WCSNLEN 1
-
-/* Define if you have the 'wint_t' type. */
-#define HAVE_WINT_T 1
-
-/* Define to 1 if O_NOATIME works. */
-#define HAVE_WORKING_O_NOATIME 1
-
-/* Define to 1 if O_NOFOLLOW works. */
-#define HAVE_WORKING_O_NOFOLLOW 1
-
-/* Define to 1 if you have the `__fsetlocking' function. */
-#define HAVE___FSETLOCKING 1
-
-/* Define to 1 if you have the `__secure_getenv' function. */
-/* #undef HAVE___SECURE_GETENV */
-
-/* Define as const if the declaration of iconv() needs const. */
-#define ICONV_CONST 
-
-/* Define if integer division by zero raises signal SIGFPE. */
-#define INTDIV0_RAISES_SIGFPE 1
-
-/* package name for gettext */
-#define PACKAGE "e2fsprogs"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-/* #undef PRI_MACROS_BROKEN */
-
-/* Define if the pthread_in_use() detection is hard. */
-/* #undef PTHREAD_IN_USE_DETECTION_HARD */
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `off_t', as computed by sizeof. */
-#define SIZEOF_OFF_T 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* Define as the maximum value of type 'size_t', if the system doesn't define
-   it. */
-#ifndef SIZE_MAX
-/* # undef SIZE_MAX */
-#endif
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at runtime.
-	STACK_DIRECTION > 0 => grows toward higher addresses
-	STACK_DIRECTION < 0 => grows toward lower addresses
-	STACK_DIRECTION = 0 => direction of growth unknown */
-/* #undef STACK_DIRECTION */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* If the compiler supports a TLS storage class define it to that here */
-#define TLS __thread
-
-/* Define if the POSIX multithreading library can be used. */
-#define USE_POSIX_THREADS 1
-
-/* Define if references to the POSIX multithreading library should be made
-   weak. */
-#define USE_POSIX_THREADS_WEAK 1
-
-/* Define if the GNU Pth multithreading library can be used. */
-/* #undef USE_PTH_THREADS */
-
-/* Define if references to the GNU Pth multithreading library should be made
-   weak. */
-/* #undef USE_PTH_THREADS_WEAK */
-
-/* Define if the old Solaris multithreading library can be used. */
-/* #undef USE_SOLARIS_THREADS */
-
-/* Define if references to the old Solaris multithreading library should be
-   made weak. */
-/* #undef USE_SOLARIS_THREADS_WEAK */
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-
-/* Define to 1 to build uuidd */
-#define USE_UUIDD 1
-
-/* Define if the native Windows multithreading API can be used. */
-/* #undef USE_WINDOWS_THREADS */
-
-/* version for gettext */
-#define VERSION "0.14.1"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Define to 1 if Apple Darwin libintl workaround is needed */
-/* #undef _INTL_REDIRECT_MACROS */
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* Please see the Gnulib manual for how to use these macros.
-
-   Suppress extern inline with HP-UX cc, as it appears to be broken; see
-   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
-
-   Suppress extern inline with Sun C in standards-conformance mode, as it
-   mishandles inline functions that call each other.  E.g., for 'inline void f
-   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
-   'reference to static identifier "f" in extern inline function'.
-   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
-
-   Suppress the use of extern inline on Apple's platforms, as Libc at least
-   through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
-   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
-   Perhaps Apple will fix this some day.  */
-#if ((__GNUC__ \
-      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
-      : (199901L <= __STDC_VERSION__ \
-         && !defined __HP_cc \
-         && !(defined __SUNPRO_C && __STDC__))) \
-     && !defined __APPLE__)
-# define _GL_INLINE inline
-# define _GL_EXTERN_INLINE extern inline
-#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
-       && !defined __APPLE__)
-# if __GNUC_GNU_INLINE__
-   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
-#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
-# else
-#  define _GL_INLINE extern inline
-# endif
-# define _GL_EXTERN_INLINE extern
-#else
-# define _GL_INLINE static _GL_UNUSED
-# define _GL_EXTERN_INLINE static _GL_UNUSED
-#endif
-
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
-#  define _GL_INLINE_HEADER_CONST_PRAGMA
-# else
-#  define _GL_INLINE_HEADER_CONST_PRAGMA \
-     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
-# endif
-  /* Suppress GCC's bogus "no previous prototype for 'FOO'"
-     and "no previous declaration for 'FOO'"  diagnostics,
-     when FOO is an inline function in the header; see
-     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.  */
-# define _GL_INLINE_HEADER_BEGIN \
-    _Pragma ("GCC diagnostic push") \
-    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
-    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
-    _GL_INLINE_HEADER_CONST_PRAGMA
-# define _GL_INLINE_HEADER_END \
-    _Pragma ("GCC diagnostic pop")
-#else
-# define _GL_INLINE_HEADER_BEGIN
-# define _GL_INLINE_HEADER_END
-#endif
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define as the type of the result of subtracting two pointers, if the system
-   doesn't define it. */
-/* #undef ptrdiff_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define to unsigned long or unsigned long long if <stdint.h> and
-   <inttypes.h> don't define. */
-/* #undef uintmax_t */
-
-
-
-#define __libc_lock_t                   gl_lock_t
-#define __libc_lock_define              gl_lock_define
-#define __libc_lock_define_initialized  gl_lock_define_initialized
-#define __libc_lock_init                gl_lock_init
-#define __libc_lock_lock                gl_lock_lock
-#define __libc_lock_unlock              gl_lock_unlock
-#define __libc_lock_recursive_t                   gl_recursive_lock_t
-#define __libc_lock_define_recursive              gl_recursive_lock_define
-#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
-#define __libc_lock_init_recursive                gl_recursive_lock_init
-#define __libc_lock_lock_recursive                gl_recursive_lock_lock
-#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
-#define glthread_in_use  libintl_thread_in_use
-#define glthread_lock_init_func     libintl_lock_init_func
-#define glthread_lock_lock_func     libintl_lock_lock_func
-#define glthread_lock_unlock_func   libintl_lock_unlock_func
-#define glthread_lock_destroy_func  libintl_lock_destroy_func
-#define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
-#define glthread_rwlock_init_func              libintl_rwlock_init_func
-#define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
-#define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
-#define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
-#define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
-#define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
-#define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
-#define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
-#define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
-#define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
-#define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
-#define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
-#define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
-#define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
-#define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
-#define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
-#define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
-#define glthread_once_func            libintl_once_func
-#define glthread_once_singlethreaded  libintl_once_singlethreaded
-#define glthread_once_multithreaded   libintl_once_multithreaded
-

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/uuid/uuid.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/uuid/uuid.h b/thirdparty/uuid/include/uuid/uuid.h
deleted file mode 100644
index ca846da..0000000
--- a/thirdparty/uuid/include/uuid/uuid.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Public include file for the UUID library
- *
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
- *
- * %Begin-Header%
- * 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, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * %End-Header%
- */
-
-#ifndef _UUID_UUID_H
-#define _UUID_UUID_H
-
-#include <sys/types.h>
-#ifndef _WIN32
-#include <sys/time.h>
-#endif
-#include <time.h>
-
-typedef unsigned char uuid_t[16];
-
-/* UUID Variant definitions */
-#define UUID_VARIANT_NCS 	0
-#define UUID_VARIANT_DCE 	1
-#define UUID_VARIANT_MICROSOFT	2
-#define UUID_VARIANT_OTHER	3
-
-/* UUID Type definitions */
-#define UUID_TYPE_DCE_TIME   1
-#define UUID_TYPE_DCE_RANDOM 4
-
-/* Allow UUID constants to be defined */
-#ifdef __GNUC__
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
-	static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
-#else
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
-	static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* clear.c */
-void uuid_clear(uuid_t uu);
-
-/* compare.c */
-int uuid_compare(const uuid_t uu1, const uuid_t uu2);
-
-/* copy.c */
-void uuid_copy(uuid_t dst, const uuid_t src);
-
-/* gen_uuid.c */
-void uuid_generate(uuid_t out);
-void uuid_generate_random(uuid_t out);
-void uuid_generate_time(uuid_t out);
-
-/* isnull.c */
-int uuid_is_null(const uuid_t uu);
-
-/* parse.c */
-int uuid_parse(const char *in, uuid_t uu);
-
-/* unparse.c */
-void uuid_unparse(const uuid_t uu, char *out);
-void uuid_unparse_lower(const uuid_t uu, char *out);
-void uuid_unparse_upper(const uuid_t uu, char *out);
-
-/* uuid_time.c */
-time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
-int uuid_type(const uuid_t uu);
-int uuid_variant(const uuid_t uu);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/uuid/uuidP.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/uuid/uuidP.h b/thirdparty/uuid/include/uuid/uuidP.h
deleted file mode 100644
index e897bbb..0000000
--- a/thirdparty/uuid/include/uuid/uuidP.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * uuid.h -- private header file for uuids
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * 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, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * %End-Header%
- */
-
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#else
-#include <uuid/uuid_types.h>
-#endif
-#include <sys/types.h>
-
-#include <uuid/uuid.h>
-
-/*
- * Offset between 15-Oct-1582 and 1-Jan-70
- */
-#define TIME_OFFSET_HIGH 0x01B21DD2
-#define TIME_OFFSET_LOW  0x13814000
-
-struct uuid {
-	uint32_t	time_low;
-	uint16_t	time_mid;
-	uint16_t	time_hi_and_version;
-	uint16_t	clock_seq;
-	uint8_t	node[6];
-};
-
-
-/*
- * prototypes
- */
-void uuid_pack(const struct uuid *uu, uuid_t ptr);
-void uuid_unpack(const uuid_t in, struct uuid *uu);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/uuid/uuidd.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/uuid/uuidd.h b/thirdparty/uuid/include/uuid/uuidd.h
deleted file mode 100644
index c71f4b7..0000000
--- a/thirdparty/uuid/include/uuid/uuidd.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Definitions used by the uuidd daemon
- *
- * Copyright (C) 2007 Theodore Ts'o.
- *
- * %Begin-Header%
- * 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, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- * 3. The name of the author may not be used to endorse or promote
- *    products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- * %End-Header%
- */
-
-#ifndef _UUID_UUIDD_H
-#define _UUID_UUIDD_H
-
-#define UUIDD_DIR		"/var/lib/libuuid"
-#define UUIDD_SOCKET_PATH	UUIDD_DIR "/request"
-#define UUIDD_PIDFILE_PATH	UUIDD_DIR "/uuidd.pid"
-#define UUIDD_PATH		"/usr/sbin/uuidd"
-
-#define UUIDD_OP_GETPID			0
-#define UUIDD_OP_GET_MAXOP		1
-#define UUIDD_OP_TIME_UUID		2
-#define UUIDD_OP_RANDOM_UUID		3
-#define UUIDD_OP_BULK_TIME_UUID		4
-#define UUIDD_OP_BULK_RANDOM_UUID	5
-#define UUIDD_MAX_OP			UUIDD_OP_BULK_RANDOM_UUID
-
-extern void uuid__generate_time(uuid_t out, int *num);
-extern void uuid__generate_random(uuid_t out, int *num);
-
-#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/win32/uuid/config.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/win32/uuid/config.h b/thirdparty/uuid/include/win32/uuid/config.h
new file mode 100644
index 0000000..b8cf1b4
--- /dev/null
+++ b/thirdparty/uuid/include/win32/uuid/config.h
@@ -0,0 +1,88 @@
+/* src/config.h.  Generated from config.h.in by configure.  */
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+/* -- reflects MinGW + Win32 -- */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `flock' function. */
+#define HAVE_FLOCK 1
+
+/* Define to 1 if you have the `jrand48' function. */
+/* #undef HAVE_JRAND48 */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+/* #undef HAVE_NETINET_IN_H */
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+/* #undef HAVE_NET_IF_DL_H */
+
+/* Define to 1 if you have the <net/if.h> header file. */
+/* #undef HAVE_NET_IF_H */
+
+/* Define if struct sockaddr contains sa_len */
+/* #undef HAVE_SA_LEN */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+//#define HAVE_SYS_FILE_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/* #undef HAVE_SYS_IOCTL_H */
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+/* #undef HAVE_SYS_SYSCALL_H */
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+//#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+/* #undef HAVE_SYS_UN_H */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+//#define HAVE_UNISTD_H 0
+
+
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "uuid"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "uuid 0.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "uuid"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.1"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+#define LIBUUID_CLOCK_FILE "c:/windows/system32/clock.txt"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/win32/uuid/uuid.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/win32/uuid/uuid.h b/thirdparty/uuid/include/win32/uuid/uuid.h
new file mode 100644
index 0000000..5177fdc
--- /dev/null
+++ b/thirdparty/uuid/include/win32/uuid/uuid.h
@@ -0,0 +1,115 @@
+/*
+ * Public include file for the UUID library
+ *
+ * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUID_H
+#define _UUID_UUID_H
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+typedef unsigned char m_uuid[16];
+
+/* UUID Variant definitions */
+#define UUID_VARIANT_NCS 	0
+#define UUID_VARIANT_DCE 	1
+#define UUID_VARIANT_MICROSOFT	2
+#define UUID_VARIANT_OTHER	3
+
+/* UUID Type definitions */
+#define UUID_TYPE_DCE_TIME   1
+#define UUID_TYPE_DCE_RANDOM 4
+
+/* Allow UUID constants to be defined */
+#ifdef __GNUC__
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+	static const m_uuid name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#else
+#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
+	static const m_uuid name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
+#endif
+
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define UUID_FIELD m_uuid
+
+struct st_tm_val {
+  long    tv_sec;         /* seconds */
+  long    tv_usec;        /* and microseconds */
+};
+
+
+
+/* clear.c */
+void uuid_clear(m_uuid uu);
+
+/* compare.c */
+int uuid_compare(const m_uuid uu1, const m_uuid uu2);
+
+/* copy.c */
+void uuid_copy(m_uuid dst, const m_uuid src);
+
+/* gen_uuid.c */
+void uuid_generate(m_uuid out);
+void uuid_generate_random(m_uuid out);
+void uuid_generate_time(m_uuid out);
+
+/* isnull.c */
+int uuid_is_null(const m_uuid uu);
+
+/* parse.c */
+int uuid_parse(const char *in, m_uuid uu);
+
+/* unparse.c */
+void uuid_unparse(const m_uuid uu, char *out);
+void uuid_unparse_lower(const m_uuid uu, char *out);
+void uuid_unparse_upper(const m_uuid uu, char *out);
+
+/* m_uuidime.c */
+time_t m_uuidime(const m_uuid uu, struct st_tm_val *ret_tv);
+int m_uuidype(const m_uuid uu);
+int uuid_variant(const m_uuid uu);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/win32/uuid/uuidP.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/win32/uuid/uuidP.h b/thirdparty/uuid/include/win32/uuid/uuidP.h
new file mode 100644
index 0000000..6ae188a
--- /dev/null
+++ b/thirdparty/uuid/include/win32/uuid/uuidP.h
@@ -0,0 +1,63 @@
+/*
+ * uuid.h -- private header file for uuids
+ *
+ * Copyright (C) 1996, 1997 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <uuid/m_uuidypes.h>
+#endif
+#include <sys/types.h>
+
+#include <uuid/uuid.h>
+
+/*
+ * Offset between 15-Oct-1582 and 1-Jan-70
+ */
+#define TIME_OFFSET_HIGH 0x01B21DD2
+#define TIME_OFFSET_LOW  0x13814000
+
+struct uuid {
+	uint32_t	time_low;
+	uint16_t	time_mid;
+	uint16_t	time_hi_and_version;
+	uint16_t	clock_seq;
+	uint8_t	node[6];
+};
+
+
+/*
+ * prototypes
+ */
+void uuid_pack(const struct uuid *uu, UUID_FIELD ptr);
+void uuid_unpack(const UUID_FIELD in, struct uuid *uu);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/include/win32/uuid/uuidd.h
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/include/win32/uuid/uuidd.h b/thirdparty/uuid/include/win32/uuid/uuidd.h
new file mode 100644
index 0000000..f704a1e
--- /dev/null
+++ b/thirdparty/uuid/include/win32/uuid/uuidd.h
@@ -0,0 +1,54 @@
+/*
+ * Definitions used by the uuidd daemon
+ *
+ * Copyright (C) 2007 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+ * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ * %End-Header%
+ */
+
+#ifndef _UUID_UUIDD_H
+#define _UUID_UUIDD_H
+
+#define UUIDD_DIR		"/var/lib/libuuid"
+#define UUIDD_SOCKET_PATH	UUIDD_DIR "/request"
+#define UUIDD_PIDFILE_PATH	UUIDD_DIR "/uuidd.pid"
+#define UUIDD_PATH		"/usr/sbin/uuidd"
+
+#define UUIDD_OP_GETPID			0
+#define UUIDD_OP_GET_MAXOP		1
+#define UUIDD_OP_TIME_UUID		2
+#define UUIDD_OP_RANDOM_UUID		3
+#define UUIDD_OP_BULK_TIME_UUID		4
+#define UUIDD_OP_BULK_RANDOM_UUID	5
+#define UUIDD_MAX_OP			UUIDD_OP_BULK_RANDOM_UUID
+
+extern void uuid__generate_time(UUID_FIELD out, int *num);
+extern void uuid__generate_random(UUID_FIELD out, int *num);
+
+#endif /* _UUID_UUID_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/isnull.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/isnull.c b/thirdparty/uuid/isnull.c
index 170c9a2..8a48e2a 100644
--- a/thirdparty/uuid/isnull.c
+++ b/thirdparty/uuid/isnull.c
@@ -36,11 +36,13 @@
 #include "uuidP.h"
 
 /* Returns 1 if the uuid is the NULL uuid */
-int uuid_is_null(const uuid_t uu)
+int uuid_is_null(const UUID_FIELD uu)
 {
-	const unsigned char 	*cp;
+	const unsigned char 	*cp = uu;
 	int			i;
 
+	if (cp == 0x00)
+		return 1;
 	for (i=0, cp = uu; i < 16; i++)
 		if (*cp++)
 			return 0;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/makefile
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/makefile b/thirdparty/uuid/makefile
index 9fd47ab..d0adfcf 100644
--- a/thirdparty/uuid/makefile
+++ b/thirdparty/uuid/makefile
@@ -24,7 +24,7 @@ LFLAGS=
 LIBS=-lpthread
 
 # define the CPP source files
-SRCS=clear.c  compare.c  copy.c  gen_uuid.c  isnull.c  pack.c  parse.c  unpack.c  unparse.c  uuid_time.c
+SRCS=clear.c  compare.c  copy.c  gen_uuid.c  isnull.c  pack.c  parse.c  unpack.c  unparse.c  m_uuidime.c
 
 # define the C object files 
 #

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/pack.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/pack.c b/thirdparty/uuid/pack.c
index 3db21ae..1693f05 100644
--- a/thirdparty/uuid/pack.c
+++ b/thirdparty/uuid/pack.c
@@ -36,7 +36,7 @@
 #include <string.h>
 #include "uuidP.h"
 
-void uuid_pack(const struct uuid *uu, uuid_t ptr)
+void uuid_pack(const struct uuid *uu, UUID_FIELD ptr)
 {
 	uint32_t	tmp;
 	unsigned char	*out = ptr;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/parse.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/parse.c b/thirdparty/uuid/parse.c
index 4c0857d..fdf76e0 100644
--- a/thirdparty/uuid/parse.c
+++ b/thirdparty/uuid/parse.c
@@ -40,7 +40,7 @@
 
 #include "uuidP.h"
 
-int uuid_parse(const char *in, uuid_t uu)
+int uuid_parse(const char *in, UUID_FIELD uu)
 {
 	struct uuid	uuid;
 	int 		i;


[8/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/ArchiveLoader.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/ArchiveLoader.h b/extensions/libarchive/ArchiveLoader.h
index fcd4ee9..f45e8c8 100644
--- a/extensions/libarchive/ArchiveLoader.h
+++ b/extensions/libarchive/ArchiveLoader.h
@@ -25,7 +25,7 @@
 #include "ManipulateArchive.h"
 #include "core/ClassLoader.h"
 
-class __attribute__((visibility("default"))) ArchiveFactory : public core::ObjectFactory {
+class ArchiveFactory : public core::ObjectFactory {
  public:
   ArchiveFactory() {
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/BinFiles.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/BinFiles.h b/extensions/libarchive/BinFiles.h
index 9a463b2..52dbcb1 100644
--- a/extensions/libarchive/BinFiles.h
+++ b/extensions/libarchive/BinFiles.h
@@ -55,10 +55,8 @@ class Bin {
     queued_data_size_ = 0;
     creation_dated_ = getTimeMillis();
     std::shared_ptr<utils::IdGenerator> id_generator = utils::IdGenerator::getIdGenerator();
-    char uuidStr[37] = { 0 };
     id_generator->generate(uuid_);
-    uuid_unparse_lower(uuid_, uuidStr);
-    uuid_str_ = uuidStr;
+    uuid_str_ = uuid_.to_string();
     logger_->log_debug("Bin %s for group %s created", uuid_str_, groupId_);
   }
   virtual ~Bin() {
@@ -142,7 +140,7 @@ class Bin {
   std::string groupId_;
   std::shared_ptr<logging::Logger> logger_;
   // A global unique identifier
-  uuid_t uuid_;
+  utils::Identifier uuid_;
   // UUID string
   std::string uuid_str_;
 };
@@ -225,7 +223,7 @@ class BinFiles : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit BinFiles(std::string name, uuid_t uuid = NULL)
+  explicit BinFiles(std::string name, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<BinFiles>::getLogger()) {
     maxBinCount_ = 100;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/libarchive/CMakeLists.txt b/extensions/libarchive/CMakeLists.txt
index 4316049..63201c1 100644
--- a/extensions/libarchive/CMakeLists.txt
+++ b/extensions/libarchive/CMakeLists.txt
@@ -17,10 +17,7 @@
 # under the License.
 #
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/) 
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 
 find_package(LibArchive)
 	

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/CompressContent.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/CompressContent.h b/extensions/libarchive/CompressContent.h
index 03e3646..fcd163c 100644
--- a/extensions/libarchive/CompressContent.h
+++ b/extensions/libarchive/CompressContent.h
@@ -52,7 +52,7 @@ public:
   /*!
    * Create a new processor
    */
-  explicit CompressContent(std::string name, uuid_t uuid = NULL) :
+  explicit CompressContent(std::string name, utils::Identifier uuid = utils::Identifier()) :
       core::Processor(name, uuid), logger_(logging::LoggerFactory<CompressContent>::getLogger()), updateFileName_(false) {
   }
   // Destructor

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/FocusArchiveEntry.cpp
----------------------------------------------------------------------
diff --git a/extensions/libarchive/FocusArchiveEntry.cpp b/extensions/libarchive/FocusArchiveEntry.cpp
index 5172dc6..5602f4c 100644
--- a/extensions/libarchive/FocusArchiveEntry.cpp
+++ b/extensions/libarchive/FocusArchiveEntry.cpp
@@ -90,12 +90,10 @@ void FocusArchiveEntry::onTrigger(core::ProcessContext *context, core::ProcessSe
     if (entryMetadata.entryType == AE_IFREG) {
       logger_->log_info("FocusArchiveEntry importing %s from %s", entryMetadata.entryName, entryMetadata.tmpFileName);
       session->import(entryMetadata.tmpFileName, flowFile, false, 0);
-      char stashKey[37];
-      uuid_t stashKeyUuid;
+      utils::Identifier stashKeyUuid;
       id_generator_->generate(stashKeyUuid);
-      uuid_unparse_lower(stashKeyUuid, stashKey);
-      logger_->log_debug("FocusArchiveEntry generated stash key %s for entry %s", stashKey, entryMetadata.entryName);
-      entryMetadata.stashKey.assign(stashKey);
+      logger_->log_debug("FocusArchiveEntry generated stash key %s for entry %s", stashKeyUuid.to_string(), entryMetadata.entryName);
+      entryMetadata.stashKey.assign(stashKeyUuid.to_string());
 
       if (entryMetadata.entryName == archiveMetadata.focusedEntry) {
         targetEntryStashKey = entryMetadata.stashKey;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/FocusArchiveEntry.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/FocusArchiveEntry.h b/extensions/libarchive/FocusArchiveEntry.h
index 174526c..8a87df7 100644
--- a/extensions/libarchive/FocusArchiveEntry.h
+++ b/extensions/libarchive/FocusArchiveEntry.h
@@ -48,7 +48,7 @@ class FocusArchiveEntry : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit FocusArchiveEntry(std::string name, uuid_t uuid = NULL)
+  explicit FocusArchiveEntry(std::string name, utils::Identifier uuid = utils::Identifier())
   : core::Processor(name, uuid),
     logger_(logging::LoggerFactory<FocusArchiveEntry>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/ManipulateArchive.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/ManipulateArchive.h b/extensions/libarchive/ManipulateArchive.h
index 6daca01..18a8b6f 100644
--- a/extensions/libarchive/ManipulateArchive.h
+++ b/extensions/libarchive/ManipulateArchive.h
@@ -46,7 +46,7 @@ public:
 	/*!
 	 * Create a new processor
 	 */
-	ManipulateArchive(std::string name, uuid_t uuid = NULL)
+	ManipulateArchive(std::string name, utils::Identifier uuid = utils::Identifier())
 	: core::Processor(name, uuid),
 		logger_(logging::LoggerFactory<ManipulateArchive>::getLogger()) {
 	}
@@ -94,4 +94,4 @@ REGISTER_RESOURCE(ManipulateArchive);
 } /* namespace apache */
 } /* namespace org */
 
-#endif  // LIBMINIFI_INCLUDE_PROCESSORS_MANIPULATEARCHIVE_H_
\ No newline at end of file
+#endif  // LIBMINIFI_INCLUDE_PROCESSORS_MANIPULATEARCHIVE_H_

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/MergeContent.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/MergeContent.h b/extensions/libarchive/MergeContent.h
index cb6b469..7e694db 100644
--- a/extensions/libarchive/MergeContent.h
+++ b/extensions/libarchive/MergeContent.h
@@ -46,6 +46,10 @@ namespace processors {
 // MergeBin Class
 class MergeBin {
 public:
+
+  virtual ~MergeBin(){
+  }
+
   virtual std::string getMergedContentType() = 0;
   // merge the flows in the bin
   virtual std::shared_ptr<core::FlowFile> merge(core::ProcessContext *context, core::ProcessSession *session,
@@ -267,7 +271,7 @@ class MergeContent : public processors::BinFiles {
   /*!
    * Create a new processor
    */
-  explicit MergeContent(std::string name, uuid_t uuid = NULL)
+  explicit MergeContent(std::string name, utils::Identifier uuid = utils::Identifier())
       : processors::BinFiles(name, uuid),
         logger_(logging::LoggerFactory<MergeContent>::getLogger()) {
     mergeStratgey_ = MERGE_STRATEGY_DEFRAGMENT;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/libarchive/UnfocusArchiveEntry.h
----------------------------------------------------------------------
diff --git a/extensions/libarchive/UnfocusArchiveEntry.h b/extensions/libarchive/UnfocusArchiveEntry.h
index cc39b37..99c7e4c 100644
--- a/extensions/libarchive/UnfocusArchiveEntry.h
+++ b/extensions/libarchive/UnfocusArchiveEntry.h
@@ -49,7 +49,7 @@ class UnfocusArchiveEntry : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit UnfocusArchiveEntry(std::string name, uuid_t uuid = NULL)
+  explicit UnfocusArchiveEntry(std::string name, utils::Identifier uuid = utils::Identifier())
   : core::Processor(name, uuid),
     logger_(logging::LoggerFactory<UnfocusArchiveEntry>::getLogger()){
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/librdkafka/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/librdkafka/CMakeLists.txt b/extensions/librdkafka/CMakeLists.txt
index d37cf67..50d89df 100644
--- a/extensions/librdkafka/CMakeLists.txt
+++ b/extensions/librdkafka/CMakeLists.txt
@@ -17,10 +17,7 @@
 # under the License.
 #
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ${CIVET_THIRDPARTY_ROOT}/include ../../thirdparty/)
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
 
 include_directories(../../thirdparty/librdkafka-0.11.1/src ./../thirdparty/librdkafka-0.11.1/src-cpp)
 
@@ -47,7 +44,6 @@ if (LibRdKafka_FOUND AND NOT BUILD_LIBRDKAFKA)
 else()
 	target_link_libraries(minifi-rdkafka-extensions rdkafka )
 endif()
-find_package(ZLIB REQUIRED)
 include_directories(${ZLIB_INCLUDE_DIRS})
 target_link_libraries (minifi-rdkafka-extensions ${ZLIB_LIBRARIES})
 if (WIN32)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/librdkafka/PublishKafka.h
----------------------------------------------------------------------
diff --git a/extensions/librdkafka/PublishKafka.h b/extensions/librdkafka/PublishKafka.h
index 0814dd9..a8af6ef 100644
--- a/extensions/librdkafka/PublishKafka.h
+++ b/extensions/librdkafka/PublishKafka.h
@@ -58,7 +58,7 @@ public:
   /*!
    * Create a new processor
    */
-  explicit PublishKafka(std::string name, uuid_t uuid = NULL) :
+  explicit PublishKafka(std::string name, utils::Identifier uuid = utils::Identifier()) :
       core::Processor(name, uuid), logger_(logging::LoggerFactory<PublishKafka>::getLogger()) {
     conf_ = nullptr;
     rk_ = nullptr;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/librdkafka/RdKafkaLoader.h
----------------------------------------------------------------------
diff --git a/extensions/librdkafka/RdKafkaLoader.h b/extensions/librdkafka/RdKafkaLoader.h
index ea650fc..1a65c29 100644
--- a/extensions/librdkafka/RdKafkaLoader.h
+++ b/extensions/librdkafka/RdKafkaLoader.h
@@ -21,7 +21,7 @@
 #include "PublishKafka.h"
 #include "core/ClassLoader.h"
 
-class __attribute__((visibility("default"))) RdKafkaFactory : public core::ObjectFactory {
+class RdKafkaFactory : public core::ObjectFactory {
  public:
   RdKafkaFactory() {
 
@@ -61,6 +61,6 @@ class __attribute__((visibility("default"))) RdKafkaFactory : public core::Objec
 };
 
 extern "C" {
-void *createRdKafkaFactory(void);
+DLL_EXPORT void *createRdKafkaFactory(void);
 }
 #endif /* EXTENSION_RDKAFKALOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/mqtt/CMakeLists.txt b/extensions/mqtt/CMakeLists.txt
index 3374557..e86e016 100644
--- a/extensions/mqtt/CMakeLists.txt
+++ b/extensions/mqtt/CMakeLists.txt
@@ -17,9 +17,7 @@
 # under the License.
 #
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 include_directories(./controllerservice ./processors ./protocol ../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/)
 
 include_directories(../../thirdparty/paho.mqtt.c/src)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/MQTTLoader.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/MQTTLoader.h b/extensions/mqtt/MQTTLoader.h
index d8d3e8f..1472182 100644
--- a/extensions/mqtt/MQTTLoader.h
+++ b/extensions/mqtt/MQTTLoader.h
@@ -26,7 +26,7 @@
 #include "ConvertHeartBeat.h"
 #include "ConvertJSONAck.h"
 #include "ConvertUpdate.h"
-class __attribute__((visibility("default"))) MQTTFactory : public core::ObjectFactory {
+class MQTTFactory : public core::ObjectFactory {
  public:
   MQTTFactory() {
 
@@ -84,6 +84,6 @@ class __attribute__((visibility("default"))) MQTTFactory : public core::ObjectFa
 };
 
 extern "C" {
-void *createMQTTFactory(void);
+DLL_EXPORT void *createMQTTFactory(void);
 }
 #endif /* EXTENSION_MQTTLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/controllerservice/MQTTControllerService.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/controllerservice/MQTTControllerService.h b/extensions/mqtt/controllerservice/MQTTControllerService.h
index a7bbebd..1633a38 100644
--- a/extensions/mqtt/controllerservice/MQTTControllerService.h
+++ b/extensions/mqtt/controllerservice/MQTTControllerService.h
@@ -83,7 +83,7 @@ class MQTTControllerService : public core::controller::ControllerService {
         logger_(logging::LoggerFactory<MQTTControllerService>::getLogger()) {
   }
 
-  explicit MQTTControllerService(const std::string &name, uuid_t uuid = 0)
+  explicit MQTTControllerService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ControllerService(name, uuid),
         initialized_(false),
         client_(nullptr),
@@ -95,7 +95,7 @@ class MQTTControllerService : public core::controller::ControllerService {
   }
 
   explicit MQTTControllerService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : ControllerService(name, nullptr),
+      : ControllerService(name),
         initialized_(false),
         client_(nullptr),
         keepAliveInterval_(0),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/AbstractMQTTProcessor.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/AbstractMQTTProcessor.h b/extensions/mqtt/processors/AbstractMQTTProcessor.h
index aab0ef5..aa271bc 100644
--- a/extensions/mqtt/processors/AbstractMQTTProcessor.h
+++ b/extensions/mqtt/processors/AbstractMQTTProcessor.h
@@ -48,7 +48,7 @@ class AbstractMQTTProcessor : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit AbstractMQTTProcessor(std::string name, uuid_t uuid = NULL)
+  explicit AbstractMQTTProcessor(std::string name, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<AbstractMQTTProcessor>::getLogger()) {
     client_ = nullptr;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/ConsumeMQTT.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/ConsumeMQTT.h b/extensions/mqtt/processors/ConsumeMQTT.h
index 0b26d42..2951035 100644
--- a/extensions/mqtt/processors/ConsumeMQTT.h
+++ b/extensions/mqtt/processors/ConsumeMQTT.h
@@ -43,14 +43,15 @@ namespace processors {
 #define MQTT_BROKER_ATTRIBUTE "mqtt.broker"
 
 // ConsumeMQTT Class
-class ConsumeMQTT: public processors::AbstractMQTTProcessor {
-public:
+class ConsumeMQTT : public processors::AbstractMQTTProcessor {
+ public:
   // Constructor
   /*!
    * Create a new processor
    */
-  explicit ConsumeMQTT(std::string name, uuid_t uuid = NULL)
-    : processors::AbstractMQTTProcessor(name, uuid), logger_(logging::LoggerFactory<ConsumeMQTT>::getLogger()) {
+  explicit ConsumeMQTT(std::string name, utils::Identifier uuid = utils::Identifier())
+      : processors::AbstractMQTTProcessor(name, uuid),
+        logger_(logging::LoggerFactory<ConsumeMQTT>::getLogger()) {
     isSubscriber_ = true;
     maxQueueSize_ = 100;
     maxSegSize_ = ULLONG_MAX;
@@ -68,10 +69,10 @@ public:
   static core::Property MaxFlowSegSize;
   static core::Property QueueBufferMaxMessage;
   // Nest Callback Class for write stream
-  class WriteCallback: public OutputStreamCallback {
-  public:
-    WriteCallback(MQTTClient_message *message) :
-      message_(message) {
+  class WriteCallback : public OutputStreamCallback {
+   public:
+    WriteCallback(MQTTClient_message *message)
+        : message_(message) {
       status_ = 0;
     }
     MQTTClient_message *message_;
@@ -84,7 +85,7 @@ public:
     int status_;
   };
 
-public:
+ public:
   /**
    * Function that's executed when the processor is scheduled.
    * @param context process context.
@@ -98,7 +99,7 @@ public:
   virtual void initialize(void);
   virtual bool enqueueReceiveMQTTMsg(MQTTClient_message *message);
 
-protected:
+ protected:
   void getReceivedMQTTMsg(std::deque<MQTTClient_message *> &msg_queue) {
     MQTTClient_message *message;
     while (queue_.try_dequeue(message)) {
@@ -106,7 +107,7 @@ protected:
     }
   }
 
-private:
+ private:
   std::shared_ptr<logging::Logger> logger_;
   std::mutex mutex_;
   uint64_t maxQueueSize_;
@@ -114,7 +115,7 @@ private:
   moodycamel::ConcurrentQueue<MQTTClient_message *> queue_;
 };
 
-REGISTER_RESOURCE (ConsumeMQTT);
+REGISTER_RESOURCE(ConsumeMQTT);
 
 } /* namespace processors */
 } /* namespace minifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/ConvertBase.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/ConvertBase.h b/extensions/mqtt/processors/ConvertBase.h
index 6f4a41e..e8fd07e 100644
--- a/extensions/mqtt/processors/ConvertBase.h
+++ b/extensions/mqtt/processors/ConvertBase.h
@@ -45,7 +45,7 @@ class ConvertBase : public core::Processor, public minifi::c2::RESTProtocol {
   /*!
    * Create a new processor
    */
-  explicit ConvertBase(std::string name, uuid_t uuid = NULL)
+  explicit ConvertBase(std::string name, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid) {
   }
   // Destructor

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/ConvertHeartBeat.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/ConvertHeartBeat.h b/extensions/mqtt/processors/ConvertHeartBeat.h
index ad7f37a..0409e4d 100644
--- a/extensions/mqtt/processors/ConvertHeartBeat.h
+++ b/extensions/mqtt/processors/ConvertHeartBeat.h
@@ -45,7 +45,7 @@ public:
   /*!
    * Create a new processor
    */
-  explicit ConvertHeartBeat(std::string name, uuid_t uuid = NULL)
+  explicit ConvertHeartBeat(std::string name, utils::Identifier uuid = utils::Identifier())
     : ConvertBase(name, uuid), logger_(logging::LoggerFactory<ConvertHeartBeat>::getLogger()) {
   }
   // Destructor

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/ConvertJSONAck.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/ConvertJSONAck.h b/extensions/mqtt/processors/ConvertJSONAck.h
index e7331c8..1759502 100644
--- a/extensions/mqtt/processors/ConvertJSONAck.h
+++ b/extensions/mqtt/processors/ConvertJSONAck.h
@@ -47,7 +47,7 @@ class ConvertJSONAck : public ConvertBase {
   /*!
    * Create a new processor
    */
-  explicit ConvertJSONAck(std::string name, uuid_t uuid = NULL)
+  explicit ConvertJSONAck(std::string name, utils::Identifier uuid = utils::Identifier())
       : ConvertBase(name, uuid),
         logger_(logging::LoggerFactory<ConvertJSONAck>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/ConvertUpdate.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/ConvertUpdate.h b/extensions/mqtt/processors/ConvertUpdate.h
index a04529a..3d0390e 100644
--- a/extensions/mqtt/processors/ConvertUpdate.h
+++ b/extensions/mqtt/processors/ConvertUpdate.h
@@ -50,7 +50,7 @@ class ConvertUpdate : public ConvertBase {
   /*!
    * Create a new processor
    */
-  explicit ConvertUpdate(std::string name, uuid_t uuid = NULL)
+  explicit ConvertUpdate(std::string name, utils::Identifier uuid = utils::Identifier())
     : ConvertBase(name, uuid), logger_(logging::LoggerFactory<ConvertUpdate>::getLogger()) {
   }
   // Destructor

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/processors/PublishMQTT.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/processors/PublishMQTT.h b/extensions/mqtt/processors/PublishMQTT.h
index 67a0d7f..fac83e2 100644
--- a/extensions/mqtt/processors/PublishMQTT.h
+++ b/extensions/mqtt/processors/PublishMQTT.h
@@ -37,14 +37,15 @@ namespace minifi {
 namespace processors {
 
 // PublishMQTT Class
-class PublishMQTT: public processors::AbstractMQTTProcessor {
-public:
+class PublishMQTT : public processors::AbstractMQTTProcessor {
+ public:
   // Constructor
   /*!
    * Create a new processor
    */
-  explicit PublishMQTT(std::string name, uuid_t uuid = NULL)
-    : processors::AbstractMQTTProcessor(name, uuid), logger_(logging::LoggerFactory<PublishMQTT>::getLogger()) {
+  explicit PublishMQTT(std::string name, utils::Identifier uuid = utils::Identifier())
+      : processors::AbstractMQTTProcessor(name, uuid),
+        logger_(logging::LoggerFactory<PublishMQTT>::getLogger()) {
     retain_ = false;
     max_seg_size_ = ULLONG_MAX;
   }
@@ -58,12 +59,16 @@ public:
   static core::Property MaxFlowSegSize;
 
   // Nest Callback Class for read stream
-  class ReadCallback: public InputStreamCallback {
-  public:
-    ReadCallback(uint64_t flow_size, uint64_t max_seg_size, const std::string &key, MQTTClient client,
-        int qos, bool retain, MQTTClient_deliveryToken &token) :
-        flow_size_(flow_size), max_seg_size_(max_seg_size), key_(key), client_(client),
-        qos_(qos), retain_(retain), token_(token) {
+  class ReadCallback : public InputStreamCallback {
+   public:
+    ReadCallback(uint64_t flow_size, uint64_t max_seg_size, const std::string &key, MQTTClient client, int qos, bool retain, MQTTClient_deliveryToken &token)
+        : flow_size_(flow_size),
+          max_seg_size_(max_seg_size),
+          key_(key),
+          client_(client),
+          qos_(qos),
+          retain_(retain),
+          token_(token) {
       status_ = 0;
       read_size_ = 0;
     }
@@ -102,7 +107,8 @@ public:
     uint64_t flow_size_;
     uint64_t max_seg_size_;
     std::string key_;
-    MQTTClient client_;;
+    MQTTClient client_;
+    ;
     int status_;
     size_t read_size_;
     int qos_;
@@ -110,7 +116,7 @@ public:
     MQTTClient_deliveryToken &token_;
   };
 
-public:
+ public:
   /**
    * Function that's executed when the processor is scheduled.
    * @param context process context.
@@ -123,15 +129,15 @@ public:
   // Initialize, over write by NiFi PublishMQTT
   virtual void initialize(void);
 
-protected:
+ protected:
 
-private:
+ private:
   uint64_t max_seg_size_;
   bool retain_;
   std::shared_ptr<logging::Logger> logger_;
 };
 
-REGISTER_RESOURCE (PublishMQTT);
+REGISTER_RESOURCE(PublishMQTT);
 
 } /* namespace processors */
 } /* namespace minifi */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/protocol/MQTTC2Protocol.cpp
----------------------------------------------------------------------
diff --git a/extensions/mqtt/protocol/MQTTC2Protocol.cpp b/extensions/mqtt/protocol/MQTTC2Protocol.cpp
index 03a6c8d..dceeedf 100644
--- a/extensions/mqtt/protocol/MQTTC2Protocol.cpp
+++ b/extensions/mqtt/protocol/MQTTC2Protocol.cpp
@@ -23,7 +23,7 @@ namespace nifi {
 namespace minifi {
 namespace c2 {
 
-MQTTC2Protocol::MQTTC2Protocol(std::string name, uuid_t uuid)
+MQTTC2Protocol::MQTTC2Protocol(std::string name, utils::Identifier uuid = utils::Identifier())
     : C2Protocol(name, uuid),
       logger_(logging::LoggerFactory<Connectable>::getLogger()) {
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/mqtt/protocol/MQTTC2Protocol.h
----------------------------------------------------------------------
diff --git a/extensions/mqtt/protocol/MQTTC2Protocol.h b/extensions/mqtt/protocol/MQTTC2Protocol.h
index 460e5d4..45c7938 100644
--- a/extensions/mqtt/protocol/MQTTC2Protocol.h
+++ b/extensions/mqtt/protocol/MQTTC2Protocol.h
@@ -44,7 +44,7 @@ namespace c2 {
  */
 class MQTTC2Protocol : public C2Protocol {
  public:
-  explicit MQTTC2Protocol(std::string name, uuid_t uuid = nullptr);
+  explicit MQTTC2Protocol(std::string name, utils::Identifier uuid = utils::Identifier());
 
   virtual ~MQTTC2Protocol();
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/pcap/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/pcap/CMakeLists.txt b/extensions/pcap/CMakeLists.txt
index c6dc980..dd48dcd 100644
--- a/extensions/pcap/CMakeLists.txt
+++ b/extensions/pcap/CMakeLists.txt
@@ -19,10 +19,8 @@
 
 find_package(PCAP REQUIRED)
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 
-include_directories(../../libminifi/include ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ${CIVET_THIRDPARTY_ROOT}/include ../../thirdparty/)
 include_directories(/usr/include/netinet)
 
 set(PCAPPLUSPLUS_TP_BASE_DIR "${CMAKE_SOURCE_DIR}/thirdparty/pcap++/")

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/pcap/CapturePacket.cpp
----------------------------------------------------------------------
diff --git a/extensions/pcap/CapturePacket.cpp b/extensions/pcap/CapturePacket.cpp
index 82cf4b0..3869452 100644
--- a/extensions/pcap/CapturePacket.cpp
+++ b/extensions/pcap/CapturePacket.cpp
@@ -151,13 +151,11 @@ void CapturePacket::onSchedule(const std::shared_ptr<core::ProcessContext> &cont
     base_dir_ = "/tmp/";
   }
 
-  uuid_t dir_ext;
+  utils::Identifier dir_ext;
 
   id_generator_->generate(dir_ext);
 
-  char id[37];
-  uuid_unparse(dir_ext, id);
-  base_path_ = id;
+  base_path_ = dir_ext.to_string();
 
   const std::vector<pcpp::PcapLiveDevice*>& devList = pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList();
   for (auto iter : devList) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/pcap/CapturePacket.h
----------------------------------------------------------------------
diff --git a/extensions/pcap/CapturePacket.h b/extensions/pcap/CapturePacket.h
index 3084eed..c4c0f5f 100644
--- a/extensions/pcap/CapturePacket.h
+++ b/extensions/pcap/CapturePacket.h
@@ -97,7 +97,7 @@ class CapturePacket : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit CapturePacket(std::string name, uuid_t uuid = NULL)
+  explicit CapturePacket(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         capture_bluetooth_(false),
         pcap_batch_size_(50),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/pcap/PcapLoader.h
----------------------------------------------------------------------
diff --git a/extensions/pcap/PcapLoader.h b/extensions/pcap/PcapLoader.h
index 38cd4b8..885e20e 100644
--- a/extensions/pcap/PcapLoader.h
+++ b/extensions/pcap/PcapLoader.h
@@ -22,7 +22,7 @@
 #include "CapturePacket.h"
 #include "utils/StringUtils.h"
 
-class __attribute__((visibility("default"))) PcapFactory : public core::ObjectFactory {
+class PcapFactory : public core::ObjectFactory {
  public:
   PcapFactory() {
 
@@ -62,6 +62,6 @@ class __attribute__((visibility("default"))) PcapFactory : public core::ObjectFa
 };
 
 extern "C" {
-void *createPcapFactory(void);
+DLL_EXPORT void *createPcapFactory(void);
 }
 #endif /* EXTENSIONS_PCAPLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/CMakeLists.txt b/extensions/rocksdb-repos/CMakeLists.txt
index 6deb067..c82b730 100644
--- a/extensions/rocksdb-repos/CMakeLists.txt
+++ b/extensions/rocksdb-repos/CMakeLists.txt
@@ -17,13 +17,7 @@
 # under the License.
 #
 
-cmake_minimum_required(VERSION 2.6)
-
-
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/rocksdb/include  ../../thirdparty/) 
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 
 find_package(RocksDB)
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/DatabaseContentRepository.h
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/DatabaseContentRepository.h b/extensions/rocksdb-repos/DatabaseContentRepository.h
index 49e7227..7e5705f 100644
--- a/extensions/rocksdb-repos/DatabaseContentRepository.h
+++ b/extensions/rocksdb-repos/DatabaseContentRepository.h
@@ -72,7 +72,7 @@ class StringAppender : public rocksdb::AssociativeMergeOperator {
 class DatabaseContentRepository : public core::ContentRepository, public core::Connectable {
  public:
 
-  DatabaseContentRepository(std::string name = getClassName<DatabaseContentRepository>(), uuid_t uuid = 0)
+  DatabaseContentRepository(std::string name = getClassName<DatabaseContentRepository>(), utils::Identifier uuid = utils::Identifier())
       : core::Connectable(name, uuid),
         is_valid_(false),
         db_(nullptr),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/FlowFileRepository.cpp
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/FlowFileRepository.cpp b/extensions/rocksdb-repos/FlowFileRepository.cpp
index 634819c..f4920bc 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.cpp
+++ b/extensions/rocksdb-repos/FlowFileRepository.cpp
@@ -162,7 +162,7 @@ void FlowFileRepository::initialize_repository() {
       checkpoint_ = std::unique_ptr<rocksdb::Checkpoint>(checkpoint);
       logger_->log_trace("Created checkpoint directory");
     } else {
-      logger_->log_trace("Could not create checkpoint directory. Not properly deleted?");
+      logger_->log_trace("Could not create checkpoint. Corrupt?");
     }
   } else
     logger_->log_trace("Could not create checkpoint directory. Not properly deleted?");
@@ -171,6 +171,7 @@ void FlowFileRepository::initialize_repository() {
 void FlowFileRepository::loadComponent(const std::shared_ptr<core::ContentRepository> &content_repo) {
   content_repo_ = content_repo;
   repo_size_ = 0;
+
   initialize_repository();
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/FlowFileRepository.h
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/FlowFileRepository.h b/extensions/rocksdb-repos/FlowFileRepository.h
index e7f8fd0..6d0972a 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.h
+++ b/extensions/rocksdb-repos/FlowFileRepository.h
@@ -36,8 +36,13 @@ namespace minifi {
 namespace core {
 namespace repository {
 
+#ifdef WIN32
+#define FLOWFILE_REPOSITORY_DIRECTORY ".\\flowfile_repository"
+#define FLOWFILE_CHECKPOINT_DIRECTORY ".\\flowfile_checkpoint"
+#else
 #define FLOWFILE_REPOSITORY_DIRECTORY "./flowfile_repository"
 #define FLOWFILE_CHECKPOINT_DIRECTORY "./flowfile_checkpoint"
+#endif
 #define MAX_FLOWFILE_REPOSITORY_STORAGE_SIZE (10*1024*1024) // 10M
 #define MAX_FLOWFILE_REPOSITORY_ENTRY_LIFE_TIME (600000) // 10 minute
 #define FLOWFILE_REPOSITORY_PURGE_PERIOD (2000) // 2000 msec
@@ -50,13 +55,13 @@ class FlowFileRepository : public core::Repository, public std::enable_shared_fr
  public:
   // Constructor
 
-  FlowFileRepository(std::string name, uuid_t uuid)
+  FlowFileRepository(std::string name, utils::Identifier uuid)
       : FlowFileRepository(name) {
   }
 
   FlowFileRepository(const std::string repo_name = "", std::string directory = FLOWFILE_REPOSITORY_DIRECTORY, int64_t maxPartitionMillis = MAX_FLOWFILE_REPOSITORY_ENTRY_LIFE_TIME,
                      int64_t maxPartitionBytes = MAX_FLOWFILE_REPOSITORY_STORAGE_SIZE, uint64_t purgePeriod = FLOWFILE_REPOSITORY_PURGE_PERIOD)
-      : core::SerializableComponent(repo_name, 0),
+      : core::SerializableComponent(repo_name),
         Repository(repo_name.length() > 0 ? repo_name : core::getClassName<FlowFileRepository>(), directory, maxPartitionMillis, maxPartitionBytes, purgePeriod),
         content_repo_(nullptr),
         checkpoint_(nullptr),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/ProvenanceRepository.h
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/ProvenanceRepository.h b/extensions/rocksdb-repos/ProvenanceRepository.h
index d4ff3a5..62438d7 100644
--- a/extensions/rocksdb-repos/ProvenanceRepository.h
+++ b/extensions/rocksdb-repos/ProvenanceRepository.h
@@ -39,7 +39,7 @@ namespace provenance {
 class ProvenanceRepository : public core::Repository, public std::enable_shared_from_this<ProvenanceRepository> {
  public:
 
-  ProvenanceRepository(std::string name, uuid_t uuid)
+  ProvenanceRepository(std::string name, utils::Identifier uuid)
       : ProvenanceRepository(name){
 
   }
@@ -50,7 +50,7 @@ class ProvenanceRepository : public core::Repository, public std::enable_shared_
   ProvenanceRepository(const std::string repo_name = "", std::string directory = PROVENANCE_DIRECTORY, int64_t maxPartitionMillis = MAX_PROVENANCE_ENTRY_LIFE_TIME, int64_t maxPartitionBytes =
   MAX_PROVENANCE_STORAGE_SIZE,
                        uint64_t purgePeriod = PROVENANCE_PURGE_PERIOD)
-      : core::SerializableComponent(repo_name, 0),
+      : core::SerializableComponent(repo_name),
         Repository(repo_name.length() > 0 ? repo_name : core::getClassName<ProvenanceRepository>(), directory, maxPartitionMillis, maxPartitionBytes, purgePeriod),
         logger_(logging::LoggerFactory<ProvenanceRepository>::getLogger()) {
     db_ = NULL;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/RocksDBLoader.h
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/RocksDBLoader.h b/extensions/rocksdb-repos/RocksDBLoader.h
index 4b14def..4d3f30f 100644
--- a/extensions/rocksdb-repos/RocksDBLoader.h
+++ b/extensions/rocksdb-repos/RocksDBLoader.h
@@ -24,7 +24,7 @@
 #include "RocksDbStream.h"
 #include "core/ClassLoader.h"
 
-class __attribute__((visibility("default"))) RocksDBFactory : public core::ObjectFactory {
+class RocksDBFactory : public core::ObjectFactory {
  public:
   RocksDBFactory() {
 
@@ -75,6 +75,6 @@ class __attribute__((visibility("default"))) RocksDBFactory : public core::Objec
 };
 
 extern "C" {
-void *createRocksDBFactory(void);
+DLL_EXPORT void *createRocksDBFactory(void);
 }
 #endif /* EXTENSIONS_ROCKSDBLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/rocksdb-repos/RocksDbStream.h
----------------------------------------------------------------------
diff --git a/extensions/rocksdb-repos/RocksDbStream.h b/extensions/rocksdb-repos/RocksDbStream.h
index e4feb62..6b0df01 100644
--- a/extensions/rocksdb-repos/RocksDbStream.h
+++ b/extensions/rocksdb-repos/RocksDbStream.h
@@ -95,7 +95,7 @@ class RocksDbStream : public io::BaseStream {
     return 4;
   }
   virtual int read(uint64_t &value, bool is_little_endian) {
-    uint8_t buf[0];
+    uint8_t buf[8];
     if (readData(&buf[0], 8) < 0)
       return -1;
     if (is_little_endian) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/script/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/script/CMakeLists.txt b/extensions/script/CMakeLists.txt
index 79137a4..acf98e7 100644
--- a/extensions/script/CMakeLists.txt
+++ b/extensions/script/CMakeLists.txt
@@ -34,10 +34,7 @@ if (ENABLE_LUA_SCRIPTING)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
 endif()
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/) 
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 
 file(GLOB SOURCES  "*.cpp")
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/script/ExecuteScript.h
----------------------------------------------------------------------
diff --git a/extensions/script/ExecuteScript.h b/extensions/script/ExecuteScript.h
index fbfaa63..49b61cd 100644
--- a/extensions/script/ExecuteScript.h
+++ b/extensions/script/ExecuteScript.h
@@ -36,7 +36,7 @@ namespace processors {
 
 class ExecuteScript : public core::Processor {
  public:
-  explicit ExecuteScript(const std::string &name, uuid_t uuid = nullptr)
+  explicit ExecuteScript(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ExecuteScript>::getLogger()),
         script_engine_q_() {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/script/python/PyProcessSession.h
----------------------------------------------------------------------
diff --git a/extensions/script/python/PyProcessSession.h b/extensions/script/python/PyProcessSession.h
index c760acd..9cd0faa 100644
--- a/extensions/script/python/PyProcessSession.h
+++ b/extensions/script/python/PyProcessSession.h
@@ -56,7 +56,7 @@ class PyProcessSession {
    */
   void releaseCoreResources();
 
-  class __attribute__((visibility("default"))) PyInputStreamCallback : public InputStreamCallback {
+  class PyInputStreamCallback : public InputStreamCallback {
    public:
     explicit PyInputStreamCallback(const py::object &input_stream_callback) {
       py_callback_ = input_stream_callback;
@@ -71,7 +71,7 @@ class PyProcessSession {
     py::object py_callback_;
   };
 
-  class __attribute__((visibility("default"))) PyOutputStreamCallback : public OutputStreamCallback {
+  class PyOutputStreamCallback : public OutputStreamCallback {
    public:
     explicit PyOutputStreamCallback(const py::object &output_stream_callback) {
       py_callback_ = output_stream_callback;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/script/python/PythonScriptEngine.h
----------------------------------------------------------------------
diff --git a/extensions/script/python/PythonScriptEngine.h b/extensions/script/python/PythonScriptEngine.h
index 280d20a..58b71c1 100644
--- a/extensions/script/python/PythonScriptEngine.h
+++ b/extensions/script/python/PythonScriptEngine.h
@@ -35,10 +35,10 @@ namespace python {
 
 namespace py = pybind11;
 
-class __attribute__((visibility("default"))) PythonScriptEngine : public script::ScriptEngine {
+class PythonScriptEngine : public script::ScriptEngine {
  public:
   PythonScriptEngine();
-  ~PythonScriptEngine() {
+  virtual ~PythonScriptEngine() {
     py::gil_scoped_acquire gil{};
     (*bindings_).dec_ref();
     (*bindings_).release();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sensors/GetEnvironmentalSensors.h
----------------------------------------------------------------------
diff --git a/extensions/sensors/GetEnvironmentalSensors.h b/extensions/sensors/GetEnvironmentalSensors.h
index f18985a..3515174 100644
--- a/extensions/sensors/GetEnvironmentalSensors.h
+++ b/extensions/sensors/GetEnvironmentalSensors.h
@@ -49,7 +49,7 @@ class GetEnvironmentalSensors : public SensorBase {
   /*!
    * Create a new processor
    */
-  GetEnvironmentalSensors(std::string name, uuid_t uuid = NULL)
+  GetEnvironmentalSensors(std::string name, utils::Identifier uuid = utils::Identifier())
       : SensorBase(name, uuid),
         humidity_sensor_(nullptr),
         pressure_sensor_(nullptr),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sensors/GetMovementSensors.h
----------------------------------------------------------------------
diff --git a/extensions/sensors/GetMovementSensors.h b/extensions/sensors/GetMovementSensors.h
index e1c1f94..4ee3de2 100644
--- a/extensions/sensors/GetMovementSensors.h
+++ b/extensions/sensors/GetMovementSensors.h
@@ -49,7 +49,7 @@ class GetMovementSensors : public SensorBase {
   /*!
    * Create a new processor
    */
-  GetMovementSensors(std::string name, uuid_t uuid = NULL)
+  GetMovementSensors(std::string name, utils::Identifier uuid = utils::Identifier())
       : SensorBase(name, uuid),
         logger_(logging::LoggerFactory<GetMovementSensors>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sensors/SensorBase.h
----------------------------------------------------------------------
diff --git a/extensions/sensors/SensorBase.h b/extensions/sensors/SensorBase.h
index 40990fe..e5c306d 100644
--- a/extensions/sensors/SensorBase.h
+++ b/extensions/sensors/SensorBase.h
@@ -48,7 +48,7 @@ class SensorBase : public core::Processor {
   /*!
    * Create a new processor
    */
-  SensorBase(std::string name, uuid_t uuid = NULL)
+  SensorBase(std::string name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         imu(nullptr),
         logger_(logging::LoggerFactory<SensorBase>::getLogger()) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sensors/SensorLoader.h
----------------------------------------------------------------------
diff --git a/extensions/sensors/SensorLoader.h b/extensions/sensors/SensorLoader.h
index db1d58c..10f5194 100644
--- a/extensions/sensors/SensorLoader.h
+++ b/extensions/sensors/SensorLoader.h
@@ -23,7 +23,7 @@
 #include "GetMovementSensors.h"
 #include "utils/StringUtils.h"
 
-class __attribute__((visibility("default"))) SensorFactory : public core::ObjectFactory {
+class SensorFactory : public core::ObjectFactory {
  public:
   SensorFactory() {
 
@@ -66,6 +66,6 @@ class __attribute__((visibility("default"))) SensorFactory : public core::Object
 ;
 
 extern "C" {
-void *createSensorFactory(void);
+DLL_EXPORT void *createSensorFactory(void);
 }
 #endif /* EXTENSIONS_ROCKSDBLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sqlite/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/sqlite/CMakeLists.txt b/extensions/sqlite/CMakeLists.txt
index 0ebb636..3bef06f 100644
--- a/extensions/sqlite/CMakeLists.txt
+++ b/extensions/sqlite/CMakeLists.txt
@@ -17,12 +17,7 @@
 # under the License.
 #
 
-cmake_minimum_required(VERSION 2.6)
-
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/civetweb-1.9.1/include ../../thirdparty/) 
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
 
 include_directories("${CMAKE_SOURCE_DIR}/thirdparty/sqlite")
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sqlite/ExecuteSQL.h
----------------------------------------------------------------------
diff --git a/extensions/sqlite/ExecuteSQL.h b/extensions/sqlite/ExecuteSQL.h
index 46cff1d..907c682 100644
--- a/extensions/sqlite/ExecuteSQL.h
+++ b/extensions/sqlite/ExecuteSQL.h
@@ -33,7 +33,7 @@ namespace processors {
 
 class ExecuteSQL : public core::Processor {
  public:
-  explicit ExecuteSQL(const std::string &name, uuid_t uuid = nullptr)
+  explicit ExecuteSQL(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ExecuteSQL>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/sqlite/PutSQL.h
----------------------------------------------------------------------
diff --git a/extensions/sqlite/PutSQL.h b/extensions/sqlite/PutSQL.h
index 2bac22d..5e11efe 100644
--- a/extensions/sqlite/PutSQL.h
+++ b/extensions/sqlite/PutSQL.h
@@ -33,7 +33,7 @@ namespace processors {
 
 class PutSQL : public core::Processor {
  public:
-  explicit PutSQL(const std::string &name, uuid_t uuid = nullptr)
+  explicit PutSQL(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<PutSQL>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/tensorflow/TFApplyGraph.h
----------------------------------------------------------------------
diff --git a/extensions/tensorflow/TFApplyGraph.h b/extensions/tensorflow/TFApplyGraph.h
index 105c5c3..7b2f58a 100644
--- a/extensions/tensorflow/TFApplyGraph.h
+++ b/extensions/tensorflow/TFApplyGraph.h
@@ -33,7 +33,7 @@ namespace processors {
 
 class TFApplyGraph : public core::Processor {
  public:
-  explicit TFApplyGraph(const std::string &name, uuid_t uuid = nullptr)
+  explicit TFApplyGraph(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<TFApplyGraph>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/tensorflow/TFConvertImageToTensor.h
----------------------------------------------------------------------
diff --git a/extensions/tensorflow/TFConvertImageToTensor.h b/extensions/tensorflow/TFConvertImageToTensor.h
index b28f620..796903c 100644
--- a/extensions/tensorflow/TFConvertImageToTensor.h
+++ b/extensions/tensorflow/TFConvertImageToTensor.h
@@ -33,7 +33,7 @@ namespace processors {
 
 class TFConvertImageToTensor : public core::Processor {
  public:
-  explicit TFConvertImageToTensor(const std::string &name, uuid_t uuid = nullptr)
+  explicit TFConvertImageToTensor(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<TFConvertImageToTensor>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/tensorflow/TFExtractTopLabels.h
----------------------------------------------------------------------
diff --git a/extensions/tensorflow/TFExtractTopLabels.h b/extensions/tensorflow/TFExtractTopLabels.h
index 58ed57f..ab1ece8 100644
--- a/extensions/tensorflow/TFExtractTopLabels.h
+++ b/extensions/tensorflow/TFExtractTopLabels.h
@@ -33,7 +33,7 @@ namespace processors {
 
 class TFExtractTopLabels : public core::Processor {
  public:
-  explicit TFExtractTopLabels(const std::string &name, uuid_t uuid = nullptr)
+  explicit TFExtractTopLabels(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<TFExtractTopLabels>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/usb-camera/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/usb-camera/CMakeLists.txt b/extensions/usb-camera/CMakeLists.txt
index d807e80..7c1acd1 100644
--- a/extensions/usb-camera/CMakeLists.txt
+++ b/extensions/usb-camera/CMakeLists.txt
@@ -17,8 +17,7 @@
 # under the License.
 #
 
-set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
-set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
 
 find_package(PkgConfig)
 pkg_check_modules(LIBUSB libusb-1.0)
@@ -44,7 +43,6 @@ if (NOT PNG_FOUND)
     message(FATAL_ERROR "A compatible PNG library is required to build GetUSBCamera.")
 endif()
 
-include_directories(../../libminifi/include  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ${CIVET_THIRDPARTY_ROOT}/include ../../thirdparty/) 
 
 include_directories(../../thirdparty/libuvc-0.0.6/include)
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/usb-camera/GetUSBCamera.h
----------------------------------------------------------------------
diff --git a/extensions/usb-camera/GetUSBCamera.h b/extensions/usb-camera/GetUSBCamera.h
index 4c1c572..edfbe5f 100644
--- a/extensions/usb-camera/GetUSBCamera.h
+++ b/extensions/usb-camera/GetUSBCamera.h
@@ -41,7 +41,7 @@ namespace processors {
 
 class GetUSBCamera : public core::Processor {
  public:
-  explicit GetUSBCamera(const std::string &name, uuid_t uuid = nullptr)
+  explicit GetUSBCamera(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<GetUSBCamera>::getLogger()) {
     png_write_mtx_ = std::make_shared<std::mutex>();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/windows-event-log/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/windows-event-log/CMakeLists.txt b/extensions/windows-event-log/CMakeLists.txt
new file mode 100644
index 0000000..5e0545e
--- /dev/null
+++ b/extensions/windows-event-log/CMakeLists.txt
@@ -0,0 +1,60 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
+
+file(GLOB SOURCES  "*.cpp")
+
+add_library(minifi-wel STATIC ${SOURCES})
+set_property(TARGET minifi-wel PROPERTY POSITION_INDEPENDENT_CODE ON)
+if(THREADS_HAVE_PTHREAD_ARG)
+  target_compile_options(PUBLIC minifi-wel "-pthread")
+endif()
+if(CMAKE_THREAD_LIBS_INIT)
+  target_link_libraries(minifi-wel "${CMAKE_THREAD_LIBS_INIT}")
+endif()
+
+
+# Include UUID
+find_package(UUID REQUIRED)
+target_link_libraries(minifi-wel ${LIBMINIFI} ${UUID_LIBRARIES})
+find_package(OpenSSL REQUIRED)
+include_directories(${OPENSSL_INCLUDE_DIR})
+target_link_libraries(minifi-wel ${CMAKE_DL_LIBS} )
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIRS})
+target_link_libraries (minifi-wel ${ZLIB_LIBRARIES})
+if (WIN32)
+    set_target_properties(minifi-wel PROPERTIES
+        LINK_FLAGS "/WHOLEARCHIVE"
+    )
+elseif (APPLE)
+    set_target_properties(minifi-wel PROPERTIES
+        LINK_FLAGS "-Wl,-all_load"
+    )
+else ()
+    set_target_properties(minifi-wel PROPERTIES
+        LINK_FLAGS "-Wl,--whole-archive"
+    )
+endif ()
+
+
+SET (WEL-EXTENSION minifi-wel PARENT_SCOPE)
+
+register_extension(minifi-wel)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/windows-event-log/TailEventLog.cpp
----------------------------------------------------------------------
diff --git a/extensions/windows-event-log/TailEventLog.cpp b/extensions/windows-event-log/TailEventLog.cpp
new file mode 100644
index 0000000..f7ac3bc
--- /dev/null
+++ b/extensions/windows-event-log/TailEventLog.cpp
@@ -0,0 +1,144 @@
+/**
+ * @file TailEventLog.cpp
+ * TailEventLog class implementation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "TailEventLog.h"
+#include <vector>
+#include <queue>
+#include <map>
+#include <set>
+#include <sstream>
+#include <stdio.h>
+#include <string>
+#include <iostream>
+
+#include "io/DataStream.h"
+#include "core/ProcessContext.h"
+#include "core/ProcessSession.h"
+
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace processors {
+
+const std::string TailEventLog::ProcessorName("TailEventLog");
+core::Relationship TailEventLog::Success("success", "All files, containing log events, are routed to success");
+core::Property TailEventLog::LogSourceFileName("Log Source", "Log Source from which to read events", "");
+core::Property TailEventLog::MaxEventsPerFlowFile("Max Events Per FlowFile", "Events per flow file", "1");
+void TailEventLog::initialize() {
+  //! Set the supported properties
+  std::set<core::Property> properties;
+  properties.insert(LogSourceFileName);
+  properties.insert(MaxEventsPerFlowFile);
+  setSupportedProperties(properties);
+  //! Set the supported relationships
+  std::set<core::Relationship> relationships;
+  relationships.insert(Success);
+  setSupportedRelationships(relationships);
+}
+
+void TailEventLog::onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) {
+  std::string value;
+
+  if (context->getProperty(LogSourceFileName.getName(), value)) {
+    log_source_ = value;
+  }
+  if (context->getProperty(MaxEventsPerFlowFile.getName(), value)) {
+    core::Property::StringToInt(value, max_events_);
+  }
+
+  log_handle_ = OpenEventLog(NULL, log_source_.c_str());
+
+  logger_->log_trace("TailEventLog configured to tail %s",log_source_);
+
+}
+
+void TailEventLog::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
+  
+	if (log_handle_ == nullptr) {
+		logger_->log_debug("Handle could not be created for %s", log_source_);
+	}
+
+	BYTE buffer[MAX_RECORD_BUFFER_SIZE];
+
+	EVENTLOGRECORD *event_record = (EVENTLOGRECORD*)&buffer;
+
+	DWORD bytes_to_read = 0, min_bytes = 0;
+	
+	GetOldestEventLogRecord(log_handle_, &current_record_);
+	GetNumberOfEventLogRecords(log_handle_, &num_records_);
+	current_record_ = num_records_-max_events_;
+	
+	logger_->log_trace("%d and %d", current_record_, num_records_);
+
+	if (ReadEventLog(log_handle_,EVENTLOG_FORWARDS_READ | EVENTLOG_SEEK_READ, current_record_, event_record,MAX_RECORD_BUFFER_SIZE, &bytes_to_read,&min_bytes))
+	{
+		if (bytes_to_read == 0) {
+			logger_->log_debug("Yielding");
+			context->yield();
+		}
+		while (bytes_to_read > 0)
+		{
+
+			std::shared_ptr<FlowFileRecord> flowFile = std::static_pointer_cast<FlowFileRecord>(session->create());
+			if (flowFile == nullptr)
+				return;
+
+			LPSTR source =
+				(LPSTR)((LPBYTE)event_record + sizeof(EVENTLOGRECORD));
+
+			LPSTR computer_name =
+				(LPSTR)((LPBYTE)event_record + sizeof(EVENTLOGRECORD) +
+					strlen(source) + 1);
+
+			flowFile->addAttribute("source", source);
+			flowFile->addAttribute("record_number", std::to_string( event_record->RecordNumber));
+			flowFile->addAttribute("computer_name", computer_name);
+			
+			flowFile->addAttribute("event_time", getTimeStamp(event_record->TimeGenerated));
+			flowFile->addAttribute("event_type", typeToString(event_record->EventType));
+			//flowFile->addAttribute("", event_message);
+
+			
+			io::DataStream stream((const uint8_t*)(event_record + event_record->DataOffset), event_record->DataLength);
+			// need an import from the data stream.
+			session->importFrom(stream, flowFile);
+			session->transfer(flowFile, Success);
+			bytes_to_read -= event_record->Length;
+			event_record = (EVENTLOGRECORD *)
+				((LPBYTE)event_record + event_record->Length);
+		}
+
+		event_record = (EVENTLOGRECORD *)&buffer;
+		logger_->log_trace("All done no more");
+	}
+	else {
+		LogWindowsError();
+		logger_->log_trace("Yielding due to error");
+		context->yield();
+	}
+
+}
+} /* namespace processors */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/extensions/windows-event-log/TailEventLog.h
----------------------------------------------------------------------
diff --git a/extensions/windows-event-log/TailEventLog.h b/extensions/windows-event-log/TailEventLog.h
new file mode 100644
index 0000000..8f5828e
--- /dev/null
+++ b/extensions/windows-event-log/TailEventLog.h
@@ -0,0 +1,165 @@
+/**
+ * @file TailEventLog.h
+ * TailEventLog class declaration
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef TAIL_EVENT_LOG_H_
+#define TAIL_EVENT_LOG_H_
+
+#include "core/Core.h"
+#include "FlowFileRecord.h"
+#include "core/Processor.h"
+#include "core/ProcessSession.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace processors {
+
+#define MAX_RECORD_BUFFER_SIZE 0x10000 // 64k
+const LPWSTR pEventTypeNames[] = { L"Error", L"Warning", L"Informational", L"Audit Success", L"Audit Failure" };
+char log_name[255] = "Application";
+
+//! TailEventLog Class
+class TailEventLog : public core::Processor
+{
+public:
+	//! Constructor
+	/*!
+	 * Create a new processor
+	 */
+	TailEventLog(std::string name, utils::Identifier uuid = utils::Identifier())
+	: core::Processor(name, uuid), logger_(logging::LoggerFactory<TailEventLog>::getLogger()),max_events_(1){
+	}
+	//! Destructor
+	virtual ~TailEventLog()
+	{
+	}
+	//! Processor Name
+	static const std::string ProcessorName;
+	//! Supported Properties
+	static core::Property LogSourceFileName;
+	static core::Property MaxEventsPerFlowFile;
+
+	//! Supported Relationships
+	static core::Relationship Success;
+
+public:
+  /**
+   * Function that's executed when the processor is scheduled.
+   * @param context process context.
+   * @param sessionFactory process session factory that is used when creating
+   * ProcessSession objects.
+   */
+  void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;
+	//! OnTrigger method, implemented by NiFi TailEventLog
+	virtual void onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) override;
+	//! Initialize, over write by NiFi TailEventLog
+	virtual void initialize(void) override;
+
+protected:
+
+	virtual void notifyStop() override{
+		CloseEventLog(log_handle_);
+	}
+
+
+	inline std::string typeToString(WORD wEventType)
+	{
+		switch (wEventType)
+		{
+		case EVENTLOG_ERROR_TYPE:
+			return "Error";
+		case EVENTLOG_WARNING_TYPE:
+			return "Warning";
+		case EVENTLOG_INFORMATION_TYPE:
+			return "Information";
+		case EVENTLOG_AUDIT_SUCCESS:
+			return "Audit Success";
+		case EVENTLOG_AUDIT_FAILURE:
+			return "Audit Failure";
+		default:
+			return "Unknown Event";
+		}
+	}
+
+	std::string getTimeStamp(const DWORD Time)
+	{
+		uint64_t ullTimeStamp = 0;
+		uint64_t SecsTo1970 = 116444736000000000;
+		SYSTEMTIME st;
+		FILETIME ft, ftLocal;
+
+		ullTimeStamp = Int32x32To64(Time, 10000000) + SecsTo1970;
+		ft.dwHighDateTime = (DWORD)((ullTimeStamp >> 32) & 0xFFFFFFFF);
+		ft.dwLowDateTime = (DWORD)(ullTimeStamp & 0xFFFFFFFF);
+
+		FileTimeToLocalFileTime(&ft, &ftLocal);
+		FileTimeToSystemTime(&ftLocal, &st);
+
+		std::stringstream  str;
+		str.precision(2);
+		str << st.wMonth << "/" << st.wDay << "/" << st.wYear << " " << st.wHour << ":" << st.wMinute << ":" << st.wSecond;
+
+		return str.str();
+	}
+
+
+	/**
+
+	*/
+	void LogWindowsError(void)
+	{
+		auto error_id = GetLastError();
+		LPVOID lpMsg;
+
+		FormatMessage(
+			FORMAT_MESSAGE_ALLOCATE_BUFFER |
+			FORMAT_MESSAGE_FROM_SYSTEM,
+			NULL,
+			error_id,
+			MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+			(LPTSTR)&lpMsg,
+			0, NULL);
+
+		logger_->log_debug("Error %d: %s\n", (int)error_id, (char *)lpMsg);
+
+	}
+
+
+
+private:
+  std::mutex log_mutex_;
+  std::string log_source_;
+  uint32_t max_events_;
+  DWORD current_record_;
+  DWORD num_records_;
+
+  HANDLE log_handle_;
+  // Logger
+  std::shared_ptr<logging::Logger> logger_;
+};
+REGISTER_RESOURCE(TailEventLog);
+
+} /* namespace processors */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */
+
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/generateVersion.bat
----------------------------------------------------------------------
diff --git a/generateVersion.bat b/generateVersion.bat
new file mode 100644
index 0000000..a1a3ad5
--- /dev/null
+++ b/generateVersion.bat
@@ -0,0 +1,106 @@
+@echo off &setlocal enabledelayedexpansion
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+set version=%1
+set version=%version:"=%
+set src_dir=%2
+set src_dir=%src_dir:"=%
+set out_dir=%3
+set out_dir=%out_dir:"=%
+set compiler=%4
+set compiler=%compiler:"=%
+set compiler_version=%5
+set compiler_version=%compiler_version:"=%
+set flags=%6
+set flags=%flags:"=%
+set extensions=%7
+set extensions=%extensions:"=%
+set extensions=%extensions:\=%
+set buildident=%8
+set buildident=%buildident:"=%
+set buildrev=%9
+set buildrev=%buildrev:"=%
+
+
+call :GetUnixTime builddate
+
+
+set /a count=0
+for %%i in (%extensions%) do (
+    set /a count+=1
+    set "extension!count!=%%i"
+)
+
+(
+	echo #ifndef AGENT_BUILD_H
+	echo #define AGENT_BUILD_H
+
+	echo #include ^<vector^>
+
+	echo namespace org {
+	echo namespace apache {
+	echo namespace nifi {
+	echo namespace minifi {
+
+	echo class AgentBuild {
+	echo public:
+	echo static constexpr const char* VERSION = "%version%";
+	echo static constexpr const char* BUILD_IDENTIFIER = "%buildident%";
+	echo   static constexpr const char* BUILD_REV = "%buildrev%";
+	echo   static constexpr const char* BUILD_DATE = "%builddate%";
+	echo   static constexpr const char* COMPILER = "%compiler%";
+	echo   static constexpr const char* COMPILER_VERSION = "%compiler_version%";
+	echo   static constexpr const char* COMPILER_FLAGS = "%flags%";
+	echo   static std^:^:vector^<std^:^:string^> getExtensions^(^) {
+  	echo 	static std^:^:vector^<std^:^:string^> extensions;
+  	echo 	if ^(extensions.empty^(^)^){
+	) > "%out_dir%/agent_version.h"
+
+	for /l %%i in (1,1,%count%) do (
+	   (
+				echo extensions.push_back^("!extension%%i!"^);
+		)>> "%out_dir%/agent_version.h"
+	)
+
+	
+(
+	echo 	  extensions.push_back^("minifi-system"^);
+	echo 	}
+  	echo 	return extensions;
+	echo   }
+	echo };
+
+	echo } /* namespace minifi */
+	echo } /* namespace nifi */
+	echo } /* namespace apache */
+	echo } /* namespace org */
+
+	echo #endif /* AGENT_BUILD_H */
+) >> "%out_dir%/agent_version.h"
+
+ goto :EOF
+
+ rem see license regarding the following snippet of code taken from 
+ rem https://github.com/ritchielawrence/batchfunctionlibrary
+
+:GetUnixTime
+setlocal enableextensions
+for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do (
+    set %%x)
+set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z
+set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469
+set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100
+endlocal & set "%1=%ut%" & goto :EOF

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/libminifi/CMakeLists.txt b/libminifi/CMakeLists.txt
index 54a9801..46f276e 100644
--- a/libminifi/CMakeLists.txt
+++ b/libminifi/CMakeLists.txt
@@ -31,20 +31,34 @@ set(PROJECT_VERSION_PATCH 0)
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
+if (WIN32)
+	add_definitions(-DWIN32_LEAN_AND_MEAN)
+	include_directories("thirdparty/uuid/include/win32/")
+else()
+	include_directories("thirdparty/uuid/include/posix")
+endif()
 IF (IOS)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-abi-version=2 -fobjc-arc -std=gnu++11 -stdlib=libc++ -isysroot ${CMAKE_OSX_SYSROOT} -DIOS")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-abi-version=2 -fobjc-arc -isysroot ${CMAKE_OSX_SYSROOT} -DIOS")
 ELSE ()
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENSSL_SUPPORT -DYAML_SUPPORT")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL_SUPPORT -DYAML_SUPPORT")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBDIFF")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBDIFF")
-include_directories("../thirdparty/bsdiff/")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYAML_SUPPORT")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DYAML_SUPPORT")
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBDIFF")
+#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBDIFF")
+#include_directories("../thirdparty/bsdiff/")
 
 ENDIF()
 
 
 include(CheckCXXCompilerFlag)
+if (WIN32)
+  if ((MSVC_VERSION GREATER "1900") OR (MSVC_VERSION EQUAL "1900"))
+	    CHECK_CXX_COMPILER_FLAG("/std:c++14" _cpp_latest_flag_supported)
+	    if (_cpp_latest_flag_supported)
+	        add_compile_options("/std:c++14")
+	    endif()
+	endif()
+else()
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
 CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 if(COMPILER_SUPPORTS_CXX11)
@@ -55,7 +69,13 @@ else()
  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
 endif()
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-reorder")
+endif()
+
+if (WIN32)
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
+else()
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-reorder")
+endif()
 
 include_directories(../thirdparty/spdlog-20170710/include)
 include_directories(../thirdparty/yaml-cpp-yaml-cpp-20171024/include)
@@ -64,7 +84,20 @@ include_directories(../thirdparty/rapidjson-1.1.0/include)
 include_directories(../thirdparty/concurrentqueue/)
 include_directories(include)
 
-file(GLOB SOURCES  "src/sitetosite/*.cpp"  "src/core/logging/*.cpp"  "src/core/state/*.cpp" "src/core/state/nodes/*.cpp" "src/c2/protocols/*.cpp" "src/c2/*.cpp" "src/io/*.cpp" "src/io/tls/*.cpp" "src/core/controller/*.cpp" "src/controllers/*.cpp" "src/core/*.cpp"  "src/core/repository/*.cpp" "src/core/yaml/*.cpp" "src/core/reporting/*.cpp"  "src/provenance/*.cpp" "src/utils/*.cpp" "src/*.cpp")
+
+if(WIN32)
+include_directories(opsys/win)
+set(SOCKET_SOURCES "src/io/win/*.cpp")
+else()
+include_directories(opsys/posix)
+set(SOCKET_SOURCES "src/io/posix/*.cpp")
+endif()
+
+find_package(OpenSSL)
+if (OPENSSL_FOUND)
+	set(TLS_SOURCES "src/io/tls/*.cpp")
+endif(OPENSSL_FOUND)
+file(GLOB SOURCES  "src/sitetosite/*.cpp"  "src/core/logging/*.cpp"  "src/core/state/*.cpp" "src/core/state/nodes/*.cpp" "src/c2/protocols/*.cpp" "src/c2/*.cpp" "src/io/*.cpp" ${SOCKET_SOURCES} ${TLS_SOURCES} "src/core/controller/*.cpp" "src/controllers/*.cpp" "src/core/*.cpp"  "src/core/repository/*.cpp" "src/core/yaml/*.cpp" "src/core/reporting/*.cpp"  "src/provenance/*.cpp" "src/utils/*.cpp" "src/*.cpp")
 
 file(GLOB PROCESSOR_SOURCES  "src/processors/*.cpp" )
 
@@ -78,31 +111,34 @@ add_library(spdlog STATIC ${SPD_SOURCES})
 add_library(core-minifi STATIC ${SOURCES})
 target_link_libraries(core-minifi ${CMAKE_DL_LIBS} ${UUID_LIBRARIES} yaml-cpp)
 
-target_link_libraries(core-minifi  PRIVATE bsdiff )
+#target_link_libraries(core-minifi  PRIVATE bsdiff )
 
 find_package(ZLIB REQUIRED)
 include_directories(${ZLIB_INCLUDE_DIRS})
 
 target_link_libraries(core-minifi minifi-expression-language-extensions)
 target_link_libraries (core-minifi ${ZLIB_LIBRARIES})
-
+set_target_properties(core-minifi PROPERTIES LINK_FLAGS "/WHOLEARCHIVE")
 
 
 
 # Include OpenSSL
-find_package (OpenSSL REQUIRED)
+
 if (OPENSSL_FOUND)
 	include_directories(${OPENSSL_INCLUDE_DIR})
 	target_link_libraries (core-minifi ${OPENSSL_LIBRARIES})
-else ()
-    message( FATAL_ERROR "OpenSSL was not found. Please install OpenSSL" )
 endif (OPENSSL_FOUND)
 
 add_library(minifi STATIC ${PROCESSOR_SOURCES})
 add_library(capi STATIC ${CAPI_SOURCES})
 
+
 target_link_libraries(minifi core-minifi)
+if (WIN32)
+set_target_properties(minifi PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+set_target_properties(minifi PROPERTIES LINK_FLAGS "${LINK_FLAGS} /WHOLEARCHIVE:core-minifi")
+endif()
 
 
 
-SET (LIBMINIFI core-minifi PARENT_SCOPE)
+SET (LIBMINIFI core-minifi PARENT_SCOPE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/Connection.h
----------------------------------------------------------------------
diff --git a/libminifi/include/Connection.h b/libminifi/include/Connection.h
index e88b071..046c0d2 100644
--- a/libminifi/include/Connection.h
+++ b/libminifi/include/Connection.h
@@ -47,28 +47,31 @@ class Connection : public core::Connectable, public std::enable_shared_from_this
   /*
    * Create a new processor
    */
-  explicit Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, uuid_t uuid = NULL, uuid_t srcUUID =
-  NULL,
-                      uuid_t destUUID = NULL);
+  explicit Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name);
+  explicit Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid);
+  explicit Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid,
+                        utils::Identifier & srcUUID);
+  explicit Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid,
+                      utils::Identifier & srcUUID, utils::Identifier & destUUID);
   // Destructor
   virtual ~Connection() {
   }
 
   // Set Source Processor UUID
-  void setSourceUUID(uuid_t uuid) {
-    uuid_copy(src_uuid_, uuid);
+  void setSourceUUID(utils::Identifier &uuid) {
+    src_uuid_ = uuid;
   }
   // Set Destination Processor UUID
-  void setDestinationUUID(uuid_t uuid) {
-    uuid_copy(dest_uuid_, uuid);
+  void setDestinationUUID(utils::Identifier &uuid) {
+    dest_uuid_ = uuid;
   }
   // Get Source Processor UUID
-  void getSourceUUID(uuid_t uuid) {
-    uuid_copy(uuid, src_uuid_);
+  void getSourceUUID(utils::Identifier &uuid) {
+    uuid = src_uuid_;
   }
   // Get Destination Processor UUID
-  void getDestinationUUID(uuid_t uuid) {
-    uuid_copy(uuid, dest_uuid_);
+  void getDestinationUUID(utils::Identifier &uuid) {
+    uuid = dest_uuid_;
   }
 
   // Set Connection Source Processor
@@ -159,9 +162,9 @@ class Connection : public core::Connectable, public std::enable_shared_from_this
 
  protected:
   // Source Processor UUID
-  uuid_t src_uuid_;
+  utils::Identifier src_uuid_;
   // Destination Processor UUID
-  uuid_t dest_uuid_;
+  utils::Identifier dest_uuid_;
   // Relationship for this connection
   core::Relationship relationship_;
   // Source Processor (ProcessNode/Port)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/FlowControlProtocol.h
----------------------------------------------------------------------
diff --git a/libminifi/include/FlowControlProtocol.h b/libminifi/include/FlowControlProtocol.h
index 72da2d3..b453eb1 100644
--- a/libminifi/include/FlowControlProtocol.h
+++ b/libminifi/include/FlowControlProtocol.h
@@ -21,13 +21,9 @@
 #define __FLOW_CONTROL_PROTOCOL_H__
 
 #include <stdio.h>
-#include <unistd.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+
 #include <fcntl.h>
-#include <netdb.h>
 #include <string>
 #include <errno.h>
 #include <chrono>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/RemoteProcessorGroupPort.h
----------------------------------------------------------------------
diff --git a/libminifi/include/RemoteProcessorGroupPort.h b/libminifi/include/RemoteProcessorGroupPort.h
index 11b598d..1b81f04 100644
--- a/libminifi/include/RemoteProcessorGroupPort.h
+++ b/libminifi/include/RemoteProcessorGroupPort.h
@@ -78,7 +78,7 @@ class RemoteProcessorGroupPort : public core::Processor {
   /*!
    * Create a new processor
    */
-  RemoteProcessorGroupPort(const std::shared_ptr<io::StreamFactory> &stream_factory, std::string name, std::string url, const std::shared_ptr<Configure> &configure, uuid_t uuid = nullptr)
+  RemoteProcessorGroupPort(const std::shared_ptr<io::StreamFactory> &stream_factory, std::string name, std::string url, const std::shared_ptr<Configure> &configure, utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         configure_(configure),
         direction_(sitetosite::SEND),
@@ -90,9 +90,7 @@ class RemoteProcessorGroupPort : public core::Processor {
         logger_(logging::LoggerFactory<RemoteProcessorGroupPort>::getLogger()) {
     client_type_ = sitetosite::CLIENT_TYPE::RAW;
     stream_factory_ = stream_factory;
-    if (uuid != nullptr) {
-      uuid_copy(protocol_uuid_, uuid);
-    }
+    protocol_uuid_ = uuid;
     site2site_secure_ = false;
     peer_index_ = -1;
     // REST API port and host
@@ -134,8 +132,8 @@ class RemoteProcessorGroupPort : public core::Processor {
     transmitting_ = val;
   }
   // setInterface
-  void setInterface(const std::string &interface) {
-    local_network_interface_ = interface;
+  void setInterface(const std::string &ifc) {
+    local_network_interface_ = ifc;
   }
   std::string getInterface() {
     return local_network_interface_;
@@ -211,7 +209,7 @@ class RemoteProcessorGroupPort : public core::Processor {
   // local network interface
   std::string local_network_interface_;
 
-  uuid_t protocol_uuid_;
+  utils::Identifier protocol_uuid_;
 
   // rest API end point info
   std::vector<struct RPG> nifi_instances_;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/agent/build_description.h
----------------------------------------------------------------------
diff --git a/libminifi/include/agent/build_description.h b/libminifi/include/agent/build_description.h
index 3e56d73..74c68a6 100644
--- a/libminifi/include/agent/build_description.h
+++ b/libminifi/include/agent/build_description.h
@@ -64,8 +64,12 @@ class BuildDescription {
 
   static struct Components getClassDescriptions(const std::string group = "minifi-system") {
     static std::map<std::string, struct Components> class_mappings;
-    if (UNLIKELY(IsNullOrEmpty(class_mappings[group].processors_) && IsNullOrEmpty(class_mappings[group].processors_))) {
-      for (const auto clazz : core::ClassLoader::getDefaultClassLoader().getClasses(group)) {
+#ifndef WIN32
+	if (UNLIKELY(IsNullOrEmpty(class_mappings[group].processors_) && IsNullOrEmpty(class_mappings[group].processors_))) {
+#else
+	if (!class_mappings[group].processors_.empty()) {
+#endif
+      for (auto clazz : core::ClassLoader::getDefaultClassLoader().getClasses(group)) {
         std::string class_name = clazz;
         auto lastOfIdx = clazz.find_last_of("::");
         if (lastOfIdx != std::string::npos) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/c2/C2Protocol.h
----------------------------------------------------------------------
diff --git a/libminifi/include/c2/C2Protocol.h b/libminifi/include/c2/C2Protocol.h
index 683a486..71cdd17 100644
--- a/libminifi/include/c2/C2Protocol.h
+++ b/libminifi/include/c2/C2Protocol.h
@@ -34,7 +34,7 @@ namespace c2 {
 class C2Protocol : public core::Connectable {
  public:
 
-  C2Protocol(std::string name, uuid_t uuid)
+  C2Protocol(std::string name, utils::Identifier &uuid)
       : core::Connectable(name, uuid),
         running_(true) {
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/c2/ControllerSocketProtocol.h
----------------------------------------------------------------------
diff --git a/libminifi/include/c2/ControllerSocketProtocol.h b/libminifi/include/c2/ControllerSocketProtocol.h
index e437cc4..4481409 100644
--- a/libminifi/include/c2/ControllerSocketProtocol.h
+++ b/libminifi/include/c2/ControllerSocketProtocol.h
@@ -36,7 +36,7 @@ namespace c2 {
 class ControllerSocketProtocol : public HeartBeatReporter {
  public:
 
-  ControllerSocketProtocol(std::string name, uuid_t uuid = nullptr)
+  ControllerSocketProtocol(std::string name, utils::Identifier uuid = utils::Identifier())
       : HeartBeatReporter(name, uuid),
         logger_(logging::LoggerFactory<ControllerSocketProtocol>::getLogger()) {
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/c2/HeartBeatReporter.h
----------------------------------------------------------------------
diff --git a/libminifi/include/c2/HeartBeatReporter.h b/libminifi/include/c2/HeartBeatReporter.h
index 81f8828..7062d14 100644
--- a/libminifi/include/c2/HeartBeatReporter.h
+++ b/libminifi/include/c2/HeartBeatReporter.h
@@ -36,7 +36,7 @@ namespace c2 {
 class HeartBeatReporter : public core::Connectable {
  public:
 
-  HeartBeatReporter(std::string name, uuid_t uuid)
+  HeartBeatReporter(std::string name, utils::Identifier & uuid)
       : core::Connectable(name, uuid),
         controller_(nullptr),
         update_sink_(nullptr),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/capi/Instance.h
----------------------------------------------------------------------
diff --git a/libminifi/include/capi/Instance.h b/libminifi/include/capi/Instance.h
index 29e0fcb..982f6d4 100644
--- a/libminifi/include/capi/Instance.h
+++ b/libminifi/include/capi/Instance.h
@@ -73,8 +73,8 @@ class Instance {
         no_op_repo_(std::make_shared<minifi::core::Repository>()) {
     running_ = false;
     stream_factory_ = minifi::io::StreamFactory::getInstance(configure_);
-    uuid_t uuid;
-    uuid_parse(port.c_str(), uuid);
+    utils::Identifier uuid;
+    uuid = port;
     rpg_ = std::make_shared<minifi::RemoteProcessorGroupPort>(stream_factory_, url, url, configure_, uuid);
     proc_node_ = std::make_shared<core::ProcessorNode>(rpg_);
     core::FlowConfiguration::initialize_static_functions();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/capi/Plan.h
----------------------------------------------------------------------
diff --git a/libminifi/include/capi/Plan.h b/libminifi/include/capi/Plan.h
index 8687168..dbbaca0 100644
--- a/libminifi/include/capi/Plan.h
+++ b/libminifi/include/capi/Plan.h
@@ -18,7 +18,9 @@
 
 #ifndef LIBMINIFI_CAPI_PLAN_H_
 #define LIBMINIFI_CAPI_PLAN_H_
-#include <dirent.h>
+#ifndef WIN32
+	#include <dirent.h>
+#endif
 #include <cstdio>
 #include <cstdlib>
 #include <sstream>
@@ -111,6 +113,7 @@ class ExecutionPlan {
 
  private:
 
+  static std::shared_ptr<utils::IdGenerator> id_generator_;
   std::shared_ptr<logging::Logger> logger_;
 };
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/controllers/LinuxPowerManagementService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/controllers/LinuxPowerManagementService.h b/libminifi/include/controllers/LinuxPowerManagementService.h
index 2b8bf0d..4800161 100644
--- a/libminifi/include/controllers/LinuxPowerManagementService.h
+++ b/libminifi/include/controllers/LinuxPowerManagementService.h
@@ -50,7 +50,7 @@ class LinuxPowerManagerService : public ThreadManagementService {
         logger_(logging::LoggerFactory<LinuxPowerManagerService>::getLogger()) {
   }
 
-  explicit LinuxPowerManagerService(const std::string &name, uuid_t uuid = 0)
+  explicit LinuxPowerManagerService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ThreadManagementService(name, uuid),
         enabled_(false),
         battery_level_(0),
@@ -62,7 +62,7 @@ class LinuxPowerManagerService : public ThreadManagementService {
   }
 
   explicit LinuxPowerManagerService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : LinuxPowerManagerService(name, nullptr) {
+      : LinuxPowerManagerService(name) {
     setConfiguration(configuration);
     initialize();
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/controllers/NetworkPrioritizerService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/controllers/NetworkPrioritizerService.h b/libminifi/include/controllers/NetworkPrioritizerService.h
index 7821f26..4a09fff 100644
--- a/libminifi/include/controllers/NetworkPrioritizerService.h
+++ b/libminifi/include/controllers/NetworkPrioritizerService.h
@@ -44,8 +44,8 @@ class NetworkPrioritizerService : public core::controller::ControllerService, pu
   explicit NetworkPrioritizerService(const std::string &name, const std::string &id)
       : ControllerService(name, id),
         enabled_(false),
-        max_throughput_(std::numeric_limits<uint64_t>::max()),
-        max_payload_(std::numeric_limits<uint64_t>::max()),
+        max_throughput_((std::numeric_limits<uint64_t>::max)()),
+        max_payload_((std::numeric_limits<uint64_t>::max)()),
         tokens_per_ms(2),
         tokens_(1000),
         timestamp_(0),
@@ -54,11 +54,11 @@ class NetworkPrioritizerService : public core::controller::ControllerService, pu
         logger_(logging::LoggerFactory<NetworkPrioritizerService>::getLogger()) {
   }
 
-  explicit NetworkPrioritizerService(const std::string &name, uuid_t uuid = 0)
+  explicit NetworkPrioritizerService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ControllerService(name, uuid),
         enabled_(false),
-        max_throughput_(std::numeric_limits<uint64_t>::max()),
-        max_payload_(std::numeric_limits<uint64_t>::max()),
+        max_throughput_((std::numeric_limits<uint64_t>::max)()),
+        max_payload_((std::numeric_limits<uint64_t>::max)()),
         tokens_per_ms(2),
         tokens_(1000),
         timestamp_(0),
@@ -68,7 +68,7 @@ class NetworkPrioritizerService : public core::controller::ControllerService, pu
   }
 
   explicit NetworkPrioritizerService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : NetworkPrioritizerService(name, nullptr) {
+      : NetworkPrioritizerService(name) {
     setConfiguration(configuration);
     initialize();
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/controllers/SSLContextService.h
----------------------------------------------------------------------
diff --git a/libminifi/include/controllers/SSLContextService.h b/libminifi/include/controllers/SSLContextService.h
index 9ceb10c..4fa24c7 100644
--- a/libminifi/include/controllers/SSLContextService.h
+++ b/libminifi/include/controllers/SSLContextService.h
@@ -17,9 +17,11 @@
  */
 #ifndef LIBMINIFI_INCLUDE_CONTROLLERS_SSLCONTEXTSERVICE_H_
 #define LIBMINIFI_INCLUDE_CONTROLLERS_SSLCONTEXTSERVICE_H_
-
+#define WIN32_LEAN_AND_MEAN 1
+#ifdef OPENSSL_SUPPORT
 #include <openssl/err.h>
 #include <openssl/ssl.h>
+#endif
 #include <iostream>
 #include <memory>
 #include "core/Resource.h"
@@ -36,17 +38,27 @@ namespace controllers {
 
 class SSLContext {
  public:
+#ifdef OPENSSL_SUPPORT
   SSLContext(SSL_CTX *context)
       : context_(context) {
 
   }
+#else
+	 SSLContext(void *context) {
+
+	 }
+#endif
   ~SSLContext() {
+#ifdef OPENSSL_SUPPORT
     if (context_) {
       SSL_CTX_free(context_);
     }
+#endif
   }
  protected:
+#ifdef OPENSSL_SUPPORT
   SSL_CTX *context_;
+#endif
 };
 
 /**
@@ -66,7 +78,7 @@ class SSLContextService : public core::controller::ControllerService {
         logger_(logging::LoggerFactory<SSLContextService>::getLogger()) {
   }
 
-  explicit SSLContextService(const std::string &name, uuid_t uuid = 0)
+  explicit SSLContextService(const std::string &name, utils::Identifier uuid = utils::Identifier())
       : ControllerService(name, uuid),
         initialized_(false),
         valid_(false),
@@ -74,7 +86,7 @@ class SSLContextService : public core::controller::ControllerService {
   }
 
   explicit SSLContextService(const std::string &name, const std::shared_ptr<Configure> &configuration)
-      : ControllerService(name, nullptr),
+      : ControllerService(name),
         initialized_(false),
         valid_(false),
         logger_(logging::LoggerFactory<SSLContextService>::getLogger()) {
@@ -130,6 +142,7 @@ class SSLContextService : public core::controller::ControllerService {
     return false;
   }
 
+#ifdef OPENSSL_SUPPORT
   bool configure_ssl_context(SSL_CTX *ctx) {
     if (!IsNullOrEmpty(certificate)) {
       if (SSL_CTX_use_certificate_file(ctx, certificate.c_str(), SSL_FILETYPE_PEM) <= 0) {
@@ -165,6 +178,7 @@ class SSLContextService : public core::controller::ControllerService {
 
     return true;
   }
+#endif
 
   virtual void onEnable();
 
@@ -205,5 +219,4 @@ REGISTER_RESOURCE(SSLContextService);
 } /* namespace nifi */
 } /* namespace apache */
 } /* namespace org */
-
 #endif /* LIBMINIFI_INCLUDE_CONTROLLERS_SSLCONTEXTSERVICE_H_ */


[6/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/ListenSyslog.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/ListenSyslog.h b/libminifi/include/processors/ListenSyslog.h
index f9dc678..69223c4 100644
--- a/libminifi/include/processors/ListenSyslog.h
+++ b/libminifi/include/processors/ListenSyslog.h
@@ -21,14 +21,17 @@
 #define __LISTEN_SYSLOG_H__
 
 #include <stdio.h>
-#include <unistd.h>
 #include <sys/types.h>
+#ifndef WIN32
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <errno.h>
 #include <sys/select.h>
 #include <sys/time.h>
+#else
+#include <WinSock2.h>
+#endif
+#include <errno.h>
 #include <sys/types.h>
 #include <chrono>
 #include <thread>
@@ -39,12 +42,15 @@
 #include "core/Resource.h"
 #include "core/logging/LoggerConfiguration.h"
 
+#ifndef WIN32
+
 namespace org {
 namespace apache {
 namespace nifi {
 namespace minifi {
 namespace processors {
 
+
 // SyslogEvent
 typedef struct {
   char *payload;
@@ -58,7 +64,7 @@ class ListenSyslog : public core::Processor {
   /*!
    * Create a new processor
    */
-  ListenSyslog(std::string name, uuid_t uuid = NULL)
+  ListenSyslog(std::string name,  utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<ListenSyslog>::getLogger()) {
     _eventQueueByteSize = 0;
@@ -216,3 +222,5 @@ REGISTER_RESOURCE(ListenSyslog);
 } /* namespace org */
 
 #endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/LogAttribute.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/LogAttribute.h b/libminifi/include/processors/LogAttribute.h
index b9e333f..412e068 100644
--- a/libminifi/include/processors/LogAttribute.h
+++ b/libminifi/include/processors/LogAttribute.h
@@ -40,7 +40,7 @@ class LogAttribute : public core::Processor {
   /*!
    * Create a new processor
    */
-  LogAttribute(std::string name, uuid_t uuid = NULL)
+  LogAttribute(std::string name,  utils::Identifier uuid = utils::Identifier())
       : Processor(name, uuid),
         logger_(logging::LoggerFactory<LogAttribute>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/PutFile.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/PutFile.h b/libminifi/include/processors/PutFile.h
index ddcdac1..ba410d5 100644
--- a/libminifi/include/processors/PutFile.h
+++ b/libminifi/include/processors/PutFile.h
@@ -46,7 +46,7 @@ class PutFile : public core::Processor {
   /*!
    * Create a new processor
    */
-  PutFile(std::string name, uuid_t uuid = NULL)
+  PutFile(std::string name,  utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<PutFile>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/RouteOnAttribute.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/RouteOnAttribute.h b/libminifi/include/processors/RouteOnAttribute.h
index 1c1eb45..0737f8f 100644
--- a/libminifi/include/processors/RouteOnAttribute.h
+++ b/libminifi/include/processors/RouteOnAttribute.h
@@ -36,7 +36,7 @@ namespace processors {
 class RouteOnAttribute : public core::Processor {
  public:
 
-  RouteOnAttribute(std::string name, uuid_t uuid = NULL)
+  RouteOnAttribute(std::string name,  utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<RouteOnAttribute>::getLogger()) {
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/TailFile.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/TailFile.h b/libminifi/include/processors/TailFile.h
index fd59cb5..a98e990 100644
--- a/libminifi/include/processors/TailFile.h
+++ b/libminifi/include/processors/TailFile.h
@@ -40,7 +40,7 @@ class TailFile : public core::Processor {
   /*!
    * Create a new processor
    */
-  explicit TailFile(std::string name, uuid_t uuid = NULL)
+  explicit TailFile(std::string name,  utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<TailFile>::getLogger()) {
     _stateRecovered = false;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/processors/UpdateAttribute.h
----------------------------------------------------------------------
diff --git a/libminifi/include/processors/UpdateAttribute.h b/libminifi/include/processors/UpdateAttribute.h
index 117c78a..a768a87 100644
--- a/libminifi/include/processors/UpdateAttribute.h
+++ b/libminifi/include/processors/UpdateAttribute.h
@@ -36,7 +36,7 @@ namespace processors {
 class UpdateAttribute : public core::Processor {
  public:
 
-  UpdateAttribute(std::string name, uuid_t uuid = NULL)
+  UpdateAttribute(std::string name,  utils::Identifier uuid = utils::Identifier())
       : core::Processor(name, uuid),
         logger_(logging::LoggerFactory<UpdateAttribute>::getLogger()) {
   }
@@ -64,7 +64,7 @@ class UpdateAttribute : public core::Processor {
 
  private:
   std::shared_ptr<logging::Logger> logger_;
-  std::vector<std::string> attributes_;
+  std::vector<core::Property> attributes_;
 };
 
 REGISTER_RESOURCE(UpdateAttribute);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/provenance/Provenance.h
----------------------------------------------------------------------
diff --git a/libminifi/include/provenance/Provenance.h b/libminifi/include/provenance/Provenance.h
index 72fd379..5ec33fa 100644
--- a/libminifi/include/provenance/Provenance.h
+++ b/libminifi/include/provenance/Provenance.h
@@ -18,7 +18,6 @@
 #ifndef __PROVENANCE_H__
 #define __PROVENANCE_H__
 
-#include <ftw.h>
 #include <uuid/uuid.h>
 #include <atomic>
 #include <cstdint>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/sitetosite/Peer.h
----------------------------------------------------------------------
diff --git a/libminifi/include/sitetosite/Peer.h b/libminifi/include/sitetosite/Peer.h
index 3775c7c..2c9e2a0 100644
--- a/libminifi/include/sitetosite/Peer.h
+++ b/libminifi/include/sitetosite/Peer.h
@@ -19,9 +19,6 @@
 #define LIBMINIFI_INCLUDE_SITETOSITE_PEER_H_
 
 #include <stdio.h>
-#include <fcntl.h>
-#include <resolv.h>
-#include <netdb.h>
 #include <string>
 #include <errno.h>
 #include <uuid/uuid.h>
@@ -36,6 +33,7 @@
 #include "properties/Configure.h"
 #include "io/ClientSocket.h"
 #include "io/BaseStream.h"
+#include "io/DataStream.h"
 #include "utils/TimeUtil.h"
 #include "utils/HTTPClient.h"
 
@@ -47,11 +45,11 @@ namespace sitetosite {
 
 class Peer {
  public:
-  explicit Peer(uuid_t port_id, const std::string &host, uint16_t port, bool secure = false)
+  explicit Peer(utils::Identifier &port_id, const std::string &host, uint16_t port, bool secure = false)
       : host_(host),
         port_(port),
         secure_(secure) {
-    uuid_copy(port_id_, port_id);
+    port_id_ = port_id;
   }
 
   explicit Peer(const std::string &host, uint16_t port, bool secure = false)
@@ -64,14 +62,14 @@ class Peer {
       : host_(other.host_),
         port_(other.port_),
         secure_(other.secure_) {
-    uuid_copy(port_id_, other.port_id_);
+    port_id_ = other.port_id_;
   }
 
-  explicit Peer(const Peer &&other)
+  explicit Peer(Peer &&other)
       : host_(std::move(other.host_)),
         port_(std::move(other.port_)),
         secure_(std::move(other.secure_)) {
-    uuid_copy(port_id_, other.port_id_);
+    port_id_ = other.port_id_;
   }
 
   uint16_t getPort() const {
@@ -86,8 +84,8 @@ class Peer {
     return secure_;
   }
 
-  void getPortId(uuid_t other) const {
-    uuid_copy(other, port_id_);
+  void getPortId(utils::Identifier &other) const {
+    other = port_id_;
   }
 
  protected:
@@ -95,7 +93,7 @@ class Peer {
 
   uint16_t port_;
 
-  uuid_t port_id_;
+  utils::Identifier port_id_;
 
   // secore comms
 
@@ -149,12 +147,12 @@ class SiteToSitePeer : public org::apache::nifi::minifi::io::BaseStream {
   /*
    * Create a new site2site peer
    */
-  explicit SiteToSitePeer(std::unique_ptr<org::apache::nifi::minifi::io::DataStream> injected_socket, const std::string host, uint16_t port, const std::string &interface)
-      : SiteToSitePeer(host, port, interface) {
+  explicit SiteToSitePeer(std::unique_ptr<org::apache::nifi::minifi::io::DataStream> injected_socket, const std::string host, uint16_t port, const std::string &ifc)
+      : SiteToSitePeer(host, port, ifc) {
     stream_ = std::move(injected_socket);
   }
 
-  explicit SiteToSitePeer(const std::string &host, uint16_t port, const std::string &interface)
+  explicit SiteToSitePeer(const std::string &host, uint16_t port, const std::string &ifc)
       : stream_(nullptr),
         host_(host),
         port_(port),
@@ -164,7 +162,7 @@ class SiteToSitePeer : public org::apache::nifi::minifi::io::BaseStream {
     url_ = "nifi://" + host_ + ":" + std::to_string(port_);
     yield_expiration_ = 0;
     timeout_ = 30000;  // 30 seconds
-    local_network_interface_= std::move(io::NetworkInterface(interface, nullptr));
+    local_network_interface_= std::move(io::NetworkInterface(ifc, nullptr));
   }
 
   explicit SiteToSitePeer(SiteToSitePeer &&ss)
@@ -191,8 +189,8 @@ class SiteToSitePeer : public org::apache::nifi::minifi::io::BaseStream {
     return url_;
   }
   // setInterface
-  void setInterface(std::string &interface) {
-    local_network_interface_ = std::move(io::NetworkInterface(interface,nullptr));
+  void setInterface(std::string &ifc) {
+    local_network_interface_ = std::move(io::NetworkInterface(ifc,nullptr));
   }
   std::string getInterface() {
     return local_network_interface_.getInterface();

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/sitetosite/RawSocketProtocol.h
----------------------------------------------------------------------
diff --git a/libminifi/include/sitetosite/RawSocketProtocol.h b/libminifi/include/sitetosite/RawSocketProtocol.h
index 7a075bf..0c7feb5 100644
--- a/libminifi/include/sitetosite/RawSocketProtocol.h
+++ b/libminifi/include/sitetosite/RawSocketProtocol.h
@@ -21,13 +21,7 @@
 #define __SITE2SITE_CLIENT_PROTOCOL_H__
 
 #include <stdio.h>
-#include <unistd.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <netdb.h>
 #include <string>
 #include <errno.h>
 #include <chrono>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/sitetosite/SiteToSite.h
----------------------------------------------------------------------
diff --git a/libminifi/include/sitetosite/SiteToSite.h b/libminifi/include/sitetosite/SiteToSite.h
index 484a277..2cc0823 100644
--- a/libminifi/include/sitetosite/SiteToSite.h
+++ b/libminifi/include/sitetosite/SiteToSite.h
@@ -245,8 +245,7 @@ class Transaction {
 
     // Generate the global UUID for the transaction
     id_generator_->generate(uuid_);
-    uuid_unparse_lower(uuid_, uuidStr);
-    uuid_str_ = uuidStr;
+    uuid_str_ = uuid_.to_string();
   }
   // Destructor
   virtual ~Transaction() {
@@ -262,7 +261,7 @@ class Transaction {
 
   void setUUIDStr(const std::string &str) {
     uuid_str_ = str;
-    uuid_parse(str.c_str(), uuid_);
+    uuid_ = str;
   }
 
   // getState
@@ -323,7 +322,7 @@ class Transaction {
   TransferDirection _direction;
 
   // A global unique identifier
-  uuid_t uuid_;
+  utils::Identifier uuid_;
   // UUID string
   std::string uuid_str_;
 
@@ -332,10 +331,10 @@ class Transaction {
 
 class SiteToSiteClientConfiguration {
  public:
-  SiteToSiteClientConfiguration(std::shared_ptr<io::StreamFactory> stream_factory, const std::shared_ptr<Peer> &peer, const std::string &interface, CLIENT_TYPE type = RAW)
+  SiteToSiteClientConfiguration(std::shared_ptr<io::StreamFactory> stream_factory, const std::shared_ptr<Peer> &peer, const std::string &ifc, CLIENT_TYPE type = RAW)
       : stream_factory_(stream_factory),
         peer_(peer),
-        local_network_interface_(interface),
+        local_network_interface_(ifc),
         ssl_service_(nullptr) {
     client_type_ = type;
   }
@@ -363,8 +362,8 @@ class SiteToSiteClientConfiguration {
   }
 
   // setInterface
-  void setInterface(std::string &interface) {
-    local_network_interface_ = interface;
+  void setInterface(std::string &ifc) {
+    local_network_interface_ = ifc;
   }
   std::string getInterface() const {
     return local_network_interface_;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/sitetosite/SiteToSiteClient.h
----------------------------------------------------------------------
diff --git a/libminifi/include/sitetosite/SiteToSiteClient.h b/libminifi/include/sitetosite/SiteToSiteClient.h
index 259b95e..6469e82 100644
--- a/libminifi/include/sitetosite/SiteToSiteClient.h
+++ b/libminifi/include/sitetosite/SiteToSiteClient.h
@@ -56,7 +56,7 @@ class SiteToSiteClient : public core::Connectable {
  public:
 
   SiteToSiteClient()
-      : core::Connectable("SitetoSiteClient", 0),
+      : core::Connectable("SitetoSiteClient"),
         peer_state_(IDLE),
         _batchSendNanos(5000000000),
         ssl_context_service_(nullptr),
@@ -96,11 +96,20 @@ class SiteToSiteClient : public core::Connectable {
    * @returns true if the process succeeded, failure OR exception thrown otherwise
    */
   virtual bool transfer(TransferDirection direction, const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
-    if (__builtin_expect(direction == SEND, 1)) {
+#ifndef WIN32
+	  if (__builtin_expect(direction == SEND, 1)) {
       return transferFlowFiles(context, session);
     } else {
       return receiveFlowFiles(context, session);
     }
+#else
+	  if (direction == SEND) {
+		  return transferFlowFiles(context, session);
+	  }
+	  else {
+		  return receiveFlowFiles(context, session);
+	  }
+#endif
   }
 
   /**
@@ -136,11 +145,9 @@ class SiteToSiteClient : public core::Connectable {
   virtual bool transmitPayload(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session, const std::string &payload,
                                std::map<std::string, std::string> attributes) = 0;
 
-  void setPortId(uuid_t id) {
-    uuid_copy(port_id_, id);
-    char idStr[37];
-    uuid_unparse_lower(id, idStr);
-    port_id_str_ = idStr;
+  void setPortId(utils::Identifier &id) {
+    port_id_ = id;
+    port_id_str_ = port_id_.to_string();
   }
 
   /**
@@ -241,7 +248,7 @@ class SiteToSiteClient : public core::Connectable {
   std::string port_id_str_;
 
   // portId
-  uuid_t port_id_;
+  utils::Identifier port_id_;
 
   // Peer Connection
   std::unique_ptr<SiteToSitePeer> peer_;
@@ -285,7 +292,7 @@ class WriteCallback : public OutputStreamCallback {
     int len = _packet->_size;
     int total = 0;
     while (len > 0) {
-      int size = std::min(len, 16384);
+	  int size = len < 16384 ? len : 16384; 
       int ret = _packet->transaction_->getStream().readData(buffer, size);
       if (ret != size) {
         logging::LOG_ERROR(_packet->logger_reference_) << "Site2Site Receive Flow Size " << size << " Failed " << ret << ", should have received " << len;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/sitetosite/SiteToSiteFactory.h
----------------------------------------------------------------------
diff --git a/libminifi/include/sitetosite/SiteToSiteFactory.h b/libminifi/include/sitetosite/SiteToSiteFactory.h
index 4f0f36c..2d1dd74 100644
--- a/libminifi/include/sitetosite/SiteToSiteFactory.h
+++ b/libminifi/include/sitetosite/SiteToSiteFactory.h
@@ -58,7 +58,7 @@ static std::unique_ptr<SiteToSitePeer> createStreamingPeer(const SiteToSiteClien
  * RawSiteToSiteClient will be instantiated and returned through a unique ptr.
  */
 static std::unique_ptr<SiteToSiteClient> createRawSocket(const SiteToSiteClientConfiguration &client_configuration) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   client_configuration.getPeer()->getPortId(uuid);
   auto rsptr = createStreamingPeer(client_configuration);
   if (nullptr == rsptr){
@@ -77,7 +77,7 @@ static std::unique_ptr<SiteToSiteClient> createRawSocket(const SiteToSiteClientC
  * @returns site to site client or nullptr.
  */
 static std::unique_ptr<SiteToSiteClient> createClient(const SiteToSiteClientConfiguration &client_configuration) {
-  uuid_t uuid;
+  utils::Identifier uuid;
   client_configuration.getPeer()->getPortId(uuid);
   switch (client_configuration.getClientType()) {
     case RAW:
@@ -90,8 +90,7 @@ static std::unique_ptr<SiteToSiteClient> createClient(const SiteToSiteClientConf
         auto peer = std::unique_ptr<SiteToSitePeer>(new SiteToSitePeer(client_configuration.getPeer()->getHost(), client_configuration.getPeer()->getPort(),
             client_configuration.getInterface()));
         peer->setHTTPProxy(client_configuration.getHTTPProxy());
-        char idStr[37];
-        uuid_unparse_lower(uuid, idStr);
+
         ptr->setPortId(uuid);
         ptr->setPeer(std::move(peer));
         return ptr;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/HTTPClient.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/HTTPClient.h b/libminifi/include/utils/HTTPClient.h
index 553dcea..87bf659 100644
--- a/libminifi/include/utils/HTTPClient.h
+++ b/libminifi/include/utils/HTTPClient.h
@@ -198,7 +198,7 @@ class HTTPRequestResponse {
 };
 
 class BaseHTTPClient {
- public:
+public:
   explicit BaseHTTPClient(const std::string &url, const std::shared_ptr<minifi::controllers::SSLContextService> ssl_context_service = nullptr) {
     response_code = -1;
   }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/Id.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/Id.h b/libminifi/include/utils/Id.h
index d9f0811..46537be 100644
--- a/libminifi/include/utils/Id.h
+++ b/libminifi/include/utils/Id.h
@@ -17,10 +17,11 @@
 #ifndef LIBMINIFI_INCLUDE_UTILS_ID_H_
 #define LIBMINIFI_INCLUDE_UTILS_ID_H_
 
+#include <cstddef>
 #include <atomic>
 #include <memory>
 #include <string>
-#include <uuid/uuid.h>
+#include "uuid/uuid.h"
 
 #include "core/logging/Logger.h"
 #include "properties/Properties.h"
@@ -37,9 +38,91 @@ namespace nifi {
 namespace minifi {
 namespace utils {
 
+template<typename T, typename C>
+class IdentifierBase {
+ public:
+
+  IdentifierBase(T myid) {
+    copyInto(myid);
+  }
+
+  IdentifierBase(const IdentifierBase &other) {
+    copyInto(other.id_);
+  }
+
+  IdentifierBase() {
+  }
+
+  IdentifierBase &operator=(const IdentifierBase &other) {
+    copyInto(other.id_);
+    return *this;
+  }
+
+  IdentifierBase &operator=(T o) {
+    copyInto(o);
+    return *this;
+  }
+
+  void getIdentifier(T other) const {
+    copyOutOf(other);
+  }
+
+  C convert() const {
+    return converted_;
+  }
+
+ protected:
+
+  void copyInto(const IdentifierBase &other){
+    memcpy(id_, other.id_, sizeof(T));
+  }
+
+  void copyInto(const void *other) {
+    memcpy(id_, other, sizeof(T));
+  }
+
+  void copyOutOf(void *other) {
+    memcpy(other, id_, sizeof(T));
+  }
+
+  C converted_;
+
+  T id_;
+};
+
+class Identifier : public IdentifierBase<UUID_FIELD, std::string> {
+ public:
+  Identifier(UUID_FIELD u);
+  Identifier();
+  Identifier(const Identifier &other);
+  Identifier(const IdentifierBase &other);
+
+  Identifier &operator=(const IdentifierBase &other);
+  Identifier &operator=(const Identifier &other);
+  Identifier &operator=(UUID_FIELD o);
+
+  Identifier &operator=(std::string id);
+  bool operator==(std::nullptr_t nullp);
+
+  bool operator!=(std::nullptr_t nullp);
+
+  bool operator!=(const Identifier &other);
+  bool operator==(const Identifier &other);
+
+  std::string to_string();
+
+  unsigned char *toArray();
+
+ protected:
+
+  void build_string();
+
+};
+
 class IdGenerator {
  public:
-  void generate(uuid_t output);
+  void generate(Identifier &output);
+  Identifier generate();
   void initialize(const std::shared_ptr<Properties> & properties);
 
   static std::shared_ptr<IdGenerator> getIdGenerator() {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/StringUtils.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/StringUtils.h b/libminifi/include/utils/StringUtils.h
index 7f33260..24adae1 100644
--- a/libminifi/include/utils/StringUtils.h
+++ b/libminifi/include/utils/StringUtils.h
@@ -17,6 +17,11 @@
 #ifndef LIBMINIFI_INCLUDE_IO_STRINGUTILS_H_
 #define LIBMINIFI_INCLUDE_IO_STRINGUTILS_H_
 #include <iostream>
+#include <functional>
+#ifdef WIN32
+	#include <cwctype>
+	#include <cctype>
+#endif
 #include <algorithm>
 #include <sstream>
 #include <vector>
@@ -68,7 +73,7 @@ class StringUtils {
    * @returns modified string
    */
   static inline std::string trimLeft(std::string s) {
-    s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::pointer_to_unary_function<int, int>(std::isspace))));
+    s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::pointer_to_unary_function<int, int>(isspace))));
     return s;
   }
 
@@ -79,7 +84,7 @@ class StringUtils {
    */
 
   static inline std::string trimRight(std::string s) {
-    s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::pointer_to_unary_function<int, int>(std::isspace))).base(), s.end());
+    s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::pointer_to_unary_function<int, int>(isspace))).base(), s.end());
     return s;
   }
 
@@ -88,7 +93,7 @@ class StringUtils {
    */
   static inline bool equalsIgnoreCase(const std::string &left, const std::string right) {
     if (left.length() == right.length()) {
-      return std::equal(right.begin(), right.end(), left.begin(), [](unsigned char lc, unsigned char rc) {return std::tolower(lc) == std::tolower(rc);});
+      return std::equal(right.begin(), right.end(), left.begin(), [](unsigned char lc, unsigned char rc) {return tolower(lc) == tolower(rc);});
     } else {
       return false;
     }
@@ -200,7 +205,7 @@ class StringUtils {
   inline static bool endsWithIgnoreCase(const std::string &value, const std::string & endString) {
     if (endString.size() > value.size())
       return false;
-    return std::equal(endString.rbegin(), endString.rend(), value.rbegin(), [](unsigned char lc, unsigned char rc) {return std::tolower(lc) == std::tolower(rc);});
+    return std::equal(endString.rbegin(), endString.rend(), value.rbegin(), [](unsigned char lc, unsigned char rc) {return tolower(lc) == tolower(rc);});
   }
 
   inline static bool endsWith(const std::string &value, const std::string & endString) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/TimeUtil.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/TimeUtil.h b/libminifi/include/utils/TimeUtil.h
index 19c2566..0dc3b5c 100644
--- a/libminifi/include/utils/TimeUtil.h
+++ b/libminifi/include/utils/TimeUtil.h
@@ -18,9 +18,6 @@
 #define __TIME_UTIL_H__
 
 #include <time.h>
-#include <sys/time.h>
-#include <string.h>
-#include <unistd.h>
 #include <string.h>
 #include <iomanip>
 #include <sstream>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/file/DiffUtils.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/file/DiffUtils.h b/libminifi/include/utils/file/DiffUtils.h
index d44360d..313e0f6 100644
--- a/libminifi/include/utils/file/DiffUtils.h
+++ b/libminifi/include/utils/file/DiffUtils.h
@@ -24,10 +24,8 @@
 #else
 #include <cstdlib>
 #include <sys/stat.h>
-#include <dirent.h>
 #endif
 #include <cstdio>
-#include <unistd.h>
 #include <fcntl.h>
 #ifdef WIN32
 #define stat _stat

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/file/FileManager.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/file/FileManager.h b/libminifi/include/utils/file/FileManager.h
index f6a4312..247f249 100644
--- a/libminifi/include/utils/file/FileManager.h
+++ b/libminifi/include/utils/file/FileManager.h
@@ -23,7 +23,6 @@
 #include <cstdlib>
 #endif
 #include <cstdio>
-#include <unistd.h>
 #include <fcntl.h>
 #include "io/validation.h"
 #include "utils/Id.h"

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/include/utils/file/FileUtils.h
----------------------------------------------------------------------
diff --git a/libminifi/include/utils/file/FileUtils.h b/libminifi/include/utils/file/FileUtils.h
index 33ca437..dd307ee 100644
--- a/libminifi/include/utils/file/FileUtils.h
+++ b/libminifi/include/utils/file/FileUtils.h
@@ -17,6 +17,9 @@
 #ifndef LIBMINIFI_INCLUDE_UTILS_FILEUTILS_H_
 #define LIBMINIFI_INCLUDE_UTILS_FILEUTILS_H_
 
+
+
+
 #include <sstream>
 #include <fstream>
 #ifdef BOOST_VERSION
@@ -24,14 +27,30 @@
 #else
 #include <cstring>
 #include <cstdlib>
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <WinSock2.h>
+#include <WS2tcpip.h>
+#include <Windows.h>
+#pragma comment(lib, "Ws2_32.lib")
+#else
 #include <sys/stat.h>
 #include <dirent.h>
 #endif
+#endif
 #include <cstdio>
+#ifndef WIN32
 #include <unistd.h>
+#endif
 #include <fcntl.h>
 #ifdef WIN32
 #define stat _stat
+#include <direct.h>
+#include <windows.h> // winapi
+#include <sys/stat.h> // stat
+#include <tchar.h> // _tcscpy,_tcscat,_tcscmp
+#include <string> // string
+#include <algorithm> // replace
 #endif
 
 namespace org {
@@ -72,6 +91,50 @@ class FileUtils {
       //display error message
     }
     return 0;
+#elif defined(WIN32)
+	  WIN32_FIND_DATA FindFileData;
+	  HANDLE hFind;
+	  DWORD Attributes;
+	  std::string str;
+
+	  
+		std::stringstream pathstr;
+		pathstr << path << "\\.*";
+		str = pathstr.str();
+
+	  
+	  //List files
+	  hFind = FindFirstFile(str.c_str(), &FindFileData);
+	  if (hFind != INVALID_HANDLE_VALUE)
+	  {
+		  do {
+			  if (strcmp(FindFileData.cFileName, ".") != 0 && strcmp(FindFileData.cFileName, "..") != 0)
+			  {
+				  //Str append Example
+
+				  std::stringstream strs;
+				  strs << path << "\\" << FindFileData.cFileName;
+				  str = strs.str();
+
+				  //_tprintf (TEXT("File Found: %s\n"),str);
+				  Attributes = GetFileAttributes(str.c_str());
+				  if (Attributes & FILE_ATTRIBUTE_DIRECTORY)
+				  {
+					  //is directory
+					  delete_dir(str, delete_files_recursively);
+				  }
+				  else
+				  {
+					  remove(str.c_str());
+					  //not directory
+				  }
+			  }
+		  } while (FindNextFile(hFind, &FindFileData));
+		  FindClose(hFind);
+
+		  RemoveDirectory(path.c_str());
+	  }
+	  return 0;
 #else
     DIR *current_directory = opendir(path.c_str());
     int r = -1;
@@ -136,11 +199,15 @@ class FileUtils {
 #else
     struct stat dir_stat;
     if (stat(path.c_str(), &dir_stat)) {
-      mkdir(path.c_str(), 0700);
+#ifdef WIN32
+      _mkdir(path.c_str());
+#else
+	mkdir(path.c_str(), 0700);
+#endif
+	return 0;
     }
-    return 0;
+	return -1;
 #endif
-    return -1;
   }
 
   static int copy_file(const std::string &path_from, const std::string dest_path) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/opsys/posix/io/ClientSocket.h
----------------------------------------------------------------------
diff --git a/libminifi/opsys/posix/io/ClientSocket.h b/libminifi/opsys/posix/io/ClientSocket.h
new file mode 100644
index 0000000..4ed8b99
--- /dev/null
+++ b/libminifi/opsys/posix/io/ClientSocket.h
@@ -0,0 +1,296 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_INCLUDE_IO_POSIX_CLIENTSOCKET_H_
+#define LIBMINIFI_INCLUDE_IO_POSIX_CLIENTSOCKET_H_
+
+
+#include <cstdint>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <mutex>
+#include <atomic>
+#include "io/BaseStream.h"
+#include "core/Core.h"
+#include "core/logging/Logger.h"
+#include "io/validation.h"
+#include "properties/Configure.h"
+#include "io/NetworkPrioritizer.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace io {
+
+/**
+ * Context class for socket. This is currently only used as a parent class for TLSContext.  It is necessary so the Socket and TLSSocket constructors
+ * can be the same.  It also gives us a common place to set timeouts, etc from the Configure object in the future.
+ */
+class SocketContext {
+ public:
+  SocketContext(const std::shared_ptr<Configure> &configure) {
+  }
+};
+/**
+ * Socket class.
+ * Purpose: Provides a general purpose socket interface that abstracts
+ * connecting information from users
+ * Design: Extends DataStream and allows us to perform most streaming
+ * operations against a BSD socket
+ *
+ *
+ */
+class Socket : public BaseStream {
+ public:
+  /**
+   * Constructor that creates a client socket.
+   * @param context the SocketContext
+   * @param hostname hostname we are connecting to.
+   * @param port port we are connecting to.
+   */
+  explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port);
+
+  /**
+   * Move constructor.
+   */
+  explicit Socket(const Socket &&);
+
+  /**
+   * Static function to return the current machine's host name
+   */
+  static std::string getMyHostName() {
+    static std::string HOSTNAME = init_hostname();
+    return HOSTNAME;
+  }
+
+  /**
+   * Destructor
+   */
+
+  virtual ~Socket();
+
+  virtual void closeStream();
+  /**
+   * Initializes the socket
+   * @return result of the creation operation.
+   */
+  virtual int16_t initialize();
+
+  virtual void setInterface(io::NetworkInterface &&interface) {
+    local_network_interface_ = std::move(interface);
+  }
+
+  /**
+   * Sets the non blocking flag on the file descriptor.
+   */
+  void setNonBlocking();
+
+  std::string getHostname() const;
+
+  /**
+   * Return the port for this socket
+   * @returns port
+   */
+  uint16_t getPort();
+
+  // data stream extensions
+  /**
+   * Reads data and places it into buf
+   * @param buf buffer in which we extract data
+   * @param buflen
+   * @param retrieve_all_bytes determines if we should read all bytes before returning
+   */
+  virtual int readData(std::vector<uint8_t> &buf, int buflen) {
+    return readData(buf, buflen, true);
+  }
+  /**
+   * Reads data and places it into buf
+   * @param buf buffer in which we extract data
+   * @param buflen
+   * @param retrieve_all_bytes determines if we should read all bytes before returning
+   */
+  virtual int readData(uint8_t *buf, int buflen) {
+    return readData(buf, buflen, true);
+  }
+
+  /**
+   * Reads data and places it into buf
+   * @param buf buffer in which we extract data
+   * @param buflen
+   * @param retrieve_all_bytes determines if we should read all bytes before returning
+   */
+  virtual int readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes);
+  /**
+   * Reads data and places it into buf
+   * @param buf buffer in which we extract data
+   * @param buflen
+   * @param retrieve_all_bytes determines if we should read all bytes before returning
+   */
+  virtual int readData(uint8_t *buf, int buflen, bool retrieve_all_bytes);
+
+  /**
+   * Write value to the stream using std::vector
+   * @param buf incoming buffer
+   * @param buflen buffer to write
+   *
+   */
+  virtual int writeData(std::vector<uint8_t> &buf, int buflen);
+
+  /**
+   * writes value to stream
+   * @param value value to write
+   * @param size size of value
+   */
+  virtual int writeData(uint8_t *value, int size);
+
+  /**
+   * Writes a system word
+   * @param value value to write
+   */
+  virtual int write(uint64_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Writes a uint32_t
+   * @param value value to write
+   */
+  virtual int write(uint32_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Writes a system short
+   * @param value value to write
+   */
+  virtual int write(uint16_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Reads a system word
+   * @param value value to write
+   */
+  virtual int read(uint64_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Reads a uint32_t
+   * @param value value to write
+   */
+  virtual int read(uint32_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Reads a system short
+   * @param value value to write
+   */
+  virtual int read(uint16_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+  /**
+   * Returns the underlying buffer
+   * @return vector's array
+   **/
+  const uint8_t *getBuffer() const {
+    return DataStream::getBuffer();
+  }
+
+  /**
+   * Retrieve size of data stream
+   * @return size of data stream
+   **/
+  const uint64_t getSize() const {
+    return DataStream::getSize();
+  }
+
+ protected:
+
+  /**
+   * Constructor that accepts host name, port and listeners. With this
+   * contructor we will be creating a server socket
+   * @param context the SocketContext
+   * @param hostname our host name
+   * @param port connecting port
+   * @param listeners number of listeners in the queue
+   */
+  explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners);
+
+  /**
+   * Creates a vector and returns the vector using the provided
+   * type name.
+   * @param t incoming object
+   * @returns vector.
+   */
+  template<typename T>
+  std::vector<uint8_t> readBuffer(const T&);
+
+  /**
+   * Creates a connection using the address info object.
+   * @param p addrinfo structure.
+   * @returns fd.
+   */
+  virtual int8_t createConnection(const addrinfo *p, in_addr_t &addr);
+
+  /**
+   * Sets socket options depending on the instance.
+   * @param sock socket file descriptor.
+   */
+  virtual int16_t setSocketOptions(const int sock);
+
+  /**
+   * Attempt to select the socket file descriptor
+   * @param msec timeout interval to wait
+   * @returns file descriptor
+   */
+  virtual int16_t select_descriptor(const uint16_t msec);
+
+  addrinfo *addr_info_;
+
+  std::recursive_mutex selection_mutex_;
+
+  std::string requested_hostname_;
+  std::string canonical_hostname_;
+  uint16_t port_;
+
+  bool is_loopback_only_;
+  io::NetworkInterface local_network_interface_;
+
+  // connection information
+  int32_t socket_file_descriptor_;
+
+  fd_set total_list_;
+  fd_set read_fds_;
+  std::atomic<uint16_t> socket_max_;
+  std::atomic<uint64_t> total_written_;
+  std::atomic<uint64_t> total_read_;
+  uint16_t listeners_;
+
+
+  bool nonBlocking_;
+ private:
+  std::shared_ptr<logging::Logger> logger_;
+  static std::string init_hostname() {
+    char hostname[1024];
+    gethostname(hostname, 1024);
+    Socket mySock(nullptr, hostname, 0);
+    mySock.initialize();
+    auto resolved_hostname = mySock.getHostname();
+    return !IsNullOrEmpty(resolved_hostname) ? resolved_hostname : hostname;
+  }
+};
+
+} /* namespace io */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */
+#endif /* LIBMINIFI_INCLUDE_IO_POSIX_CLIENTSOCKET_H_ */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/opsys/win/io/ClientSocket.h
----------------------------------------------------------------------
diff --git a/libminifi/opsys/win/io/ClientSocket.h b/libminifi/opsys/win/io/ClientSocket.h
new file mode 100644
index 0000000..3621215
--- /dev/null
+++ b/libminifi/opsys/win/io/ClientSocket.h
@@ -0,0 +1,343 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_INCLUDE_IO_WIN__CLIENTSOCKET_H_
+#define LIBMINIFI_INCLUDE_IO_WIN__CLIENTSOCKET_H_
+
+#include <cstdint>
+#include <sys/types.h>
+#ifdef WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+//#include <WinSock.h>
+//#include <WS2tcpip.h>
+#include <Windows.h>
+#include <WS2tcpip.h>
+#pragma comment(lib, "Ws2_32.lib")
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <unistd.h>
+#endif
+#include <mutex>
+#include <atomic>
+#include "io/BaseStream.h"
+#include "core/Core.h"
+#include "core/logging/Logger.h"
+#include "io/validation.h"
+#include "properties/Configure.h"
+#include "io/NetworkPrioritizer.h"
+
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace io {
+
+#ifdef WIN32
+	typedef SOCKET SocketDescriptor;
+#else
+	typedef int SocketDescriptor;
+	#define INVALID_SOCKET -1
+#endif
+
+
+/**
+ * Context class for socket. This is currently only used as a parent class for TLSContext.  It is necessary so the Socket and TLSSocket constructors
+ * can be the same.  It also gives us a common place to set timeouts, etc from the Configure object in the future.
+ */
+class SocketContext {
+ public:
+  SocketContext(const std::shared_ptr<Configure> &configure) {
+  }
+};
+/**
+ * Socket class.
+ * Purpose: Provides a general purpose socket interface that abstracts
+ * connecting information from users
+ * Design: Extends DataStream and allows us to perform most streaming
+ * operations against a BSD socket
+ *
+ *
+ */
+class Socket : public BaseStream {
+public:
+	/**
+	 * Constructor that creates a client socket.
+	 * @param context the SocketContext
+	 * @param hostname hostname we are connecting to.
+	 * @param port port we are connecting to.
+	 */
+	explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port);
+
+	/**
+	 * Move constructor.
+	 */
+	explicit Socket(const Socket &&);
+
+	/**
+	 * Static function to return the current machine's host name
+	 */
+	static std::string getMyHostName() {
+		static std::string HOSTNAME = init_hostname();
+		return HOSTNAME;
+	}
+
+	/**
+	 * Destructor
+	 */
+
+	virtual ~Socket();
+
+	virtual void closeStream();
+	/**
+	 * Initializes the socket
+	 * @return result of the creation operation.
+	 */
+	virtual int16_t initialize();
+
+	virtual void setInterface(io::NetworkInterface &&ifc) {
+		local_network_interface_ = std::move(ifc);
+	}
+
+	/**
+	 * Sets the non blocking flag on the file descriptor.
+	 */
+	void setNonBlocking();
+
+	std::string getHostname() const;
+
+	/**
+	 * Return the port for this socket
+	 * @returns port
+	 */
+	uint16_t getPort();
+
+	// data stream extensions
+	/**
+	 * Reads data and places it into buf
+	 * @param buf buffer in which we extract data
+	 * @param buflen
+	 * @param retrieve_all_bytes determines if we should read all bytes before returning
+	 */
+	virtual int readData(std::vector<uint8_t> &buf, int buflen) {
+		return readData(buf, buflen, true);
+	}
+	/**
+	 * Reads data and places it into buf
+	 * @param buf buffer in which we extract data
+	 * @param buflen
+	 * @param retrieve_all_bytes determines if we should read all bytes before returning
+	 */
+	virtual int readData(uint8_t *buf, int buflen) {
+		return readData(buf, buflen, true);
+	}
+
+	/**
+	 * Reads data and places it into buf
+	 * @param buf buffer in which we extract data
+	 * @param buflen
+	 * @param retrieve_all_bytes determines if we should read all bytes before returning
+	 */
+	virtual int readData(std::vector<uint8_t> &buf, int buflen, bool retrieve_all_bytes);
+	/**
+	 * Reads data and places it into buf
+	 * @param buf buffer in which we extract data
+	 * @param buflen
+	 * @param retrieve_all_bytes determines if we should read all bytes before returning
+	 */
+	virtual int readData(uint8_t *buf, int buflen, bool retrieve_all_bytes);
+
+	/**
+	 * Write value to the stream using std::vector
+	 * @param buf incoming buffer
+	 * @param buflen buffer to write
+	 *
+	 */
+	virtual int writeData(std::vector<uint8_t> &buf, int buflen);
+
+	/**
+	 * writes value to stream
+	 * @param value value to write
+	 * @param size size of value
+	 */
+	virtual int writeData(uint8_t *value, int size);
+
+	/**
+	 * Writes a system word
+	 * @param value value to write
+	 */
+	virtual int write(uint64_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Writes a uint32_t
+	 * @param value value to write
+	 */
+	virtual int write(uint32_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Writes a system short
+	 * @param value value to write
+	 */
+	virtual int write(uint16_t value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Reads a system word
+	 * @param value value to write
+	 */
+	virtual int read(uint64_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Reads a uint32_t
+	 * @param value value to write
+	 */
+	virtual int read(uint32_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Reads a system short
+	 * @param value value to write
+	 */
+	virtual int read(uint16_t &value, bool is_little_endian = EndiannessCheck::IS_LITTLE);
+
+	/**
+	 * Returns the underlying buffer
+	 * @return vector's array
+	 **/
+	const uint8_t *getBuffer() const {
+		return DataStream::getBuffer();
+	}
+
+	/**
+	 * Retrieve size of data stream
+	 * @return size of data stream
+	 **/
+	const uint64_t getSize() const {
+		return DataStream::getSize();
+	}
+
+protected:
+
+	/**
+	 * Constructor that accepts host name, port and listeners. With this
+	 * contructor we will be creating a server socket
+	 * @param context the SocketContext
+	 * @param hostname our host name
+	 * @param port connecting port
+	 * @param listeners number of listeners in the queue
+	 */
+	explicit Socket(const std::shared_ptr<SocketContext> &context, const std::string &hostname, const uint16_t port, const uint16_t listeners);
+
+	/**
+	 * Creates a vector and returns the vector using the provided
+	 * type name.
+	 * @param t incoming object
+	 * @returns vector.
+	 */
+	template<typename T>
+	std::vector<uint8_t> readBuffer(const T&);
+
+	/**
+	 * Creates a connection using the address info object.
+	 * @param p addrinfo structure.
+	 * @returns fd.
+	 */
+#ifdef WIN32
+	virtual int8_t createConnection(const addrinfo *p, struct in_addr &addr);
+#else
+	virtual int8_t createConnection(const addrinfo *p, in_addr_t &addr);
+#endif
+
+	/**
+	 * Sets socket options depending on the instance.
+	 * @param sock socket file descriptor.
+	 */
+	virtual int16_t setSocketOptions(const SocketDescriptor sock);
+
+	/**
+	 * Attempt to select the socket file descriptor
+	 * @param msec timeout interval to wait
+	 * @returns file descriptor
+	 */
+	virtual int16_t select_descriptor(const uint16_t msec);
+
+
+	addrinfo *addr_info_;
+
+	std::recursive_mutex selection_mutex_;
+
+	std::string requested_hostname_;
+	std::string canonical_hostname_;
+	uint16_t port_;
+
+	bool is_loopback_only_;
+	io::NetworkInterface local_network_interface_;
+
+	// connection information
+	SocketDescriptor socket_file_descriptor_;
+
+	fd_set total_list_;
+	fd_set read_fds_;
+	std::atomic<uint16_t> socket_max_;
+	std::atomic<uint64_t> total_written_;
+	std::atomic<uint64_t> total_read_;
+	uint16_t listeners_;
+
+	bool nonBlocking_;
+private:
+
+	class SocketInitializer
+	{
+	public:
+		SocketInitializer() {
+			#ifdef WIN32
+			static WSADATA s_wsaData;
+			int iWinSockInitResult = WSAStartup(MAKEWORD(2, 2), &s_wsaData);
+			#endif
+		}
+		~SocketInitializer() {
+		#ifdef WIN32
+			WSACleanup();
+		#endif
+		}
+	};
+	 static void initialize_socket() {
+		 static SocketInitializer initialized;
+		 }
+	 
+
+  std::shared_ptr<logging::Logger> logger_;
+
+
+  static std::string init_hostname() {
+    char hostname[1024];
+    gethostname(hostname, 1024);
+    Socket mySock(nullptr, hostname, 0);
+    mySock.initialize();
+    auto resolved_hostname = mySock.getHostname();
+    return !IsNullOrEmpty(resolved_hostname) ? resolved_hostname : hostname;
+  }
+};
+
+} /* namespace io */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */
+#endif /* LIBMINIFI_INCLUDE_IO_WIN__CLIENTSOCKET_H_ */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/Connection.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/Connection.cpp b/libminifi/src/Connection.cpp
index 9513f68..f9a8fcb 100644
--- a/libminifi/src/Connection.cpp
+++ b/libminifi/src/Connection.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "Connection.h"
-#include <sys/time.h>
 #include <time.h>
 #include <vector>
 #include <queue>
@@ -39,17 +38,64 @@ namespace apache {
 namespace nifi {
 namespace minifi {
 
-Connection::Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, uuid_t uuid, uuid_t srcUUID,
-                       uuid_t destUUID)
+Connection::Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name)
+    : core::Connectable(name),
+      flow_repository_(flow_repository),
+      content_repo_(content_repo),
+      logger_(logging::LoggerFactory<Connection>::getLogger()) {
+  source_connectable_ = nullptr;
+  dest_connectable_ = nullptr;
+  max_queue_size_ = 0;
+  max_data_queue_size_ = 0;
+  expired_duration_ = 0;
+  queued_data_size_ = 0;
+
+  logger_->log_debug("Connection %s created", name_);
+}
+
+Connection::Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid)
+    : core::Connectable(name, uuid),
+      flow_repository_(flow_repository),
+      content_repo_(content_repo),
+      logger_(logging::LoggerFactory<Connection>::getLogger()) {
+  source_connectable_ = nullptr;
+  dest_connectable_ = nullptr;
+  max_queue_size_ = 0;
+  max_data_queue_size_ = 0;
+  expired_duration_ = 0;
+  queued_data_size_ = 0;
+
+  logger_->log_debug("Connection %s created", name_);
+}
+
+Connection::Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid,
+                       utils::Identifier & srcUUID)
+    : core::Connectable(name, uuid),
+      flow_repository_(flow_repository),
+      content_repo_(content_repo),
+      logger_(logging::LoggerFactory<Connection>::getLogger()) {
+
+  src_uuid_ = srcUUID;
+
+  source_connectable_ = nullptr;
+  dest_connectable_ = nullptr;
+  max_queue_size_ = 0;
+  max_data_queue_size_ = 0;
+  expired_duration_ = 0;
+  queued_data_size_ = 0;
+
+  logger_->log_debug("Connection %s created", name_);
+}
+
+Connection::Connection(const std::shared_ptr<core::Repository> &flow_repository, const std::shared_ptr<core::ContentRepository> &content_repo, std::string name, utils::Identifier & uuid,
+                       utils::Identifier & srcUUID, utils::Identifier & destUUID)
     : core::Connectable(name, uuid),
       flow_repository_(flow_repository),
       content_repo_(content_repo),
       logger_(logging::LoggerFactory<Connection>::getLogger()) {
 
-  if (srcUUID)
-    uuid_copy(src_uuid_, srcUUID);
-  if (destUUID)
-    uuid_copy(dest_uuid_, destUUID);
+  src_uuid_ = srcUUID;
+  dest_uuid_ = destUUID;
 
   source_connectable_ = nullptr;
   dest_connectable_ = nullptr;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/FlowControlProtocol.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/FlowControlProtocol.cpp b/libminifi/src/FlowControlProtocol.cpp
index 60122b0..60f701a 100644
--- a/libminifi/src/FlowControlProtocol.cpp
+++ b/libminifi/src/FlowControlProtocol.cpp
@@ -18,10 +18,8 @@
  * limitations under the License.
  */
 #include "FlowControlProtocol.h"
-#include <sys/time.h>
 #include <stdio.h>
 #include <time.h>
-#include <netinet/tcp.h>
 #include <chrono>
 #include <thread>
 #include <string>
@@ -35,96 +33,12 @@ namespace nifi {
 namespace minifi {
 
 int FlowControlProtocol::connectServer(const char *host, uint16_t port) {
-  in_addr_t addr;
-  int sock = 0;
-  struct hostent *h;
-#ifdef __MACH__
-  h = gethostbyname(host);
-#else
-  char buf[1024];
-  struct hostent he;
-  int hh_errno;
-  gethostbyname_r(host, &he, buf, sizeof(buf), &h, &hh_errno);
-#endif
-  memcpy(reinterpret_cast<char*>(&addr), h->h_addr_list[0], h->h_length);
-  sock = socket(AF_INET, SOCK_STREAM, 0);
-  if (sock < 0) {
-    logger_->log_error("Could not create socket to hostName %s", host);
-    return 0;
-  }
-
-#ifndef __MACH__
-  int opt = 1;
-  bool nagle_off = true;
-
-  if (nagle_off) {
-    if (setsockopt(sock, SOL_TCP, TCP_NODELAY, reinterpret_cast<void*>(&opt), sizeof(opt)) < 0) {
-      logger_->log_error("setsockopt() TCP_NODELAY failed");
-      close(sock);
-      return 0;
-    }
-    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char*>(&opt), sizeof(opt)) < 0) {
-      logger_->log_error("setsockopt() SO_REUSEADDR failed");
-      close(sock);
-      return 0;
-    }
-  }
-
-  int sndsize = 256 * 1024;
-  if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&sndsize), sizeof(sndsize)) < 0) {
-    logger_->log_error("setsockopt() SO_SNDBUF failed");
-    close(sock);
-    return 0;
-  }
-#endif
-
-  struct sockaddr_in sa;
-  socklen_t socklen;
-  int status;
-
-  memset(&sa, 0, sizeof(sa));
-  sa.sin_family = AF_INET;
-  sa.sin_addr.s_addr = htonl(INADDR_ANY);
-  sa.sin_port = htons(0);
-  socklen = sizeof(sa);
-  if (bind(sock, (struct sockaddr *) &sa, socklen) < 0) {
-    logger_->log_error("socket bind failed");
-    close(sock);
-    return 0;
-  }
-
-  memset(&sa, 0, sizeof(sa));
-  sa.sin_family = AF_INET;
-  sa.sin_addr.s_addr = addr;
-  sa.sin_port = htons(port);
-  socklen = sizeof(sa);
-
-  status = connect(sock, (struct sockaddr *) &sa, socklen);
-
-  if (status < 0) {
-    logger_->log_error("socket connect failed to %s %ll", host, port);
-    close(sock);
-    return 0;
-  }
-
-  logger_->log_debug("Flow Control Protocol socket %ll connect to server %s port %ll success", sock, host, port);
-
-  return sock;
+  in_addr addr;
+  return 0;
 }
 
 int FlowControlProtocol::sendData(uint8_t *buf, int buflen) {
-  int ret = 0, bytes = 0;
-
-  while (bytes < buflen) {
-    ret = send(_socket, buf + bytes, buflen - bytes, 0);
-    // check for errors
-    if (ret == -1) {
-      return ret;
-    }
-    bytes += ret;
-  }
-
-  return bytes;
+  return 0;
 }
 
 int FlowControlProtocol::selectClient(int msec) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/FlowController.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/FlowController.cpp b/libminifi/src/FlowController.cpp
index 12ce99f..c840f14 100644
--- a/libminifi/src/FlowController.cpp
+++ b/libminifi/src/FlowController.cpp
@@ -18,11 +18,9 @@
  * limitations under the License.
  */
 #include "FlowController.h"
-#include <sys/time.h>
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <vector>
 #include <queue>
 #include <map>
@@ -56,6 +54,13 @@
 #include "core/Connectable.h"
 #include "utils/HTTPClient.h"
 
+
+#ifdef _MSC_VER
+#ifndef PATH_MAX
+#define PATH_MAX 260
+#endif
+#endif
+
 namespace org {
 namespace apache {
 namespace nifi {
@@ -63,7 +68,7 @@ namespace minifi {
 
 std::shared_ptr<utils::IdGenerator> FlowController::id_generator_ = utils::IdGenerator::getIdGenerator();
 
-#define DEFAULT_CONFIG_NAME "conf/flow.yml"
+#define DEFAULT_CONFIG_NAME "conf/config.yml"
 
 FlowController::FlowController(std::shared_ptr<core::Repository> provenance_repo, std::shared_ptr<core::Repository> flow_file_repo, std::shared_ptr<Configure> configure,
                                std::unique_ptr<core::FlowConfiguration> flow_configuration, std::shared_ptr<core::ContentRepository> content_repo, const std::string name, bool headless_mode)
@@ -133,8 +138,12 @@ FlowController::FlowController(std::shared_ptr<core::Repository> provenance_repo
 
 void FlowController::initializePaths(const std::string &adjustedFilename) {
   char *path = NULL;
+#ifndef WIN32
   char full_path[PATH_MAX];
   path = realpath(adjustedFilename.c_str(), full_path);
+#else
+  path = const_cast<char*>(adjustedFilename.c_str());
+#endif
 
   if (path == NULL) {
     throw std::runtime_error("Path is not specified. Either manually set MINIFI_HOME or ensure ../conf exists");
@@ -144,7 +153,7 @@ void FlowController::initializePaths(const std::string &adjustedFilename) {
   logger_->log_info("FlowController NiFi Configuration file %s", pathString);
 
   if (!path) {
-    logger_->log_error("Could not locate path from provided configuration file name (%s).  Exiting.", full_path);
+    logger_->log_error("Could not locate path from provided configuration file name (%s).  Exiting.", path);
     exit(1);
   }
 }
@@ -540,7 +549,7 @@ void FlowController::loadC2ResponseConfiguration(const std::string &prefix) {
         std::string name;
 
         if (configuration_->get(nameOption.str(), name)) {
-          std::shared_ptr<state::response::ResponseNode> new_node = std::make_shared<state::response::ObjectNode>(name, nullptr);
+          std::shared_ptr<state::response::ResponseNode> new_node = std::make_shared<state::response::ObjectNode>(name);
 
           if (configuration_->get(classOption.str(), class_definitions)) {
             std::vector<std::string> classes = utils::StringUtils::split(class_definitions, ",");
@@ -601,7 +610,7 @@ std::shared_ptr<state::response::ResponseNode> FlowController::loadC2ResponseCon
         std::string name;
 
         if (configuration_->get(nameOption.str(), name)) {
-          std::shared_ptr<state::response::ResponseNode> new_node = std::make_shared<state::response::ObjectNode>(name, nullptr);
+          std::shared_ptr<state::response::ResponseNode> new_node = std::make_shared<state::response::ObjectNode>(name);
           if (name.find(",") != std::string::npos) {
             std::vector<std::string> sub_classes = utils::StringUtils::split(name, ",");
             for (std::string subClassStr : classes) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/FlowFileRecord.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/FlowFileRecord.cpp b/libminifi/src/FlowFileRecord.cpp
index 7815e70..8868c9a 100644
--- a/libminifi/src/FlowFileRecord.cpp
+++ b/libminifi/src/FlowFileRecord.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "FlowFileRecord.h"
-#include <sys/time.h>
 #include <time.h>
 #include <cstdio>
 #include <vector>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/Properties.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/Properties.cpp b/libminifi/src/Properties.cpp
index cb3b752..f5537fc 100644
--- a/libminifi/src/Properties.cpp
+++ b/libminifi/src/Properties.cpp
@@ -104,8 +104,12 @@ void Properties::loadConfigureFile(const char *fileName) {
     }
   }
   char *path = NULL;
+#ifndef WIN32
   char full_path[PATH_MAX];
   path = realpath(adjustedFilename.c_str(), full_path);
+#else
+  path = const_cast<char*>(adjustedFilename.c_str());
+#endif
   logger_->log_info("Using configuration file located at %s", path);
 
   std::ifstream file(path, std::ifstream::in);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/RemoteProcessorGroupPort.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/RemoteProcessorGroupPort.cpp b/libminifi/src/RemoteProcessorGroupPort.cpp
index e52a2c2..8bed630 100644
--- a/libminifi/src/RemoteProcessorGroupPort.cpp
+++ b/libminifi/src/RemoteProcessorGroupPort.cpp
@@ -20,8 +20,6 @@
 
 #include "RemoteProcessorGroupPort.h"
 
-#include <curl/curl.h>
-#include <curl/easy.h>
 #include <uuid/uuid.h>
 #include <algorithm>
 #include <cstdint>
@@ -133,8 +131,8 @@ void RemoteProcessorGroupPort::initialize() {
 
 void RemoteProcessorGroupPort::onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) {
   std::string value;
-  if (context->getProperty(portUUID.getName(), value)) {
-    uuid_parse(value.c_str(), protocol_uuid_);
+  if (context->getProperty(portUUID.getName(), value) && !value.empty()) {
+    protocol_uuid_ = value;
   }
 
   std::string context_name;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/c2/C2Agent.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/c2/C2Agent.cpp b/libminifi/src/c2/C2Agent.cpp
index 2514906..1ef8eea 100644
--- a/libminifi/src/c2/C2Agent.cpp
+++ b/libminifi/src/c2/C2Agent.cpp
@@ -17,7 +17,6 @@
  */
 
 #include "c2/C2Agent.h"
-#include <unistd.h>
 #include <csignal>
 #include <utility>
 #include <vector>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/c2/protocols/RESTProtocol.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/c2/protocols/RESTProtocol.cpp b/libminifi/src/c2/protocols/RESTProtocol.cpp
index 391ed81..d1e8b9a 100644
--- a/libminifi/src/c2/protocols/RESTProtocol.cpp
+++ b/libminifi/src/c2/protocols/RESTProtocol.cpp
@@ -33,6 +33,7 @@ namespace minifi {
 namespace c2 {
 
 const C2Payload RESTProtocol::parseJsonResponse(const C2Payload &payload, const std::vector<char> &response) {
+#ifndef WIN32
   rapidjson::Document root;
 
   try {
@@ -126,6 +127,7 @@ const C2Payload RESTProtocol::parseJsonResponse(const C2Payload &payload, const
     }
   } catch (...) {
   }
+#endif
   return std::move(C2Payload(payload.getOperation(), state::UpdateState::READ_COMPLETE, true));
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/capi/C2CallbackAgent.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/capi/C2CallbackAgent.cpp b/libminifi/src/capi/C2CallbackAgent.cpp
index d8da5d6..dd04466 100644
--- a/libminifi/src/capi/C2CallbackAgent.cpp
+++ b/libminifi/src/capi/C2CallbackAgent.cpp
@@ -17,7 +17,6 @@
  */
 
 #include "capi/C2CallbackAgent.h"
-#include <unistd.h>
 #include <csignal>
 #include <utility>
 #include <vector>

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/capi/Plan.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/capi/Plan.cpp b/libminifi/src/capi/Plan.cpp
index 6181382..595a01a 100644
--- a/libminifi/src/capi/Plan.cpp
+++ b/libminifi/src/capi/Plan.cpp
@@ -22,6 +22,8 @@
 #include <set>
 #include <string>
 
+std::shared_ptr<utils::IdGenerator> ExecutionPlan::id_generator_ = utils::IdGenerator::getIdGenerator();
+
 ExecutionPlan::ExecutionPlan(std::shared_ptr<core::ContentRepository> content_repo, std::shared_ptr<core::Repository> flow_repo, std::shared_ptr<core::Repository> prov_repo)
     : content_repo_(content_repo),
       flow_repo_(flow_repo),
@@ -38,8 +40,8 @@ std::shared_ptr<core::Processor> ExecutionPlan::addProcessor(const std::shared_p
     return nullptr;
   }
 
-  uuid_t uuid;
-  uuid_generate(uuid);
+  utils::Identifier uuid;
+  id_generator_->generate(uuid);
 
   processor->setStreamFactory(stream_factory);
   // initialize the processor
@@ -66,7 +68,7 @@ std::shared_ptr<core::Processor> ExecutionPlan::addProcessor(const std::shared_p
     connection->setSource(last);
     connection->setDestination(processor);
 
-    uuid_t uuid_copy, uuid_copy_next;
+    utils::Identifier uuid_copy, uuid_copy_next;
     last->getUUID(uuid_copy);
     connection->setSourceUUID(uuid_copy);
     processor->getUUID(uuid_copy_next);
@@ -95,8 +97,8 @@ std::shared_ptr<core::Processor> ExecutionPlan::addProcessor(const std::string &
     return nullptr;
   }
 
-  uuid_t uuid;
-  uuid_generate(uuid);
+  utils::Identifier uuid;
+  id_generator_->generate(uuid);
 
   auto ptr = core::ClassLoader::getDefaultClassLoader().instantiate(processor_name, uuid);
   if (nullptr == ptr) {
@@ -186,7 +188,7 @@ std::shared_ptr<minifi::Connection> ExecutionPlan::buildFinalConnection(std::sha
   if (setDest)
     connection->setDestination(processor);
 
-  uuid_t uuid_copy;
+  utils::Identifier uuid_copy;
   last->getUUID(uuid_copy);
   connection->setSourceUUID(uuid_copy);
   if (setDest)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/controllers/LinuxPowerManagementService.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/controllers/LinuxPowerManagementService.cpp b/libminifi/src/controllers/LinuxPowerManagementService.cpp
index 836c9d3..a54cb7b 100644
--- a/libminifi/src/controllers/LinuxPowerManagementService.cpp
+++ b/libminifi/src/controllers/LinuxPowerManagementService.cpp
@@ -40,7 +40,7 @@ bool LinuxPowerManagerService::isAboveMax(int new_tasks) {
 }
 
 uint16_t LinuxPowerManagerService::getMaxThreads() {
-  return std::numeric_limits<uint16_t>::max();
+  return (std::numeric_limits<uint16_t>::max)();
 }
 
 bool LinuxPowerManagerService::canIncrease() {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/controllers/NetworkPrioritizerService.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/controllers/NetworkPrioritizerService.cpp b/libminifi/src/controllers/NetworkPrioritizerService.cpp
index 63210ec..d92758a 100644
--- a/libminifi/src/controllers/NetworkPrioritizerService.cpp
+++ b/libminifi/src/controllers/NetworkPrioritizerService.cpp
@@ -21,15 +21,18 @@
 #include <limits>
 #include <string>
 #include <vector>
-#include <sys/ioctl.h>
+#ifndef WIN32
 #include <ifaddrs.h>
 #include <net/if.h>
+#include <sys/ioctl.h>
 #include <netinet/in.h>
-#include <string.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <stdlib.h>
 #include <unistd.h>
+#endif
+#include <string.h>
+#include <stdlib.h>
+
 #include <set>
 #include "utils/StringUtils.h"
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD))
@@ -112,6 +115,7 @@ std::string NetworkPrioritizerService::get_nearest_interface(const std::vector<s
 }
 
 bool NetworkPrioritizerService::interface_online(const std::string &ifc) {
+#ifndef WIN32
   struct ifreq ifr;
   auto sockid = socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP);
   memset(&ifr, 0, sizeof(ifr));
@@ -121,6 +125,9 @@ bool NetworkPrioritizerService::interface_online(const std::string &ifc) {
   }
   close(sockid);
   return (ifr.ifr_flags & IFF_UP) && (ifr.ifr_flags & IFF_RUNNING);
+#else
+  return false;
+#endif
 }
 
 std::vector<std::string> NetworkPrioritizerService::getInterfaces(uint32_t size = 0) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/controllers/SSLContextService.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/controllers/SSLContextService.cpp b/libminifi/src/controllers/SSLContextService.cpp
index 352ba37..8d0a997 100644
--- a/libminifi/src/controllers/SSLContextService.cpp
+++ b/libminifi/src/controllers/SSLContextService.cpp
@@ -17,8 +17,11 @@
  */
 
 #include "controllers/SSLContextService.h"
+
+#ifdef OPENSSL_SUPPORT
 #include <openssl/err.h>
 #include <openssl/ssl.h>
+#endif
 #include <string>
 #include <memory>
 #include <set>
@@ -44,7 +47,13 @@ void SSLContextService::initialize() {
   initialized_ = true;
 }
 
+/**
+ * If OpenSSL is not installed we may still continue operations. Nullptr will
+ * be returned and it will be up to the caller to determien if this failure is
+ * recoverable.
+ */
 std::unique_ptr<SSLContext> SSLContextService::createSSLContext() {
+#ifdef OPENSSL_SUPPORT
   SSL_library_init();
   const SSL_METHOD *method;
 
@@ -82,6 +91,9 @@ std::unique_ptr<SSLContext> SSLContextService::createSSLContext() {
     logger_->log_error("Can not load CA certificate %s, Exiting, error : %s", ca_certificate_, std::strerror(errno));
   }
   return std::unique_ptr<SSLContext>(new SSLContext(ctx));
+#else
+  return nullptr;
+#endif
 }
 
 const std::string &SSLContextService::getCertificateFile() {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/controllers/UpdatePolicyControllerService.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/controllers/UpdatePolicyControllerService.cpp b/libminifi/src/controllers/UpdatePolicyControllerService.cpp
index 08faad2..ae56fe1 100644
--- a/libminifi/src/controllers/UpdatePolicyControllerService.cpp
+++ b/libminifi/src/controllers/UpdatePolicyControllerService.cpp
@@ -21,15 +21,8 @@
 #include <limits>
 #include <string>
 #include <vector>
-#include <sys/ioctl.h>
-#include <ifaddrs.h>
-#include <net/if.h>
-#include <netinet/in.h>
 #include <string.h>
-#include <sys/socket.h>
-#include <netdb.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <set>
 #include "utils/StringUtils.h"
 #if ( defined(__APPLE__) || defined(__MACH__) || defined(BSD))

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/ClassLoader.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/ClassLoader.cpp b/libminifi/src/core/ClassLoader.cpp
index 5c2fdf8..9c1aa67 100644
--- a/libminifi/src/core/ClassLoader.cpp
+++ b/libminifi/src/core/ClassLoader.cpp
@@ -15,10 +15,8 @@
  * limitations under the License.
  */
 
-#include <sys/mman.h>
 #include <memory>
 #include <string>
-
 #include "core/ClassLoader.h"
 
 namespace org {
@@ -35,6 +33,7 @@ ClassLoader &ClassLoader::getDefaultClassLoader() {
   // populate ret
   return ret;
 }
+
 uint16_t ClassLoader::registerResource(const std::string &resource, const std::string &resourceFunction) {
   void *resource_ptr = nullptr;
   if (resource.empty()) {
@@ -57,7 +56,7 @@ uint16_t ClassLoader::registerResource(const std::string &resource, const std::s
   // load the symbols
   createFactory* create_factory_func = reinterpret_cast<createFactory*>(dlsym(resource_ptr, resourceFunction.c_str()));
   const char* dlsym_error = dlerror();
-  if (dlsym_error) {
+  if ((dlsym_error != nullptr && strlen(dlsym_error) > 0) || create_factory_func == nullptr) {
     return RESOURCE_FAILURE;
   }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/ConfigurableComponent.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/ConfigurableComponent.cpp b/libminifi/src/core/ConfigurableComponent.cpp
index ff6d1e5..c413ab9 100644
--- a/libminifi/src/core/ConfigurableComponent.cpp
+++ b/libminifi/src/core/ConfigurableComponent.cpp
@@ -191,6 +191,7 @@ bool ConfigurableComponent::createDynamicProperty(const std::string &name, const
   }
 
   Property new_property(name, DEFAULT_DYNAMIC_PROPERTY_DESC, value, false, "", {}, {});
+  new_property.setSupportsExpressionLanguage(true);
   logger_->log_info("Processor %s dynamic property '%s' value '%s'", name.c_str(), new_property.getName().c_str(), value.c_str());
   dynamic_properties_[new_property.getName()] = new_property;
   onDynamicPropertyModified({}, new_property);
@@ -205,6 +206,7 @@ bool ConfigurableComponent::setDynamicProperty(const std::string name, std::stri
     Property &orig_property = it->second;
     Property new_property = orig_property;
     new_property.setValue(value);
+    new_property.setSupportsExpressionLanguage(true);
     dynamic_properties_[new_property.getName()] = new_property;
     onDynamicPropertyModified(orig_property, new_property);
     logger_->log_debug("Component %s dynamic property name %s value %s", name, new_property.getName(), value);
@@ -222,6 +224,7 @@ bool ConfigurableComponent::updateDynamicProperty(const std::string &name, const
     Property &orig_property = it->second;
     Property new_property = orig_property;
     new_property.addValue(value);
+    new_property.setSupportsExpressionLanguage(true);
     dynamic_properties_[new_property.getName()] = new_property;
     onDynamicPropertyModified(orig_property, new_property);
     logger_->log_debug("Component %s dynamic property name %s value %s", name, new_property.getName(), value);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/Connectable.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/Connectable.cpp b/libminifi/src/core/Connectable.cpp
index 2a98818..a5fb1b2 100644
--- a/libminifi/src/core/Connectable.cpp
+++ b/libminifi/src/core/Connectable.cpp
@@ -30,13 +30,21 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-Connectable::Connectable(std::string name, uuid_t uuid)
+Connectable::Connectable(std::string name, utils::Identifier &uuid)
     : CoreComponent(name, uuid),
       max_concurrent_tasks_(1),
       connectable_version_(nullptr),
       logger_(logging::LoggerFactory<Connectable>::getLogger()) {
 }
 
+Connectable::Connectable(std::string name)
+    : CoreComponent(name),
+      max_concurrent_tasks_(1),
+      connectable_version_(nullptr),
+      logger_(logging::LoggerFactory<Connectable>::getLogger()) {
+}
+
+
 Connectable::Connectable(const Connectable &&other)
     : CoreComponent(std::move(other)),
       max_concurrent_tasks_(std::move(other.max_concurrent_tasks_)),

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/Core.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/Core.cpp b/libminifi/src/core/Core.cpp
index da9462b..e5c8d6c 100644
--- a/libminifi/src/core/Core.cpp
+++ b/libminifi/src/core/Core.cpp
@@ -29,31 +29,29 @@ namespace core {
 std::shared_ptr<utils::IdGenerator> CoreComponent::id_generator_ = utils::IdGenerator::getIdGenerator();
 
 // Set UUID
-void CoreComponent::setUUID(uuid_t uuid) {
-  uuid_copy(uuid_, uuid);
-  char uuidStr[37];
-  uuid_unparse_lower(uuid_, uuidStr);
-  uuidStr_ = uuidStr;
+void CoreComponent::setUUID(utils::Identifier &uuid) {
+  uuid_ = uuid;
+  uuidStr_ = uuid_.to_string();
 }
 
 void CoreComponent::setUUIDStr(const std::string uuidStr) {
-  uuid_parse(uuidStr.c_str(), uuid_);
+  uuid_ = uuidStr;
   uuidStr_ = uuidStr;
 }
 // Get UUID
-bool CoreComponent::getUUID(uuid_t uuid) {
-  if (uuid) {
-    uuid_copy(uuid, uuid_);
-    return true;
-  } else {
+bool CoreComponent::getUUID(utils::Identifier &uuid) {
+  if (uuid_ == nullptr) {
     return false;
   }
+  uuid = uuid_;
+  return true;
 }
 
 // Get UUID
-unsigned const char *CoreComponent::getUUID() {
-  return uuid_;
-}
+/*
+ unsigned const char *CoreComponent::getUUID() {
+ return uuid_.getIdentifier();
+ }*/
 
 // Set Processor Name
 void CoreComponent::setName(const std::string name) {

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/FlowConfiguration.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/FlowConfiguration.cpp b/libminifi/src/core/FlowConfiguration.cpp
index 320797b..aea6d62 100644
--- a/libminifi/src/core/FlowConfiguration.cpp
+++ b/libminifi/src/core/FlowConfiguration.cpp
@@ -28,13 +28,15 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-std::vector<std::string> FlowConfiguration::statics_sl_funcs_;
-std::mutex FlowConfiguration::atomic_initialization_;
+static_initializers &get_static_functions() {
+  static static_initializers static_sl_funcs;
+  return static_sl_funcs;
+}
 
 FlowConfiguration::~FlowConfiguration() {
 }
 
-std::shared_ptr<core::Processor> FlowConfiguration::createProcessor(std::string name, uuid_t uuid) {
+std::shared_ptr<core::Processor> FlowConfiguration::createProcessor(std::string name, utils::Identifier &  uuid) {
   auto ptr = core::ClassLoader::getDefaultClassLoader().instantiate(name, uuid);
   if (nullptr == ptr) {
     logger_->log_error("No Processor defined for %s", name);
@@ -60,47 +62,47 @@ std::shared_ptr<core::Processor> FlowConfiguration::createProvenanceReportTask()
 }
 
 std::unique_ptr<core::ProcessGroup> FlowConfiguration::updateFromPayload(const std::string &source, const std::string &yamlConfigPayload) {
-    if (!source.empty()) {
-      std::string host, protocol, path, query, url = source;
-      int port;
-      utils::parse_url(&url, &host, &port, &protocol, &path, &query);
-
-      std::string flow_id, bucket_id;
-      auto path_split = utils::StringUtils::split(path, "/");
-      for (size_t i = 0; i < path_split.size(); i++) {
-        const std::string &str = path_split.at(i);
-        if (str == "flows") {
-          if (i + 1 < path_split.size()) {
-            flow_id = path_split.at(i + 1);
-            i++;
-          }
+  if (!source.empty()) {
+    std::string host, protocol, path, query, url = source;
+    int port;
+    utils::parse_url(&url, &host, &port, &protocol, &path, &query);
+
+    std::string flow_id, bucket_id;
+    auto path_split = utils::StringUtils::split(path, "/");
+    for (size_t i = 0; i < path_split.size(); i++) {
+      const std::string &str = path_split.at(i);
+      if (str == "flows") {
+        if (i + 1 < path_split.size()) {
+          flow_id = path_split.at(i + 1);
+          i++;
         }
+      }
 
-        if (str == "bucket") {
-          if (i + 1 < path_split.size()) {
-            bucket_id = path_split.at(i + 1);
-            i++;
-          }
+      if (str == "bucket") {
+        if (i + 1 < path_split.size()) {
+          bucket_id = path_split.at(i + 1);
+          i++;
         }
       }
-      flow_version_->setFlowVersion(url, bucket_id, flow_id);
     }
-    return getRootFromPayload(yamlConfigPayload);
+    flow_version_->setFlowVersion(url, bucket_id, flow_id);
   }
+  return getRootFromPayload(yamlConfigPayload);
+}
 
-std::unique_ptr<core::ProcessGroup> FlowConfiguration::createRootProcessGroup(std::string name, uuid_t uuid, int version) {
+std::unique_ptr<core::ProcessGroup> FlowConfiguration::createRootProcessGroup(std::string name, utils::Identifier &  uuid, int version) {
   return std::unique_ptr<core::ProcessGroup>(new core::ProcessGroup(core::ROOT_PROCESS_GROUP, name, uuid, version));
 }
 
-std::unique_ptr<core::ProcessGroup> FlowConfiguration::createRemoteProcessGroup(std::string name, uuid_t uuid) {
+std::unique_ptr<core::ProcessGroup> FlowConfiguration::createRemoteProcessGroup(std::string name, utils::Identifier &  uuid) {
   return std::unique_ptr<core::ProcessGroup>(new core::ProcessGroup(core::REMOTE_PROCESS_GROUP, name, uuid));
 }
 
-std::shared_ptr<minifi::Connection> FlowConfiguration::createConnection(std::string name, uuid_t uuid) {
+std::shared_ptr<minifi::Connection> FlowConfiguration::createConnection(std::string name, utils::Identifier &  uuid) {
   return std::make_shared<minifi::Connection>(flow_file_repo_, content_repo_, name, uuid);
 }
 
-std::shared_ptr<core::controller::ControllerServiceNode> FlowConfiguration::createControllerService(const std::string &class_name, const std::string &name, uuid_t uuid) {
+std::shared_ptr<core::controller::ControllerServiceNode> FlowConfiguration::createControllerService(const std::string &class_name, const std::string &name, utils::Identifier &  uuid) {
   std::shared_ptr<core::controller::ControllerServiceNode> controllerServicesNode = service_provider_->createControllerService(class_name, name, true);
   if (nullptr != controllerServicesNode)
     controllerServicesNode->setUUID(uuid);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/FlowFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/FlowFile.cpp b/libminifi/src/core/FlowFile.cpp
index 3427559..d41d9b0 100644
--- a/libminifi/src/core/FlowFile.cpp
+++ b/libminifi/src/core/FlowFile.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<utils::IdGenerator> FlowFile::id_generator_ = utils::IdGenerator
 std::shared_ptr<logging::Logger> FlowFile::logger_ = logging::LoggerFactory<FlowFile>::getLogger();
 
 FlowFile::FlowFile()
-    : Connectable("FlowFile", 0),
+    : Connectable("FlowFile"),
       size_(0),
       id_(0),
       stored(false),
@@ -54,7 +54,7 @@ FlowFile::~FlowFile() {
 }
 
 FlowFile& FlowFile::operator=(const FlowFile& other) {
-  uuid_copy(uuid_, other.uuid_);
+  uuid_ = other.uuid_;
   stored = other.stored;
   marked_delete_ = other.marked_delete_;
   entry_date_ = other.entry_date_;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/ProcessGroup.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/ProcessGroup.cpp b/libminifi/src/core/ProcessGroup.cpp
index 205f9f2..7df1b09 100644
--- a/libminifi/src/core/ProcessGroup.cpp
+++ b/libminifi/src/core/ProcessGroup.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "core/ProcessGroup.h"
-#include <sys/time.h>
 #include <time.h>
 #include <vector>
 #include <memory>
@@ -39,17 +38,40 @@ namespace core {
 
 std::shared_ptr<utils::IdGenerator> ProcessGroup::id_generator_ = utils::IdGenerator::getIdGenerator();
 
-ProcessGroup::ProcessGroup(ProcessGroupType type, std::string name, uuid_t uuid, int version, ProcessGroup *parent)
+ProcessGroup::ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid)
+    : ProcessGroup(type, name, uuid, 0, 0) {
+}
+
+ProcessGroup::ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid, int version)
+    : ProcessGroup(type, name, uuid, version, 0) {
+}
+
+ProcessGroup::ProcessGroup(ProcessGroupType type, std::string name, utils::Identifier &uuid, int version, ProcessGroup *parent)
     : logger_(logging::LoggerFactory<ProcessGroup>::getLogger()),
       name_(name),
       type_(type),
       config_version_(version),
       parent_process_group_(parent) {
-  if (!uuid)
-    // Generate the global UUID for the flow record
+  if (uuid == nullptr) {
     id_generator_->generate(uuid_);
-  else
-    uuid_copy(uuid_, uuid);
+  } else {
+    uuid_ = uuid;
+  }
+
+  yield_period_msec_ = 0;
+  transmitting_ = false;
+  transport_protocol_ = "RAW";
+
+  logger_->log_debug("ProcessGroup %s created", name_);
+}
+
+ProcessGroup::ProcessGroup(ProcessGroupType type, std::string name)
+    : logger_(logging::LoggerFactory<ProcessGroup>::getLogger()),
+      name_(name),
+      type_(type),
+      config_version_(0),
+      parent_process_group_(0) {
+  id_generator_->generate(uuid_);
 
   yield_period_msec_ = 0;
   transmitting_ = false;
@@ -168,20 +190,15 @@ void ProcessGroup::stopProcessing(TimerDrivenSchedulingAgent *timeScheduler, Eve
   }
 }
 
-std::shared_ptr<Processor> ProcessGroup::findProcessor(uuid_t uuid) {
+std::shared_ptr<Processor> ProcessGroup::findProcessor(utils::Identifier &uuid) {
   std::lock_guard<std::recursive_mutex> lock(mutex_);
   std::shared_ptr<Processor> ret = NULL;
   for (auto processor : processors_) {
     logger_->log_debug("find processor %s", processor->getName());
-    uuid_t processorUUID;
+    utils::Identifier processorUUID;
 
     if (processor->getUUID(processorUUID)) {
-      char uuid_str[37];  // ex. "1b4e28ba-2fa1-11d2-883f-0016d3cca427" + "\0"
-      uuid_unparse_lower(processorUUID, uuid_str);
-      std::string processorUUIDstr = uuid_str;
-      uuid_unparse_lower(uuid, uuid_str);
-      std::string uuidStr = uuid_str;
-      if (processorUUIDstr == uuidStr) {
+      if (uuid == processorUUID) {
         return processor;
       }
     }
@@ -277,14 +294,14 @@ void ProcessGroup::addConnection(std::shared_ptr<Connection> connection) {
     // We do not have the same connection in this process group yet
     connections_.insert(connection);
     logger_->log_debug("Add connection %s into process group %s", connection->getName(), name_);
-    uuid_t sourceUUID;
+    utils::Identifier sourceUUID;
     std::shared_ptr<Processor> source = NULL;
     connection->getSourceUUID(sourceUUID);
     source = this->findProcessor(sourceUUID);
     if (source)
       source->addConnection(connection);
     std::shared_ptr<Processor> destination = NULL;
-    uuid_t destinationUUID;
+    utils::Identifier destinationUUID;
     connection->getDestinationUUID(destinationUUID);
     destination = this->findProcessor(destinationUUID);
     if (destination && destination != source)
@@ -299,14 +316,14 @@ void ProcessGroup::removeConnection(std::shared_ptr<Connection> connection) {
     // We do not have the same connection in this process group yet
     connections_.erase(connection);
     logger_->log_debug("Remove connection %s into process group %s", connection->getName(), name_);
-    uuid_t sourceUUID;
+    utils::Identifier sourceUUID;
     std::shared_ptr<Processor> source = NULL;
     connection->getSourceUUID(sourceUUID);
     source = this->findProcessor(sourceUUID);
     if (source)
       source->removeConnection(connection);
     std::shared_ptr<Processor> destination = NULL;
-    uuid_t destinationUUID;
+    utils::Identifier destinationUUID;
     connection->getDestinationUUID(destinationUUID);
     destination = this->findProcessor(destinationUUID);
     if (destination && destination != source)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/ProcessSession.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/ProcessSession.cpp b/libminifi/src/core/ProcessSession.cpp
index 1bfa9f8..dc45446 100644
--- a/libminifi/src/core/ProcessSession.cpp
+++ b/libminifi/src/core/ProcessSession.cpp
@@ -19,7 +19,6 @@
  */
 #include "core/ProcessSession.h"
 #include "core/ProcessSessionReadCallback.h"
-#include <sys/time.h>
 #include <time.h>
 #include <vector>
 #include <queue>
@@ -31,6 +30,25 @@
 #include <thread>
 #include <iostream>
 #include <uuid/uuid.h>
+/* This implementation is only for native Windows systems.  */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#define _WINSOCKAPI_
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <WinSock2.h>
+#include <WS2tcpip.h>
+#include <Windows.h>
+#pragma comment(lib, "Ws2_32.lib")
+#include <direct.h>
+
+int getpagesize(void) {
+  return 4096;
+  // SYSTEM_INFO system_info;
+  // GetSystemInfo(&system_info);
+  // return system_info.dwPageSize;
+}
+#endif
 
 namespace org {
 namespace apache {
@@ -619,12 +637,10 @@ bool ProcessSession::exportContent(const std::string &destination, const std::st
 }
 
 bool ProcessSession::exportContent(const std::string &destination, const std::shared_ptr<core::FlowFile> &flow, bool keepContent) {
-  char tmpFileUuidStr[37];
-  uuid_t tmpFileUuid;
+  utils::Identifier tmpFileUuid;
   id_generator_->generate(tmpFileUuid);
-  uuid_unparse_lower(tmpFileUuid, tmpFileUuidStr);
   std::stringstream tmpFileSs;
-  tmpFileSs << destination << "." << tmpFileUuidStr;
+  tmpFileSs << destination << "." << tmpFileUuid.to_string();
   std::string tmpFileName = tmpFileSs.str();
 
   return exportContent(destination, tmpFileName, flow, keepContent);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/src/core/Processor.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/core/Processor.cpp b/libminifi/src/core/Processor.cpp
index 7c0fe25..480ae58 100644
--- a/libminifi/src/core/Processor.cpp
+++ b/libminifi/src/core/Processor.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 #include "core/Processor.h"
-#include <sys/time.h>
 #include <time.h>
 #include <vector>
 #include <queue>
@@ -45,8 +44,8 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
-Processor::Processor(std::string name, uuid_t uuid)
-    : Connectable(name, uuid),
+Processor::Processor(std::string name)
+    : Connectable(name),
       ConfigurableComponent(),
       logger_(logging::LoggerFactory<Processor>::getLogger()) {
   has_work_.store(false);
@@ -66,6 +65,27 @@ Processor::Processor(std::string name, uuid_t uuid)
   logger_->log_debug("Processor %s created UUID %s", name_, uuidStr_);
 }
 
+Processor::Processor(std::string name, utils::Identifier &uuid)
+    : Connectable(name, uuid),
+      ConfigurableComponent(),
+      logger_(logging::LoggerFactory<Processor>::getLogger()) {
+  has_work_.store(false);
+  // Setup the default values
+  state_ = DISABLED;
+  strategy_ = TIMER_DRIVEN;
+  loss_tolerant_ = false;
+  _triggerWhenEmpty = false;
+  scheduling_period_nano_ = MINIMUM_SCHEDULING_NANOS;
+  run_duration_nano_ = DEFAULT_RUN_DURATION;
+  yield_period_msec_ = DEFAULT_YIELD_PERIOD_SECONDS * 1000;
+  _penalizationPeriodMsec = DEFAULT_PENALIZATION_PERIOD_SECONDS * 1000;
+  max_concurrent_tasks_ = DEFAULT_MAX_CONCURRENT_TASKS;
+  active_tasks_ = 0;
+  yield_expiration_ = 0;
+  incoming_connections_Iter = this->_incomingConnections.begin();
+  logger_->log_debug("Processor %s created UUID %s with uuid %s", name_, uuidStr_, uuid.to_string());
+}
+
 bool Processor::isRunning() {
   return (state_ == RUNNING && active_tasks_ > 0);
 }
@@ -87,17 +107,13 @@ bool Processor::addConnection(std::shared_ptr<Connectable> conn) {
   std::shared_ptr<Connection> connection = std::static_pointer_cast<Connection>(conn);
   std::lock_guard<std::mutex> lock(mutex_);
 
-  uuid_t srcUUID;
-  uuid_t destUUID;
+  utils::Identifier srcUUID;
+  utils::Identifier destUUID;
 
   connection->getSourceUUID(srcUUID);
   connection->getDestinationUUID(destUUID);
-  char uuid_str[37];
-
-  uuid_unparse_lower(uuid_, uuid_str);
-  std::string my_uuid = uuid_str;
-  uuid_unparse_lower(destUUID, uuid_str);
-  std::string destination_uuid = uuid_str;
+  std::string my_uuid = uuid_.to_string();
+  std::string destination_uuid = destUUID.to_string();
   if (my_uuid == destination_uuid) {
     // Connection is destination to the current processor
     if (_incomingConnections.find(connection) == _incomingConnections.end()) {
@@ -108,8 +124,7 @@ bool Processor::addConnection(std::shared_ptr<Connectable> conn) {
       ret = true;
     }
   }
-  uuid_unparse_lower(srcUUID, uuid_str);
-  std::string source_uuid = uuid_str;
+  std::string source_uuid = srcUUID.to_string();
   if (my_uuid == source_uuid) {
     std::string relationship = connection->getRelationship().getName();
     // Connection is source from the current processor
@@ -147,15 +162,15 @@ void Processor::removeConnection(std::shared_ptr<Connectable> conn) {
 
   std::lock_guard<std::mutex> lock(mutex_);
 
-  uuid_t srcUUID;
-  uuid_t destUUID;
+  utils::Identifier srcUUID;
+  utils::Identifier destUUID;
 
   std::shared_ptr<Connection> connection = std::static_pointer_cast<Connection>(conn);
 
   connection->getSourceUUID(srcUUID);
   connection->getDestinationUUID(destUUID);
 
-  if (uuid_compare(uuid_, destUUID) == 0) {
+  if (uuid_ == destUUID) {
     // Connection is destination to the current processor
     if (_incomingConnections.find(connection) != _incomingConnections.end()) {
       _incomingConnections.erase(connection);
@@ -165,7 +180,7 @@ void Processor::removeConnection(std::shared_ptr<Connectable> conn) {
     }
   }
 
-  if (uuid_compare(uuid_, srcUUID) == 0) {
+  if (uuid_ == srcUUID) {
     std::string relationship = connection->getRelationship().getName();
     // Connection is source from the current processor
     auto &&it = out_going_connections_.find(relationship);


[3/9] nifi-minifi-cpp git commit: MINIFICPP-595: Provide basic support for windows. MINIFICPP-32: Add windows event log reader MINIFICPP-596: Build core and libminifi artifacts. Must abstract features that are operating system dependent, such as uuid

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/libminifi/test/unit/YamlConfigurationTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/YamlConfigurationTests.cpp b/libminifi/test/unit/YamlConfigurationTests.cpp
index d495d75..671b59f 100644
--- a/libminifi/test/unit/YamlConfigurationTests.cpp
+++ b/libminifi/test/unit/YamlConfigurationTests.cpp
@@ -30,163 +30,164 @@ TEST_CASE("Test YAML Config Processing", "[YamlConfiguration]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
 
   SECTION("loading YAML without optional component IDs works") {
-    static const std::string CONFIG_YAML_WITHOUT_IDS = ""
-        "MiNiFi Config Version: 1\n"
-        "Flow Controller:\n"
-        "    name: MiNiFi Flow\n"
-        "    comment:\n"
-        "\n"
-        "Core Properties:\n"
-        "    flow controller graceful shutdown period: 10 sec\n"
-        "    flow service write delay interval: 500 ms\n"
-        "    administrative yield duration: 30 sec\n"
-        "    bored yield duration: 10 millis\n"
-        "\n"
-        "FlowFile Repository:\n"
-        "    partitions: 256\n"
-        "    checkpoint interval: 2 mins\n"
-        "    always sync: false\n"
-        "    Swap:\n"
-        "        threshold: 20000\n"
-        "        in period: 5 sec\n"
-        "        in threads: 1\n"
-        "        out period: 5 sec\n"
-        "        out threads: 4\n"
-        "\n"
-        "Provenance Repository:\n"
-        "    provenance rollover time: 1 min\n"
-        "\n"
-        "Content Repository:\n"
-        "    content claim max appendable size: 10 MB\n"
-        "    content claim max flow files: 100\n"
-        "    always sync: false\n"
-        "\n"
-        "Component Status Repository:\n"
-        "    buffer size: 1440\n"
-        "    snapshot frequency: 1 min\n"
-        "\n"
-        "Security Properties:\n"
-        "    keystore: /tmp/ssl/localhost-ks.jks\n"
-        "    keystore type: JKS\n"
-        "    keystore password: localtest\n"
-        "    key password: localtest\n"
-        "    truststore: /tmp/ssl/localhost-ts.jks\n"
-        "    truststore type: JKS\n"
-        "    truststore password: localtest\n"
-        "    ssl protocol: TLS\n"
-        "    Sensitive Props:\n"
-        "        key:\n"
-        "        algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL\n"
-        "        provider: BC\n"
-        "\n"
-        "Processors:\n"
-        "    - name: TailFile\n"
-        "      class: org.apache.nifi.processors.standard.TailFile\n"
-        "      max concurrent tasks: 1\n"
-        "      scheduling strategy: TIMER_DRIVEN\n"
-        "      scheduling period: 1 sec\n"
-        "      penalization period: 30 sec\n"
-        "      yield period: 1 sec\n"
-        "      run duration nanos: 0\n"
-        "      auto-terminated relationships list:\n"
-        "      Properties:\n"
-        "          File to Tail: logs/minifi-app.log\n"
-        "          Rolling Filename Pattern: minifi-app*\n"
-        "          Initial Start Position: Beginning of File\n"
-        "\n"
-        "Connections:\n"
-        "    - name: TailToS2S\n"
-        "      source name: TailFile\n"
-        "      source relationship name: success\n"
-        "      destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61\n"
-        "      max work queue size: 0\n"
-        "      max work queue data size: 1 MB\n"
-        "      flowfile expiration: 60 sec\n"
-        "      queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer\n"
-        "\n"
-        "Remote Processing Groups:\n"
-        "    - name: NiFi Flow\n"
-        "      comment:\n"
-        "      url: https://localhost:8090/nifi\n"
-        "      timeout: 30 secs\n"
-        "      yield period: 10 sec\n"
-        "      Input Ports:\n"
-        "          - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61\n"
-        "            name: tailed log\n"
-        "            comments:\n"
-        "            max concurrent tasks: 1\n"
-        "            use compression: false\n"
-        "\n"
-        "Provenance Reporting:\n"
-        "    comment:\n"
-        "    scheduling strategy: TIMER_DRIVEN\n"
-        "    scheduling period: 30 sec\n"
-        "    host: localhost\n"
-        "    port name: provenance\n"
-        "    port: 8090\n"
-        "    port uuid: 2f389b8d-83f2-48d3-b465-048f28a1cb56\n"
-        "    url: https://localhost:8090/\n"
-        "    originating url: http://${hostname(true)}:8081/nifi\n"
-        "    use compression: true\n"
-        "    timeout: 30 secs\n"
-        "    batch size: 1000";
-
-    std::istringstream configYamlStream(CONFIG_YAML_WITHOUT_IDS);
-    std::unique_ptr<core::ProcessGroup> rootFlowConfig = yamlConfig.getYamlRoot(configYamlStream);
+  static const std::string CONFIG_YAML_WITHOUT_IDS = ""
+  "MiNiFi Config Version: 1\n"
+  "Flow Controller:\n"
+  "    name: MiNiFi Flow\n"
+  "    comment:\n"
+  "\n"
+  "Core Properties:\n"
+  "    flow controller graceful shutdown period: 10 sec\n"
+  "    flow service write delay interval: 500 ms\n"
+  "    administrative yield duration: 30 sec\n"
+  "    bored yield duration: 10 millis\n"
+  "\n"
+  "FlowFile Repository:\n"
+  "    partitions: 256\n"
+  "    checkpoint interval: 2 mins\n"
+  "    always sync: false\n"
+  "    Swap:\n"
+  "        threshold: 20000\n"
+  "        in period: 5 sec\n"
+  "        in threads: 1\n"
+  "        out period: 5 sec\n"
+  "        out threads: 4\n"
+  "\n"
+  "Provenance Repository:\n"
+  "    provenance rollover time: 1 min\n"
+  "\n"
+  "Content Repository:\n"
+  "    content claim max appendable size: 10 MB\n"
+  "    content claim max flow files: 100\n"
+  "    always sync: false\n"
+  "\n"
+  "Component Status Repository:\n"
+  "    buffer size: 1440\n"
+  "    snapshot frequency: 1 min\n"
+  "\n"
+  "Security Properties:\n"
+  "    keystore: /tmp/ssl/localhost-ks.jks\n"
+  "    keystore type: JKS\n"
+  "    keystore password: localtest\n"
+  "    key password: localtest\n"
+  "    truststore: /tmp/ssl/localhost-ts.jks\n"
+  "    truststore type: JKS\n"
+  "    truststore password: localtest\n"
+  "    ssl protocol: TLS\n"
+  "    Sensitive Props:\n"
+  "        key:\n"
+  "        algorithm: PBEWITHMD5AND256BITAES-CBC-OPENSSL\n"
+  "        provider: BC\n"
+  "\n"
+  "Processors:\n"
+  "    - name: TailFile\n"
+  "      class: org.apache.nifi.processors.standard.TailFile\n"
+  "      max concurrent tasks: 1\n"
+  "      scheduling strategy: TIMER_DRIVEN\n"
+  "      scheduling period: 1 sec\n"
+  "      penalization period: 30 sec\n"
+  "      yield period: 1 sec\n"
+  "      run duration nanos: 0\n"
+  "      auto-terminated relationships list:\n"
+  "      Properties:\n"
+  "          File to Tail: logs/minifi-app.log\n"
+  "          Rolling Filename Pattern: minifi-app*\n"
+  "          Initial Start Position: Beginning of File\n"
+  "\n"
+  "Connections:\n"
+  "    - name: TailToS2S\n"
+  "      source name: TailFile\n"
+  "      source relationship name: success\n"
+  "      destination name: 8644cbcc-a45c-40e0-964d-5e536e2ada61\n"
+  "      max work queue size: 0\n"
+  "      max work queue data size: 1 MB\n"
+  "      flowfile expiration: 60 sec\n"
+  "      queue prioritizer class: org.apache.nifi.prioritizer.NewestFlowFileFirstPrioritizer\n"
+  "\n"
+  "Remote Processing Groups:\n"
+  "    - name: NiFi Flow\n"
+  "      comment:\n"
+  "      url: https://localhost:8090/nifi\n"
+  "      timeout: 30 secs\n"
+  "      yield period: 10 sec\n"
+  "      Input Ports:\n"
+  "          - id: 8644cbcc-a45c-40e0-964d-5e536e2ada61\n"
+  "            name: tailed log\n"
+  "            comments:\n"
+  "            max concurrent tasks: 1\n"
+  "            use compression: false\n"
+  "\n"
+  "Provenance Reporting:\n"
+  "    comment:\n"
+  "    scheduling strategy: TIMER_DRIVEN\n"
+  "    scheduling period: 30 sec\n"
+  "    host: localhost\n"
+  "    port name: provenance\n"
+  "    port: 8090\n"
+  "    port uuid: 2f389b8d-83f2-48d3-b465-048f28a1cb56\n"
+  "    url: https://localhost:8090/\n"
+  "    originating url: http://${hostname(true)}:8081/nifi\n"
+  "    use compression: true\n"
+  "    timeout: 30 secs\n"
+  "    batch size: 1000";
+
+  std::istringstream configYamlStream(CONFIG_YAML_WITHOUT_IDS);
+  std::unique_ptr<core::ProcessGroup> rootFlowConfig = yamlConfig.getYamlRoot(configYamlStream);
 
-    REQUIRE(rootFlowConfig);
-    REQUIRE(rootFlowConfig->findProcessor("TailFile"));
-    REQUIRE(NULL != rootFlowConfig->findProcessor("TailFile")->getUUID());
-    REQUIRE(!rootFlowConfig->findProcessor("TailFile")->getUUIDStr().empty());
-    REQUIRE(1 == rootFlowConfig->findProcessor("TailFile")->getMaxConcurrentTasks());
-    REQUIRE(
-        core::SchedulingStrategy::TIMER_DRIVEN == rootFlowConfig->findProcessor("TailFile")->getSchedulingStrategy());
-    REQUIRE(1 == rootFlowConfig->findProcessor("TailFile")->getMaxConcurrentTasks());
-    REQUIRE(1 * 1000 * 1000 * 1000 == rootFlowConfig->findProcessor("TailFile")->getSchedulingPeriodNano());
-    REQUIRE(30 * 1000 == rootFlowConfig->findProcessor("TailFile")->getPenalizationPeriodMsec());
-    REQUIRE(1 * 1000 == rootFlowConfig->findProcessor("TailFile")->getYieldPeriodMsec());
-    REQUIRE(0 == rootFlowConfig->findProcessor("TailFile")->getRunDurationNano());
-
-    std::map<std::string, std::shared_ptr<minifi::Connection>> connectionMap;
-    rootFlowConfig->getConnections(connectionMap);
-    REQUIRE(2 == connectionMap.size());
-    // This is a map of UUID->Connection, and we don't know UUID, so just going to loop over it
-    for (auto it : connectionMap) {
-      REQUIRE(it.second);
-      REQUIRE(!it.second->getUUIDStr().empty());
-      REQUIRE(it.second->getDestination());
-      REQUIRE(it.second->getSource());
-    }
+  REQUIRE(rootFlowConfig);
+  REQUIRE(rootFlowConfig->findProcessor("TailFile"));
+  utils::Identifier uuid;
+  rootFlowConfig->findProcessor("TailFile")->getUUID(uuid);
+  REQUIRE(uuid != nullptr);
+  REQUIRE(!rootFlowConfig->findProcessor("TailFile")->getUUIDStr().empty());
+  REQUIRE(1 == rootFlowConfig->findProcessor("TailFile")->getMaxConcurrentTasks());
+  REQUIRE(
+      core::SchedulingStrategy::TIMER_DRIVEN == rootFlowConfig->findProcessor("TailFile")->getSchedulingStrategy());
+  REQUIRE(1 == rootFlowConfig->findProcessor("TailFile")->getMaxConcurrentTasks());
+  REQUIRE(1 * 1000 * 1000 * 1000 == rootFlowConfig->findProcessor("TailFile")->getSchedulingPeriodNano());
+  REQUIRE(30 * 1000 == rootFlowConfig->findProcessor("TailFile")->getPenalizationPeriodMsec());
+  REQUIRE(1 * 1000 == rootFlowConfig->findProcessor("TailFile")->getYieldPeriodMsec());
+  REQUIRE(0 == rootFlowConfig->findProcessor("TailFile")->getRunDurationNano());
+
+  std::map<std::string, std::shared_ptr<minifi::Connection>> connectionMap;
+  rootFlowConfig->getConnections(connectionMap);
+  REQUIRE(2 == connectionMap.size());
+  // This is a map of UUID->Connection, and we don't know UUID, so just going to loop over it
+  for (auto it : connectionMap) {
+    REQUIRE(it.second);
+    REQUIRE(!it.second->getUUIDStr().empty());
+    REQUIRE(it.second->getDestination());
+    REQUIRE(it.second->getSource());
   }
+}
 
   SECTION("missing required field in YAML throws exception") {
-    static const std::string CONFIG_YAML_NO_RPG_PORT_ID = ""
-        "MiNiFi Config Version: 1\n"
-        "Flow Controller:\n"
-        "  name: MiNiFi Flow\n"
-        "Processors: []\n"
-        "Connections: []\n"
-        "Remote Processing Groups:\n"
-        "    - name: NiFi Flow\n"
-        "      comment:\n"
-        "      url: https://localhost:8090/nifi\n"
-        "      timeout: 30 secs\n"
-        "      yield period: 10 sec\n"
-        "      Input Ports:\n"
-        "          - name: tailed log\n"
-        "            comments:\n"
-        "            max concurrent tasks: 1\n"
-        "            use compression: false\n"
-        "\n";
-
-    std::istringstream configYamlStream(CONFIG_YAML_NO_RPG_PORT_ID);
-    REQUIRE_THROWS_AS(yamlConfig.getYamlRoot(configYamlStream), std::invalid_argument);
-  }
+  static const std::string CONFIG_YAML_NO_RPG_PORT_ID = ""
+  "MiNiFi Config Version: 1\n"
+  "Flow Controller:\n"
+  "  name: MiNiFi Flow\n"
+  "Processors: []\n"
+  "Connections: []\n"
+  "Remote Processing Groups:\n"
+  "    - name: NiFi Flow\n"
+  "      comment:\n"
+  "      url: https://localhost:8090/nifi\n"
+  "      timeout: 30 secs\n"
+  "      yield period: 10 sec\n"
+  "      Input Ports:\n"
+  "          - name: tailed log\n"
+  "            comments:\n"
+  "            max concurrent tasks: 1\n"
+  "            use compression: false\n"
+  "\n";
+
+  std::istringstream configYamlStream(CONFIG_YAML_NO_RPG_PORT_ID);
+  REQUIRE_THROWS_AS(yamlConfig.getYamlRoot(configYamlStream), std::invalid_argument);
+}
 }
 
 TEST_CASE("Test YAML v3 Config Processing", "[YamlConfiguration3]") {
@@ -196,11 +197,11 @@ TEST_CASE("Test YAML v3 Config Processing", "[YamlConfiguration3]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
 
-  static const std::string TEST_CONFIG_YAML = R"(
+  static const std::string TEST_CONFIG_YAML =
+      R"(
 MiNiFi Config Version: 3
 Flow Controller:
   name: Simple TailFile To RPG
@@ -315,7 +316,9 @@ NiFi Properties Overrides: {}
 
   REQUIRE(rootFlowConfig);
   REQUIRE(rootFlowConfig->findProcessor("TailFile"));
-  REQUIRE(NULL != rootFlowConfig->findProcessor("TailFile")->getUUID());
+  utils::Identifier uuid;
+  rootFlowConfig->findProcessor("TailFile")->getUUID(uuid);
+  REQUIRE(uuid != nullptr);
   REQUIRE(!rootFlowConfig->findProcessor("TailFile")->getUUIDStr().empty());
   REQUIRE(1 == rootFlowConfig->findProcessor("TailFile")->getMaxConcurrentTasks());
   REQUIRE(core::SchedulingStrategy::TIMER_DRIVEN == rootFlowConfig->findProcessor("TailFile")->getSchedulingStrategy());
@@ -348,8 +351,7 @@ TEST_CASE("Test Dynamic Unsupported", "[YamlConfigurationDynamicUnsupported]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
 
   static const std::string TEST_CONFIG_YAML = R"(
@@ -366,14 +368,15 @@ Processors:
 
   REQUIRE(rootFlowConfig);
   REQUIRE(rootFlowConfig->findProcessor("PutFile"));
-  REQUIRE(NULL != rootFlowConfig->findProcessor("PutFile")->getUUID());
+  utils::Identifier uuid;
+  rootFlowConfig->findProcessor("PutFile")->getUUID(uuid);
+  REQUIRE(uuid != nullptr);
   REQUIRE(!rootFlowConfig->findProcessor("PutFile")->getUUIDStr().empty());
 
   REQUIRE(LogTestController::getInstance().contains("[warning] Unable to set the dynamic property "
-                                                        "Dynamic Property with value Bad"));
+                                                    "Dynamic Property with value Bad"));
 }
 
-
 TEST_CASE("Test Required Property", "[YamlConfigurationRequiredProperty]") {
   TestController test_controller;
 
@@ -385,8 +388,7 @@ TEST_CASE("Test Required Property", "[YamlConfigurationRequiredProperty]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
 
   static const std::string TEST_CONFIG_YAML = R"(
@@ -407,12 +409,14 @@ Processors:
 
     REQUIRE(rootFlowConfig);
     REQUIRE(rootFlowConfig->findProcessor("GetFile"));
-    REQUIRE(NULL != rootFlowConfig->findProcessor("GetFile")->getUUID());
+    utils::Identifier uuid;
+    rootFlowConfig->findProcessor("GetFile")->getUUID(uuid);
+    REQUIRE(uuid != nullptr);
     REQUIRE(!rootFlowConfig->findProcessor("GetFile")->getUUIDStr().empty());
   } catch (const std::exception &e) {
     caught_exception = true;
     REQUIRE("Unable to parse configuration file for component named 'XYZ' because required property "
-            "'Input Directory' is not set [in 'Processors' section of configuration file]" == std::string(e.what()));
+        "'Input Directory' is not set [in 'Processors' section of configuration file]" == std::string(e.what()));
   }
 
   REQUIRE(caught_exception);
@@ -424,13 +428,13 @@ TEST_CASE("Test Required Property 2", "[YamlConfigurationRequiredProperty2]") {
   LogTestController &logTestController = LogTestController::getInstance();
   logTestController.setDebug<TestPlan>();
   logTestController.setDebug<core::YamlConfiguration>();
+  logTestController.setDebug<core::Processor>();
 
   std::shared_ptr<core::Repository> testProvRepo = core::createRepository("provenancerepository", true);
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
 
   static const std::string TEST_CONFIG_YAML = R"(
@@ -448,7 +452,9 @@ Processors:
 
   REQUIRE(rootFlowConfig);
   REQUIRE(rootFlowConfig->findProcessor("XYZ"));
-  REQUIRE(NULL != rootFlowConfig->findProcessor("XYZ")->getUUID());
+  utils::Identifier uuid;
+  rootFlowConfig->findProcessor("XYZ")->getUUID(uuid);
+  REQUIRE(uuid != nullptr);
   REQUIRE(!rootFlowConfig->findProcessor("XYZ")->getUUIDStr().empty());
 }
 
@@ -474,13 +480,12 @@ TEST_CASE("Test Dependent Property", "[YamlConfigurationDependentProperty]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", {"Prop A"}, {}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", { "Prop A" }, { }));
   component->setSupportedProperties(std::move(props));
   yamlConfig.validateComponentProperties(component, "component A", "section A");
   REQUIRE(true);  // Expected to get here w/o any exceptions
@@ -497,13 +502,12 @@ TEST_CASE("Test Dependent Property 2", "[YamlConfigurationDependentProperty2]")
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "", false, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", {"Prop A"}, {}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "", false, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", { "Prop A" }, { }));
   component->setSupportedProperties(std::move(props));
   bool config_failed = false;
   try {
@@ -511,8 +515,8 @@ TEST_CASE("Test Dependent Property 2", "[YamlConfigurationDependentProperty2]")
   } catch (const std::exception &e) {
     config_failed = true;
     REQUIRE("Unable to parse configuration file for component named 'component A' because property "
-            "'Prop B' depends on property 'Prop A' which is not set "
-            "[in 'section A' section of configuration file]" == std::string(e.what()));
+        "'Prop B' depends on property 'Prop A' which is not set "
+        "[in 'section A' section of configuration file]" == std::string(e.what()));
   }
   REQUIRE(config_failed);
 }
@@ -528,13 +532,12 @@ TEST_CASE("Test Exclusive Property", "[YamlConfigurationExclusiveProperty]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", {}, {{"Prop A", "^abcd.*$"}}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", { }, { { "Prop A", "^abcd.*$" } }));
   component->setSupportedProperties(std::move(props));
   yamlConfig.validateComponentProperties(component, "component A", "section A");
   REQUIRE(true);  // Expected to get here w/o any exceptions
@@ -549,13 +552,12 @@ TEST_CASE("Test Regex Property", "[YamlConfigurationRegexProperty]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "^val.*$", {}, {}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "^val.*$", { }, { }));
   component->setSupportedProperties(std::move(props));
   yamlConfig.validateComponentProperties(component, "component A", "section A");
   REQUIRE(true);  // Expected to get here w/o any exceptions
@@ -571,13 +573,12 @@ TEST_CASE("Test Exclusive Property 2", "[YamlConfigurationExclusiveProperty2]")
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", {}, {{"Prop A", "^val.*$"}}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "", { }, { { "Prop A", "^val.*$" } }));
   component->setSupportedProperties(std::move(props));
   bool config_failed = false;
   try {
@@ -585,8 +586,8 @@ TEST_CASE("Test Exclusive Property 2", "[YamlConfigurationExclusiveProperty2]")
   } catch (const std::exception &e) {
     config_failed = true;
     REQUIRE("Unable to parse configuration file for component named 'component A' because "
-            "property 'Prop B' is exclusive of property 'Prop A' values matching '^val.*$' "
-            "[in 'section A' section of configuration file]" == std::string(e.what()));
+        "property 'Prop B' is exclusive of property 'Prop A' values matching '^val.*$' "
+        "[in 'section A' section of configuration file]" == std::string(e.what()));
   }
   REQUIRE(config_failed);
 }
@@ -600,13 +601,12 @@ TEST_CASE("Test Regex Property 2", "[YamlConfigurationRegexProperty2]") {
   std::shared_ptr<core::Repository> testFlowFileRepo = core::createRepository("flowfilerepository", true);
   std::shared_ptr<minifi::Configure> configuration = std::make_shared<minifi::Configure>();
   std::shared_ptr<minifi::io::StreamFactory> streamFactory = minifi::io::StreamFactory::getInstance(configuration);
-  std::shared_ptr<core::ContentRepository>
-      content_repo = std::make_shared<core::repository::VolatileContentRepository>();
+  std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   core::YamlConfiguration yamlConfig(testProvRepo, testFlowFileRepo, content_repo, streamFactory, configuration);
   const auto component = std::make_shared<DummyComponent>();
   std::set<core::Property> props;
-  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", {}, {}));
-  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "^notval.*$", {}, {}));
+  props.emplace(core::Property("Prop A", "Prop A desc", "val A", true, "", { }, { }));
+  props.emplace(core::Property("Prop B", "Prop B desc", "val B", true, "^notval.*$", { }, { }));
   component->setSupportedProperties(std::move(props));
   bool config_failed = false;
   try {
@@ -614,8 +614,8 @@ TEST_CASE("Test Regex Property 2", "[YamlConfigurationRegexProperty2]") {
   } catch (const std::exception &e) {
     config_failed = true;
     REQUIRE("Unable to parse configuration file for component named 'component A' because "
-            "property 'Prop B' does not match validation pattern '^notval.*$' "
-            "[in 'section A' section of configuration file]" == std::string(e.what()));
+        "property 'Prop B' does not match validation pattern '^notval.*$' "
+        "[in 'section A' section of configuration file]" == std::string(e.what()));
   }
   REQUIRE(config_failed);
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/main/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 6905382..74055a4 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -15,7 +15,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
+# 
 
 cmake_minimum_required(VERSION 2.6)
 
@@ -25,48 +25,89 @@ ENDIF(POLICY CMP0048)
 
 include_directories(../libminifi/include ../thirdparty/spdlog-20170710/include ../thirdparty/concurrentqueue ../thirdparty/yaml-cpp-yaml-cpp-20171024/include ../thirdparty/rapidjson-1.1.0/include ../thirdparty/)
 
+
+if(WIN32)
+	add_definitions(-DWIN32_LEAN_AND_MEAN)
+	include_directories(../libminifi/opsys/win)
+else()
+	include_directories(../libminifi/opsys/posix)
+endif()
+
+
 include(CheckCXXCompilerFlag)
+if (WIN32)
+  if ((MSVC_VERSION GREATER "1900") OR (MSVC_VERSION EQUAL "1900"))
+	    CHECK_CXX_COMPILER_FLAG("/std:c++14" _cpp_latest_flag_supported)
+	    if (_cpp_latest_flag_supported)
+	        add_compile_options("/std:c++14")
+	    endif()
+	endif()
+else()
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
 CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 if(COMPILER_SUPPORTS_CXX11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Os")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 elseif(COMPILER_SUPPORTS_CXX0X)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Os")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 else()
  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
 endif()
 
-add_executable(minifiexe MiNiFiMain.cpp)
-if(THREADS_HAVE_PTHREAD_ARG)
-  target_compile_options(PUBLIC minifiexe "-pthread")
 endif()
+
+add_executable(minifiexe MiNiFiMain.cpp)
+#if(THREADS_HAVE_PTHREAD_ARG)
+#  target_compile_options(PUBLIC minifiexe "-pthread")
+#endif()
 if(CMAKE_THREAD_LIBS_INIT)
   target_link_libraries(minifiexe "${CMAKE_THREAD_LIBS_INIT}")
 endif()
 
 # Include UUID
-find_package(UUID REQUIRED)
 
-# Include OpenSSL
-find_package(OpenSSL REQUIRED)
-include_directories(${OPENSSL_INCLUDE_DIR})
+set (WIN32_ARCHIVES "")
+
+
 
 # Link against minifi, yaml-cpp, civetweb-cpp, uuid, openssl, and rocksdb
 #target_link_libraries(minifiexe core-minifi)
 
 if (APPLE)
 	target_link_libraries (minifiexe -Wl,-all_load core-minifi)
-else ()
+elseif(NOT WIN32)
 	target_link_libraries (minifiexe -Wl,--whole-archive core-minifi -Wl,--no-whole-archive)
+else()
+	#target_link_libraries (minifiexe core-minifi)
+	set(WIN32_ARCHIVES "${WIN32_ARCHIVES} /WHOLEARCHIVE:core-minifi")
+#	set_target_properties(minifiexe PROPERTIES LINK_FLAGS "/WHOLEARCHIVE:core-minifi")
 endif ()
 
+
 if (APPLE)
 	target_link_libraries (minifiexe -Wl,-all_load minifi)
-else ()
+elseif(NOT WIN32)
 	target_link_libraries (minifiexe -Wl,--whole-archive minifi -Wl,--no-whole-archive)
+else()
+	target_link_libraries (minifiexe minifi)
+	set(WIN32_ARCHIVES "${WIN32_ARCHIVES} /WHOLEARCHIVE:minifi")
+	#set_target_properties(minifiexe PROPERTIES LINK_FLAGS "${LINK_FLAGS} /WHOLEARCHIVE:minifi")
 endif ()
 
-target_link_libraries(minifiexe yaml-cpp ${UUID_LIBRARIES} ${OPENSSL_LIBRARIES})
+target_link_libraries(minifiexe yaml-cpp ${UUID_LIBRARIES} ) #
+
+if (WIN32)
+	include_directories("../thirdparty/Simple-Windows-Posix-Semaphore")
+  	target_link_libraries(minifiexe semaphore)
+endif()
+
+# Include OpenSSL
+if (OPENSSL_FOUND)
+	target_link_libraries(minifiexe ${OPENSSL_LIBRARIES})
+	include_directories(${OPENSSL_INCLUDE_DIR})
+endif(OPENSSL_FOUND)
+
+
+
 
 if (APPLE)
 	get_property(extensions GLOBAL PROPERTY EXTENSION-OPTIONS)
@@ -77,10 +118,19 @@ if (APPLE)
 else ()
 	get_property(extensions GLOBAL PROPERTY EXTENSION-OPTIONS)
 	foreach(EXTENSION ${extensions})
+	if (WIN32)
+	target_link_libraries (minifiexe ${EXTENSION})
+	set(WIN32_ARCHIVES "${WIN32_ARCHIVES} /WHOLEARCHIVE:${EXTENSION}")
+	#set_target_properties(minifiexe PROPERTIES LINK_FLAGS "${LINK_FLAGS} /WHOLEARCHIVE:${EXTENSION}")
+	  else()
 	  target_link_libraries (minifiexe -Wl,--whole-archive ${EXTENSION} -Wl,--no-whole-archive)
+	  endif()
 	endforeach()
 endif ()
 
+if(WIN32)
+	set_target_properties(minifiexe PROPERTIES LINK_FLAGS "${WIN32_ARCHIVES}")
+endif()
 set_target_properties(minifiexe
         PROPERTIES OUTPUT_NAME minifi)
 
@@ -89,6 +139,10 @@ install(TARGETS minifiexe
         DESTINATION bin
         COMPONENT bin)
 
-
+if (NOT WIN32)
 add_custom_command(TARGET minifiexe POST_BUILD
            COMMAND cat ${CMAKE_BINARY_DIR}/all.log)
+else()
+#add_custom_command(TARGET minifiexe POST_BUILD
+#           COMMAND type ${CMAKE_BINARY_DIR}/all.log)
+endif()

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/main/Main.h
----------------------------------------------------------------------
diff --git a/main/Main.h b/main/Main.h
index 016673e..5f30ebb 100644
--- a/main/Main.h
+++ b/main/Main.h
@@ -19,16 +19,31 @@
 #define MAIN_MAIN_H_
 
 
+#ifdef WIN32
+#define FILE_SEPARATOR "\\"
+#else
+#define FILE_SEPARATOR "/"
+#endif
+
+#define WIN32_LEAN_AND_MEAN
 //! Main thread sleep interval 1 second
 #define SLEEP_INTERVAL 1
 //! Main thread stop wait time
 #define STOP_WAIT_TIME_MS 30*1000
 //! Default YAML location
+#ifdef WIN32
+#define DEFAULT_NIFI_CONFIG_YML "\\conf\\config.yml"
+//! Default properties file paths
+#define DEFAULT_NIFI_PROPERTIES_FILE "\\conf\\minifi.properties"
+#define DEFAULT_LOG_PROPERTIES_FILE "\\conf\\minifi-log.properties"
+#define DEFAULT_UID_PROPERTIES_FILE "\\conf\\minifi-uid.properties"
+#else
 #define DEFAULT_NIFI_CONFIG_YML "./conf/config.yml"
 //! Default properties file paths
 #define DEFAULT_NIFI_PROPERTIES_FILE "./conf/minifi.properties"
 #define DEFAULT_LOG_PROPERTIES_FILE "./conf/minifi-log.properties"
 #define DEFAULT_UID_PROPERTIES_FILE "./conf/minifi-uid.properties"
+#endif
 //! Define home environment variable
 #define MINIFI_HOME_ENV_KEY "MINIFI_HOME"
 
@@ -39,6 +54,12 @@
 #define CONFIG_YAML_REMOTE_PROCESSING_GROUPS_KEY "Remote Processing Groups"
 
 
+#ifdef _MSC_VER
+#ifndef PATH_MAX
+#define PATH_MAX 260
+#endif
+#endif
+
 /**
  * Validates a MINIFI_HOME value.
  * @param home_path
@@ -46,7 +67,12 @@
  */
 bool validHome(const std::string &home_path) {
   struct stat stat_result { };
-  auto properties_file_path = home_path + "/" + DEFAULT_NIFI_PROPERTIES_FILE;
+  std::string sep = FILE_SEPARATOR;
+#ifdef WIN32
+    sep = "";
+#endif
+  auto properties_file_path = home_path + sep + DEFAULT_NIFI_PROPERTIES_FILE;
+  std::cout << "looking for " << properties_file_path << std::endl;
   return (stat(properties_file_path.c_str(), &stat_result) == 0);
 }
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/main/MiNiFiMain.cpp
----------------------------------------------------------------------
diff --git a/main/MiNiFiMain.cpp b/main/MiNiFiMain.cpp
index 58c71bc..1c5bded 100644
--- a/main/MiNiFiMain.cpp
+++ b/main/MiNiFiMain.cpp
@@ -17,6 +17,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <WinSock2.h>
+#include <WS2tcpip.h>
+#include <Windows.h>
+#pragma comment(lib, "Ws2_32.lib")
+#include <direct.h>
+#endif
+
 #include <fcntl.h>
 #include <stdio.h>
 #include <cstdlib>
@@ -25,7 +36,6 @@
 #include <vector>
 #include <queue>
 #include <map>
-#include <unistd.h>
 #include <yaml-cpp/yaml.h>
 #include <iostream>
 #include "ResourceClaim.h"
@@ -86,7 +96,11 @@ int main(int argc, char **argv) {
     logger->log_info("MINIFI_HOME is not set; determining based on environment.");
     char *path = nullptr;
     char full_path[PATH_MAX];
+#ifndef WIN32
     path = realpath(argv[0], full_path);
+#else
+	path = nullptr;
+#endif
 
     if (path != nullptr) {
       std::string minifiHomePath(path);
@@ -99,25 +113,47 @@ int main(int argc, char **argv) {
     // attempt to use cwd as MINIFI_HOME
     if (minifiHome.empty() || !validHome(minifiHome)) {
       char cwd[PATH_MAX];
-      getcwd(cwd, PATH_MAX);
+#ifdef WIN32
+	  _getcwd(cwd,PATH_MAX);
+#else
+	  getcwd(cwd, PATH_MAX);
+#endif
       minifiHome = cwd;
     }
 
+	
     logger->log_debug("Setting %s to %s", MINIFI_HOME_ENV_KEY, minifiHome);
+#ifdef WIN32
+	SetEnvironmentVariable(MINIFI_HOME_ENV_KEY, minifiHome.c_str());
+#else
     setenv(MINIFI_HOME_ENV_KEY, minifiHome.c_str(), 0);
+#endif
   }
 
   if (!validHome(minifiHome)) {
-    logger->log_error("No valid MINIFI_HOME could be inferred. "
-                      "Please set MINIFI_HOME or run minifi from a valid location.");
-    return -1;
+	  minifiHome = minifiHome.substr(0, minifiHome.find_last_of("/\\"));    //Remove /bin from path
+	  if (!validHome(minifiHome)) {
+		  logger->log_error("No valid MINIFI_HOME could be inferred. "
+			  "Please set MINIFI_HOME or run minifi from a valid location. minifiHome is %s", minifiHome);
+		  return -1;
+	  }
   }
 
-  if (signal(SIGINT, sigHandler) == SIG_ERR || signal(SIGTERM, sigHandler) == SIG_ERR || signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
+#ifdef WIN32
+
+  if (signal(SIGINT, sigHandler) == SIG_ERR || signal(SIGTERM, sigHandler) == SIG_ERR ) {
+	logger->log_error("Cannot install signal handler");
     std::cerr << "Cannot install signal handler" << std::endl;
     return -1;
   }
 
+#else
+  if (signal(SIGINT, sigHandler) == SIG_ERR || signal(SIGTERM, sigHandler) == SIG_ERR || signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
+	  std::cerr << "Cannot install signal handler" << std::endl;
+	  return -1;
+  }
+#endif
+
   std::shared_ptr<logging::LoggerProperties> log_properties = std::make_shared<logging::LoggerProperties>();
   log_properties->setHome(minifiHome);
   log_properties->loadConfigureFile(DEFAULT_LOG_PROPERTIES_FILE);
@@ -135,6 +171,7 @@ int main(int argc, char **argv) {
   configure->setHome(minifiHome);
   configure->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
 
+ 
   if (configure->get(minifi::Configure::nifi_graceful_shutdown_seconds, graceful_shutdown_seconds)) {
     try {
       stop_wait_time = std::stoi(graceful_shutdown_seconds);

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/Simple-Windows-Posix-Semaphore/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/Simple-Windows-Posix-Semaphore/CMakeLists.txt b/thirdparty/Simple-Windows-Posix-Semaphore/CMakeLists.txt
new file mode 100644
index 0000000..99effc5
--- /dev/null
+++ b/thirdparty/Simple-Windows-Posix-Semaphore/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+#
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+add_library(
+    semaphore
+    semaphore.c
+)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.c
----------------------------------------------------------------------
diff --git a/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.c b/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.c
new file mode 100644
index 0000000..4f7194a
--- /dev/null
+++ b/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.c
@@ -0,0 +1,371 @@
+/*
+    Copyright (c) 2011, Dongsheng Song <so...@live.cn>
+	
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+/*
+	Simple Windows replacement for POSIX semaphores 
+	Modified by Daniel Tillett from libpthread <http://github.com/songdongsheng/libpthread>
+	Copyright (c) 2015, Daniel Tillett <daniel.tillett @ gmail.com>
+*/
+
+
+/**
+    @file semaphore.c
+    @brief Implementation Code of Semaphore Routines
+*/
+
+#include "semaphore.h"
+
+static int lc_set_errno(int result) {
+	if (result != 0) {
+		errno = result;
+		return -1;
+		}
+
+	return 0;
+	}
+
+/**
+    Create an unnamed semaphore.
+    @param sem The pointer of the semaphore object.
+    @param pshared The pshared argument indicates whether this semaphore
+          is to be shared between the threads (0 or PTHREAD_PROCESS_PRIVATE)
+          of a process, or between processes (PTHREAD_PROCESS_SHARED).
+    @param value The value argument specifies the initial value for
+          the semaphore.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_init(sem_t *sem, int pshared, unsigned int value) {
+	char buf[24] = {'\0'};
+	arch_sem_t *pv;
+
+	if (sem == NULL || value > (unsigned int) SEM_VALUE_MAX) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if (NULL == (pv = (arch_sem_t *)calloc(1, sizeof(arch_sem_t)))) {
+		return lc_set_errno(ENOMEM);
+		}
+
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		sprintf(buf, "Global\\%p", pv);
+		}
+
+	if ((pv->handle = CreateSemaphoreA(NULL, value, SEM_VALUE_MAX, buf)) == NULL) {
+		free(pv);
+		return lc_set_errno(ENOSPC);
+		}
+
+	*sem = pv;
+	return 0;
+	}
+
+/**
+    Acquire a semaphore.
+    @param sem The pointer of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_wait(sem_t *sem) {
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	if (sem == NULL || pv == NULL) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if (WaitForSingleObject(pv->handle, INFINITE) != WAIT_OBJECT_0) {
+		return lc_set_errno(EINVAL);
+		}
+
+	return 0;
+	}
+
+/**
+    Try acquire a semaphore.
+    @param sem The pointer of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_trywait(sem_t *sem) {
+	unsigned rc;
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	if (sem == NULL || pv == NULL) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if ((rc = WaitForSingleObject(pv->handle, 0)) == WAIT_OBJECT_0) {
+		return 0;
+		}
+
+	if (rc == WAIT_TIMEOUT) {
+		return lc_set_errno(EAGAIN);
+		}
+
+	return lc_set_errno(EINVAL);
+	}
+
+/* Time conversion functions */
+#define INT64_MAX				0x7fffffffffffffff
+#define INT64_C(x)				((x) + (INT64_MAX - INT64_MAX))
+
+/*  Number of 100ns-seconds between the beginning of the Windows epoch
+    (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970)
+*/
+#define DELTA_EPOCH_IN_100NS    INT64_C(116444736000000000)
+#define POW10_3					INT64_C(1000)
+#define POW10_4					INT64_C(10000)
+#define POW10_6					INT64_C(1000000)
+
+static __int64 FileTimeToUnixTimeIn100NS(FILETIME *input) {
+	return (((__int64) input->dwHighDateTime) << 32 | input->dwLowDateTime) - DELTA_EPOCH_IN_100NS;
+	}
+
+/* Return milli-seconds since the Unix epoch (jan. 1, 1970) UTC */
+static __int64 arch_time_in_ms(void) {
+	FILETIME time;
+	GetSystemTimeAsFileTime(&time);
+	return FileTimeToUnixTimeIn100NS(&time) / POW10_4;
+	}
+
+static  __int64 arch_time_in_ms_from_timespec(const struct timespec *ts) {
+	return ts->tv_sec * POW10_3 + ts->tv_nsec / POW10_6;
+	}
+
+static unsigned arch_rel_time_in_ms(const struct timespec *ts) {
+	__int64 t1 = arch_time_in_ms_from_timespec(ts);
+	__int64 t2 = arch_time_in_ms();
+	__int64 t = t1 - t2;
+
+	if (t < 0 || t >= INT64_C(4294967295)) {
+		return 0;
+		}
+
+	return (unsigned) t;
+	}
+
+/**
+    Try acquire a semaphore.
+    @param sem The pointer of the semaphore object.
+    @param abs_timeout The pointer of the structure that specifies an
+          absolute timeout in seconds and nanoseconds since the Epoch,
+          1970-01-01 00:00:00 +0000 (UTC).
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout) {
+	unsigned rc;
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	if (sem == NULL || pv == NULL) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if ((rc = WaitForSingleObject(pv->handle, arch_rel_time_in_ms(abs_timeout))) == WAIT_OBJECT_0) {
+		return 0;
+		}
+
+	if (rc == WAIT_TIMEOUT) {
+		return lc_set_errno(ETIMEDOUT);
+		}
+
+	return lc_set_errno(EINVAL);
+	}
+
+/**
+    Release a semaphore.
+    @param sem The pointer of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_post(sem_t *sem) {
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	if (sem == NULL || pv == NULL) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if (ReleaseSemaphore(pv->handle, 1, NULL) == 0) {
+		return lc_set_errno(EINVAL);
+		}
+
+	return 0;
+	}
+
+/**
+    Get the value of a semaphore.
+    @param sem The pointer of the semaphore object.
+    @param value The pointer of the current value of the semaphore.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_getvalue(sem_t *sem, int *value) {
+	long previous;
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	switch (WaitForSingleObject(pv->handle, 0)) {
+		case WAIT_OBJECT_0:
+			if (!ReleaseSemaphore(pv->handle, 1, &previous)) {
+				return lc_set_errno(EINVAL);
+				}
+
+			*value = previous + 1;
+			return 0;
+
+		case WAIT_TIMEOUT:
+			*value = 0;
+			return 0;
+
+		default:
+			return lc_set_errno(EINVAL);
+		}
+	}
+
+/**
+    Destroy a semaphore.
+    @param sem The pointer of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+*/
+int sem_destroy(sem_t *sem) {
+	arch_sem_t *pv = (arch_sem_t *) sem;
+
+	if (pv == NULL) {
+		return lc_set_errno(EINVAL);
+		}
+
+	if (CloseHandle(pv->handle) == 0) {
+		return lc_set_errno(EINVAL);
+		}
+
+	free(pv);
+	*sem = NULL;
+	return 0;
+	}
+
+/**
+    Open a named semaphore.
+    @param name The name of the semaphore object.
+    @param oflag If O_CREAT is specified in oflag, then the semaphore is
+          created if it does not already exist. If both O_CREAT and O_EXCL
+          are specified in oflag, then an error is returned if a semaphore
+          with the given name already exists.
+    @param mode Ignored (The mode argument specifies the permissions to be
+          placed on the new semaphore).
+    @param value The value argument specifies the initial value for
+          the semaphore.
+    @return On success, returns the address of the new semaphore; On error,
+           returns SEM_FAILED (NULL), with errno set to indicate the error.
+*/
+sem_t *sem_open(const char *name, int oflag, mode_t mode, unsigned int value) {
+	int len;
+	char buffer[512];
+	
+	UNUSED(mode);
+
+	if (value > (unsigned int) SEM_VALUE_MAX || (len = strlen(name)) > (int) sizeof(buffer) - 8 || len < 1) {
+		lc_set_errno(EINVAL);
+		return NULL;
+		}
+
+	arch_sem_t *pv = malloc(1 * sizeof(arch_sem_t));
+	if (NULL == pv) {
+		lc_set_errno(ENOMEM);
+		return NULL;
+		}
+
+	memmove(buffer, "Global\\", 7);
+	memmove(buffer + 7, name, len);
+	buffer[len + 7] = '\0';
+
+	if ((pv->handle = CreateSemaphoreA(NULL, value, SEM_VALUE_MAX, buffer)) == NULL) {
+		switch (GetLastError()) {
+			case ERROR_ACCESS_DENIED:
+				lc_set_errno(EACCES);
+				break;
+
+			case ERROR_INVALID_HANDLE:
+				lc_set_errno(ENOENT);
+				break;
+
+			default:
+				lc_set_errno(ENOSPC);
+				break;
+			}
+
+		free(pv);
+		return NULL;
+		}
+
+	else {
+		if (GetLastError() == ERROR_ALREADY_EXISTS) {
+			if ((oflag & O_CREAT) && (oflag & O_EXCL)) {
+				CloseHandle(pv->handle);
+				free(pv);
+				lc_set_errno(EEXIST);
+				return NULL;
+				}
+
+			return (sem_t *) pv;
+			}
+
+		else {
+			if (!(oflag & O_CREAT)) {
+				free(pv);
+				lc_set_errno(ENOENT);
+				return NULL;
+				}
+			}
+		}
+
+	return (sem_t *) pv;
+	}
+
+/**
+    Close a named semaphore.
+    @param sem The pointer of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+    @remark Same as sem_destroy.
+*/
+int sem_close(sem_t *sem) {
+	return sem_destroy(sem);
+	}
+
+/**
+    Remove a named semaphore.
+    @param name The name of the semaphore object.
+    @return If the function succeeds, the return value is 0.
+           If the function fails, the return value is -1,
+           with errno set to indicate the error.
+    @remark The semaphore object is destroyed when its last handle has been
+           closed, so this function does nothing.
+*/
+int sem_unlink(const char *name) {
+	UNUSED(name);
+	return 0;
+	}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.h
----------------------------------------------------------------------
diff --git a/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.h b/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.h
new file mode 100644
index 0000000..124d9b6
--- /dev/null
+++ b/thirdparty/Simple-Windows-Posix-Semaphore/semaphore.h
@@ -0,0 +1,129 @@
+/*
+    Copyright (c) 2011, Dongsheng Song <so...@live.cn>
+	
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+/*
+	Simple Windows replacement for POSIX semaphores 
+	Modified by Daniel Tillett from libpthread <http://github.com/songdongsheng/libpthread>
+	Copyright (c) 2015, Daniel Tillett <daniel.tillett @ gmail.com>
+*/
+
+#ifndef _SEMAPHORE_H_
+#define _SEMAPHORE_H_   1
+
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <WinSock2.h>
+#include <WS2tcpip.h>
+#include <Windows.h>
+#pragma comment(lib, "Ws2_32.lib")
+#include <direct.h>
+#endif
+
+/**
+    @file semaphore.h
+    @brief POSIX Semaphore Definitions and Routines
+*/
+
+/**
+    @defgroup sem POSIX Semaphore Definitions and Routines
+    @{
+*/
+#include <stdlib.h>
+#include <errno.h> /* Adding definition of EINVAL, ETIMEDOUT, ..., etc. */
+#include <fcntl.h> /* Adding O_CREAT definition. */
+#include <stdio.h>
+#include <winsock.h>
+
+#ifndef PTHREAD_PROCESS_SHARED
+#define PTHREAD_PROCESS_PRIVATE	0
+#define PTHREAD_PROCESS_SHARED	1
+#endif
+
+/* Support POSIX.1b semaphores.  */
+#ifndef _POSIX_SEMAPHORES
+#define _POSIX_SEMAPHORES       200809L
+#endif
+
+#ifndef SEM_VALUE_MAX
+#define SEM_VALUE_MAX           INT_MAX
+#endif
+
+#ifndef SEM_FAILED
+#define SEM_FAILED              NULL
+#endif
+
+#define UNUSED(x)				(void)(x)
+
+#ifndef ETIMEDOUT
+#define ETIMEDOUT				138 /* This is the value in VC 2010. */
+#endif
+#include <time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void  *sem_t;
+
+#ifndef _MODE_T_
+typedef unsigned short _mode_t;
+#define _MODE_T_  1
+
+#ifndef NO_OLDNAMES
+typedef _mode_t mode_t;
+#endif
+#endif  /* _MODE_T_ */
+
+typedef struct {
+	HANDLE handle;
+	} arch_sem_t;
+
+#ifndef _TIMESPEC_DEFINED
+/*
+struct timespec {
+	time_t  tv_sec;     
+	long    tv_nsec;    
+	};
+
+struct itimerspec {
+	struct timespec  it_interval; 
+	struct timespec  it_value;    
+	};
+
+#define _TIMESPEC_DEFINED       1
+*/
+#endif 
+
+int sem_init(sem_t *sem, int pshared, unsigned int value);
+int sem_wait(sem_t *sem);
+int sem_trywait(sem_t *sem);
+int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+int sem_post(sem_t *sem);
+int sem_getvalue(sem_t *sem, int *value);
+int sem_destroy(sem_t *sem);
+sem_t *sem_open(const char *name, int oflag, mode_t mode, unsigned int value);
+int sem_close(sem_t *sem);
+int sem_unlink(const char *name);
+
+#ifdef __cplusplus
+	}
+#endif
+
+/** @} */
+
+#endif /* _SEMAPHORE_H_ */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/librdkafka-0.11.4/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/librdkafka-0.11.4/CMakeLists.txt b/thirdparty/librdkafka-0.11.4/CMakeLists.txt
index 93379e2..b5dd530 100644
--- a/thirdparty/librdkafka-0.11.4/CMakeLists.txt
+++ b/thirdparty/librdkafka-0.11.4/CMakeLists.txt
@@ -15,10 +15,11 @@ option(ENABLE_SHAREDPTR_DEBUG "Enable sharedptr debugging" OFF)
 set(TRYCOMPILE_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/packaging/cmake/try_compile")
 
 # ZLIB {
-find_package(ZLIB QUIET)
 if(ZLIB_FOUND)
+message("ZLIB FOUND")
   set(with_zlib_default ON)
 else()
+message("ZLIB FOUND")
   set(with_zlib_default OFF)
 endif()
 option(WITH_ZLIB "With ZLIB" ${with_zlib_default})

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/librdkafka-0.11.4/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/librdkafka-0.11.4/src/CMakeLists.txt b/thirdparty/librdkafka-0.11.4/src/CMakeLists.txt
index 19216b0..e48f7d1 100644
--- a/thirdparty/librdkafka-0.11.4/src/CMakeLists.txt
+++ b/thirdparty/librdkafka-0.11.4/src/CMakeLists.txt
@@ -101,7 +101,9 @@ if(WITHOUT_WIN32_CONFIG)
   endif(WITH_PLUGINS)
 endif()
 
-option(RDKAFKA_BUILD_STATIC "Build static rdkafka library" OFF)
+option(RDKAFKA_BUILD_STATIC "Build static rdkafka library" ON)
+
+SET(RDKAFKA_BUILD_STATIC "ON")
 
 if(RDKAFKA_BUILD_STATIC)
   set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -132,7 +134,7 @@ target_include_directories(rdkafka PUBLIC "$<BUILD_INTERFACE:${dummy}>")
 
 if(WITH_ZLIB)
   find_package(ZLIB REQUIRED)
-  target_link_libraries(rdkafka PUBLIC ZLIB::ZLIB)
+  target_link_libraries(rdkafka PUBLIC ${ZLIB_LIBRARY})
 endif()
 
 if(WITH_SSL)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/rocksdb/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/rocksdb/CMakeLists.txt b/thirdparty/rocksdb/CMakeLists.txt
index 8e73957..837f0bc 100644
--- a/thirdparty/rocksdb/CMakeLists.txt
+++ b/thirdparty/rocksdb/CMakeLists.txt
@@ -586,23 +586,23 @@ endif()
 set(ROCKSDB_STATIC_LIB rocksdb${ARTIFACT_SUFFIX})
 #set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
 set(ROCKSDB_IMPORT_LIB ${ROCKSDB_SHARED_LIB})
-#if(WIN32)
-#  set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
-#  set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
-#else()
-#  set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
-#  set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
-
-#  add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
-#  target_link_libraries(${ROCKSDB_SHARED_LIB}
+if(WIN32)
+  #set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib Rpcrt4.lib)
+  set(SYSTEM_LIBS ${SYSTEM_LIBS}  Rpcrt4.lib)
+  set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+else()
+  set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
+  set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+  add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
+ # target_link_libraries(${ROCKSDB_SHARED_LIB}
 #    ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
-#  set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
-#                        LINKER_LANGUAGE CXX
-#                        VERSION ${ROCKSDB_VERSION}
-#                        SOVERSION ${ROCKSDB_VERSION_MAJOR}
-#                        CXX_STANDARD 11
-#                        OUTPUT_NAME "rocksdb")
-#endif()
+  set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES
+                        LINKER_LANGUAGE CXX
+                        VERSION ${ROCKSDB_VERSION}
+                        SOVERSION ${ROCKSDB_VERSION_MAJOR}
+                        CXX_STANDARD 11
+                        OUTPUT_NAME "rocksdb")
+endif()
 
 option(WITH_LIBRADOS "Build with librados" OFF)
 if(WITH_LIBRADOS)
@@ -617,8 +617,7 @@ target_link_libraries(${ROCKSDB_STATIC_LIB}
 
 if(WIN32)
   add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES})
-  target_link_libraries(${ROCKSDB_IMPORT_LIB}
-    ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+  #target_link_libraries(${ROCKSDB_IMPORT_LIB}  ${SYSTEM_LIBS})
   set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES
     COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS")
   if(MSVC)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/CMakeLists.txt b/thirdparty/uuid/CMakeLists.txt
index 4b39a0b..323c1b9 100644
--- a/thirdparty/uuid/CMakeLists.txt
+++ b/thirdparty/uuid/CMakeLists.txt
@@ -17,7 +17,11 @@
 # under the License.
 #
 
-include_directories("include/uuid")
+if (WIN32)
+	include_directories("include/win32/uuid")
+else()
+	include_directories("include/posix/uuid")
+endif()
 
 add_library(
     uuid
@@ -28,7 +32,6 @@ add_library(
     isnull.c
     pack.c
     parse.c
-    tst_uuid.c
     unpack.c
     unparse.c
     uuid_time.c

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/clear.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/clear.c b/thirdparty/uuid/clear.c
index 436f8f7..d963b5a 100644
--- a/thirdparty/uuid/clear.c
+++ b/thirdparty/uuid/clear.c
@@ -37,7 +37,7 @@
 
 #include "uuidP.h"
 
-void uuid_clear(uuid_t uu)
+void uuid_clear(UUID_FIELD uu)
 {
 	memset(uu, 0, 16);
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/compare.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/compare.c b/thirdparty/uuid/compare.c
index d5fc503..0e1d95a 100644
--- a/thirdparty/uuid/compare.c
+++ b/thirdparty/uuid/compare.c
@@ -40,7 +40,7 @@
 
 #define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
 
-int uuid_compare(const uuid_t uu1, const uuid_t uu2)
+int uuid_compare(const UUID_FIELD uu1, const UUID_FIELD uu2)
 {
 	struct uuid	uuid1, uuid2;
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/copy.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/copy.c b/thirdparty/uuid/copy.c
index 32e6f50..efc250e 100644
--- a/thirdparty/uuid/copy.c
+++ b/thirdparty/uuid/copy.c
@@ -35,7 +35,7 @@
 #include "config.h"
 #include "uuidP.h"
 
-void uuid_copy(uuid_t dst, const uuid_t src)
+void uuid_copy(UUID_FIELD dst, const UUID_FIELD src)
 {
 	unsigned char		*cp1;
 	const unsigned char	*cp2;

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/2b0a55e4/thirdparty/uuid/gen_uuid.c
----------------------------------------------------------------------
diff --git a/thirdparty/uuid/gen_uuid.c b/thirdparty/uuid/gen_uuid.c
index 22b4513..b53b038 100644
--- a/thirdparty/uuid/gen_uuid.c
+++ b/thirdparty/uuid/gen_uuid.c
@@ -35,13 +35,19 @@
 /*
  * Force inclusion of SVID stuff since we need it if we're compiling in
  * gcc-wall wall mode
+ * But not deprecated in glibc >= 20, and not needed nowadays.
  */
-#define _SVID_SOURCE
+/* #define _SVID_SOURCE */
 
 #include "config.h"
-
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+#ifdef WIN32
+#define WIN32_WINNT 0x0500
+#include <io.h>
+typedef int mode_t;
 #include <windows.h>
 #define UUID MYUUID
 #endif
@@ -55,11 +61,11 @@
 #include <string.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <limits.h>
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#include <sys/wait.h>
 #include <sys/stat.h>
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
@@ -88,31 +94,18 @@
 #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
 #include <sys/syscall.h>
 #endif
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
 
 #include "uuidP.h"
 #include "uuidd.h"
 
-#ifdef HAVE_SRANDOM
-#define srand(x) 	srandom(x)
-#define rand() 		random()
-#endif
-
-#ifdef TLS
-#define THREAD_LOCAL static TLS
+#ifdef HAVE_TLS
+#define THREAD_LOCAL static __thread
 #else
 #define THREAD_LOCAL static
 #endif
 
-#if defined(__linux__) && defined(__NR_gettid) && defined(HAVE_JRAND48)
-#define DO_JRAND_MIX
-THREAD_LOCAL unsigned short jrand_seed[3];
-#endif
-
-#ifdef _WIN32
-static void gettimeofday (struct timeval *tv, void *dummy)
+#ifdef WIN32
+static void gettimeofday (struct st_tm_val *tv, void *dummy)
 {
 	FILETIME	ftime;
 	uint64_t	n;
@@ -135,85 +128,6 @@ static int getuid (void)
 }
 #endif
 
-static int get_random_fd(void)
-{
-	struct timeval	tv;
-	static int	fd = -2;
-	int		i;
-
-	if (fd == -2) {
-		gettimeofday(&tv, 0);
-#ifndef _WIN32
-		fd = open("/dev/urandom", O_RDONLY);
-		if (fd == -1)
-			fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
-		if (fd >= 0) {
-			i = fcntl(fd, F_GETFD);
-			if (i >= 0)
-				fcntl(fd, F_SETFD, i | FD_CLOEXEC);
-		}
-#endif
-		srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
-#ifdef DO_JRAND_MIX
-		jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF);
-		jrand_seed[1] = getppid() ^ (tv.tv_usec & 0xFFFF);
-		jrand_seed[2] = (tv.tv_sec ^ tv.tv_usec) >> 16;
-#endif
-	}
-	/* Crank the random number generator a few times */
-	gettimeofday(&tv, 0);
-	for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
-		rand();
-	return fd;
-}
-
-
-/*
- * Generate a series of random bytes.  Use /dev/urandom if possible,
- * and if not, use srandom/random.
- */
-static void get_random_bytes(void *buf, int nbytes)
-{
-	int i, n = nbytes, fd = get_random_fd();
-	int lose_counter = 0;
-	unsigned char *cp = buf;
-
-	if (fd >= 0) {
-		while (n > 0) {
-			i = read(fd, cp, n);
-			if (i <= 0) {
-				if (lose_counter++ > 16)
-					break;
-				continue;
-			}
-			n -= i;
-			cp += i;
-			lose_counter = 0;
-		}
-	}
-
-	/*
-	 * We do this all the time, but this is the only source of
-	 * randomness if /dev/random/urandom is out to lunch.
-	 */
-	for (cp = buf, i = 0; i < nbytes; i++)
-		*cp++ ^= (rand() >> 7) & 0xFF;
-#ifdef DO_JRAND_MIX
-	{
-		unsigned short tmp_seed[3];
-
-		memcpy(tmp_seed, jrand_seed, sizeof(tmp_seed));
-		jrand_seed[2] = jrand_seed[2] ^ syscall(__NR_gettid);
-		for (cp = buf, i = 0; i < nbytes; i++)
-			*cp++ ^= (jrand48(tmp_seed) >> 7) & 0xFF;
-		memcpy(jrand_seed, tmp_seed,
-		       sizeof(jrand_seed) - sizeof(unsigned short));
-	}
-#endif
-
-	return;
-}
-
 /*
  * Get the ethernet hardware address, if we can find it...
  *
@@ -225,12 +139,12 @@ static void get_random_bytes(void *buf, int nbytes)
 static int get_node_id(unsigned char *node_id)
 {
 #ifdef HAVE_NET_IF_H
-	int 		sd;
-	struct ifreq 	ifr, *ifrp;
-	struct ifconf 	ifc;
+	int		sd;
+	struct ifreq	ifr, *ifrp;
+	struct ifconf	ifc;
 	char buf[1024];
 	int		n, i;
-	unsigned char 	*a;
+	unsigned char	*a;
 #ifdef HAVE_NET_IF_DL_H
 	struct sockaddr_dl *sdlp;
 #endif
@@ -242,14 +156,12 @@ static int get_node_id(unsigned char *node_id)
  * just sizeof(struct ifreq)
  */
 #ifdef HAVE_SA_LEN
-#ifndef max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#endif
+#define max(x, y) (((x) > (y)) ? (x) : (y))
 #define ifreq_size(i) max(sizeof(struct ifreq),\
      sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
 #else
 #define ifreq_size(i) sizeof(struct ifreq)
-#endif /* HAVE_SA_LEN*/
+#endif /* HAVE_SA_LEN */
 
 	sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
 	if (sd < 0) {
@@ -304,50 +216,164 @@ static int get_node_id(unsigned char *node_id)
 	return 0;
 }
 
+#if defined(__linux__) && defined(__NR_gettid) && defined(HAVE_JRAND48)
+#define DO_JRAND_MIX
+static unsigned short ul_jrand_seed[3];
+#endif
+
+static int random_get_fd(void)
+{
+    int i, fd = -1;
+    struct st_tm_val  tv;
+
+    gettimeofday(&tv, 0);
+#ifndef WIN32
+    fd = open("/dev/urandom", O_RDONLY);
+    if (fd == -1)
+	fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
+    if (fd >= 0) {
+	i = fcntl(fd, F_GETFD);
+	if (i >= 0)
+	    fcntl(fd, F_SETFD, i | FD_CLOEXEC);
+    }
+#endif
+    srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
+
+#ifdef DO_JRAND_MIX
+    ul_jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF);
+    ul_jrand_seed[1] = getppid() ^ (tv.tv_usec & 0xFFFF);
+    ul_jrand_seed[2] = (tv.tv_sec ^ tv.tv_usec) >> 16;
+#endif
+    /* Crank the random number generator a few times */
+    gettimeofday(&tv, 0);
+    for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
+	rand();
+    return fd;
+}
+
+/*
+ * Generate a stream of random nbytes into buf.
+ * Use /dev/urandom if possible, and if not,
+ * use glibc pseudo-random functions.
+ */
+static void random_get_bytes(void *buf, size_t nbytes)
+{
+    size_t i, n = nbytes;
+    int fd = random_get_fd();
+    int lose_counter = 0;
+    unsigned char *cp = (unsigned char *) buf;
+
+    if (fd >= 0) {
+	while (n > 0) {
+	    ssize_t x = read(fd, cp, n);
+	    if (x <= 0) {
+		if (lose_counter++ > 16)
+		    break;
+		continue;
+	    }
+	    n -= x;
+	    cp += x;
+	    lose_counter = 0;
+	}
+
+	close(fd);
+    }
+
+    /*
+     * We do this all the time, but this is the only source of
+     * randomness if /dev/random/urandom is out to lunch.
+     */
+    for (cp = buf, i = 0; i < nbytes; i++)
+	*cp++ ^= (rand() >> 7) & 0xFF;
+
+#ifdef DO_JRAND_MIX
+    {
+	unsigned short tmp_seed[3];
+
+	memcpy(tmp_seed, ul_jrand_seed, sizeof(tmp_seed));
+	ul_jrand_seed[2] = ul_jrand_seed[2] ^ syscall(__NR_gettid);
+	for (cp = buf, i = 0; i < nbytes; i++)
+	    *cp++ ^= (jrand48(tmp_seed) >> 7) & 0xFF;
+	memcpy(ul_jrand_seed, tmp_seed,
+	       sizeof(ul_jrand_seed)-sizeof(unsigned short));
+    }
+#endif
+
+    return;
+}
+
+#ifdef WIN32 /* compatibility layer */
+#define LOCK_EX 1
+#define LOCK_UN 2
+static int flock(int fd, int op)
+{
+    HANDLE h = (HANDLE) _get_osfhandle(fd);
+    OVERLAPPED offset;
+    if (h < 0)
+	return -1;
+    memset(&offset, 0, sizeof(offset));
+    switch (op) {
+    case LOCK_EX:
+	return (LockFileEx(h, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &offset)) ? 0 : -1;
+    case LOCK_UN:
+	UnlockFileEx(h, 0, 1, 0, &offset);
+	return 0;
+    }
+    return -1;
+}
+#endif
+
 /* Assume that the gettimeofday() has microsecond granularity */
 #define MAX_ADJUSTMENT 10
 
+/*
+ * Get clock from global sequence clock counter.
+ *
+ * Return -1 if the clock counter could not be opened/locked (in this case
+ * pseudorandom value is returned in @ret_clock_seq), otherwise return 0.
+ */
 static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
 		     uint16_t *ret_clock_seq, int *num)
 {
 	THREAD_LOCAL int		adjustment = 0;
-	THREAD_LOCAL struct timeval	last = {0, 0};
+	THREAD_LOCAL struct st_tm_val	last = {0, 0};
 	THREAD_LOCAL int		state_fd = -2;
 	THREAD_LOCAL FILE		*state_f;
 	THREAD_LOCAL uint16_t		clock_seq;
-	struct timeval 			tv;
-	struct flock			fl;
+	struct st_tm_val			tv;
 	uint64_t			clock_reg;
 	mode_t				save_umask;
 	int				len;
+	int				ret = 0;
 
 	if (state_fd == -2) {
 		save_umask = umask(0);
-		state_fd = open("/var/lib/libuuid/clock.txt",
-				O_RDWR|O_CREAT, 0660);
+		state_fd = open(LIBUUID_CLOCK_FILE, O_RDWR|O_CREAT, 0660);
 		(void) umask(save_umask);
-		if (state_fd >= 0) {
+		if (state_fd != -1) {
 			state_f = fdopen(state_fd, "r+");
 			if (!state_f) {
 				close(state_fd);
 				state_fd = -1;
+				ret = -1;
 			}
 		}
+		else
+			ret = -1;
 	}
-	fl.l_type = F_WRLCK;
-	fl.l_whence = SEEK_SET;
-	fl.l_start = 0;
-	fl.l_len = 0;
-	fl.l_pid = 0;
 	if (state_fd >= 0) {
 		rewind(state_f);
-		while (fcntl(state_fd, F_SETLKW, &fl) < 0) {
+#ifdef HAVE_FLOCK
+		while (flock(state_fd, LOCK_EX) < 0) {
 			if ((errno == EAGAIN) || (errno == EINTR))
 				continue;
 			fclose(state_f);
+			close(state_fd);
 			state_fd = -1;
+			ret = -1;
 			break;
 		}
+#endif
 	}
 	if (state_fd >= 0) {
 		unsigned int cl;
@@ -364,7 +390,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
 	}
 
 	if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
-		get_random_bytes(&clock_seq, sizeof(clock_seq));
+		random_get_bytes(&clock_seq, sizeof(clock_seq));
 		clock_seq &= 0x3FFF;
 		gettimeofday(&last, 0);
 		last.tv_sec--;
@@ -400,176 +426,47 @@ try_again:
 		last.tv_usec = last.tv_usec % 1000000;
 	}
 
-	if (state_fd > 0) {
+	if (state_fd >= 0) {
 		rewind(state_f);
 		len = fprintf(state_f,
 			      "clock: %04x tv: %016lu %08lu adj: %08d\n",
-			      clock_seq, last.tv_sec, (long)last.tv_usec,
-			      adjustment);
+			      clock_seq, (unsigned long) last.tv_sec, (unsigned long) last.tv_usec, adjustment);
 		fflush(state_f);
+#ifdef WIN32
+		if (_chsize(fileno(state_fd), len) < 0) {
+			fprintf(state_f, "                   \n");
+			fflush(state_f);
+		}
+#else
 		if (ftruncate(state_fd, len) < 0) {
 			fprintf(state_f, "                   \n");
 			fflush(state_f);
 		}
+#endif
 		rewind(state_f);
-		fl.l_type = F_UNLCK;
-		if (fcntl(state_fd, F_SETLK, &fl) < 0) {
-			fclose(state_f);
-			state_fd = -1;
-		}
+#ifdef HAVE_FLOCK
+		flock(state_fd, LOCK_UN);
+#endif
 	}
 
 	*clock_high = clock_reg >> 32;
 	*clock_low = clock_reg;
 	*ret_clock_seq = clock_seq;
-	return 0;
-}
-
-static ssize_t read_all(int fd, char *buf, size_t count)
-{
-	ssize_t ret;
-	ssize_t c = 0;
-	int tries = 0;
-
-	memset(buf, 0, count);
-	while (count > 0) {
-		ret = read(fd, buf, count);
-		if (ret <= 0) {
-			if ((errno == EAGAIN || errno == EINTR || ret == 0) &&
-			    (tries++ < 5))
-				continue;
-			return c ? c : -1;
-		}
-		if (ret > 0)
-			tries = 0;
-		count -= ret;
-		buf += ret;
-		c += ret;
-	}
-	return c;
-}
-
-/*
- * Close all file descriptors
- */
-static void close_all_fds(void)
-{
-	int i, max;
-
-#if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
-	max = sysconf(_SC_OPEN_MAX);
-#elif defined(HAVE_GETDTABLESIZE)
-	max = getdtablesize();
-#elif defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)
-	struct rlimit rl;
-
-	getrlimit(RLIMIT_NOFILE, &rl);
-	max = rl.rlim_cur;
-#else
-	max = OPEN_MAX;
-#endif
-
-	for (i=0; i < max; i++) {
-		close(i);
-		if (i <= 2)
-			open("/dev/null", O_RDWR);
-	}
+	return ret;
 }
 
 
-/*
- * Try using the uuidd daemon to generate the UUID
- *
- * Returns 0 on success, non-zero on failure.
- */
-static int get_uuid_via_daemon(int op, uuid_t out, int *num)
-{
-#if defined(USE_UUIDD) && defined(HAVE_SYS_UN_H)
-	char op_buf[64];
-	int op_len;
-	int s;
-	ssize_t ret;
-	int32_t reply_len = 0, expected = 16;
-	struct sockaddr_un srv_addr;
-	struct stat st;
-	pid_t pid;
-	static const char *uuidd_path = UUIDD_PATH;
-	static int access_ret = -2;
-	static int start_attempts = 0;
-
-	if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
-		return -1;
-
-	srv_addr.sun_family = AF_UNIX;
-	strcpy(srv_addr.sun_path, UUIDD_SOCKET_PATH);
-
-	if (connect(s, (const struct sockaddr *) &srv_addr,
-		    sizeof(struct sockaddr_un)) < 0) {
-		if (access_ret == -2)
-			access_ret = access(uuidd_path, X_OK);
-		if (access_ret == 0)
-			access_ret = stat(uuidd_path, &st);
-		if (access_ret == 0 && (st.st_mode & (S_ISUID | S_ISGID)) == 0)
-			access_ret = access(UUIDD_DIR, W_OK);
-		if (access_ret == 0 && start_attempts++ < 5) {
-			if ((pid = fork()) == 0) {
-				close_all_fds();
-				execl(uuidd_path, "uuidd", "-qT", "300",
-				      (char *) NULL);
-				exit(1);
-			}
-			(void) waitpid(pid, 0, 0);
-			if (connect(s, (const struct sockaddr *) &srv_addr,
-				    sizeof(struct sockaddr_un)) < 0)
-				goto fail;
-		} else
-			goto fail;
-	}
-	op_buf[0] = op;
-	op_len = 1;
-	if (op == UUIDD_OP_BULK_TIME_UUID) {
-		memcpy(op_buf+1, num, sizeof(*num));
-		op_len += sizeof(*num);
-		expected += sizeof(*num);
-	}
-
-	ret = write(s, op_buf, op_len);
-	if (ret < 1)
-		goto fail;
-
-	ret = read_all(s, (char *) &reply_len, sizeof(reply_len));
-	if (ret < 0)
-		goto fail;
-
-	if (reply_len != expected)
-		goto fail;
-
-	ret = read_all(s, op_buf, reply_len);
-
-	if (op == UUIDD_OP_BULK_TIME_UUID)
-		memcpy(op_buf+16, num, sizeof(int));
-
-	memcpy(out, op_buf, 16);
-
-	close(s);
-	return ((ret == expected) ? 0 : -1);
-
-fail:
-	close(s);
-#endif
-	return -1;
-}
-
-void uuid__generate_time(uuid_t out, int *num)
+int __uuid_generate_time(UUID_FIELD out, int *num)
 {
 	static unsigned char node_id[6];
 	static int has_init = 0;
 	struct uuid uu;
 	uint32_t	clock_mid;
+	int ret;
 
 	if (!has_init) {
 		if (get_node_id(node_id) <= 0) {
-			get_random_bytes(node_id, 6);
+			random_get_bytes(node_id, 6);
 			/*
 			 * Set multicast bit, to prevent conflicts
 			 * with IEEE 802 addresses obtained from
@@ -579,61 +476,44 @@ void uuid__generate_time(uuid_t out, int *num)
 		}
 		has_init = 1;
 	}
-	get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num);
+	ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num);
 	uu.clock_seq |= 0x8000;
 	uu.time_mid = (uint16_t) clock_mid;
 	uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000;
 	memcpy(uu.node, node_id, 6);
 	uuid_pack(&uu, out);
+	return ret;
 }
 
-void uuid_generate_time(uuid_t out)
+/*
+ * Generate time-based UUID and store it to @out
+ *
+ * Since there is no daemon here, use fall-back right away
+ */
+static int uuid_generate_time_generic(UUID_FIELD out) {
+	return __uuid_generate_time(out, 0);
+}
+
+/*
+ * Generate time-based UUID and store it to @out.
+ *
+ * Discards return value from uuid_generate_time_generic()
+ */
+void uuid_generate_time(UUID_FIELD out)
 {
-#ifdef TLS
-	THREAD_LOCAL int		num = 0;
-	THREAD_LOCAL struct uuid	uu;
-	THREAD_LOCAL time_t		last_time = 0;
-	time_t				now;
-
-	if (num > 0) {
-		now = time(0);
-		if (now > last_time+1)
-			num = 0;
-	}
-	if (num <= 0) {
-		num = 1000;
-		if (get_uuid_via_daemon(UUIDD_OP_BULK_TIME_UUID,
-					out, &num) == 0) {
-			last_time = time(0);
-			uuid_unpack(out, &uu);
-			num--;
-			return;
-		}
-		num = 0;
-	}
-	if (num > 0) {
-		uu.time_low++;
-		if (uu.time_low == 0) {
-			uu.time_mid++;
-			if (uu.time_mid == 0)
-				uu.time_hi_and_version++;
-		}
-		num--;
-		uuid_pack(&uu, out);
-		return;
-	}
-#else
-	if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, 0) == 0)
-		return;
-#endif
+	(void)uuid_generate_time_generic(out);
+}
+
 
-	uuid__generate_time(out, 0);
+int uuid_generate_time_safe(UUID_FIELD out)
+{
+	return uuid_generate_time_generic(out);
 }
 
 
-void uuid__generate_random(uuid_t out, int *num)
+void __uuid_generate_random(UUID_FIELD out, int *num)
 {
-	uuid_t	buf;
+	UUID_FIELD	buf;
 	struct uuid uu;
 	int i, n;
 
@@ -643,23 +523,34 @@ void uuid__generate_random(uuid_t out, int *num)
 		n = *num;
 
 	for (i = 0; i < n; i++) {
-		get_random_bytes(buf, sizeof(buf));
+		random_get_bytes(buf, sizeof(buf));
 		uuid_unpack(buf, &uu);
 
 		uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
 		uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF)
 			| 0x4000;
 		uuid_pack(&uu, out);
-		out += sizeof(uuid_t);
+		out += sizeof(UUID_FIELD);
 	}
 }
 
-void uuid_generate_random(uuid_t out)
+void uuid_generate_random(UUID_FIELD out)
 {
 	int	num = 1;
 	/* No real reason to use the daemon for random uuid's -- yet */
 
-	uuid__generate_random(out, &num);
+	__uuid_generate_random(out, &num);
+}
+
+/*
+ * Check whether good random source (/dev/random or /dev/urandom)
+ * is available.
+ */
+static int have_random_source(void)
+{
+	struct stat s;
+
+	return (!stat("/dev/random", &s) || !stat("/dev/urandom", &s));
 }
 
 
@@ -669,9 +560,9 @@ void uuid_generate_random(uuid_t out)
  * /dev/urandom is available, since otherwise we won't have
  * high-quality randomness.
  */
-void uuid_generate(uuid_t out)
+void uuid_generate(UUID_FIELD out)
 {
-	if (get_random_fd() >= 0)
+	if (have_random_source())
 		uuid_generate_random(out);
 	else
 		uuid_generate_time(out);