You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zi...@apache.org on 2022/04/04 03:55:55 UTC
[pulsar] branch master updated: [fix][doc] Fix javadoc warnings on pulsar-broker (#14881)
This is an automated email from the ASF dual-hosted git repository.
zike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new f18ee845bd2 [fix][doc] Fix javadoc warnings on pulsar-broker (#14881)
f18ee845bd2 is described below
commit f18ee845bd2e77eb5f58dd12d717136bc541b1a6
Author: Ankit Agrahari <an...@gmail.com>
AuthorDate: Mon Apr 4 09:25:45 2022 +0530
[fix][doc] Fix javadoc warnings on pulsar-broker (#14881)
### Motivation
Fixing the javadoc warnings on the executing maven build for pulsar-broker.
### Modifications
Changes done in the Java doc which is added as part of code.
---
.../src/main/java/org/apache/pulsar/broker/BrokerData.java | 2 +-
.../apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java | 3 +--
.../apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java | 5 +++--
.../apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java | 2 +-
.../pulsar/broker/loadbalance/impl/WRRPlacementStrategy.java | 6 +++---
.../java/org/apache/pulsar/broker/namespace/NamespaceService.java | 1 -
.../service/HashRangeAutoSplitStickyKeyConsumerSelector.java | 8 ++++----
.../org/apache/pulsar/broker/service/TopicPoliciesService.java | 2 +-
.../pulsar/broker/service/persistent/DispatchRateLimiter.java | 2 +-
.../broker/service/streamingdispatch/StreamingEntryReader.java | 2 +-
.../broker/stats/prometheus/PrometheusMetricsGenerator.java | 2 +-
.../pulsar/broker/transaction/buffer/TransactionBuffer.java | 4 ++--
12 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BrokerData.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BrokerData.java
index 79929cb39a9..39d92dff916 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BrokerData.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BrokerData.java
@@ -27,7 +27,7 @@ import org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData;
* Data class containing three components comprising all the data available for the leader broker about other brokers: -
* The local broker data which is written to ZooKeeper by each individual broker (LocalBrokerData). - The time average
* bundle data which is written to ZooKeeper by the leader broker (TimeAverageBrokerData). - The preallocated bundles
- * which are not written to ZooKeeper but are maintained by the leader broker (Map<String, BundleData>).
+ * which are not written to ZooKeeper but are maintained by the leader broker (Map<String, BundleData>).
*/
@Data
public class BrokerData {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java
index c0ee0d2f986..7423485d7e1 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LoadManagerShared.java
@@ -414,7 +414,6 @@ public class LoadManagerShared {
/**
* It returns map of broker and count of namespace that are belong to the same anti-affinity group as given.
- * {@param namespaceName}
*
* @param pulsar
* @param namespaceName
@@ -533,7 +532,7 @@ public class LoadManagerShared {
/**
* It filters out brokers which owns topic higher than configured threshold at
- * {@link ServiceConfiguration.loadBalancerBrokerMaxTopics}. <br/>
+ * ServiceConfiguration.loadBalancerBrokerMaxTopics. <br/>
* if all the brokers own topic higher than threshold then it resets the list with original broker candidates
*
* @param brokerCandidateCache
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java
index 62a29b9f22d..99f2ea56301 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java
@@ -39,8 +39,9 @@ import org.slf4j.LoggerFactory;
* Load shedding strategy that unloads any broker that exceeds the average resource utilization of all brokers by a
* configured threshold. As a consequence, this strategy tends to distribute load among all brokers. It does this by
* first computing the average resource usage per broker for the whole cluster. The resource usage for each broker is
- * calculated using the following method: {@link LocalBrokerData#getMaxResourceUsageWithWeight)}. The weights for each
- * resource are configurable. Historical observations are included in the running average based on the broker's
+ * calculated using the following method:
+ * {@link LocalBrokerData#getMaxResourceUsageWithWeight(double, double, double, double, double)}. The weights
+ * for each resource are configurable. Historical observations are included in the running average based on the broker's
* setting for loadBalancerHistoryResourcePercentage. Once the average resource usage is calculated, a broker's
* current/historical usage is compared to the average broker usage. If a broker's usage is greater than the average
* usage per broker plus the loadBalancerBrokerThresholdShedderPercentage, this load shedder proposes removing
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java
index df8e1b66509..0f3256ca7ad 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java
@@ -38,7 +38,7 @@ import org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData;
* This strategy tends to distribute load uniformly across all brokers. This strategy checks load difference between
* broker with highest load and broker with lowest load. If the difference is higher than configured thresholds
* {@link ServiceConfiguration#getLoadBalancerMsgRateDifferenceShedderThreshold()} or
- * {@link ServiceConfiguration#loadBalancerMsgThroughputMultiplierDifferenceShedderThreshold()} then it finds out
+ * {@link ServiceConfiguration#getLoadBalancerMsgThroughputMultiplierDifferenceShedderThreshold()} then it finds out
* bundles which can be unloaded to distribute traffic evenly across all brokers.
*
*/
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/WRRPlacementStrategy.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/WRRPlacementStrategy.java
index 2d9fab1bebc..716ac7ac7fc 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/WRRPlacementStrategy.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/WRRPlacementStrategy.java
@@ -38,7 +38,7 @@ public class WRRPlacementStrategy implements PlacementStrategy {
/**
* Function : getByWeightedRoundRobin returns ResourceUnit selected by WRR algorithm
* based on available resource on RU.
- * <code>
+ * <code>
* ^
* |
* |
@@ -47,14 +47,14 @@ public class WRRPlacementStrategy implements PlacementStrategy {
* | | | | |
* | Broker 2 | Broker 3 | Broker 1 | B4 |
* | | | | |
- * +----------------+------------------------+--------------------------------+--------->
+ * +----------------+------------------------+--------------------------------+---------
* 0 20 50 90 100
*
* This is weighted Round robin, we calculate weight based on availability of resources;
* total availability is taken as a full range then each broker is given range based on
* its resource availability, if the number generated within total range happens to be in
* broker's range, that broker is selected
- * </code>
+ * </code>
*/
public ResourceUnit findBrokerForPlacement(Multimap<Long, ResourceUnit> finalCandidates) {
if (finalCandidates.isEmpty()) {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
index 2c17652554c..6417322a964 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
@@ -286,7 +286,6 @@ public class NamespaceService implements AutoCloseable {
/**
* Register all the bootstrap name spaces including the heartbeat namespace.
*
- * @return
* @throws PulsarServerException
*/
public void registerBootstrapNamespaces() throws PulsarServerException {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAutoSplitStickyKeyConsumerSelector.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAutoSplitStickyKeyConsumerSelector.java
index e4a2bf70851..671a014b7f6 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAutoSplitStickyKeyConsumerSelector.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAutoSplitStickyKeyConsumerSelector.java
@@ -34,19 +34,19 @@ import org.apache.pulsar.client.api.Range;
* 2.The whole range of hash value could be covered by all the consumers.
* 3.Once a consumer is removed, the left consumers could still serve the whole range.
*
- * Initializing with a fixed hash range, by default 2 << 15.
+ * Initializing with a fixed hash range, by default 2 >> 15.
* First consumer added, hash range looks like:
*
- * 0 -> 65536(consumer-1)
+ * 0 -< 65536(consumer-1)
*
* Second consumer added, will find a biggest range to split:
*
- * 0 -> 32768(consumer-2) -> 65536(consumer-1)
+ * 0 -< 32768(consumer-2) -< 65536(consumer-1)
*
* While a consumer removed, The range for this consumer will be taken over
* by other consumer, consumer-2 removed:
*
- * 0 -> 65536(consumer-1)
+ * 0 -< 65536(consumer-1)
*
* In this approach use skip list map to maintain the hash range and consumers.
*
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicPoliciesService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicPoliciesService.java
index 5b2aa6e8ce9..9834afc4f2f 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicPoliciesService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicPoliciesService.java
@@ -83,7 +83,7 @@ public interface TopicPoliciesService {
* @param topicName topic name
* @param backoff back off policy
* @param isGlobal is global policies
- * @return CompletableFuture<Optional<TopicPolicies>>
+ * @return CompletableFuture<Optional<TopicPolicies>>
*/
default CompletableFuture<Optional<TopicPolicies>> getTopicPoliciesAsyncWithRetry(TopicName topicName,
final Backoff backoff, ScheduledExecutorService scheduledExecutorService, boolean isGlobal) {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/DispatchRateLimiter.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/DispatchRateLimiter.java
index 944ee3dcaf2..af2f45e9dcc 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/DispatchRateLimiter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/DispatchRateLimiter.java
@@ -346,7 +346,7 @@ public class DispatchRateLimiter {
}
/**
- * Update dispatch rate by updating msg and byte rate-limiter. If dispatch-rate is configured < 0 then it closes
+ * Update dispatch rate by updating msg and byte rate-limiter. If dispatch-rate is configured < 0 then it closes
* the rate-limiter and disables appropriate rate-limiter.
*
* @param dispatchRate
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/streamingdispatch/StreamingEntryReader.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/streamingdispatch/StreamingEntryReader.java
index 85083da93c0..ec46d32548f 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/streamingdispatch/StreamingEntryReader.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/streamingdispatch/StreamingEntryReader.java
@@ -76,7 +76,7 @@ public class StreamingEntryReader implements AsyncCallbacks.ReadEntryCallback, W
/**
* Read entries in streaming way, that said instead of reading with micro batch and send entries to consumer after
* all entries in the batch are read from ledger, this method will fire numEntriesToRead requests to managedLedger
- * and send entry to consumer whenever it is read && all entries before it have been sent to consumer.
+ * and send entry to consumer whenever it is read and all entries before it have been sent to consumer.
* @param numEntriesToRead number of entry to read from ledger.
* @param maxReadSizeByte maximum byte will be read from ledger.
* @param ctx Context send along with read request.
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
index a585601d545..e0235817f0c 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
@@ -51,7 +51,7 @@ import org.apache.pulsar.common.util.SimpleTextOutputStream;
/**
* Generate metrics aggregated at the namespace level and optionally at a topic level and formats them out
* in a text format suitable to be consumed by Prometheus.
- * Format specification can be found at {@link https://prometheus.io/docs/instrumenting/exposition_formats/}
+ * Format specification can be found at <a href="https://prometheus.io/docs/instrumenting/exposition_formats/">Exposition Formats</a>
*/
public class PrometheusMetricsGenerator {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/TransactionBuffer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/TransactionBuffer.java
index b0193fc86c1..33307f2f634 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/TransactionBuffer.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/TransactionBuffer.java
@@ -36,8 +36,8 @@ import org.apache.pulsar.common.policies.data.TransactionInBufferStats;
*
* <p>When committing transaction starts, the broker will append a `COMMITTED`
* marker to the data partition first to mark the transaction is committed.
- * The broker knows the data ledger of the commit marker and calls {@link #commitTxn(TxnID, long, long)}
- * to commit and seal the buffer.
+ * The broker knows the data ledger of the commit marker and calls
+ * {@link TransactionBuffer#commitTxn(TxnID, long)} to commit and seal the buffer.
*
* <p>When the marker is appended to the data partition, all the entries are visible
* to the consumers. So a transaction reader {@link TransactionBufferReader} will be