You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/01/25 09:07:35 UTC

(hbase) branch master updated: HBASE-28255 Correcting spelling errors or annotations with non-standard spelling (#5577)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new caa6aed287c HBASE-28255 Correcting spelling errors or annotations with non-standard spelling (#5577)
caa6aed287c is described below

commit caa6aed287c92abd1b630f56e02a2953172373a8
Author: Sigma <49...@users.noreply.github.com>
AuthorDate: Thu Jan 25 17:07:30 2024 +0800

    HBASE-28255 Correcting spelling errors or annotations with non-standard spelling (#5577)
    
    Co-authored-by: mazhengxuan <ma...@didiglobal.com>
    Co-authored-by: Duo Zhang <zh...@apache.org>
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../java/org/apache/hadoop/hbase/Abortable.java    |  2 +-
 .../apache/hadoop/hbase/ipc/AbstractRpcClient.java |  2 +-
 .../example/ZooKeeperScanPolicyObserver.java       |  2 +-
 .../procedure2/AbstractProcedureScheduler.java     |  2 +-
 .../master/replication/AbstractPeerProcedure.java  |  2 +-
 .../hbase/regionserver/AbstractMemStore.java       |  2 +-
 .../regionserver/AbstractMultiFileWriter.java      |  2 +-
 .../hbase/regionserver/wal/AbstractFSWAL.java      | 54 +++++++++++-----------
 .../wal/AbstractProtobufWALReader.java             | 12 ++---
 9 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java
index b9736d57345..b0a5a86d50b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java
@@ -37,7 +37,7 @@ public interface Abortable {
   void abort(String why, Throwable e);
 
   /**
-   * It just call another abort method and the Throwable parameter is null.
+   * It just calls another abort method and the Throwable parameter is null.
    * @param why Why we're aborting.
    * @see Abortable#abort(String, Throwable)
    */
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index fcded9f5b69..5926539d067 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -209,7 +209,7 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
       for (T conn : connections.values()) {
         // Remove connection if it has not been chosen by anyone for more than maxIdleTime, and the
         // connection itself has already shutdown. The latter check is because we may still
-        // have some pending calls on connection so we should not shutdown the connection outside.
+        // have some pending calls on connection, so we should not shut down the connection outside.
         // The connection itself will disconnect if there is no pending call for maxIdleTime.
         if (conn.getLastTouched() < closeBeforeTime && !conn.isActive()) {
           if (LOG.isTraceEnabled()) {
diff --git a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
index 53288be872e..fa7ccf73736 100644
--- a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
+++ b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ZooKeeperScanPolicyObserver.java
@@ -41,7 +41,7 @@ import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * This is an example showing how a RegionObserver could configured via ZooKeeper in order to
+ * This is an example showing how a RegionObserver could be configured via ZooKeeper in order to
  * control a Region compaction, flush, and scan policy. This also demonstrated the use of shared
  * {@link org.apache.hadoop.hbase.coprocessor.RegionObserver} state. See
  * {@link RegionCoprocessorEnvironment#getSharedData()}.
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/AbstractProcedureScheduler.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/AbstractProcedureScheduler.java
index 4d1d5c1ccd9..61f73544b1b 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/AbstractProcedureScheduler.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/AbstractProcedureScheduler.java
@@ -236,7 +236,7 @@ public abstract class AbstractProcedureScheduler implements ProcedureScheduler {
   // ==========================================================================
 
   /**
-   * Wake up all of the given events. Note that we first take scheduler lock and then wakeInternal()
+   * Wake up all the given events. Note that we first take scheduler lock and then wakeInternal()
    * synchronizes on the event. Access should remain package-private. Use ProcedureEvent class to
    * wake/suspend events.
    * @param events the list of events to wake
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java
index cd4cca0f918..b3b01f675c7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java
@@ -52,7 +52,7 @@ public abstract class AbstractPeerProcedure<TState> extends AbstractPeerNoLockPr
   // The sleep interval when waiting table to be enabled or disabled.
   protected static final int SLEEP_INTERVAL_MS = 1000;
 
-  // used to keep compatible with old client where we can only returns after updateStorage.
+  // used to keep compatible with old client where we can only return after updateStorage.
   protected ProcedurePrepareLatch latch;
 
   protected AbstractPeerProcedure() {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
index 5cd3a92e5b6..62ff6f9a92f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
@@ -157,7 +157,7 @@ public abstract class AbstractMemStore implements MemStore {
     Cell toAdd = maybeCloneWithAllocator(currentActive, cell, false);
     boolean mslabUsed = (toAdd != cell);
     // This cell data is backed by the same byte[] where we read request in RPC(See
-    // HBASE-15180). By default MSLAB is ON and we might have copied cell to MSLAB area. If
+    // HBASE-15180). By default, MSLAB is ON and we might have copied cell to MSLAB area. If
     // not we must do below deep copy. Or else we will keep referring to the bigger chunk of
     // memory and prevent it from getting GCed.
     // Copy to MSLAB would not have happened if
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMultiFileWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMultiFileWriter.java
index a02b05f66ba..6370d6a79cc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMultiFileWriter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMultiFileWriter.java
@@ -64,7 +64,7 @@ public abstract class AbstractMultiFileWriter implements CellSink, ShipperListen
    * Commit all writers.
    * <p>
    * Notice that here we use the same <code>maxSeqId</code> for all output files since we haven't
-   * find an easy to find enough sequence ids for different output files in some corner cases. See
+   * found an easy to find enough sequence ids for different output files in some corner cases. See
    * comments in HBASE-15400 for more details.
    */
   public List<Path> commitWriters(long maxSeqId, boolean majorCompaction) throws IOException {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
index 1a5b5384b01..ef25068512f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java
@@ -259,8 +259,8 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   protected final long blocksize;
 
   /*
-   * If more than this many logs, force flush of oldest region to oldest edit goes to disk. If too
-   * many and we crash, then will take forever replaying. Keep the number of logs tidy.
+   * If more than this many logs, force flush of oldest region to the oldest edit goes to disk. If
+   * too many and we crash, then will take forever replaying. Keep the number of logs tidy.
    */
   protected final int maxLogs;
 
@@ -336,7 +336,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
 
     /**
      * The log file size. Notice that the size may not be accurate if we do asynchronous close in
-     * sub classes.
+     * subclasses.
      */
     private final long logSize;
 
@@ -346,7 +346,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
     private final long rollTimeNs;
 
     /**
-     * If we do asynchronous close in sub classes, it is possible that when adding WALProps to the
+     * If we do asynchronous close in subclasses, it is possible that when adding WALProps to the
      * rolled map, the file is not closed yet, so in cleanOldLogs we should not archive this file,
      * for safety.
      */
@@ -404,9 +404,9 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   protected Supplier<Boolean> hasConsumerTask;
 
   private static final int MAX_EPOCH = 0x3FFFFFFF;
-  // the lowest bit is waitingRoll, which means new writer is created and we are waiting for old
+  // the lowest bit is waitingRoll, which means new writer is created, and we are waiting for old
   // writer to be closed.
-  // the second lowest bit is writerBroken which means the current writer is broken and rollWriter
+  // the second-lowest bit is writerBroken which means the current writer is broken and rollWriter
   // is needed.
   // all other bits are the epoch number of the current writer, this is used to detect whether the
   // writer is still the one when you issue the sync.
@@ -807,7 +807,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
    * If the number of un-archived WAL files ('live' WALs) is greater than maximum allowed, check the
    * first (oldest) WAL, and return those regions which should be flushed so that it can be
    * let-go/'archived'.
-   * @return stores of regions (encodedRegionNames) to flush in order to archive oldest WAL file.
+   * @return stores of regions (encodedRegionNames) to flush in order to archive the oldest WAL file
    */
   Map<byte[], List<byte[]>> findRegionsToForceFlush() throws IOException {
     Map<byte[], List<byte[]>> regions = null;
@@ -861,7 +861,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
     long now = System.nanoTime();
     boolean mayLogTooOld = nextLogTooOldNs <= now;
     ArrayList<byte[]> regionsBlockingWal = null;
-    // For each log file, look at its Map of regions to highest sequence id; if all sequence ids
+    // For each log file, look at its Map of regions to the highest sequence id; if all sequence ids
     // are older than what is currently in memory, the WAL can be GC'd.
     for (Map.Entry<Path, WALProps> e : this.walFile2Props.entrySet()) {
       if (!e.getValue().closed) {
@@ -1084,7 +1084,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
       try {
         Path oldPath = getOldPath();
         Path newPath = getNewPath();
-        // Any exception from here on is catastrophic, non-recoverable so we currently abort.
+        // Any exception from here on is catastrophic, non-recoverable, so we currently abort.
         W nextWriter = this.createWriterInstance(fs, newPath);
         if (remoteFs != null) {
           // create a remote wal if necessary
@@ -1107,7 +1107,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
           regionsToFlush = findRegionsToForceFlush();
         }
       } catch (CommonFSUtils.StreamLacksCapabilityException exception) {
-        // If the underlying FileSystem can't do what we ask, treat as IO failure so
+        // If the underlying FileSystem can't do what we ask, treat as IO failure, so
         // we'll abort.
         throw new IOException(
           "Underlying FileSystem can't meet stream requirements. See RS log " + "for details.",
@@ -1195,9 +1195,9 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
         throw new IOException(e.getCause());
       }
     } finally {
-      // in shutdown we may call cleanOldLogs so shutdown this executor in the end.
-      // In sync replication implementation, we may shutdown a WAL without shutting down the whole
-      // region server, if we shutdown this executor earlier we may get reject execution exception
+      // in shutdown, we may call cleanOldLogs so shutdown this executor in the end.
+      // In sync replication implementation, we may shut down a WAL without shutting down the whole
+      // region server, if we shut down this executor earlier we may get reject execution exception
       // and abort the region server
       logArchiveExecutor.shutdown();
     }
@@ -1467,8 +1467,8 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   // return whether we have successfully set readyForRolling to true.
   private boolean trySetReadyForRolling() {
     // Check without holding lock first. Usually we will just return here.
-    // waitingRoll is volatile and unacedEntries is only accessed inside event loop so it is safe to
-    // check them outside the consumeLock.
+    // waitingRoll is volatile and unacedEntries is only accessed inside event loop, so it is safe
+    // to check them outside the consumeLock.
     if (!waitingRoll(epochAndState) || !unackedAppends.isEmpty()) {
       return false;
     }
@@ -1532,13 +1532,13 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
     // changed, i.e, we have already rolled the writer, or the writer is already broken, we should
     // just skip here, to avoid mess up the state or accidentally release some WAL entries and
     // cause data corruption.
-    // The syncCompleted call is on the critical write path so we should try our best to make it
+    // The syncCompleted call is on the critical write path, so we should try our best to make it
     // fast. So here we do not hold consumeLock, for increasing performance. It is safe because
     // there are only 3 possible situations:
     // 1. For normal case, the only place where we change epochAndState is when rolling the writer.
     // Before rolling actually happen, we will only change the state to waitingRoll which is another
     // bit than writerBroken, and when we actually change the epoch, we can make sure that there is
-    // no out going sync request. So we will always pass the check here and there is no problem.
+    // no outgoing sync request. So we will always pass the check here and there is no problem.
     // 2. The writer is broken, but we have not called syncFailed yet. In this case, since
     // syncFailed and syncCompleted are executed in the same thread, we will just face the same
     // situation with #1.
@@ -1706,7 +1706,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
     for (Iterator<FSWALEntry> iter = toWriteAppends.iterator(); iter.hasNext();) {
       FSWALEntry entry = iter.next();
       /**
-       * For {@link FSHog},here may throws IOException,but for {@link AsyncFSWAL}, here would not
+       * For {@link FSHog},here may throw IOException,but for {@link AsyncFSWAL}, here would not
        * throw any IOException.
        */
       boolean appended = appendEntry(writer, entry);
@@ -1753,7 +1753,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
     }
     if (writer.getLength() == fileLengthAtLastSync) {
       // we haven't written anything out, just advance the highestSyncedSequence since we may only
-      // stamped some region sequence id.
+      // stamp some region sequence id.
       if (unackedAppends.isEmpty()) {
         highestSyncedTxid.set(highestProcessedAppendTxid);
         finishSync();
@@ -1761,7 +1761,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
       }
       return;
     }
-    // reach here means that we have some unsynced data but haven't reached the batch size yet
+    // reach here means that we have some unsynced data but haven't reached the batch size yet,
     // but we will not issue a sync directly here even if there are sync requests because we may
     // have some new data in the ringbuffer, so let's just return here and delay the decision of
     // whether to issue a sync in the caller method.
@@ -1876,12 +1876,12 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
    * have its region edit/sequence id assigned else it messes up our unification of mvcc and
    * sequenceid. On return <code>key</code> will have the region edit/sequence id filled in.
    * <p/>
-   * NOTE: This append, at a time that is usually after this call returns, starts an mvcc
+   * NOTE: This appends, at a time that is usually after this call returns, starts a mvcc
    * transaction by calling 'begin' wherein which we assign this update a sequenceid. At assignment
    * time, we stamp all the passed in Cells inside WALEdit with their sequenceId. You must
    * 'complete' the transaction this mvcc transaction by calling
    * MultiVersionConcurrencyControl#complete(...) or a variant otherwise mvcc will get stuck. Do it
-   * in the finally of a try/finally block within which this append lives and any subsequent
+   * in the finally of a try/finally block within which this appends lives and any subsequent
    * operations like sync or update of memstore, etc. Get the WriteEntry to pass mvcc out of the
    * passed in WALKey <code>walKey</code> parameter. Be warned that the WriteEntry is not
    * immediately available on return from this method. It WILL be available subsequent to a sync of
@@ -2034,14 +2034,14 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
    * Notice that you need to clear the {@link #rollRequested} flag in this method, as the new writer
    * will begin to work before returning from this method. If we clear the flag after returning from
    * this call, we may miss a roll request. The implementation class should choose a proper place to
-   * clear the {@link #rollRequested} flag so we do not miss a roll request, typically before you
+   * clear the {@link #rollRequested} flag, so we do not miss a roll request, typically before you
    * start writing to the new writer.
    */
   protected void doReplaceWriter(Path oldPath, Path newPath, W nextWriter) throws IOException {
     Preconditions.checkNotNull(nextWriter);
     waitForSafePoint();
     /**
-     * For {@link FSHLog},here would shutdown {@link FSHLog.SyncRunner}.
+     * For {@link FSHLog},here would shut down {@link FSHLog.SyncRunner}.
      */
     doCleanUpResources();
     // we will call rollWriter in init method, where we want to create the first writer and
@@ -2084,7 +2084,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   protected void doShutdown() throws IOException {
     waitForSafePoint();
     /**
-     * For {@link FSHLog},here would shutdown {@link FSHLog.SyncRunner}.
+     * For {@link FSHLog},here would shut down {@link FSHLog.SyncRunner}.
      */
     doCleanUpResources();
     if (this.writer != null) {
@@ -2214,7 +2214,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   // So here we need to skip the creation of remote writer and make it possible to write the region
   // close marker.
   // Setting markerEdit only to true is for transiting from A to S, where we need to give up writing
-  // any pending wal entries as they will be discarded. The remote cluster will replicated the
+  // any pending wal entries as they will be discarded. The remote cluster will replicate the
   // correct data back later. We still need to allow writing marker edits such as close region event
   // to allow closing a region.
   @Override
@@ -2261,7 +2261,7 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
   }
 
   /**
-   * Pass one or more log file names and it will either dump out a text version on
+   * Pass one or more log file names, and it will either dump out a text version on
    * <code>stdout</code> or split the specified log files.
    */
   public static void main(String[] args) throws IOException {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufWALReader.java
index f5e65e08c84..5d51750ba5f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufWALReader.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufWALReader.java
@@ -121,7 +121,7 @@ public abstract class AbstractProtobufWALReader
    * Get or create the input stream used by cell decoder.
    * <p/>
    * For implementing replication, we may need to limit the bytes we can read, so here we provide a
-   * method so sub classes can wrap the original input stream.
+   * method so subclasses can wrap the original input stream.
    */
   protected abstract InputStream getCellCodecInputStream(FSDataInputStream stream);
 
@@ -366,7 +366,7 @@ public abstract class AbstractProtobufWALReader
     this.fileLength = stat.getLen();
     this.walEditsStopOffset = this.fileLength;
     long currentPos = stream.getPos();
-    // we will reset walEditsStopOffset if trailer if available
+    // we will reset walEditsStopOffset if trailer is available
     trailerPresent = setTrailerIfPresent(stream);
     if (currentPos != stream.getPos()) {
       // seek back
@@ -509,18 +509,18 @@ public abstract class AbstractProtobufWALReader
    * This is used to determine whether we have already reached the WALTrailer. As the size and magic
    * are at the end of the WAL file, it is possible that these two options are missing while
    * writing, so we will consider there is no trailer. And when we actually reach the WALTrailer, we
-   * will try to decode it as WALKey and we will fail but the error could be vary as it is parsing
+   * will try to decode it as WALKey and we will fail but the error could be varied as it is parsing
    * WALTrailer actually.
    * @return whether this is a WALTrailer and we should throw EOF to upper layer the file is done
    */
   protected final boolean isWALTrailer(long startPosition) throws IOException {
-    // We have nothing in the WALTrailer PB message now so its size is just a int length size and a
+    // We have nothing in the WALTrailer PB message now so its size is just an int length size and a
     // magic at the end
     int trailerSize = PB_WAL_COMPLETE_MAGIC.length + Bytes.SIZEOF_INT;
     if (fileLength - startPosition >= trailerSize) {
       // We still have more than trailerSize bytes before reaching the EOF so this is not a trailer.
       // We also test for == here because if this is a valid trailer, we can read it while opening
-      // the reader so we should not reach here
+      // the reader, so we should not reach here
       return false;
     }
     inputStream.seek(startPosition);
@@ -548,7 +548,7 @@ public abstract class AbstractProtobufWALReader
         return false;
       }
     }
-    // in fact we should not reach here, as this means the trailer bytes are all matched and
+    // in fact, we should not reach here, as this means the trailer bytes are all matched and
     // complete, then we should not call this method...
     return true;
   }