From 5a29b95aaab71c906b860acbda73f529811074bd Mon Sep 17 00:00:00 2001 From: Technoboy- Date: Sun, 4 Oct 2020 16:41:52 +0800 Subject: [PATCH] Typo for method name (#2425) --- .../java/org/apache/bookkeeper/client/BookKeeper.java | 5 +++-- .../org/apache/bookkeeper/client/ForceLedgerOp.java | 2 +- .../org/apache/bookkeeper/client/LedgerHandle.java | 10 +++++----- .../org/apache/bookkeeper/client/PendingAddOp.java | 2 +- .../java/org/apache/bookkeeper/meta/LedgerLayout.java | 2 +- .../org/apache/bookkeeper/proto/BookieClientImpl.java | 2 +- .../proto/DefaultPerChannelBookieClientPool.java | 2 +- .../bookkeeper/proto/PerChannelBookieClientPool.java | 4 ++-- site/docs/4.10.0/api/ledger-api.md | 2 +- site/docs/4.11.0/api/ledger-api.md | 2 +- site/docs/4.11.1/api/ledger-api.md | 2 +- site/docs/4.8.0/api/ledger-api.md | 2 +- site/docs/4.8.1/api/ledger-api.md | 2 +- site/docs/4.8.2/api/ledger-api.md | 2 +- site/docs/4.9.0/api/ledger-api.md | 2 +- site/docs/4.9.1/api/ledger-api.md | 2 +- site/docs/4.9.2/api/ledger-api.md | 2 +- site/docs/latest/api/ledger-api.md | 2 +- 18 files changed, 25 insertions(+), 24 deletions(-) diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java index b0c038e5862..b7656d3586c 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java @@ -37,6 +37,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; @@ -447,7 +448,7 @@ public BookKeeper(ClientConfiguration conf, ZooKeeper zk, EventLoopGroup eventLo conf, scheduler, rootStatsLogger, - java.util.Optional.ofNullable(zkc)); + Optional.ofNullable(zkc)); } catch (ConfigurationException ce) { LOG.error("Failed to initialize metadata client driver using invalid metadata service uri", ce); throw new IOException("Failed to initialize metadata client driver", ce); @@ -569,7 +570,7 @@ private EnsemblePlacementPolicy initializeEnsemblePlacementPolicy(ClientConfigur throws IOException { try { Class policyCls = conf.getEnsemblePlacementPolicy(); - return ReflectionUtils.newInstance(policyCls).initialize(conf, java.util.Optional.ofNullable(dnsResolver), + return ReflectionUtils.newInstance(policyCls).initialize(conf, Optional.ofNullable(dnsResolver), timer, featureProvider, statsLogger, bookieAddressResolver); } catch (ConfigurationException e) { throw new IOException("Failed to initialize ensemble placement policy : ", e); diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ForceLedgerOp.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ForceLedgerOp.java index 23d547c407a..68e9c077583 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ForceLedgerOp.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ForceLedgerOp.java @@ -107,7 +107,7 @@ public void forceLedgerComplete(int rc, long ledgerId, BookieId addr, Object ctx if (ackSet.completeBookieAndCheck(bookieIndex)) { completed = true; // we are able to say that every bookie sync'd its own journal - // for every ackknowledged entry before issuing the force() call + // for every acknowledged entry before issuing the force() call if (LOG.isDebugEnabled()) { LOG.debug("After force on ledger {} updating LastAddConfirmed to {} ", ledgerId, currentNonDurableLastAddConfirmed); diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java index b773d969d78..c4b1c715bc5 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java @@ -120,7 +120,7 @@ private enum HandleState { /** * Next entryId which is expected to move forward during {@link #sendAddSuccessCallbacks() }. This is important - * in order to have an ordered sequence of addEntry ackknowledged to the writer + * in order to have an ordered sequence of addEntry acknowledged to the writer */ volatile long pendingAddsSequenceHead; @@ -1212,7 +1212,7 @@ void asyncRecoveryAddEntry(final byte[] data, final int offset, final int length doAsyncAddEntry(op); } - private boolean isWritesetWritable(DistributionSchedule.WriteSet writeSet, + private boolean isWriteSetWritable(DistributionSchedule.WriteSet writeSet, long key, int allowedNonWritableCount) { if (allowedNonWritableCount < 0) { allowedNonWritableCount = 0; @@ -1246,14 +1246,14 @@ protected boolean waitForWritable(DistributionSchedule.WriteSet writeSet, long k } final long startTime = MathUtils.nowInNano(); - boolean success = isWritesetWritable(writeSet, key, allowedNonWritableCount); + boolean success = isWriteSetWritable(writeSet, key, allowedNonWritableCount); if (!success && durationMs > 0) { int backoff = 1; final int maxBackoff = 4; final long deadline = startTime + TimeUnit.MILLISECONDS.toNanos(durationMs); - while (!isWritesetWritable(writeSet, key, allowedNonWritableCount)) { + while (!isWriteSetWritable(writeSet, key, allowedNonWritableCount)) { if (MathUtils.nowInNano() < deadline) { long maxSleep = MathUtils.elapsedMSec(startTime); if (maxSleep < 0) { @@ -1265,7 +1265,7 @@ protected boolean waitForWritable(DistributionSchedule.WriteSet writeSet, long k TimeUnit.MILLISECONDS.sleep(sleepMs); } catch (InterruptedException e) { Thread.currentThread().interrupt(); - success = isWritesetWritable(writeSet, key, allowedNonWritableCount); + success = isWriteSetWritable(writeSet, key, allowedNonWritableCount); break; } if (backoff <= maxBackoff) { diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java index b343d1a72f8..729d9fe077c 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java @@ -267,7 +267,7 @@ public void safeRun() { payload = null; // We are about to send. Check if we need to make an ensemble change - // becasue of delayed write errors + // because of delayed write errors lh.maybeHandleDelayedWriteBookieFailure(); // Iterate over set and trigger the sendWriteRequests diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerLayout.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerLayout.java index f0ee03c9ae4..f5937a7b60f 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerLayout.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerLayout.java @@ -36,7 +36,7 @@ @ToString public class LedgerLayout { - // version of compability layout version + // version of compatibility layout version public static final int LAYOUT_MIN_COMPAT_VERSION = 1; // version of ledger layout metadata public static final int LAYOUT_FORMAT_VERSION = 2; diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClientImpl.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClientImpl.java index b904c16c77a..03e3c068e42 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClientImpl.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClientImpl.java @@ -214,7 +214,7 @@ public PerChannelBookieClientPool lookupClient(BookieId addr) { if (null == oldClientPool) { clientPool = newClientPool; // initialize the pool only after we put the pool into the map - clientPool.intialize(); + clientPool.initialize(); } else { clientPool = oldClientPool; newClientPool.close(false); diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/DefaultPerChannelBookieClientPool.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/DefaultPerChannelBookieClientPool.java index 7305bef249d..5798add9b14 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/DefaultPerChannelBookieClientPool.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/DefaultPerChannelBookieClientPool.java @@ -87,7 +87,7 @@ public void operationComplete(int rc, PerChannelBookieClient pcbc) { } @Override - public void intialize() { + public void initialize() { for (PerChannelBookieClient pcbc : this.clients) { pcbc.connectIfNeededAndDoOp(this); } diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClientPool.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClientPool.java index c7bc0053ccb..e8ba5f50201 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClientPool.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClientPool.java @@ -28,9 +28,9 @@ public interface PerChannelBookieClientPool { /** - * intialize the pool. the implementation should not be blocked. + * initialize the pool. the implementation should not be blocked. */ - void intialize(); + void initialize(); /** * Obtain a channel from channel pool to execute operations. diff --git a/site/docs/4.10.0/api/ledger-api.md b/site/docs/4.10.0/api/ledger-api.md index a3494926ef3..6ec03edda5b 100644 --- a/site/docs/4.10.0/api/ledger-api.md +++ b/site/docs/4.10.0/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.11.0/api/ledger-api.md b/site/docs/4.11.0/api/ledger-api.md index 60cec16b3bc..0a1dcb47e49 100644 --- a/site/docs/4.11.0/api/ledger-api.md +++ b/site/docs/4.11.0/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.11.1/api/ledger-api.md b/site/docs/4.11.1/api/ledger-api.md index a8d9cb1b24b..f777472644f 100644 --- a/site/docs/4.11.1/api/ledger-api.md +++ b/site/docs/4.11.1/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.8.0/api/ledger-api.md b/site/docs/4.8.0/api/ledger-api.md index 03ea7089e10..d7c37bd94c1 100644 --- a/site/docs/4.8.0/api/ledger-api.md +++ b/site/docs/4.8.0/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.8.1/api/ledger-api.md b/site/docs/4.8.1/api/ledger-api.md index 51890b74c4e..7eb2aff96ff 100644 --- a/site/docs/4.8.1/api/ledger-api.md +++ b/site/docs/4.8.1/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.8.2/api/ledger-api.md b/site/docs/4.8.2/api/ledger-api.md index cd46e994126..5d81bb09437 100644 --- a/site/docs/4.8.2/api/ledger-api.md +++ b/site/docs/4.8.2/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.9.0/api/ledger-api.md b/site/docs/4.9.0/api/ledger-api.md index 65af1321b16..3338c2bcdee 100644 --- a/site/docs/4.9.0/api/ledger-api.md +++ b/site/docs/4.9.0/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.9.1/api/ledger-api.md b/site/docs/4.9.1/api/ledger-api.md index c1dc8ec6b3f..fbb907ed2dc 100644 --- a/site/docs/4.9.1/api/ledger-api.md +++ b/site/docs/4.9.1/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/4.9.2/api/ledger-api.md b/site/docs/4.9.2/api/ledger-api.md index fa112fb6516..5efe930b4c9 100644 --- a/site/docs/4.9.2/api/ledger-api.md +++ b/site/docs/4.9.2/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers. diff --git a/site/docs/latest/api/ledger-api.md b/site/docs/latest/api/ledger-api.md index e35ebababc0..c62226b7bdb 100644 --- a/site/docs/latest/api/ledger-api.md +++ b/site/docs/latest/api/ledger-api.md @@ -810,7 +810,7 @@ writing the entry to SO buffers without waiting for an fsync. In this case the LastAddConfirmed pointer is not advanced to the writer side neither is updated on the reader's side, this is because **there is some chance to lose the entry**. Such entries will be still readable using readUnconfirmed() API, but they won't be readable using Long Poll reads or regular read() API. -In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble ackknowledge the call after +In order to get guarantees of durability the writer must use explicitly the [force()](../javadoc/org/apache/bookkeeper/client/api/ForceableHandle) API which will return only after all the bookies in the ensemble acknowledge the call after performing an fsync to the disk which is storing the journal. This way the LastAddConfirmed pointer is advanced on the writer side and it will be eventually available to the readers.