You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by fg...@apache.org on 2022/11/15 18:38:22 UTC
[nifi-minifi-cpp] 04/04: MINIFICPP-1981 Decrease default C2 heartbeat frequency
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 9c439e272fc3ef814c66a14a11ea9bfe24a93c12
Author: Marton Szasz <sz...@apache.org>
AuthorDate: Wed Nov 9 16:21:33 2022 +0100
MINIFICPP-1981 Decrease default C2 heartbeat frequency
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
This closes #1450
---
C2.md | 4 ++--
conf/minifi.properties | 4 ++--
.../resources/minifi_cpp_with_provenance_repo/minifi.properties | 2 +-
encrypt-config/tests/resources/minifi.properties | 2 +-
.../tests/resources/with-additional-sensitive-props.minifi.properties | 2 +-
libminifi/test/resources/encrypted.minifi.properties | 2 +-
libminifi/test/unit/ChecksumCalculatorTests.cpp | 4 ++--
msi/WixWin.wsi | 2 +-
msi/WixWinMergeModules.wsi | 2 +-
9 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/C2.md b/C2.md
index 5394531c5..14c17090a 100644
--- a/C2.md
+++ b/C2.md
@@ -75,8 +75,8 @@ be requested via C2 DESCRIBE manifest command.
nifi.c2.agent.protocol.class=RESTSender
# nifi.c2.agent.protocol.class=CoapProtocol
- # control c2 heartbeat interval in milliseconds
- nifi.c2.agent.heartbeat.period=250
+ # control c2 heartbeat interval
+ nifi.c2.agent.heartbeat.period=30 sec
# enable reporter classes
nifi.c2.agent.heartbeat.reporter.class=RESTReciver
diff --git a/conf/minifi.properties b/conf/minifi.properties
index 18190c096..135c91b21 100644
--- a/conf/minifi.properties
+++ b/conf/minifi.properties
@@ -82,8 +82,8 @@ nifi.content.repository.class.name=DatabaseContentRepository
nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation
## Minimize heartbeat payload size by excluding agent manifest from the heartbeat
nifi.c2.full.heartbeat=false
-## heartbeat 4 times a second
-#nifi.c2.agent.heartbeat.period=250
+## heartbeat twice a minute
+#nifi.c2.agent.heartbeat.period=30 sec
## define parameters about your agent
#nifi.c2.agent.class=
#nifi.c2.agent.identifier=
diff --git a/docker/test/integration/resources/minifi_cpp_with_provenance_repo/minifi.properties b/docker/test/integration/resources/minifi_cpp_with_provenance_repo/minifi.properties
index 578f8edb0..4b3763f7e 100644
--- a/docker/test/integration/resources/minifi_cpp_with_provenance_repo/minifi.properties
+++ b/docker/test/integration/resources/minifi_cpp_with_provenance_repo/minifi.properties
@@ -15,7 +15,7 @@ nifi.security.client.ca.certificate=/tmp/shared/nifi-cert.pem
nifi.c2.enable=true
nifi.c2.agent.class=minifi-cpp-latest
nifi.c2.agent.listen=false
-nifi.c2.agent.heartbeat.period=30000
+nifi.c2.agent.heartbeat.period=30 sec
nifi.c2.agent.heartbeat.reporter.classes=RESTReceiver
nifi.c2.agent.protocol.class=RESTSender
nifi.c2.full.heartbeat=false
diff --git a/encrypt-config/tests/resources/minifi.properties b/encrypt-config/tests/resources/minifi.properties
index ae12394b7..eb572a2bd 100644
--- a/encrypt-config/tests/resources/minifi.properties
+++ b/encrypt-config/tests/resources/minifi.properties
@@ -66,7 +66,7 @@ nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation
## Minimize heartbeat payload size by excluding agent manifest from the heartbeat
#nifi.c2.full.heartbeat=false
## heartbeat 4 times a second
-#nifi.c2.agent.heartbeat.period=250
+#nifi.c2.agent.heartbeat.period=30 sec
## define parameters about your agent
nifi.c2.agent.class=EncryptConfigTester
nifi.c2.agent.identifier=EncryptConfigTester-001
diff --git a/encrypt-config/tests/resources/with-additional-sensitive-props.minifi.properties b/encrypt-config/tests/resources/with-additional-sensitive-props.minifi.properties
index 551029af2..d584d8089 100644
--- a/encrypt-config/tests/resources/with-additional-sensitive-props.minifi.properties
+++ b/encrypt-config/tests/resources/with-additional-sensitive-props.minifi.properties
@@ -68,7 +68,7 @@ nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation
## Minimize heartbeat payload size by excluding agent manifest from the heartbeat
#nifi.c2.full.heartbeat=false
## heartbeat 4 times a second
-#nifi.c2.agent.heartbeat.period=250
+#nifi.c2.agent.heartbeat.period=30 sec
## define parameters about your agent
nifi.c2.agent.class=EncryptConfigTester
nifi.c2.agent.identifier=EncryptConfigTester-001
diff --git a/libminifi/test/resources/encrypted.minifi.properties b/libminifi/test/resources/encrypted.minifi.properties
index 920034036..49e25e0fa 100644
--- a/libminifi/test/resources/encrypted.minifi.properties
+++ b/libminifi/test/resources/encrypted.minifi.properties
@@ -68,7 +68,7 @@ nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation
## Minimize heartbeat payload size by excluding agent manifest from the heartbeat
#nifi.c2.full.heartbeat=false
## heartbeat 4 times a second
-#nifi.c2.agent.heartbeat.period=250
+#nifi.c2.agent.heartbeat.period=30 sec
## define parameters about your agent
nifi.c2.agent.class=TailFileTester
c2.agent.identifier=lZL2phnmPWP4s7k8LzzONTNh/2Nhgyty||OLyo7FtKOZ5M1DbiVCEMrlch8D643MKCtw3T7iouvLHeSA==
diff --git a/libminifi/test/unit/ChecksumCalculatorTests.cpp b/libminifi/test/unit/ChecksumCalculatorTests.cpp
index d34550d94..076f7c9fe 100644
--- a/libminifi/test/unit/ChecksumCalculatorTests.cpp
+++ b/libminifi/test/unit/ChecksumCalculatorTests.cpp
@@ -102,11 +102,11 @@ TEST_CASE("The agent identifier is excluded from the checksum", "[ChecksumCalcul
std::string file_location_1 = utils::putFileToDir(test_dir, "agent_one.txt",
"nifi.c2.agent.class=Test\n"
"nifi.c2.agent.identifier=Test-111\n"
- "nifi.c2.agent.heartbeat.period=10000\n");
+ "nifi.c2.agent.heartbeat.period=10 sec\n");
std::string file_location_2 = utils::putFileToDir(test_dir, "agent_two.txt",
"nifi.c2.agent.class=Test\n"
"nifi.c2.agent.identifier=Test-222\n"
- "nifi.c2.agent.heartbeat.period=10000\n");
+ "nifi.c2.agent.heartbeat.period=10 sec\n");
utils::ChecksumCalculator checksum_calculator_1;
checksum_calculator_1.setFileLocation(file_location_1);
diff --git a/msi/WixWin.wsi b/msi/WixWin.wsi
index feb05b542..8360b314e 100644
--- a/msi/WixWin.wsi
+++ b/msi/WixWin.wsi
@@ -257,7 +257,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
<Property Id="AGENT_CLASS" Value="Your Agent Class" />
<Property Id="AGENT_IDENTIFIER" />
<Property Id="AGENT_PROTOCOL" Value="RESTSender" />
- <Property Id="AGENT_HEARTBEAT" Value="250 msec" />
+ <Property Id="AGENT_HEARTBEAT" Value="30 sec" />
<Property Id="SERVER_HEARTBEAT" Value="http://localhost:8181/heartbeat" />
<Property Id="SERVER_ACK" Value="http://localhost:8181/acknowledge" />
<Property Id="ENABLEC2" />
diff --git a/msi/WixWinMergeModules.wsi b/msi/WixWinMergeModules.wsi
index 7bf489c44..f4124f3ee 100644
--- a/msi/WixWinMergeModules.wsi
+++ b/msi/WixWinMergeModules.wsi
@@ -273,7 +273,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
<Property Id="AGENT_CLASS" Value="Your Agent Class" />
<Property Id="AGENT_IDENTIFIER" />
<Property Id="AGENT_PROTOCOL" Value="RESTSender" />
- <Property Id="AGENT_HEARTBEAT" Value="250 msec" />
+ <Property Id="AGENT_HEARTBEAT" Value="30 sec" />
<Property Id="SERVER_HEARTBEAT" Value="http://localhost:8181/heartbeat" />
<Property Id="SERVER_ACK" Value="http://localhost:8181/acknowledge" />
<Property Id="ENABLEC2" />