提交 da80606a 编写于 作者: L lsy180829 提交者: Jennifer Huang

[Issue 5614] Deprecate brokerServicePurgeInactiveFrequencyInSeconds (#5632)

* Fix Issue 5614, Deprecate brokerServicePurgeInactiveFrequencyInSeconds

* [Issue 5614] Deprecate brokerServicePurgeInactiveFrequencyInSeconds
上级 f9929d75
......@@ -698,9 +698,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
# bootstrap namespaces
bootstrapNamespaces=
......@@ -814,6 +811,9 @@ globalZookeeperServers=
# Deprecated - Enable TLS when talking with other clusters to replicate messages
replicationTlsEnabled=false
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
### --- Transaction config variables --- ###
# Enable transaction coordinator in broker
......
......@@ -495,9 +495,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
### --- WebSocket --- ###
# Enable the WebSocket API service in broker
......@@ -530,6 +527,8 @@ exposePublisherStats=true
# Deprecated. Use configurationStoreServers
globalZookeeperServers=
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
### --- BookKeeper Configuration --- #####
......
......@@ -453,9 +453,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
### --- WebSocket --- ###
# Enable the WebSocket API service in broker
......@@ -514,3 +511,6 @@ s3ManagedLedgerOffloadReadBufferSizeInBytes=1048576
# Deprecated. Use configurationStoreServers
globalZookeeperServers={{ zookeeper_servers }}
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
\ No newline at end of file
......@@ -253,7 +253,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
category = CATEGORY_POLICIES,
doc = "How often to check for inactive topics"
)
private long brokerDeleteInactiveTopicsFrequencySeconds = 60;
private int brokerDeleteInactiveTopicsFrequencySeconds = 60;
@FieldContext(
category = CATEGORY_POLICIES,
doc = "How frequently to proactively check and purge expired messages"
......@@ -1219,9 +1219,12 @@ public class ServiceConfiguration implements PulsarConfiguration {
doc = "How often to check pulsar connection is still alive"
)
private int keepAliveIntervalSeconds = 30;
@Deprecated
@FieldContext(
category = CATEGORY_POLICIES,
deprecated = true,
doc = "How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)"
+ "Deprecated in favor of using `brokerDeleteInactiveTopicsFrequencySeconds`"
)
private int brokerServicePurgeInactiveFrequencyInSeconds = 60;
@FieldContext(
......
......@@ -404,7 +404,7 @@ public class BrokerService implements Closeable, ZooKeeperCacheListener<Policies
protected void startInactivityMonitor() {
if (pulsar().getConfiguration().isBrokerDeleteInactiveTopicsEnabled()) {
int interval = pulsar().getConfiguration().getBrokerServicePurgeInactiveFrequencyInSeconds();
int interval = pulsar().getConfiguration().getBrokerDeleteInactiveTopicsFrequencySeconds();
inactivityMonitor.scheduleAtFixedRate(safeRun(() -> checkGC(interval)), interval, interval,
TimeUnit.SECONDS);
}
......
......@@ -124,7 +124,7 @@ public class ReplicatorTestBase {
config1.setZookeeperServers("127.0.0.1:" + zkPort1);
config1.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config1.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config1.setBrokerServicePurgeInactiveFrequencyInSeconds(
config1.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config1.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config1.setBrokerServicePortTls(Optional.ofNullable(PortManager.nextFreePort()));
......@@ -159,7 +159,7 @@ public class ReplicatorTestBase {
config2.setZookeeperServers("127.0.0.1:" + zkPort2);
config2.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config2.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config2.setBrokerServicePurgeInactiveFrequencyInSeconds(
config2.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config2.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config2.setBrokerServicePortTls(Optional.ofNullable(PortManager.nextFreePort()));
......@@ -194,7 +194,7 @@ public class ReplicatorTestBase {
config3.setZookeeperServers("127.0.0.1:" + zkPort3);
config3.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config3.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config3.setBrokerServicePurgeInactiveFrequencyInSeconds(
config3.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config3.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config3.setBrokerServicePortTls(Optional.ofNullable(PortManager.nextFreePort()));
......
......@@ -890,7 +890,7 @@ public class NonPersistentTopicTest extends ProducerConsumerBase {
config1.setZookeeperServers("127.0.0.1:" + zkPort1);
config1.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config1.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config1.setBrokerServicePurgeInactiveFrequencyInSeconds(
config1.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config1.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config1.setBacklogQuotaCheckIntervalInSeconds(TIME_TO_CHECK_BACKLOG_QUOTA);
......@@ -918,7 +918,7 @@ public class NonPersistentTopicTest extends ProducerConsumerBase {
config2.setZookeeperServers("127.0.0.1:" + zkPort2);
config2.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config2.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config2.setBrokerServicePurgeInactiveFrequencyInSeconds(
config2.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config2.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config2.setBacklogQuotaCheckIntervalInSeconds(TIME_TO_CHECK_BACKLOG_QUOTA);
......@@ -946,7 +946,7 @@ public class NonPersistentTopicTest extends ProducerConsumerBase {
config3.setZookeeperServers("127.0.0.1:" + zkPort3);
config3.setConfigurationStoreServers("127.0.0.1:" + globalZKPort + "/foo");
config3.setBrokerDeleteInactiveTopicsEnabled(isBrokerServicePurgeInactiveTopic());
config3.setBrokerServicePurgeInactiveFrequencyInSeconds(
config3.setBrokerDeleteInactiveTopicsFrequencySeconds(
inSec(getBrokerServicePurgeInactiveFrequency(), TimeUnit.SECONDS));
config3.setBrokerServicePort(Optional.ofNullable(PortManager.nextFreePort()));
config3.setAllowAutoTopicCreationType("non-partitioned");
......
......@@ -22,9 +22,6 @@
# Zookeeper quorum connection string
zookeeperServers=
# Deprecated. Global zookeeper quorum connection string
globalZookeeperServers=
# Configuration Store connection string
configurationStoreServers=
......@@ -278,9 +275,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
# Enable topic auto creation if new producer or consumer connected (disable auto creation with value false)
allowAutoTopicCreation=true
......@@ -288,4 +282,12 @@ allowAutoTopicCreation=true
allowAutoTopicCreationType=non-partitioned
# The number of partitioned topics that is allowed to be automatically created if allowAutoTopicCreationType is partitioned.
defaultNumPartitions=1
\ No newline at end of file
defaultNumPartitions=1
### --- Deprecated config variables --- ###
# Deprecated. Use configurationStoreServers
globalZookeeperServers={{ zookeeper_servers }}
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
\ No newline at end of file
......@@ -22,8 +22,8 @@
# Zookeeper quorum connection string
zookeeperServers=
# Global Zookeeper quorum connection string
globalZookeeperServers=
# Configuration Store connection string
configurationStoreServers=
brokerServicePort=8885
......@@ -263,9 +263,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
# Enable topic auto creation if new producer or consumer connected (disable auto creation with value false)
allowAutoTopicCreation=true
......@@ -273,4 +270,12 @@ allowAutoTopicCreation=true
allowAutoTopicCreationType=non-partitioned
# The number of partitioned topics that is allowed to be automatically created if allowAutoTopicCreationType is partitioned.
defaultNumPartitions=1
\ No newline at end of file
defaultNumPartitions=1
### --- Deprecated config variables --- ###
# Deprecated. Use configurationStoreServers
globalZookeeperServers={{ zookeeper_servers }}
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
\ No newline at end of file
......@@ -22,9 +22,6 @@
# Zookeeper quorum connection string
zookeeperServers=
# Deprecated. Global Zookeeper quorum connection string
globalZookeeperServers=
# Configuration Store connection string
configurationStoreServers=
......@@ -272,5 +269,10 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
### --- Deprecated config variables --- ###
# Deprecated. Use configurationStoreServers
globalZookeeperServers=
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
......@@ -22,9 +22,6 @@
# Zookeeper quorum connection string
zookeeperServers=
# Deprecated. Global Zookeeper quorum connection string
globalZookeeperServers=
# Configuration Store connection string
configurationStoreServers=
......@@ -264,9 +261,6 @@ defaultRetentionSizeInMB=0
# How often to check whether the connections are still alive
keepAliveIntervalSeconds=30
# How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected)
brokerServicePurgeInactiveFrequencyInSeconds=60
# Enable topic auto creation if new producer or consumer connected (disable auto creation with value false)
allowAutoTopicCreation=true
......@@ -275,3 +269,11 @@ allowAutoTopicCreationType=non-partitioned
# The number of partitioned topics that is allowed to be automatically created if allowAutoTopicCreationType is partitioned.
defaultNumPartitions=1
### --- Deprecated config variables --- ###
# Deprecated. Use configurationStoreServers
globalZookeeperServers={{ zookeeper_servers }}
# Deprecated. Use brokerDeleteInactiveTopicsFrequencySeconds
brokerServicePurgeInactiveFrequencyInSeconds=60
\ No newline at end of file
......@@ -221,7 +221,6 @@ Pulsar brokers are responsible for handling incoming messages from producers, di
|defaultRetentionTimeInMinutes| Default message retention time ||
|defaultRetentionSizeInMB| Default retention size |0|
|keepAliveIntervalSeconds| How often to check whether the connections are still alive |30|
|brokerServicePurgeInactiveFrequencyInSeconds| How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected) |60|
|loadManagerClassName| Name of load manager to use |org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl|
|managedLedgerOffloadDriver| Driver to use to offload old data to long term storage (Possible values: S3) ||
|managedLedgerOffloadMaxThreads| Maximum number of thread pool threads for ledger offloading |2|
......@@ -395,7 +394,6 @@ The [`pulsar-client`](reference-cli-tools.md#pulsar-client) CLI tool can be used
|defaultRetentionTimeInMinutes| |0|
|defaultRetentionSizeInMB| |0|
|keepAliveIntervalSeconds| |30|
|brokerServicePurgeInactiveFrequencyInSeconds| |60|
......
......@@ -218,7 +218,6 @@ Pulsar brokers are responsible for handling incoming messages from producers, di
|defaultRetentionTimeInMinutes| Default message retention time ||
|defaultRetentionSizeInMB| Default retention size |0|
|keepAliveIntervalSeconds| How often to check whether the connections are still alive |30|
|brokerServicePurgeInactiveFrequencyInSeconds| How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected) |60|
|loadManagerClassName| Name of load manager to use |org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl|
|managedLedgerOffloadDriver| Driver to use to offload old data to long term storage (Possible values: S3) ||
|managedLedgerOffloadMaxThreads| Maximum number of thread pool threads for ledger offloading |2|
......@@ -392,7 +391,6 @@ The [`pulsar-client`](reference-cli-tools.md#pulsar-client) CLI tool can be used
|defaultRetentionTimeInMinutes| |0|
|defaultRetentionSizeInMB| |0|
|keepAliveIntervalSeconds| |30|
|brokerServicePurgeInactiveFrequencyInSeconds| |60|
......
......@@ -219,7 +219,6 @@ Pulsar brokers are responsible for handling incoming messages from producers, di
|defaultRetentionTimeInMinutes| Default message retention time ||
|defaultRetentionSizeInMB| Default retention size |0|
|keepAliveIntervalSeconds| How often to check whether the connections are still alive |30|
|brokerServicePurgeInactiveFrequencyInSeconds| How often broker checks for inactive topics to be deleted (topics with no subscriptions and no one connected) |60|
|loadManagerClassName| Name of load manager to use |org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl|
|managedLedgerOffloadDriver| Driver to use to offload old data to long term storage (Possible values: S3) ||
|managedLedgerOffloadMaxThreads| Maximum number of thread pool threads for ledger offloading |2|
......@@ -393,7 +392,6 @@ The [`pulsar-client`](reference-cli-tools.md#pulsar-client) CLI tool can be used
|defaultRetentionTimeInMinutes| |0|
|defaultRetentionSizeInMB| |0|
|keepAliveIntervalSeconds| |30|
|brokerServicePurgeInactiveFrequencyInSeconds| |60|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册