Github user benqiu2016 commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/114#discussion_r123529541
--- Diff: libminifi/src/Site2SiteClientProtocol.cpp ---
@@ -319,6 +344,64 @@ void Site2SiteClientProtocol::tearDown() {
_peerState = IDLE;
}
+bool
Site2SiteClientProtocol::getPeerList(std::vector<minifi::Site2SitePeerStatus>
&peer) {
+ if (establish() && handShake()) {
+ int status = this->writeRequestType(REQUEST_PEER_LIST);
+
+ if (status <= 0) {
+ tearDown();
+ return false;
+ }
+
+ uint32_t number;
+ status = peer_->read(number);
+
+ if (status <= 0) {
+ tearDown();
+ return false;
+ }
+
+ for (int i = 0; i < number; i++) {
--- End diff --
it is config by the NiFI cluster server to let client evenly distribute the
node cross peers.
MiNiFI java is doing the similar thing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---