tisonkun commented on code in PR #17296:
URL: https://github.com/apache/pulsar/pull/17296#discussion_r967614142
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2338,7 +2424,7 @@ public class ServiceConfiguration implements
PulsarConfiguration {
doc = "Supported algorithms name for namespace bundle split"
)
private List<String> supportedNamespaceBundleSplitAlgorithms =
Lists.newArrayList("range_equally_divide",
- "topic_count_equally_divide", "specified_positions_divide",
"flow_or_qps_equally_divide");
+ "topic_count_equally_divide", "specified_positions_divide");
@FieldContext(
Review Comment:
ditto
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -595,21 +601,23 @@ public class ServiceConfiguration implements
PulsarConfiguration {
@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
- doc = "Set the inactive topic delete mode. Default is
delete_when_no_subscriptions\n"
- + "'delete_when_no_subscriptions' mode only delete the topic which has
no subscriptions and no active "
- + "producers\n"
- + "'delete_when_subscriptions_caught_up' mode only delete the topic
that all subscriptions has no "
- + "backlogs(caught up) and no active producers/consumers"
+ doc = """
+ Set the inactive topic delete mode. Default is
delete_when_no_subscriptions\
+ 'delete_when_no_subscriptions' mode only delete the topic
which has no subscriptions and no active \
+ producers
+ 'delete_when_subscriptions_caught_up' mode only delete the
topic that all subscriptions has no \
+ backlogs(caught up) and no active producers/consumers"""
Review Comment:
```suggestion
doc = """
Set the inactive topic delete mode. Default is
delete_when_no_subscriptions.
'delete_when_no_subscriptions' mode only delete the topic
which has no subscriptions
and no active producers;
'delete_when_subscriptions_caught_up' mode only delete the
topic that all subscriptions has no
backlogs(caught up) and no active producers/consumers"""
```
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -572,17 +576,19 @@ public class ServiceConfiguration implements
PulsarConfiguration {
@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
- doc = "Enable the deletion of inactive topics.\n"
- + "If only enable this option, will not clean the metadata of
partitioned topic."
+ doc = """
+ Enable the deletion of inactive topics.
+ If only enable this option, will not clean the metadata of
partitioned topic."""
)
private boolean brokerDeleteInactiveTopicsEnabled = true;
@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
- doc = "Metadata of inactive partitioned topic will not be
automatically cleaned up by default.\n"
- + "Note: If `allowAutoTopicCreation` and this option are enabled
at the same time,\n"
- + "it may appear that a partitioned topic has just been deleted
but is automatically created as a "
- + "non-partitioned topic."
+ doc = """
+ Metadata of inactive partitioned topic will not be
automatically cleaned up by default.
+ Note: If `allowAutoTopicCreation` and this option are
enabled at the same time, \
+ it may appear that a partitioned topic has just been
deleted but is automatically created as a \
+ non-partitioned topic."""
Review Comment:
```suggestion
doc = """
Metadata of inactive partitioned topic will not be
automatically cleaned up by default.
Note: If `allowAutoTopicCreation` and this option are
enabled at the same time,
it may appear that a partitioned topic has just been
deleted but is automatically created as a
non-partitioned topic."""
```
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2160,19 +2259,6 @@ public class ServiceConfiguration implements
PulsarConfiguration {
)
private int loadBalancerAverageResourceUsageDifferenceThresholdPercentage
= 10;
-
- @FieldContext(
- dynamic = true,
- category = CATEGORY_LOAD_BALANCER,
- doc = "In FlowOrQpsEquallyDivideBundleSplitAlgorithm,"
- + " if msgRate >= loadBalancerNamespaceBundleMaxMsgRate * "
- + " (100 + flowOrQpsDifferenceThresholdPercentage)/100.0 "
- + " or throughput >=
loadBalancerNamespaceBundleMaxBandwidthMbytes * "
- + " (100 + flowOrQpsDifferenceThresholdPercentage)/100.0, "
- + " execute split bundle"
- )
- private int flowOrQpsDifferenceThresholdPercentage = 10;
Review Comment:
Please avoid mixing code refactor/cleanup into a reformatting change.
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -595,21 +601,23 @@ public class ServiceConfiguration implements
PulsarConfiguration {
@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
- doc = "Set the inactive topic delete mode. Default is
delete_when_no_subscriptions\n"
- + "'delete_when_no_subscriptions' mode only delete the topic which has
no subscriptions and no active "
- + "producers\n"
- + "'delete_when_subscriptions_caught_up' mode only delete the topic
that all subscriptions has no "
- + "backlogs(caught up) and no active producers/consumers"
+ doc = """
+ Set the inactive topic delete mode. Default is
delete_when_no_subscriptions\
+ 'delete_when_no_subscriptions' mode only delete the topic
which has no subscriptions and no active \
+ producers
+ 'delete_when_subscriptions_caught_up' mode only delete the
topic that all subscriptions has no \
+ backlogs(caught up) and no active producers/consumers"""
)
private InactiveTopicDeleteMode brokerDeleteInactiveTopicsMode =
InactiveTopicDeleteMode.
delete_when_no_subscriptions;
@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
- doc = "Max duration of topic inactivity in seconds, default is not
present\n"
- + "If not present, 'brokerDeleteInactiveTopicsFrequencySeconds' will
be used\n"
- + "Topics that are inactive for longer than this value will be deleted"
+ doc = """
+ Max duration of topic inactivity in seconds, default is not
present \
+ If not present, 'brokerDeleteInactiveTopicsFrequencySeconds'
will be used \
+ Topics that are inactive for longer than this value will be
deleted"""
Review Comment:
```suggestion
doc = """
Max duration of topic inactivity in seconds, default is not
present
If not present, 'brokerDeleteInactiveTopicsFrequencySeconds'
will be used
Topics that are inactive for longer than this value will be
deleted"""
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]