MINIFI-227: Provenance report
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/4636d1e3 Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/4636d1e3 Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/4636d1e3 Branch: refs/heads/MINIFI-227 Commit: 4636d1e3143e521f256a0c2629a61d8b456544d1 Parents: d639efa Author: Bin Qiu <[email protected]> Authored: Thu Apr 6 08:09:46 2017 -0700 Committer: Bin Qiu <[email protected]> Committed: Thu Apr 6 08:09:46 2017 -0700 ---------------------------------------------------------------------- README.md | 5 +- libminifi/include/RemoteProcessorGroupPort.h | 1 + libminifi/include/Site2SiteClientProtocol.h | 10 +- libminifi/include/core/Processor.h | 12 + .../include/provenance/ProvenanceRepository.h | 3 + .../include/provenance/ProvenanceTaskReport.h | 6 +- libminifi/src/FlowFileRecord.cpp | 2 +- libminifi/src/RemoteProcessorGroupPort.cpp | 70 +- libminifi/src/Site2SiteClientProtocol.cpp | 25 +- libminifi/src/core/Processor.cpp | 50 + .../src/provenance/ProvenanceRepository.cpp | 1 - .../src/provenance/ProvenanceTaskReport.cpp | 82 +- thirdparty/jsoncpp/devtools/__init__.py | 6 - thirdparty/jsoncpp/devtools/agent_vmw7.json | 33 - thirdparty/jsoncpp/devtools/agent_vmxp.json | 26 - thirdparty/jsoncpp/devtools/antglob.py | 205 -- thirdparty/jsoncpp/devtools/batchbuild.py | 278 --- thirdparty/jsoncpp/devtools/fixeol.py | 70 - thirdparty/jsoncpp/devtools/licenseupdater.py | 94 - thirdparty/jsoncpp/devtools/tarball.py | 52 - thirdparty/jsoncpp/test/cleantests.py | 16 - .../jsoncpp/test/data/fail_test_array_01.json | 1 - .../test/data/fail_test_stack_limit.json | 1 - .../jsoncpp/test/data/test_array_01.expected | 1 - thirdparty/jsoncpp/test/data/test_array_01.json | 1 - .../jsoncpp/test/data/test_array_02.expected | 2 - thirdparty/jsoncpp/test/data/test_array_02.json | 1 - .../jsoncpp/test/data/test_array_03.expected | 6 - thirdparty/jsoncpp/test/data/test_array_03.json | 1 - .../jsoncpp/test/data/test_array_04.expected | 5 - thirdparty/jsoncpp/test/data/test_array_04.json | 1 - .../jsoncpp/test/data/test_array_05.expected | 100 - thirdparty/jsoncpp/test/data/test_array_05.json | 1 - .../jsoncpp/test/data/test_array_06.expected | 5 - thirdparty/jsoncpp/test/data/test_array_06.json | 4 - .../jsoncpp/test/data/test_array_07.expected | 2122 ------------------ thirdparty/jsoncpp/test/data/test_array_07.json | 2 - .../jsoncpp/test/data/test_basic_01.expected | 1 - thirdparty/jsoncpp/test/data/test_basic_01.json | 1 - .../jsoncpp/test/data/test_basic_02.expected | 1 - thirdparty/jsoncpp/test/data/test_basic_02.json | 1 - .../jsoncpp/test/data/test_basic_03.expected | 3 - thirdparty/jsoncpp/test/data/test_basic_03.json | 3 - .../jsoncpp/test/data/test_basic_04.expected | 2 - thirdparty/jsoncpp/test/data/test_basic_04.json | 2 - .../jsoncpp/test/data/test_basic_05.expected | 2 - thirdparty/jsoncpp/test/data/test_basic_05.json | 2 - .../jsoncpp/test/data/test_basic_06.expected | 2 - thirdparty/jsoncpp/test/data/test_basic_06.json | 2 - .../jsoncpp/test/data/test_basic_07.expected | 2 - thirdparty/jsoncpp/test/data/test_basic_07.json | 2 - .../jsoncpp/test/data/test_basic_08.expected | 3 - thirdparty/jsoncpp/test/data/test_basic_08.json | 3 - .../jsoncpp/test/data/test_basic_09.expected | 4 - thirdparty/jsoncpp/test/data/test_basic_09.json | 4 - .../jsoncpp/test/data/test_comment_00.expected | 4 - .../jsoncpp/test/data/test_comment_00.json | 5 - .../jsoncpp/test/data/test_comment_01.expected | 10 - .../jsoncpp/test/data/test_comment_01.json | 10 - .../jsoncpp/test/data/test_comment_02.expected | 23 - .../jsoncpp/test/data/test_comment_02.json | 26 - .../jsoncpp/test/data/test_complex_01.expected | 20 - .../jsoncpp/test/data/test_complex_01.json | 17 - .../jsoncpp/test/data/test_integer_01.expected | 2 - .../jsoncpp/test/data/test_integer_01.json | 2 - .../jsoncpp/test/data/test_integer_02.expected | 2 - .../jsoncpp/test/data/test_integer_02.json | 2 - .../jsoncpp/test/data/test_integer_03.expected | 2 - .../jsoncpp/test/data/test_integer_03.json | 2 - .../jsoncpp/test/data/test_integer_04.expected | 3 - .../jsoncpp/test/data/test_integer_04.json | 3 - .../jsoncpp/test/data/test_integer_05.expected | 2 - .../jsoncpp/test/data/test_integer_05.json | 2 - .../test/data/test_integer_06_64bits.expected | 1 - .../test/data/test_integer_06_64bits.json | 2 - .../test/data/test_integer_07_64bits.expected | 1 - .../test/data/test_integer_07_64bits.json | 2 - .../test/data/test_integer_08_64bits.expected | 1 - .../test/data/test_integer_08_64bits.json | 2 - .../jsoncpp/test/data/test_large_01.expected | 2122 ------------------ thirdparty/jsoncpp/test/data/test_large_01.json | 2 - .../jsoncpp/test/data/test_object_01.expected | 1 - .../jsoncpp/test/data/test_object_01.json | 1 - .../jsoncpp/test/data/test_object_02.expected | 2 - .../jsoncpp/test/data/test_object_02.json | 1 - .../jsoncpp/test/data/test_object_03.expected | 4 - .../jsoncpp/test/data/test_object_03.json | 5 - .../jsoncpp/test/data/test_object_04.expected | 2 - .../jsoncpp/test/data/test_object_04.json | 3 - .../test/data/test_preserve_comment_01.expected | 11 - .../test/data/test_preserve_comment_01.json | 14 - .../jsoncpp/test/data/test_real_01.expected | 3 - thirdparty/jsoncpp/test/data/test_real_01.json | 3 - .../jsoncpp/test/data/test_real_02.expected | 3 - thirdparty/jsoncpp/test/data/test_real_02.json | 3 - .../jsoncpp/test/data/test_real_03.expected | 3 - thirdparty/jsoncpp/test/data/test_real_03.json | 3 - .../jsoncpp/test/data/test_real_04.expected | 3 - thirdparty/jsoncpp/test/data/test_real_04.json | 3 - .../jsoncpp/test/data/test_real_05.expected | 4 - thirdparty/jsoncpp/test/data/test_real_05.json | 3 - .../jsoncpp/test/data/test_real_06.expected | 4 - thirdparty/jsoncpp/test/data/test_real_06.json | 3 - .../jsoncpp/test/data/test_real_07.expected | 4 - thirdparty/jsoncpp/test/data/test_real_07.json | 3 - .../jsoncpp/test/data/test_real_08.expected | 4 - thirdparty/jsoncpp/test/data/test_real_08.json | 4 - .../jsoncpp/test/data/test_real_09.expected | 4 - thirdparty/jsoncpp/test/data/test_real_09.json | 4 - .../jsoncpp/test/data/test_real_10.expected | 4 - thirdparty/jsoncpp/test/data/test_real_10.json | 4 - .../jsoncpp/test/data/test_real_11.expected | 4 - thirdparty/jsoncpp/test/data/test_real_11.json | 4 - .../jsoncpp/test/data/test_real_12.expected | 2 - thirdparty/jsoncpp/test/data/test_real_12.json | 2 - .../jsoncpp/test/data/test_string_01.expected | 1 - .../jsoncpp/test/data/test_string_01.json | 1 - .../jsoncpp/test/data/test_string_02.expected | 1 - .../jsoncpp/test/data/test_string_02.json | 1 - .../jsoncpp/test/data/test_string_03.expected | 1 - .../jsoncpp/test/data/test_string_03.json | 1 - .../jsoncpp/test/data/test_string_04.expected | 2 - .../jsoncpp/test/data/test_string_04.json | 2 - .../jsoncpp/test/data/test_string_05.expected | 2 - .../jsoncpp/test/data/test_string_05.json | 2 - .../test/data/test_string_unicode_01.expected | 1 - .../test/data/test_string_unicode_01.json | 1 - .../test/data/test_string_unicode_02.expected | 1 - .../test/data/test_string_unicode_02.json | 1 - .../test/data/test_string_unicode_03.expected | 1 - .../test/data/test_string_unicode_03.json | 1 - .../test/data/test_string_unicode_04.expected | 1 - .../test/data/test_string_unicode_04.json | 1 - .../test/data/test_string_unicode_05.expected | 2 - .../test/data/test_string_unicode_05.json | 1 - thirdparty/jsoncpp/test/generate_expected.py | 17 - thirdparty/jsoncpp/test/jsonchecker/fail1.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail10.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail11.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail12.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail13.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail14.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail15.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail16.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail17.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail18.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail19.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail2.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail20.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail21.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail22.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail23.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail24.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail25.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail26.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail27.json | 2 - thirdparty/jsoncpp/test/jsonchecker/fail28.json | 2 - thirdparty/jsoncpp/test/jsonchecker/fail29.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail3.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail30.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail31.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail32.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail33.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail4.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail5.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail6.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail7.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail8.json | 1 - thirdparty/jsoncpp/test/jsonchecker/fail9.json | 1 - thirdparty/jsoncpp/test/jsonchecker/pass1.json | 58 - thirdparty/jsoncpp/test/jsonchecker/pass2.json | 1 - thirdparty/jsoncpp/test/jsonchecker/pass3.json | 6 - thirdparty/jsoncpp/test/jsonchecker/readme.txt | 3 - thirdparty/jsoncpp/test/pyjsontestrunner.py | 71 - thirdparty/jsoncpp/test/runjsontests.py | 174 -- thirdparty/jsoncpp/test/rununittests.py | 84 - 176 files changed, 143 insertions(+), 6067 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 4dfe202..74d0afc 100644 --- a/README.md +++ b/README.md @@ -290,10 +290,10 @@ Additionally, users can utilize the MiNiFi Toolkit Converter (version 0.0.1 - sc ### Provenance Report Add ProvenanceTaskReport processor to config.yml - id of the ProvenanceTaskReport is the remote NiFi input port UUID + Port UUID of the ProvenanceTaskReport is the remote NiFi input port UUID - name: ProvenanceTaskReport - id: 471deef6-2a6e-4a7d-912a-81cc17e3a204 + id: 471deef6-2a6e-4a7d-912a-81cc17e3a209 class: org.apache.nifi.processors.standard.ProvenanceTaskReport max concurrent tasks: 1 scheduling strategy: TIMER_DRIVEN @@ -305,6 +305,7 @@ Additionally, users can utilize the MiNiFi Toolkit Converter (version 0.0.1 - sc Properties: Port: 10001 Host Name: localhost + Port UUID: 471deef6-2a6e-4a7d-912a-81cc17e3a204 ### Running After completing a [build](#building), the application can be run by issuing the following from : http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/include/RemoteProcessorGroupPort.h ---------------------------------------------------------------------- diff --git a/libminifi/include/RemoteProcessorGroupPort.h b/libminifi/include/RemoteProcessorGroupPort.h index e9a4228..820b81b 100644 --- a/libminifi/include/RemoteProcessorGroupPort.h +++ b/libminifi/include/RemoteProcessorGroupPort.h @@ -57,6 +57,7 @@ class RemoteProcessorGroupPort : // Supported Properties static core::Property hostName; static core::Property port; + static core::Property portUUID; // Supported Relationships static core::Relationship relation; public: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/include/Site2SiteClientProtocol.h ---------------------------------------------------------------------- diff --git a/libminifi/include/Site2SiteClientProtocol.h b/libminifi/include/Site2SiteClientProtocol.h index 5082b07..1ab6f4f 100644 --- a/libminifi/include/Site2SiteClientProtocol.h +++ b/libminifi/include/Site2SiteClientProtocol.h @@ -377,7 +377,8 @@ class Transaction { class DataPacket { public: DataPacket(Site2SiteClientProtocol *protocol, Transaction *transaction, - std::map<std::string, std::string> attributes) { + std::map<std::string, std::string> attributes, std::string &payload) : + payload_ (payload) { _protocol = protocol; _size = 0; _transaction = transaction; @@ -387,6 +388,8 @@ class DataPacket { uint64_t _size; Site2SiteClientProtocol *_protocol; Transaction *_transaction; + std::string & payload_; + }; // Site2SiteClientProtocol Class @@ -520,7 +523,6 @@ class Site2SiteClientProtocol { // Return false when any error occurs bool send(std::string transactionID, DataPacket *packet, std::shared_ptr<FlowFileRecord> flowFile, - uint8_t *payload, int length, core::ProcessSession *session); // Confirm the data that was sent or received by comparing CRC32's of the data sent and the data received. bool confirm(std::string transactionID); @@ -538,8 +540,8 @@ class Site2SiteClientProtocol { void transferFlowFiles( core::ProcessContext *context, core::ProcessSession *session); - //! Transfer payload for the process session - void transferBytes(core::ProcessContext *context, core::ProcessSession *session, uint8_t *payload, int length, + //! Transfer string for the process session + void transferString(core::ProcessContext *context, core::ProcessSession *session, std::string &payload, std::map<std::string, std::string> attributes); // deleteTransaction void deleteTransaction(std::string transactionID); http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/include/core/Processor.h ---------------------------------------------------------------------- diff --git a/libminifi/include/core/Processor.h b/libminifi/include/core/Processor.h index fd0411f..69fc3f3 100644 --- a/libminifi/include/core/Processor.h +++ b/libminifi/include/core/Processor.h @@ -42,6 +42,9 @@ #include "ProcessSessionFactory.h" #include "Scheduling.h" +#include <stack> +#include "Site2SiteClientProtocol.h" + namespace org { namespace apache { namespace nifi { @@ -241,6 +244,11 @@ class Processor : public Connectable, public ConfigurableComponent, // Trigger the Processor even if the incoming connection is empty std::atomic<bool> _triggerWhenEmpty; + //! obtainSite2SiteProtocol for use + std::shared_ptr<Site2SiteClientProtocol> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId); + //! returnSite2SiteProtocol after use + void returnSite2SiteProtocol(std::shared_ptr<Site2SiteClientProtocol> protocol); + private: // Mutex for protection @@ -248,6 +256,10 @@ private: // Yield Expiration std::atomic<uint64_t> yield_expiration_; + // Site2Site Protocols + std::stack<std::shared_ptr<Site2SiteClientProtocol>> available_protocols_; + std::atomic<bool> protocols_created_; + // Check all incoming connections for work bool isWorkAvailable(); http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/include/provenance/ProvenanceRepository.h ---------------------------------------------------------------------- diff --git a/libminifi/include/provenance/ProvenanceRepository.h b/libminifi/include/provenance/ProvenanceRepository.h index a436ecb..57e1c3f 100644 --- a/libminifi/include/provenance/ProvenanceRepository.h +++ b/libminifi/include/provenance/ProvenanceRepository.h @@ -113,6 +113,9 @@ class ProvenanceRepository : public core::Repository, // Put virtual bool Put(std::string key, uint8_t *buf, int bufLen) { + if (repo_full_) + return false; + // persistent to the DB leveldb::Slice value((const char *) buf, bufLen); leveldb::Status status; http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/include/provenance/ProvenanceTaskReport.h ---------------------------------------------------------------------- diff --git a/libminifi/include/provenance/ProvenanceTaskReport.h b/libminifi/include/provenance/ProvenanceTaskReport.h index 38edeeb..1d9d507 100644 --- a/libminifi/include/provenance/ProvenanceTaskReport.h +++ b/libminifi/include/provenance/ProvenanceTaskReport.h @@ -57,8 +57,10 @@ public: static core::Property hostName; static core::Property port; static core::Property batchSize; + static core::Property portUUID; //! Supported Relationships static core::Relationship relation; + static const char *ProvenanceAppStr; public: //! OnTrigger method, implemented by NiFi ProvenanceTaskReport virtual void onTrigger(core::ProcessContext *context, core::ProcessSession *session); @@ -68,10 +70,6 @@ public: protected: private: - std::unique_ptr<Site2SiteClientProtocol> getNextProtocol(); - void returnProtocol(std::unique_ptr<Site2SiteClientProtocol> protocol); - std::stack<std::unique_ptr<Site2SiteClientProtocol>> available_protocols_; - std::mutex protocol_mutex_; uuid_t protocol_uuid_; //! Logger std::shared_ptr<logging::Logger> logger_; http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/FlowFileRecord.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/FlowFileRecord.cpp b/libminifi/src/FlowFileRecord.cpp index 562a685..575f34f 100644 --- a/libminifi/src/FlowFileRecord.cpp +++ b/libminifi/src/FlowFileRecord.cpp @@ -276,7 +276,7 @@ bool FlowFileRecord::Serialize() { uuid_str_.c_str(), outStream.getSize()); return true; } else { - logger_->log_error("NiFi FlowFile Store event %s size %d fail", + logger_->log_debug("NiFi FlowFile Store event %s size %d fail", uuid_str_.c_str(), outStream.getSize()); return false; } http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/RemoteProcessorGroupPort.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/RemoteProcessorGroupPort.cpp b/libminifi/src/RemoteProcessorGroupPort.cpp index 9790256..849a2da 100644 --- a/libminifi/src/RemoteProcessorGroupPort.cpp +++ b/libminifi/src/RemoteProcessorGroupPort.cpp @@ -46,31 +46,16 @@ core::Property RemoteProcessorGroupPort::hostName("Host Name", "Remote Host Name.", "localhost"); core::Property RemoteProcessorGroupPort::port("Port", "Remote Port", "9999"); +core::Property RemoteProcessorGroupPort::portUUID("Port UUID", "Specifies remote NiFi Port UUID.", ""); core::Relationship RemoteProcessorGroupPort::relation; - -std::unique_ptr<Site2SiteClientProtocol> RemoteProcessorGroupPort::getNextProtocol() { - std::lock_guard<std::mutex> protocol_lock_(protocol_mutex_); - if (available_protocols_.empty()) - return nullptr; - - std::unique_ptr<Site2SiteClientProtocol> return_pointer = std::move(available_protocols_.top()); - available_protocols_.pop(); - return std::move(return_pointer); -} - -void RemoteProcessorGroupPort::returnProtocol( - std::unique_ptr<Site2SiteClientProtocol> return_protocol) { - std::lock_guard<std::mutex> protocol_lock_(protocol_mutex_); - available_protocols_.push(std::move(return_protocol)); -} - void RemoteProcessorGroupPort::initialize() { // Set the supported properties std::set<core::Property> properties; properties.insert(hostName); properties.insert(port); + properties.insert(portUUID); setSupportedProperties(properties); // Set the supported relationships std::set<core::Relationship> relationships; @@ -81,41 +66,31 @@ void RemoteProcessorGroupPort::initialize() { void RemoteProcessorGroupPort::onTrigger(core::ProcessContext *context, core::ProcessSession *session) { - std::string value; - if (!transmitting_) return; - std::unique_ptr<Site2SiteClientProtocol> protocol_ = getNextProtocol(); - - // Peer Connection - if (protocol_ == nullptr) { - - protocol_ = std::unique_ptr<Site2SiteClientProtocol>( - new Site2SiteClientProtocol(0)); - protocol_->setPortId(protocol_uuid_); - protocol_->setTimeOut(timeout_); - - std::string host = ""; - uint16_t sport = 0; - int64_t lvalue; + std::string value; + int64_t lvalue; + std::string host = ""; + uint16_t sport = 0; - if (context->getProperty(hostName.getName(), value)) { - host = value; - } - if (context->getProperty(port.getName(), value) - && core::Property::StringToInt(value, lvalue)) { - sport = (uint16_t) lvalue; - } - std::unique_ptr<org::apache::nifi::minifi::io::DataStream> str = - std::unique_ptr<org::apache::nifi::minifi::io::DataStream>( - org::apache::nifi::minifi::io::StreamFactory::getInstance() - ->createSocket(host, sport)); + if (context->getProperty(hostName.getName(), value)) { + host = value; + } + if (context->getProperty(port.getName(), value) + && core::Property::StringToInt(value, lvalue)) { + sport = (uint16_t) lvalue; + } + if (context->getProperty(portUUID.getName(), value)) { + uuid_parse(value.c_str(), protocol_uuid_); + } - std::unique_ptr<Site2SitePeer> peer_ = std::unique_ptr<Site2SitePeer>( - new Site2SitePeer(std::move(str), host, sport)); + std::shared_ptr<Site2SiteClientProtocol> protocol_ = this->obtainSite2SiteProtocol(host, sport, protocol_uuid_); - protocol_->setPeer(std::move(peer_)); + if (!protocol_) + { + context->yield(); + return; } if (!protocol_->bootstrap()) { @@ -125,6 +100,7 @@ void RemoteProcessorGroupPort::onTrigger(core::ProcessContext *context, context->getProcessorNode().getProcessor()); logger_->log_error("Site2Site bootstrap failed yield period %d peer ", processor->getYieldPeriodMsec()); + returnSite2SiteProtocol(protocol_); return; } @@ -133,7 +109,7 @@ void RemoteProcessorGroupPort::onTrigger(core::ProcessContext *context, else protocol_->transferFlowFiles(context, session); - returnProtocol(std::move(protocol_)); + returnSite2SiteProtocol(protocol_); return; } http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/Site2SiteClientProtocol.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/Site2SiteClientProtocol.cpp b/libminifi/src/Site2SiteClientProtocol.cpp index ced52f1..208432c 100644 --- a/libminifi/src/Site2SiteClientProtocol.cpp +++ b/libminifi/src/Site2SiteClientProtocol.cpp @@ -682,7 +682,6 @@ bool Site2SiteClientProtocol::receive(std::string transactionID, bool Site2SiteClientProtocol::send( std::string transactionID, DataPacket *packet, std::shared_ptr<FlowFileRecord> flowFile, - uint8_t *payload, int length, core::ProcessSession *session) { int ret; Transaction *transaction = NULL; @@ -764,15 +763,15 @@ bool Site2SiteClientProtocol::send( } } } - else if (payload != NULL){ - len = length; + else if (packet->payload_.length() > 0) { + len = packet->payload_.length(); ret = transaction->getStream().write(len); if (ret != 8) { return false; } - ret = transaction->getStream().writeData(payload, len); + ret = transaction->getStream().writeData((uint8_t *) (packet->payload_.c_str()), len); if (ret != len) { return false; } @@ -823,7 +822,8 @@ void Site2SiteClientProtocol::receiveFlowFiles( while (true) { std::map<std::string, std::string> empty; uint64_t startTime = getTimeMillis(); - DataPacket packet(this, transaction, empty); + std::string payload; + DataPacket packet(this, transaction, empty, payload); bool eof = false; if (!receive(transactionID, &packet, eof)) { @@ -1198,9 +1198,10 @@ void Site2SiteClientProtocol::transferFlowFiles( try { while (continueTransaction) { uint64_t startTime = getTimeMillis(); - DataPacket packet(this, transaction, flow->getAttributes()); + std::string payload; + DataPacket packet(this, transaction, flow->getAttributes(), payload); - if (!send(transactionID, &packet, flow, NULL, 0, session)) { + if (!send(transactionID, &packet, flow, session)) { throw Exception(SITE2SITE_EXCEPTION, "Send Failed"); return; } @@ -1257,12 +1258,12 @@ void Site2SiteClientProtocol::transferFlowFiles( return; } -void Site2SiteClientProtocol::transferBytes(core::ProcessContext *context, core::ProcessSession *session, uint8_t *payload, int length, +void Site2SiteClientProtocol::transferString(core::ProcessContext *context, core::ProcessSession *session, std::string &payload, std::map<std::string, std::string> attributes) { Transaction *transaction = NULL; - if (payload == NULL) + if (payload.length() <= 0) return; if (_peerState != READY) @@ -1292,15 +1293,15 @@ void Site2SiteClientProtocol::transferBytes(core::ProcessContext *context, core: try { - DataPacket packet(this, transaction, attributes); + DataPacket packet(this, transaction, attributes, payload); - if (!send(transactionID, &packet, nullptr, payload, length, session)) + if (!send(transactionID, &packet, nullptr, session)) { throw Exception(SITE2SITE_EXCEPTION, "Send Failed"); return; } logger_->log_info("Site2Site transaction %s send bytes length %d", - transactionID.c_str(), length); + transactionID.c_str(), payload.length()); if (!confirm(transactionID)) { http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/core/Processor.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/core/Processor.cpp b/libminifi/src/core/Processor.cpp index ba52c28..e32ba8a 100644 --- a/libminifi/src/core/Processor.cpp +++ b/libminifi/src/core/Processor.cpp @@ -35,6 +35,7 @@ #include "core/ProcessContext.h" #include "core/ProcessSession.h" #include "core/ProcessSessionFactory.h" +#include "../include/io/StreamFactory.h" namespace org { namespace apache { @@ -52,6 +53,7 @@ Processor::Processor(std::string name, uuid_t uuid) strategy_ = TIMER_DRIVEN; loss_tolerant_ = false; _triggerWhenEmpty = false; + protocols_created_ = false; scheduling_period_nano_ = MINIMUM_SCHEDULING_NANOS; run_durantion_nano_ = 0; yield_period_msec_ = DEFAULT_YIELD_PERIOD_SECONDS * 1000; @@ -193,7 +195,55 @@ void Processor::removeConnection(std::shared_ptr<Connectable> conn) { } } +std::shared_ptr<Site2SiteClientProtocol> Processor::obtainSite2SiteProtocol + (std::string host, uint16_t sport, uuid_t portId) { + std::lock_guard<std::mutex> lock(mutex_); + + if (!protocols_created_) { + for (int i = 0; i < this->max_concurrent_tasks_; i++) { + // create the protocol pool based on max threads allowed + std::shared_ptr<Site2SiteClientProtocol> protocol ( + new Site2SiteClientProtocol(0)); + protocols_created_ = true; + protocol->setPortId(portId); + std::unique_ptr<org::apache::nifi::minifi::io::DataStream> str = + std::unique_ptr<org::apache::nifi::minifi::io::DataStream>( + org::apache::nifi::minifi::io::StreamFactory::getInstance() + ->createSocket(host, sport)); + std::unique_ptr<Site2SitePeer> peer_ = std::unique_ptr<Site2SitePeer>( + new Site2SitePeer(std::move(str), host, sport)); + protocol->setPeer(std::move(peer_)); + available_protocols_.push(protocol); + } + } + if (!available_protocols_.empty()) { + std::shared_ptr<Site2SiteClientProtocol> return_pointer = available_protocols_.top(); + available_protocols_.pop(); + return return_pointer; + } + else { + // create the protocol on demand if we exceed the pool + std::shared_ptr<Site2SiteClientProtocol> protocol ( + new Site2SiteClientProtocol(0)); + protocol->setPortId(portId); + std::unique_ptr<org::apache::nifi::minifi::io::DataStream> str = + std::unique_ptr<org::apache::nifi::minifi::io::DataStream>( + org::apache::nifi::minifi::io::StreamFactory::getInstance() + ->createSocket(host, sport)); + std::unique_ptr<Site2SitePeer> peer_ = std::unique_ptr<Site2SitePeer>( + new Site2SitePeer(std::move(str), host, sport)); + protocol->setPeer(std::move(peer_)); + return protocol; + } +} +void Processor::returnSite2SiteProtocol(std::shared_ptr<Site2SiteClientProtocol> protocol) +{ + std::lock_guard<std::mutex> lock(mutex_); + if (protocol && available_protocols_.size() < max_concurrent_tasks_) { + available_protocols_.push(protocol); + } +} bool Processor::flowFilesQueued() { std::lock_guard<std::mutex> lock(mutex_); http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/provenance/ProvenanceRepository.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/provenance/ProvenanceRepository.cpp b/libminifi/src/provenance/ProvenanceRepository.cpp index d4448fd..6fe332b 100644 --- a/libminifi/src/provenance/ProvenanceRepository.cpp +++ b/libminifi/src/provenance/ProvenanceRepository.cpp @@ -36,7 +36,6 @@ void ProvenanceRepository::run() { uint64_t curTime = getTimeMillis(); uint64_t size = repoSize(); if (size >= purgeThreshold) { - std::lock_guard<std::mutex> lock(mutex_); std::vector<std::string> purgeList; leveldb::Iterator* it = db_->NewIterator(leveldb::ReadOptions()); for (it->SeekToFirst(); it->Valid(); it->Next()) { http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/libminifi/src/provenance/ProvenanceTaskReport.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/provenance/ProvenanceTaskReport.cpp b/libminifi/src/provenance/ProvenanceTaskReport.cpp index d4995a0..4f16e4b 100644 --- a/libminifi/src/provenance/ProvenanceTaskReport.cpp +++ b/libminifi/src/provenance/ProvenanceTaskReport.cpp @@ -49,7 +49,9 @@ const std::string ProvenanceTaskReport::ProcessorName("ProvenanceTaskReport"); core::Property ProvenanceTaskReport::hostName("Host Name", "Remote Host Name.", "localhost"); core::Property ProvenanceTaskReport::port("Port", "Remote Port", "9999"); core::Property ProvenanceTaskReport::batchSize("Batch Size", "Specifies how many records to send in a single batch, at most.", "100"); +core::Property ProvenanceTaskReport::portUUID("Port UUID", "Specifies remote NiFi Port UUID.", ""); core::Relationship ProvenanceTaskReport::relation; +const char *ProvenanceTaskReport::ProvenanceAppStr = "MiNiFi Flow"; void ProvenanceTaskReport::initialize() { @@ -58,6 +60,7 @@ void ProvenanceTaskReport::initialize() properties.insert(hostName); properties.insert(port); properties.insert(batchSize); + properties.insert(portUUID); setSupportedProperties(properties); //! Set the supported relationships std::set<core::Relationship> relationships; @@ -65,55 +68,30 @@ void ProvenanceTaskReport::initialize() setSupportedRelationships(relationships); } -std::unique_ptr<Site2SiteClientProtocol> ProvenanceTaskReport::getNextProtocol() -{ - std::lock_guard<std::mutex> protocol_lock_(protocol_mutex_); - if (available_protocols_.empty()) - return nullptr; - std::unique_ptr<Site2SiteClientProtocol> return_pointer = std::move(available_protocols_.top()); - available_protocols_.pop(); - return std::move(return_pointer); -} - -void ProvenanceTaskReport::returnProtocol( - std::unique_ptr<Site2SiteClientProtocol> return_protocol) -{ - std::lock_guard<std::mutex> protocol_lock_(protocol_mutex_); - available_protocols_.push(std::move(return_protocol)); -} - void ProvenanceTaskReport::onTrigger(core::ProcessContext *context, core::ProcessSession *session) { std::string value; int64_t lvalue; - - std::unique_ptr<Site2SiteClientProtocol> protocol_ = getNextProtocol(); + std::string host = ""; + uint16_t sport = 0; - if (protocol_ == nullptr) + if (context->getProperty(hostName.getName(), value)) { + host = value; + } + if (context->getProperty(port.getName(), value) + && core::Property::StringToInt(value, lvalue)) { + sport = (uint16_t) lvalue; + } + if (context->getProperty(portUUID.getName(), value)) { + uuid_parse(value.c_str(), protocol_uuid_); + } + + std::shared_ptr<Site2SiteClientProtocol> protocol_ = this->obtainSite2SiteProtocol(host, sport, protocol_uuid_); + + if (!protocol_) { - protocol_ = std::unique_ptr<Site2SiteClientProtocol>( - new Site2SiteClientProtocol(0)); - protocol_->setPortId(protocol_uuid_); - - std::string host = ""; - uint16_t sport = 0; - - if (context->getProperty(hostName.getName(), value)) { - host = value; - } - if (context->getProperty(port.getName(), value) - && core::Property::StringToInt(value, lvalue)) { - sport = (uint16_t) lvalue; - } - std::unique_ptr<org::apache::nifi::minifi::io::DataStream> str = - std::unique_ptr<org::apache::nifi::minifi::io::DataStream>( - org::apache::nifi::minifi::io::StreamFactory::getInstance() - ->createSocket(host, sport)); - - std::unique_ptr<Site2SitePeer> peer_ = std::unique_ptr<Site2SitePeer>( - new Site2SitePeer(std::move(str), host, sport)); - - protocol_->setPeer(std::move(peer_)); + context->yield(); + return; } if (!protocol_->bootstrap()) @@ -124,14 +102,15 @@ void ProvenanceTaskReport::onTrigger(core::ProcessContext *context, core::Proces context->getProcessorNode().getProcessor()); logger_->log_error("Site2Site bootstrap failed yield period %d peer ", processor->getYieldPeriodMsec()); + returnSite2SiteProtocol(protocol_); return; } - int batch = 100; + int64_t batch = 100; if (context->getProperty(batchSize.getName(), value) && core::Property::StringToInt(value, lvalue)) { - batch = (int) lvalue; + batch = lvalue; } std::vector<std::shared_ptr<ProvenanceEventRecord>> records; @@ -141,7 +120,7 @@ void ProvenanceTaskReport::onTrigger(core::ProcessContext *context, core::Proces if (records.size() <= 0) { - returnProtocol(std::move(protocol_)); + returnSite2SiteProtocol(protocol_); return; } @@ -185,33 +164,30 @@ void ProvenanceTaskReport::onTrigger(core::ProcessContext *context, core::Proces recordJson["transitUri"] = record->getTransitUri().c_str(); recordJson["remoteIdentifier"] = record->getSourceSystemFlowFileIdentifier().c_str(); recordJson["alternateIdentifier"] = record->getAlternateIdentifierUri().c_str(); - recordJson["application"] = "MiNiFi Flow"; + recordJson["application"] = ProvenanceAppStr; array.append(recordJson); } Json::StyledWriter writer; std::string jsonStr = writer.write(array); - uint8_t *payload = (uint8_t *) jsonStr.c_str(); - int length = jsonStr.length(); try { std::map<std::string, std::string> attributes; - protocol_->transferBytes(context, session, payload, length, attributes); + protocol_->transferString(context, session, jsonStr, attributes); } catch (...) { // if transfer bytes failed, return instead of purge the provenance records - returnProtocol(std::move(protocol_)); + returnSite2SiteProtocol(protocol_); return; } // we transfer the record, purge the record from DB repo->purgeProvenanceRecord(records); - returnProtocol(std::move(protocol_)); + returnSite2SiteProtocol(protocol_); - return; } } /* namespace provenance */ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/__init__.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/__init__.py b/thirdparty/jsoncpp/devtools/__init__.py deleted file mode 100644 index d18a521..0000000 --- a/thirdparty/jsoncpp/devtools/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2010 Baptiste Lepilleur -# Distributed under MIT license, or public domain if desired and -# recognized in your jurisdiction. -# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -# module http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/agent_vmw7.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/agent_vmw7.json b/thirdparty/jsoncpp/devtools/agent_vmw7.json deleted file mode 100644 index 95d62ba..0000000 --- a/thirdparty/jsoncpp/devtools/agent_vmw7.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "cmake_variants" : [ - {"name": "generator", - "generators": [ - {"generator": [ - "Visual Studio 7 .NET 2003", - "Visual Studio 9 2008", - "Visual Studio 9 2008 Win64", - "Visual Studio 10", - "Visual Studio 10 Win64", - "Visual Studio 11", - "Visual Studio 11 Win64" - ] - }, - {"generator": ["MinGW Makefiles"], - "env_prepend": [{"path": "c:/wut/prg/MinGW/bin"}] - } - ] - }, - {"name": "shared_dll", - "variables": [ - ["BUILD_SHARED_LIBS=true"], - ["BUILD_SHARED_LIBS=false"] - ] - }, - {"name": "build_type", - "build_types": [ - "debug", - "release" - ] - } - ] -} http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/agent_vmxp.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/agent_vmxp.json b/thirdparty/jsoncpp/devtools/agent_vmxp.json deleted file mode 100644 index 39d5e53..0000000 --- a/thirdparty/jsoncpp/devtools/agent_vmxp.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "cmake_variants" : [ - {"name": "generator", - "generators": [ - {"generator": [ - "Visual Studio 6", - "Visual Studio 7", - "Visual Studio 8 2005" - ] - } - ] - }, - {"name": "shared_dll", - "variables": [ - ["BUILD_SHARED_LIBS=true"], - ["BUILD_SHARED_LIBS=false"] - ] - }, - {"name": "build_type", - "build_types": [ - "debug", - "release" - ] - } - ] -} http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/antglob.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/antglob.py b/thirdparty/jsoncpp/devtools/antglob.py deleted file mode 100644 index c272f66..0000000 --- a/thirdparty/jsoncpp/devtools/antglob.py +++ /dev/null @@ -1,205 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -# Copyright 2009 Baptiste Lepilleur -# Distributed under MIT license, or public domain if desired and -# recognized in your jurisdiction. -# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -from __future__ import print_function -from dircache import listdir -import re -import fnmatch -import os.path - - -# These fnmatch expressions are used by default to prune the directory tree -# while doing the recursive traversal in the glob_impl method of glob function. -prune_dirs = '.git .bzr .hg .svn _MTN _darcs CVS SCCS ' - -# These fnmatch expressions are used by default to exclude files and dirs -# while doing the recursive traversal in the glob_impl method of glob function. -##exclude_pats = prune_pats + '*~ #*# .#* %*% ._* .gitignore .cvsignore vssver.scc .DS_Store'.split() - -# These ant_glob expressions are used by default to exclude files and dirs and also prune the directory tree -# while doing the recursive traversal in the glob_impl method of glob function. -default_excludes = ''' -**/*~ -**/#*# -**/.#* -**/%*% -**/._* -**/CVS -**/CVS/** -**/.cvsignore -**/SCCS -**/SCCS/** -**/vssver.scc -**/.svn -**/.svn/** -**/.git -**/.git/** -**/.gitignore -**/.bzr -**/.bzr/** -**/.hg -**/.hg/** -**/_MTN -**/_MTN/** -**/_darcs -**/_darcs/** -**/.DS_Store ''' - -DIR = 1 -FILE = 2 -DIR_LINK = 4 -FILE_LINK = 8 -LINKS = DIR_LINK | FILE_LINK -ALL_NO_LINK = DIR | FILE -ALL = DIR | FILE | LINKS - -_ANT_RE = re.compile(r'(/\*\*/)|(\*\*/)|(/\*\*)|(\*)|(/)|([^\*/]*)') - -def ant_pattern_to_re(ant_pattern): - """Generates a regular expression from the ant pattern. - Matching convention: - **/a: match 'a', 'dir/a', 'dir1/dir2/a' - a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b' - *.py: match 'script.py' but not 'a/script.py' - """ - rex = ['^'] - next_pos = 0 - sep_rex = r'(?:/|%s)' % re.escape(os.path.sep) -## print 'Converting', ant_pattern - for match in _ANT_RE.finditer(ant_pattern): -## print 'Matched', match.group() -## print match.start(0), next_pos - if match.start(0) != next_pos: - raise ValueError("Invalid ant pattern") - if match.group(1): # /**/ - rex.append(sep_rex + '(?:.*%s)?' % sep_rex) - elif match.group(2): # **/ - rex.append('(?:.*%s)?' % sep_rex) - elif match.group(3): # /** - rex.append(sep_rex + '.*') - elif match.group(4): # * - rex.append('[^/%s]*' % re.escape(os.path.sep)) - elif match.group(5): # / - rex.append(sep_rex) - else: # somepath - rex.append(re.escape(match.group(6))) - next_pos = match.end() - rex.append('$') - return re.compile(''.join(rex)) - -def _as_list(l): - if isinstance(l, basestring): - return l.split() - return l - -def glob(dir_path, - includes = '**/*', - excludes = default_excludes, - entry_type = FILE, - prune_dirs = prune_dirs, - max_depth = 25): - include_filter = [ant_pattern_to_re(p) for p in _as_list(includes)] - exclude_filter = [ant_pattern_to_re(p) for p in _as_list(excludes)] - prune_dirs = [p.replace('/',os.path.sep) for p in _as_list(prune_dirs)] - dir_path = dir_path.replace('/',os.path.sep) - entry_type_filter = entry_type - - def is_pruned_dir(dir_name): - for pattern in prune_dirs: - if fnmatch.fnmatch(dir_name, pattern): - return True - return False - - def apply_filter(full_path, filter_rexs): - """Return True if at least one of the filter regular expression match full_path.""" - for rex in filter_rexs: - if rex.match(full_path): - return True - return False - - def glob_impl(root_dir_path): - child_dirs = [root_dir_path] - while child_dirs: - dir_path = child_dirs.pop() - for entry in listdir(dir_path): - full_path = os.path.join(dir_path, entry) -## print 'Testing:', full_path, - is_dir = os.path.isdir(full_path) - if is_dir and not is_pruned_dir(entry): # explore child directory ? -## print '===> marked for recursion', - child_dirs.append(full_path) - included = apply_filter(full_path, include_filter) - rejected = apply_filter(full_path, exclude_filter) - if not included or rejected: # do not include entry ? -## print '=> not included or rejected' - continue - link = os.path.islink(full_path) - is_file = os.path.isfile(full_path) - if not is_file and not is_dir: -## print '=> unknown entry type' - continue - if link: - entry_type = is_file and FILE_LINK or DIR_LINK - else: - entry_type = is_file and FILE or DIR -## print '=> type: %d' % entry_type, - if (entry_type & entry_type_filter) != 0: -## print ' => KEEP' - yield os.path.join(dir_path, entry) -## else: -## print ' => TYPE REJECTED' - return list(glob_impl(dir_path)) - - -if __name__ == "__main__": - import unittest - - class AntPatternToRETest(unittest.TestCase): -## def test_conversion(self): -## self.assertEqual('^somepath$', ant_pattern_to_re('somepath').pattern) - - def test_matching(self): - test_cases = [ ('path', - ['path'], - ['somepath', 'pathsuffix', '/path', '/path']), - ('*.py', - ['source.py', 'source.ext.py', '.py'], - ['path/source.py', '/.py', 'dir.py/z', 'z.pyc', 'z.c']), - ('**/path', - ['path', '/path', '/a/path', 'c:/a/path', '/a/b/path', '//a/path', '/a/path/b/path'], - ['path/', 'a/path/b', 'dir.py/z', 'somepath', 'pathsuffix', 'a/somepath']), - ('path/**', - ['path/a', 'path/path/a', 'path//'], - ['path', 'somepath/a', 'a/path', 'a/path/a', 'pathsuffix/a']), - ('/**/path', - ['/path', '/a/path', '/a/b/path/path', '/path/path'], - ['path', 'path/', 'a/path', '/pathsuffix', '/somepath']), - ('a/b', - ['a/b'], - ['somea/b', 'a/bsuffix', 'a/b/c']), - ('**/*.py', - ['script.py', 'src/script.py', 'a/b/script.py', '/a/b/script.py'], - ['script.pyc', 'script.pyo', 'a.py/b']), - ('src/**/*.py', - ['src/a.py', 'src/dir/a.py'], - ['a/src/a.py', '/src/a.py']), - ] - for ant_pattern, accepted_matches, rejected_matches in list(test_cases): - def local_path(paths): - return [ p.replace('/',os.path.sep) for p in paths ] - test_cases.append((ant_pattern, local_path(accepted_matches), local_path(rejected_matches))) - for ant_pattern, accepted_matches, rejected_matches in test_cases: - rex = ant_pattern_to_re(ant_pattern) - print('ant_pattern:', ant_pattern, ' => ', rex.pattern) - for accepted_match in accepted_matches: - print('Accepted?:', accepted_match) - self.assertTrue(rex.match(accepted_match) is not None) - for rejected_match in rejected_matches: - print('Rejected?:', rejected_match) - self.assertTrue(rex.match(rejected_match) is None) - - unittest.main() http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/batchbuild.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/batchbuild.py b/thirdparty/jsoncpp/devtools/batchbuild.py deleted file mode 100644 index 0eb0690..0000000 --- a/thirdparty/jsoncpp/devtools/batchbuild.py +++ /dev/null @@ -1,278 +0,0 @@ -from __future__ import print_function -import collections -import itertools -import json -import os -import os.path -import re -import shutil -import string -import subprocess -import sys -import cgi - -class BuildDesc: - def __init__(self, prepend_envs=None, variables=None, build_type=None, generator=None): - self.prepend_envs = prepend_envs or [] # [ { "var": "value" } ] - self.variables = variables or [] - self.build_type = build_type - self.generator = generator - - def merged_with(self, build_desc): - """Returns a new BuildDesc by merging field content. - Prefer build_desc fields to self fields for single valued field. - """ - return BuildDesc(self.prepend_envs + build_desc.prepend_envs, - self.variables + build_desc.variables, - build_desc.build_type or self.build_type, - build_desc.generator or self.generator) - - def env(self): - environ = os.environ.copy() - for values_by_name in self.prepend_envs: - for var, value in list(values_by_name.items()): - var = var.upper() - if type(value) is unicode: - value = value.encode(sys.getdefaultencoding()) - if var in environ: - environ[var] = value + os.pathsep + environ[var] - else: - environ[var] = value - return environ - - def cmake_args(self): - args = ["-D%s" % var for var in self.variables] - # skip build type for Visual Studio solution as it cause warning - if self.build_type and 'Visual' not in self.generator: - args.append("-DCMAKE_BUILD_TYPE=%s" % self.build_type) - if self.generator: - args.extend(['-G', self.generator]) - return args - - def __repr__(self): - return "BuildDesc(%s, build_type=%s)" % (" ".join(self.cmake_args()), self.build_type) - -class BuildData: - def __init__(self, desc, work_dir, source_dir): - self.desc = desc - self.work_dir = work_dir - self.source_dir = source_dir - self.cmake_log_path = os.path.join(work_dir, 'batchbuild_cmake.log') - self.build_log_path = os.path.join(work_dir, 'batchbuild_build.log') - self.cmake_succeeded = False - self.build_succeeded = False - - def execute_build(self): - print('Build %s' % self.desc) - self._make_new_work_dir() - self.cmake_succeeded = self._generate_makefiles() - if self.cmake_succeeded: - self.build_succeeded = self._build_using_makefiles() - return self.build_succeeded - - def _generate_makefiles(self): - print(' Generating makefiles: ', end=' ') - cmd = ['cmake'] + self.desc.cmake_args() + [os.path.abspath(self.source_dir)] - succeeded = self._execute_build_subprocess(cmd, self.desc.env(), self.cmake_log_path) - print('done' if succeeded else 'FAILED') - return succeeded - - def _build_using_makefiles(self): - print(' Building:', end=' ') - cmd = ['cmake', '--build', self.work_dir] - if self.desc.build_type: - cmd += ['--config', self.desc.build_type] - succeeded = self._execute_build_subprocess(cmd, self.desc.env(), self.build_log_path) - print('done' if succeeded else 'FAILED') - return succeeded - - def _execute_build_subprocess(self, cmd, env, log_path): - process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.work_dir, - env=env) - stdout, _ = process.communicate() - succeeded = (process.returncode == 0) - with open(log_path, 'wb') as flog: - log = ' '.join(cmd) + '\n' + stdout + '\nExit code: %r\n' % process.returncode - flog.write(fix_eol(log)) - return succeeded - - def _make_new_work_dir(self): - if os.path.isdir(self.work_dir): - print(' Removing work directory', self.work_dir) - shutil.rmtree(self.work_dir, ignore_errors=True) - if not os.path.isdir(self.work_dir): - os.makedirs(self.work_dir) - -def fix_eol(stdout): - """Fixes wrong EOL produced by cmake --build on Windows (\r\r\n instead of \r\n). - """ - return re.sub('\r*\n', os.linesep, stdout) - -def load_build_variants_from_config(config_path): - with open(config_path, 'rb') as fconfig: - data = json.load(fconfig) - variants = data[ 'cmake_variants' ] - build_descs_by_axis = collections.defaultdict(list) - for axis in variants: - axis_name = axis["name"] - build_descs = [] - if "generators" in axis: - for generator_data in axis["generators"]: - for generator in generator_data["generator"]: - build_desc = BuildDesc(generator=generator, - prepend_envs=generator_data.get("env_prepend")) - build_descs.append(build_desc) - elif "variables" in axis: - for variables in axis["variables"]: - build_desc = BuildDesc(variables=variables) - build_descs.append(build_desc) - elif "build_types" in axis: - for build_type in axis["build_types"]: - build_desc = BuildDesc(build_type=build_type) - build_descs.append(build_desc) - build_descs_by_axis[axis_name].extend(build_descs) - return build_descs_by_axis - -def generate_build_variants(build_descs_by_axis): - """Returns a list of BuildDesc generated for the partial BuildDesc for each axis.""" - axis_names = list(build_descs_by_axis.keys()) - build_descs = [] - for axis_name, axis_build_descs in list(build_descs_by_axis.items()): - if len(build_descs): - # for each existing build_desc and each axis build desc, create a new build_desc - new_build_descs = [] - for prototype_build_desc, axis_build_desc in itertools.product(build_descs, axis_build_descs): - new_build_descs.append(prototype_build_desc.merged_with(axis_build_desc)) - build_descs = new_build_descs - else: - build_descs = axis_build_descs - return build_descs - -HTML_TEMPLATE = string.Template('''<html> -<head> - <title>$title</title> - <style type="text/css"> - td.failed {background-color:#f08080;} - td.ok {background-color:#c0eec0;} - </style> -</head> -<body> -<table border="1"> -<thead> - <tr> - <th>Variables</th> - $th_vars - </tr> - <tr> - <th>Build type</th> - $th_build_types - </tr> -</thead> -<tbody> -$tr_builds -</tbody> -</table> -</body></html>''') - -def generate_html_report(html_report_path, builds): - report_dir = os.path.dirname(html_report_path) - # Vertical axis: generator - # Horizontal: variables, then build_type - builds_by_generator = collections.defaultdict(list) - variables = set() - build_types_by_variable = collections.defaultdict(set) - build_by_pos_key = {} # { (generator, var_key, build_type): build } - for build in builds: - builds_by_generator[build.desc.generator].append(build) - var_key = tuple(sorted(build.desc.variables)) - variables.add(var_key) - build_types_by_variable[var_key].add(build.desc.build_type) - pos_key = (build.desc.generator, var_key, build.desc.build_type) - build_by_pos_key[pos_key] = build - variables = sorted(variables) - th_vars = [] - th_build_types = [] - for variable in variables: - build_types = sorted(build_types_by_variable[variable]) - nb_build_type = len(build_types_by_variable[variable]) - th_vars.append('<th colspan="%d">%s</th>' % (nb_build_type, cgi.escape(' '.join(variable)))) - for build_type in build_types: - th_build_types.append('<th>%s</th>' % cgi.escape(build_type)) - tr_builds = [] - for generator in sorted(builds_by_generator): - tds = [ '<td>%s</td>\n' % cgi.escape(generator) ] - for variable in variables: - build_types = sorted(build_types_by_variable[variable]) - for build_type in build_types: - pos_key = (generator, variable, build_type) - build = build_by_pos_key.get(pos_key) - if build: - cmake_status = 'ok' if build.cmake_succeeded else 'FAILED' - build_status = 'ok' if build.build_succeeded else 'FAILED' - cmake_log_url = os.path.relpath(build.cmake_log_path, report_dir) - build_log_url = os.path.relpath(build.build_log_path, report_dir) - td = '<td class="%s"><a href="%s" class="%s">CMake: %s</a>' % ( build_status.lower(), cmake_log_url, cmake_status.lower(), cmake_status) - if build.cmake_succeeded: - td += '<br><a href="%s" class="%s">Build: %s</a>' % ( build_log_url, build_status.lower(), build_status) - td += '</td>' - else: - td = '<td></td>' - tds.append(td) - tr_builds.append('<tr>%s</tr>' % '\n'.join(tds)) - html = HTML_TEMPLATE.substitute( title='Batch build report', - th_vars=' '.join(th_vars), - th_build_types=' '.join(th_build_types), - tr_builds='\n'.join(tr_builds)) - with open(html_report_path, 'wt') as fhtml: - fhtml.write(html) - print('HTML report generated in:', html_report_path) - -def main(): - usage = r"""%prog WORK_DIR SOURCE_DIR CONFIG_JSON_PATH [CONFIG2_JSON_PATH...] -Build a given CMake based project located in SOURCE_DIR with multiple generators/options.dry_run -as described in CONFIG_JSON_PATH building in WORK_DIR. - -Example of call: -python devtools\batchbuild.py e:\buildbots\jsoncpp\build . devtools\agent_vmw7.json -""" - from optparse import OptionParser - parser = OptionParser(usage=usage) - parser.allow_interspersed_args = True -# parser.add_option('-v', '--verbose', dest="verbose", action='store_true', -# help="""Be verbose.""") - parser.enable_interspersed_args() - options, args = parser.parse_args() - if len(args) < 3: - parser.error("Missing one of WORK_DIR SOURCE_DIR CONFIG_JSON_PATH.") - work_dir = args[0] - source_dir = args[1].rstrip('/\\') - config_paths = args[2:] - for config_path in config_paths: - if not os.path.isfile(config_path): - parser.error("Can not read: %r" % config_path) - - # generate build variants - build_descs = [] - for config_path in config_paths: - build_descs_by_axis = load_build_variants_from_config(config_path) - build_descs.extend(generate_build_variants(build_descs_by_axis)) - print('Build variants (%d):' % len(build_descs)) - # assign build directory for each variant - if not os.path.isdir(work_dir): - os.makedirs(work_dir) - builds = [] - with open(os.path.join(work_dir, 'matrix-dir-map.txt'), 'wt') as fmatrixmap: - for index, build_desc in enumerate(build_descs): - build_desc_work_dir = os.path.join(work_dir, '%03d' % (index+1)) - builds.append(BuildData(build_desc, build_desc_work_dir, source_dir)) - fmatrixmap.write('%s: %s\n' % (build_desc_work_dir, build_desc)) - for build in builds: - build.execute_build() - html_report_path = os.path.join(work_dir, 'batchbuild-report.html') - generate_html_report(html_report_path, builds) - print('Done') - - -if __name__ == '__main__': - main() - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/fixeol.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/fixeol.py b/thirdparty/jsoncpp/devtools/fixeol.py deleted file mode 100644 index b55e146..0000000 --- a/thirdparty/jsoncpp/devtools/fixeol.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2010 Baptiste Lepilleur -# Distributed under MIT license, or public domain if desired and -# recognized in your jurisdiction. -# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -from __future__ import print_function -import os.path -import sys - -def fix_source_eol(path, is_dry_run = True, verbose = True, eol = '\n'): - """Makes sure that all sources have the specified eol sequence (default: unix).""" - if not os.path.isfile(path): - raise ValueError('Path "%s" is not a file' % path) - try: - f = open(path, 'rb') - except IOError as msg: - print("%s: I/O Error: %s" % (file, str(msg)), file=sys.stderr) - return False - try: - raw_lines = f.readlines() - finally: - f.close() - fixed_lines = [line.rstrip('\r\n') + eol for line in raw_lines] - if raw_lines != fixed_lines: - print('%s =>' % path, end=' ') - if not is_dry_run: - f = open(path, "wb") - try: - f.writelines(fixed_lines) - finally: - f.close() - if verbose: - print(is_dry_run and ' NEED FIX' or ' FIXED') - return True -## -## -## -##def _do_fix(is_dry_run = True): -## from waftools import antglob -## python_sources = antglob.glob('.', -## includes = '**/*.py **/wscript **/wscript_build', -## excludes = antglob.default_excludes + './waf.py', -## prune_dirs = antglob.prune_dirs + 'waf-* ./build') -## for path in python_sources: -## _fix_python_source(path, is_dry_run) -## -## cpp_sources = antglob.glob('.', -## includes = '**/*.cpp **/*.h **/*.inl', -## prune_dirs = antglob.prune_dirs + 'waf-* ./build') -## for path in cpp_sources: -## _fix_source_eol(path, is_dry_run) -## -## -##def dry_fix(context): -## _do_fix(is_dry_run = True) -## -##def fix(context): -## _do_fix(is_dry_run = False) -## -##def shutdown(): -## pass -## -##def check(context): -## # Unit tests are run when "check" target is used -## ut = UnitTest.unit_test() -## ut.change_to_testfile_dir = True -## ut.want_to_see_test_output = True -## ut.want_to_see_test_error = True -## ut.run() -## ut.print_results() http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/licenseupdater.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/licenseupdater.py b/thirdparty/jsoncpp/devtools/licenseupdater.py deleted file mode 100644 index 6f82361..0000000 --- a/thirdparty/jsoncpp/devtools/licenseupdater.py +++ /dev/null @@ -1,94 +0,0 @@ -"""Updates the license text in source file. -""" -from __future__ import print_function - -# An existing license is found if the file starts with the string below, -# and ends with the first blank line. -LICENSE_BEGIN = "// Copyright " - -BRIEF_LICENSE = LICENSE_BEGIN + """2007-2010 Baptiste Lepilleur -// Distributed under MIT license, or public domain if desired and -// recognized in your jurisdiction. -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -""".replace('\r\n','\n') - -def update_license(path, dry_run, show_diff): - """Update the license statement in the specified file. - Parameters: - path: path of the C++ source file to update. - dry_run: if True, just print the path of the file that would be updated, - but don't change it. - show_diff: if True, print the path of the file that would be modified, - as well as the change made to the file. - """ - with open(path, 'rt') as fin: - original_text = fin.read().replace('\r\n','\n') - newline = fin.newlines and fin.newlines[0] or '\n' - if not original_text.startswith(LICENSE_BEGIN): - # No existing license found => prepend it - new_text = BRIEF_LICENSE + original_text - else: - license_end_index = original_text.index('\n\n') # search first blank line - new_text = BRIEF_LICENSE + original_text[license_end_index+2:] - if original_text != new_text: - if not dry_run: - with open(path, 'wb') as fout: - fout.write(new_text.replace('\n', newline)) - print('Updated', path) - if show_diff: - import difflib - print('\n'.join(difflib.unified_diff(original_text.split('\n'), - new_text.split('\n')))) - return True - return False - -def update_license_in_source_directories(source_dirs, dry_run, show_diff): - """Updates license text in C++ source files found in directory source_dirs. - Parameters: - source_dirs: list of directory to scan for C++ sources. Directories are - scanned recursively. - dry_run: if True, just print the path of the file that would be updated, - but don't change it. - show_diff: if True, print the path of the file that would be modified, - as well as the change made to the file. - """ - from devtools import antglob - prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist' - for source_dir in source_dirs: - cpp_sources = antglob.glob(source_dir, - includes = '''**/*.h **/*.cpp **/*.inl''', - prune_dirs = prune_dirs) - for source in cpp_sources: - update_license(source, dry_run, show_diff) - -def main(): - usage = """%prog DIR [DIR2...] -Updates license text in sources of the project in source files found -in the directory specified on the command-line. - -Example of call: -python devtools\licenseupdater.py include src -n --diff -=> Show change that would be made to the sources. - -python devtools\licenseupdater.py include src -=> Update license statement on all sources in directories include/ and src/. -""" - from optparse import OptionParser - parser = OptionParser(usage=usage) - parser.allow_interspersed_args = False - parser.add_option('-n', '--dry-run', dest="dry_run", action='store_true', default=False, - help="""Only show what files are updated, do not update the files""") - parser.add_option('--diff', dest="show_diff", action='store_true', default=False, - help="""On update, show change made to the file.""") - parser.enable_interspersed_args() - options, args = parser.parse_args() - update_license_in_source_directories(args, options.dry_run, options.show_diff) - print('Done') - -if __name__ == '__main__': - import sys - import os.path - sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - main() - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/devtools/tarball.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/devtools/tarball.py b/thirdparty/jsoncpp/devtools/tarball.py deleted file mode 100644 index 2e72717..0000000 --- a/thirdparty/jsoncpp/devtools/tarball.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2010 Baptiste Lepilleur -# Distributed under MIT license, or public domain if desired and -# recognized in your jurisdiction. -# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -from contextlib import closing -import os -import tarfile - -TARGZ_DEFAULT_COMPRESSION_LEVEL = 9 - -def make_tarball(tarball_path, sources, base_dir, prefix_dir=''): - """Parameters: - tarball_path: output path of the .tar.gz file - sources: list of sources to include in the tarball, relative to the current directory - base_dir: if a source file is in a sub-directory of base_dir, then base_dir is stripped - from path in the tarball. - prefix_dir: all files stored in the tarball be sub-directory of prefix_dir. Set to '' - to make them child of root. - """ - base_dir = os.path.normpath(os.path.abspath(base_dir)) - def archive_name(path): - """Makes path relative to base_dir.""" - path = os.path.normpath(os.path.abspath(path)) - common_path = os.path.commonprefix((base_dir, path)) - archive_name = path[len(common_path):] - if os.path.isabs(archive_name): - archive_name = archive_name[1:] - return os.path.join(prefix_dir, archive_name) - def visit(tar, dirname, names): - for name in names: - path = os.path.join(dirname, name) - if os.path.isfile(path): - path_in_tar = archive_name(path) - tar.add(path, path_in_tar) - compression = TARGZ_DEFAULT_COMPRESSION_LEVEL - with closing(tarfile.TarFile.open(tarball_path, 'w:gz', - compresslevel=compression)) as tar: - for source in sources: - source_path = source - if os.path.isdir(source): - for dirpath, dirnames, filenames in os.walk(source_path): - visit(tar, dirpath, filenames) - else: - path_in_tar = archive_name(source_path) - tar.add(source_path, path_in_tar) # filename, arcname - -def decompress(tarball_path, base_dir): - """Decompress the gzipped tarball into directory base_dir. - """ - with closing(tarfile.TarFile.open(tarball_path)) as tar: - tar.extractall(base_dir) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/cleantests.py ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/cleantests.py b/thirdparty/jsoncpp/test/cleantests.py deleted file mode 100644 index 9772d54..0000000 --- a/thirdparty/jsoncpp/test/cleantests.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2007 Baptiste Lepilleur -# Distributed under MIT license, or public domain if desired and -# recognized in your jurisdiction. -# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE - -"""Removes all files created during testing.""" - -import glob -import os - -paths = [] -for pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]: - paths += glob.glob('data/' + pattern) - -for path in paths: - os.unlink(path) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/fail_test_array_01.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/fail_test_array_01.json b/thirdparty/jsoncpp/test/data/fail_test_array_01.json deleted file mode 100644 index f72a6d0..0000000 --- a/thirdparty/jsoncpp/test/data/fail_test_array_01.json +++ /dev/null @@ -1 +0,0 @@ -[ 1 2 3] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/fail_test_stack_limit.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/fail_test_stack_limit.json b/thirdparty/jsoncpp/test/data/fail_test_stack_limit.json deleted file mode 100644 index 7524e0b..0000000 --- a/thirdparty/jsoncpp/test/data/fail_test_stack_limit.json +++ /dev/null @@ -1 +0,0 @@ -[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_01.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_01.expected b/thirdparty/jsoncpp/test/data/test_array_01.expected deleted file mode 100644 index a341ff7..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_01.expected +++ /dev/null @@ -1 +0,0 @@ -.=[] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_01.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_01.json b/thirdparty/jsoncpp/test/data/test_array_01.json deleted file mode 100644 index fe51488..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_01.json +++ /dev/null @@ -1 +0,0 @@ -[] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_02.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_02.expected b/thirdparty/jsoncpp/test/data/test_array_02.expected deleted file mode 100644 index ef1f262..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_02.expected +++ /dev/null @@ -1,2 +0,0 @@ -.=[] -.[0]=1 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_02.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_02.json b/thirdparty/jsoncpp/test/data/test_array_02.json deleted file mode 100644 index 7660873..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_02.json +++ /dev/null @@ -1 +0,0 @@ -[1] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_03.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_03.expected b/thirdparty/jsoncpp/test/data/test_array_03.expected deleted file mode 100644 index 3d8dc18..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_03.expected +++ /dev/null @@ -1,6 +0,0 @@ -.=[] -.[0]=1 -.[1]=2 -.[2]=3 -.[3]=4 -.[4]=5 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_03.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_03.json b/thirdparty/jsoncpp/test/data/test_array_03.json deleted file mode 100644 index 9b3f924..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_03.json +++ /dev/null @@ -1 +0,0 @@ -[ 1, 2 , 3,4,5] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_04.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_04.expected b/thirdparty/jsoncpp/test/data/test_array_04.expected deleted file mode 100644 index ad4add9..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_04.expected +++ /dev/null @@ -1,5 +0,0 @@ -.=[] -.[0]=1 -.[1]="abc" -.[2]=12.3 -.[3]=-4 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_04.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_04.json b/thirdparty/jsoncpp/test/data/test_array_04.json deleted file mode 100644 index ecca546..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_04.json +++ /dev/null @@ -1 +0,0 @@ -[1, "abc" , 12.3, -4] http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_05.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_05.expected b/thirdparty/jsoncpp/test/data/test_array_05.expected deleted file mode 100644 index 76cff87..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_05.expected +++ /dev/null @@ -1,100 +0,0 @@ -.=[] -.[0]=1 -.[1]=2 -.[2]=3 -.[3]=4 -.[4]=5 -.[5]=6 -.[6]=7 -.[7]=8 -.[8]=9 -.[9]=10 -.[10]=11 -.[11]=12 -.[12]=13 -.[13]=14 -.[14]=15 -.[15]=16 -.[16]=17 -.[17]=18 -.[18]=19 -.[19]=20 -.[20]=21 -.[21]=22 -.[22]=23 -.[23]=24 -.[24]=25 -.[25]=26 -.[26]=27 -.[27]=28 -.[28]=29 -.[29]=30 -.[30]=31 -.[31]=32 -.[32]=33 -.[33]=34 -.[34]=35 -.[35]=36 -.[36]=37 -.[37]=38 -.[38]=39 -.[39]=40 -.[40]=41 -.[41]=42 -.[42]=43 -.[43]=44 -.[44]=45 -.[45]=46 -.[46]=47 -.[47]=48 -.[48]=49 -.[49]=50 -.[50]=51 -.[51]=52 -.[52]=53 -.[53]=54 -.[54]=55 -.[55]=56 -.[56]=57 -.[57]=58 -.[58]=59 -.[59]=60 -.[60]=61 -.[61]=62 -.[62]=63 -.[63]=64 -.[64]=65 -.[65]=66 -.[66]=67 -.[67]=68 -.[68]=69 -.[69]=70 -.[70]=71 -.[71]=72 -.[72]=73 -.[73]=74 -.[74]=75 -.[75]=76 -.[76]=77 -.[77]=78 -.[78]=79 -.[79]=80 -.[80]=81 -.[81]=82 -.[82]=83 -.[83]=84 -.[84]=85 -.[85]=86 -.[86]=87 -.[87]=88 -.[88]=89 -.[89]=90 -.[90]=91 -.[91]=92 -.[92]=93 -.[93]=94 -.[94]=95 -.[95]=96 -.[96]=97 -.[97]=98 -.[98]=99 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_05.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_05.json b/thirdparty/jsoncpp/test/data/test_array_05.json deleted file mode 100644 index 7809d6c..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_05.json +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_06.expected ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_06.expected b/thirdparty/jsoncpp/test/data/test_array_06.expected deleted file mode 100644 index 5c9f48e..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_06.expected +++ /dev/null @@ -1,5 +0,0 @@ -.=[] -.[0]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -.[1]="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" -.[2]="ccccccccccccccccccccccc" -.[3]="dddddddddddddddddddddddddddddddddddddddddddddddddddd" http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4636d1e3/thirdparty/jsoncpp/test/data/test_array_06.json ---------------------------------------------------------------------- diff --git a/thirdparty/jsoncpp/test/data/test_array_06.json b/thirdparty/jsoncpp/test/data/test_array_06.json deleted file mode 100644 index 7f6c516..0000000 --- a/thirdparty/jsoncpp/test/data/test_array_06.json +++ /dev/null @@ -1,4 +0,0 @@ -[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - "ccccccccccccccccccccccc", - "dddddddddddddddddddddddddddddddddddddddddddddddddddd" ] \ No newline at end of file
