This is an automated email from the ASF dual-hosted git repository.

shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new cafc121b93 Deprecate method `setAllocatorPoolingConcurrenncy` due to 
typos and add a new method with correct name (#4288)
cafc121b93 is described below

commit cafc121b93859e861ccdb34a10706794af35b0e2
Author: hudeqi <[email protected]>
AuthorDate: Thu Apr 18 11:48:18 2024 +0800

    Deprecate method `setAllocatorPoolingConcurrenncy` due to typos and add a 
new method with correct name (#4288)
    
    ### Motivation
    
    Fix some typos
    
    ### Changes
    - Deprecate method `setAllocatorPoolingConcurrenncy` due to typos and add a 
new method with correct name
    - Fix other internal typos
---
 .../bookkeeper/conf/AbstractConfiguration.java     | 24 +++++++++++++++++++---
 .../meta/AbstractHierarchicalLedgerManager.java    |  4 ++--
 .../org/apache/bookkeeper/replication/Auditor.java |  2 +-
 .../replication/AuditorBookieCheckTask.java        |  2 +-
 4 files changed, 25 insertions(+), 7 deletions(-)

diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
index 438dc40983..6c55e580f3 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
@@ -1098,11 +1098,29 @@ public abstract class AbstractConfiguration<T extends 
AbstractConfiguration>
      *            the concurrency level to use for the allocator pool
      * @return configuration object.
      */
+    @Deprecated
     public T setAllocatorPoolingConcurrenncy(int concurrency) {
         this.setProperty(ALLOCATOR_POOLING_POLICY, concurrency);
         return getThis();
     }
 
+    /**
+     * Controls the amount of concurrency for the memory pool.
+     *
+     * <p>Default is to have a number of allocator arenas equals to 2 * CPUS.
+     *
+     * <p>Decreasing this number will reduce the amount of memory overhead, at 
the
+     * expense of increased allocation contention.
+     *
+     * @param concurrency
+     *            the concurrency level to use for the allocator pool
+     * @return configuration object.
+     */
+    public T setAllocatorPoolingConcurrency(int concurrency) {
+        this.setProperty(ALLOCATOR_POOLING_POLICY, concurrency);
+        return getThis();
+    }
+
     /**
      * @return the configured ouf of memory policy for the allocator.
      */
@@ -1181,14 +1199,14 @@ public abstract class AbstractConfiguration<T extends 
AbstractConfiguration>
      * CPU cores busy.
      * </p>
      *
-     * @param busyWaitEanbled
+     * @param busyWaitEnabled
      *            if enabled, use spin-waiting strategy to reduce latency in
      *            context switches
      *
      * @see #isBusyWaitEnabled()
      */
-    public T setBusyWaitEnabled(boolean busyWaitEanbled) {
-        setProperty(ENABLE_BUSY_WAIT, busyWaitEanbled);
+    public T setBusyWaitEnabled(boolean busyWaitEnabled) {
+        setProperty(ENABLE_BUSY_WAIT, busyWaitEnabled);
         return getThis();
     }
 
diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractHierarchicalLedgerManager.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractHierarchicalLedgerManager.java
index 939870314d..c7a730cc73 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractHierarchicalLedgerManager.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractHierarchicalLedgerManager.java
@@ -67,7 +67,7 @@ public abstract class AbstractHierarchicalLedgerManager 
extends AbstractZkLedger
                     finalCb.processResult(successRc, null, context);
                     return;
                 } else if (rc != Code.OK.intValue()) {
-                    LOG.error("Error syncing path " + path + " when getting 
its chidren: ",
+                    LOG.error("Error syncing path " + path + " when getting 
its children: ",
                               
KeeperException.create(KeeperException.Code.get(rc), path));
                     finalCb.processResult(failureRc, null, context);
                     return;
@@ -99,7 +99,7 @@ public abstract class AbstractHierarchicalLedgerManager 
extends AbstractZkLedger
     }
 
     /**
-     * Process list one by one in asynchronize way. Process will be stopped 
immediately
+     * Process list one by one in asynchronous way. Process will be stopped 
immediately
      * when error occurred.
      */
     private static class AsyncListProcessor<T> {
diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
index 13b10cf927..997baf3338 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
@@ -572,7 +572,7 @@ public class Auditor implements AutoCloseable {
         if (!ledgerUnderreplicationManager.isLedgerReplicationEnabled()) {
             ReplicationEnableCb cb = new ReplicationEnableCb();
             LOG.info("LedgerReplication is disabled externally through 
Zookeeper, "
-                    + "since DISABLE_NODE ZNode is created, so waiting untill 
it is enabled");
+                    + "since DISABLE_NODE ZNode is created, so waiting until 
it is enabled");
             ledgerUnderreplicationManager.notifyLedgerReplicationEnabled(cb);
             cb.await();
         }
diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorBookieCheckTask.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorBookieCheckTask.java
index fb67538de1..1836296db6 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorBookieCheckTask.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorBookieCheckTask.java
@@ -176,7 +176,7 @@ public class AuditorBookieCheckTask extends AuditorTask {
             InterruptedException {
         if (!isLedgerReplicationEnabled()) {
             LOG.info("LedgerReplication is disabled externally through 
Zookeeper, "
-                    + "since DISABLE_NODE ZNode is created, so waiting untill 
it is enabled");
+                    + "since DISABLE_NODE ZNode is created, so waiting until 
it is enabled");
             ReplicationEnableCb cb = new ReplicationEnableCb();
             ledgerUnderreplicationManager.notifyLedgerReplicationEnabled(cb);
             cb.await();

Reply via email to