Browse Source

ZOOKEEPER-4834. fix typos in Apache ZooKeeper (#2167)

Signed-off-by: ZhangJian He <shoothzj@gmail.com>
ZhangJian He 9 months ago
parent
commit
9a2dc253ca
100 changed files with 230 additions and 178 deletions
  1. 52 0
      .typos.toml
  2. 1 1
      owaspSuppressions.xml
  3. 4 4
      zookeeper-client/zookeeper-client-c/ChangeLog
  4. 3 3
      zookeeper-client/zookeeper-client-c/LICENSE
  5. 3 3
      zookeeper-client/zookeeper-client-c/acinclude.m4
  6. 8 8
      zookeeper-client/zookeeper-client-c/include/zookeeper.h
  7. 1 1
      zookeeper-client/zookeeper-client-c/src/addrvec.h
  8. 1 1
      zookeeper-client/zookeeper-client-c/src/hashtable/hashtable.c
  9. 1 1
      zookeeper-client/zookeeper-client-c/src/mt_adaptor.c
  10. 1 1
      zookeeper-client/zookeeper-client-c/src/recordio.c
  11. 1 1
      zookeeper-client/zookeeper-client-c/src/winport.c
  12. 1 1
      zookeeper-client/zookeeper-client-c/src/winport.h
  13. 3 3
      zookeeper-client/zookeeper-client-c/src/zookeeper.c
  14. 1 1
      zookeeper-client/zookeeper-client-c/tests/TestClient.cc
  15. 2 2
      zookeeper-client/zookeeper-client-c/tests/TestOperations.cc
  16. 1 1
      zookeeper-client/zookeeper-client-c/tests/TestWatchers.cc
  17. 1 1
      zookeeper-client/zookeeper-client-c/tests/ThreadingUtil.h
  18. 1 1
      zookeeper-client/zookeeper-client-c/tests/ZKMocks.h
  19. 1 1
      zookeeper-contrib/zookeeper-contrib-loggraph/README.md
  20. 1 1
      zookeeper-contrib/zookeeper-contrib-loggraph/src/main/java/org/apache/zookeeper/graph/Log4JSource.java
  21. 1 1
      zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.raphael.js
  22. 1 1
      zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/loggraph.js
  23. 2 2
      zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/loggraph.server.js
  24. 3 3
      zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/raphael.js
  25. 1 1
      zookeeper-contrib/zookeeper-contrib-monitoring/cacti/README
  26. 1 1
      zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py
  27. 1 1
      zookeeper-contrib/zookeeper-contrib-monitoring/nagios/README.txt
  28. 5 5
      zookeeper-contrib/zookeeper-contrib-rest/SPEC.txt
  29. 2 2
      zookeeper-contrib/zookeeper-contrib-rest/src/main/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java
  30. 1 1
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/blockingqueue.h
  31. 1 1
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/doxygen.cfg
  32. 1 1
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/event.h
  33. 1 1
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/thread.h
  34. 1 1
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkadapter.cc
  35. 2 2
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkadapter.h
  36. 10 10
      zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkfuse.cc
  37. 1 1
      zookeeper-contrib/zookeeper-contrib-zkpython/src/test/close_deadlock_test.py
  38. 1 1
      zookeeper-contrib/zookeeper-contrib-zkpython/src/test/create_test.py
  39. 1 1
      zookeeper-contrib/zookeeper-contrib-zkpython/src/test/get_set_test.py
  40. 1 1
      zookeeper-contrib/zookeeper-contrib-zktreeutil/README.txt
  41. 1 1
      zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkAdaptor.cc
  42. 1 1
      zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkAdaptor.h
  43. 1 1
      zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkTreeUtil.h
  44. 1 1
      zookeeper-contrib/zookeeper-contrib-zooinspector/TODO
  45. 1 1
      zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/com/nitido/utils/toaster/Toaster.java
  46. 1 1
      zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeSelectionListener.java
  47. 3 3
      zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java
  48. 2 2
      zookeeper-docs/src/main/resources/markdown/releasenotes.md
  49. 1 1
      zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
  50. 1 1
      zookeeper-jute/src/main/java/org/apache/jute/compiler/JFile.java
  51. 2 2
      zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java
  52. 1 1
      zookeeper-jute/src/main/java/org/apache/jute/compiler/package.html
  53. 3 3
      zookeeper-jute/src/main/java/org/apache/jute/package.html
  54. 1 1
      zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java
  55. 1 1
      zookeeper-recipes/README.txt
  56. 1 1
      zookeeper-recipes/zookeeper-recipes-lock/README.txt
  57. 3 3
      zookeeper-recipes/zookeeper-recipes-lock/src/main/c/acinclude.m4
  58. 2 2
      zookeeper-recipes/zookeeper-recipes-lock/src/main/c/include/zoo_lock.h
  59. 5 5
      zookeeper-recipes/zookeeper-recipes-lock/src/main/java/org/apache/zookeeper/recipes/lock/WriteLock.java
  60. 3 3
      zookeeper-recipes/zookeeper-recipes-queue/src/main/c/acinclude.m4
  61. 1 1
      zookeeper-recipes/zookeeper-recipes-queue/src/main/c/src/zoo_queue.c
  62. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNIO.java
  63. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java
  64. 3 3
      zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
  65. 4 4
      zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
  66. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliWrapperException.java
  67. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java
  68. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/common/IOUtils.java
  69. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/metrics/Summary.java
  70. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/metrics/SummarySet.java
  71. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/BlueThrottle.java
  72. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ConnectionMXBean.java
  73. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ContainerManager.java
  74. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ExpiryQueue.java
  75. 4 4
      zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxnFactory.java
  76. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java
  77. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ReferenceCountedACLCache.java
  78. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/RequestThrottler.java
  79. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxnFactory.java
  80. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java
  81. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java
  82. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
  83. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ExitHandler.java
  84. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ZooKeeperServerEmbedded.java
  85. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ZooKeeperServerEmbeddedImpl.java
  86. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java
  87. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FastLeaderElection.java
  88. 4 4
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java
  89. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
  90. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java
  91. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
  92. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/util/OSMXBean.java
  93. 3 3
      zookeeper-server/src/main/java/org/apache/zookeeper/server/util/RequestPathMetricsCollector.java
  94. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/WatchManager.java
  95. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/ClientCnxnSocketFragilityTest.java
  96. 2 2
      zookeeper-server/src/test/java/org/apache/zookeeper/GetAllChildrenNumberTest.java
  97. 3 3
      zookeeper-server/src/test/java/org/apache/zookeeper/GetEphemeralsTest.java
  98. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/JaasConfiguration.java
  99. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/PortAssignment.java
  100. 5 5
      zookeeper-server/src/test/java/org/apache/zookeeper/ZooKeeperTest.java

+ 52 - 0
.typos.toml

@@ -0,0 +1,52 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+[default.extend-words]
+# abbr
+"aroun" = "aroun"
+"delet" = "delet"
+"dout" = "dout"
+"fied" = "fied"
+"fle" = "fle"
+"fo" = "fo"
+"hte" = "hte"
+"nd" = "nd"
+"nwe" = "nwe"
+"pn" = "pn"
+"strack" = "strack"
+"thr" = "thr"
+"ths" = "ths"
+"wew" = "wew"
+# keep for comptability
+"pathes" = "pathes"
+"shapshot" = "shapshot"
+# keyword fp
+"atend" = "atend"
+"chec" = "chec"
+"clos" = "clos"
+"erro" = "erro"
+"infor" = "infor"
+"locahost" = "locahost"
+"leafs" = "leafs"
+"sceen" = "sceen"
+
+[files]
+extend-exclude = [
+    "zookeeper-server/src/test/java/org/apache/zookeeper/common/CertificatesToPlayWith.java",
+]

+ 1 - 1
owaspSuppressions.xml

@@ -48,7 +48,7 @@
    </suppress>
    <suppress>
       <!-- Seems like false positive - we are not using Prometheus
-           2.x, rather the client which lastest is 0.6. at the time of
+           2.x, rather the client which latest is 0.6. at the time of
            this writing  -->
       <cve>CVE-2019-3826</cve>
    </suppress>

+ 4 - 4
zookeeper-client/zookeeper-client-c/ChangeLog

@@ -1,13 +1,13 @@
 Release 2.1.1
 2008-04-30 Andrew Kornev <akornev@users.sourceforge.net>
 
-    * changed the distributino package name to "c-client-src"
+    * changed the distributions package name to "c-client-src"
     
 Release 2.1.0
 2008-04-30 Andrew Kornev <akornev@users.sourceforge.net>
 
     * added the client latency diagnostics; the client prints a warning when the
-      reponse latency exceeds 20ms
+      response latency exceeds 20ms
 
     * modified logging format to report the znode path for which the zookeeper 
       operation is called
@@ -31,12 +31,12 @@ Release 1.1.3
     * get_xid() is not thread-safe (xid initialization race condition 
       in the multi-threaded mode).
     
-    * the I/O thread doesn’t automatically terminate on AUTH_FAILURE and 
+    * the I/O thread doesn't automatically terminate on AUTH_FAILURE and
       SESSION_EXPIRED events.
       
     * all session events should be processed on the completion thread. 
     
-    * PING operation doesn’t atomically enqueue the completion and 
+    * PING operation doesn't atomically enqueue the completion and
       send buffers like other operations do.
       
     * corrected zookeeper_init() doxygen docs.

+ 3 - 3
zookeeper-client/zookeeper-client-c/LICENSE

@@ -285,7 +285,7 @@
  * The implementation was written so as to conform with Netscapes SSL.
  *
  * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
+ * the following conditions are adhered to.  The following conditions
  * apply to all code found in this distribution, be it the RC4, RSA,
  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
  * included with this distribution is covered by the same copyright terms
@@ -310,7 +310,7 @@
  *    must display the following acknowledgement:
  *    "This product includes cryptographic software written by
  *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
+ *    The word 'cryptographic' can be left out if the routines from the library
  *    being used are not cryptographic related :-).
  * 4. If you include any Windows specific code (or a derivative thereof) from
  *    the apps directory (application code) you must include an acknowledgement:
@@ -328,7 +328,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * The licence and distribution terms for any publically available version or
+ * The licence and distribution terms for any publicly available version or
  * derivative of this code cannot be changed.  i.e. this code cannot simply be
  * copied and put under another distribution licence
  * [including the GNU Public Licence.]

+ 3 - 3
zookeeper-client/zookeeper-client-c/acinclude.m4

@@ -10,7 +10,7 @@
 # DX_???_FEATURE(ON|OFF) - control the default setting of a Doxygen feature.
 # Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
 # 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
-# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
+# for generating a separate .chi file by the .chm file, and 'MAN', 'RTF',
 # 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
 # variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
 # paper size.
@@ -239,8 +239,8 @@ DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
              DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
             [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
 
-# Seperate CHI file generation.
-DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
+# Separate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
             [DX_CHECK_DEPEND(chm, 1)],
             [DX_CLEAR_DEPEND(chm, 1)],
             [],

+ 8 - 8
zookeeper-client/zookeeper-client-c/include/zookeeper.h

@@ -108,7 +108,7 @@ enum ZOO_ERRORS {
   ZBADARGUMENTS = -8, /*!< Invalid arguments */
   ZINVALIDSTATE = -9, /*!< Invliad zhandle state */
   ZNEWCONFIGNOQUORUM = -13, /*!< No quorum of new config is connected and
-                                 up-to-date with the leader of last commmitted
+                                 up-to-date with the leader of last committed
                                  config - try invoking reconfiguration after new
                                  servers are connected and synced */
   ZRECONFIGINPROGRESS = -14, /*!< Reconfiguration requested while another
@@ -697,7 +697,7 @@ ZOOAPI sasl_callback_t *zoo_sasl_make_basic_callbacks(const char *user,
  * \return ZOK on success or one of the following errcodes on failure:
  * ZBADARGUMENTS - invalid input parameters
  * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE
- * ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details
+ * ZSYSTEMERROR -- a system (OS) error occurred; it's worth checking errno to get details
  */
 ZOOAPI int zoo_set_servers(zhandle_t *zh, const char *hosts);
 
@@ -1779,7 +1779,7 @@ typedef enum {
  * \param wtype the watcher type to be removed
  * \param watcher the watcher to be removed, if null all watches for that
  * path (and watcher type) will be removed
- * \param watcherCtx the contex associated with the watcher to be removed
+ * \param watcherCtx the context associated with the watcher to be removed
  * \param local whether the watches will be removed locally even if there is
  * no server connection
  * \return the return code for the function call.
@@ -1789,7 +1789,7 @@ typedef enum {
  * or ZOO_AUTH_FAILED_STATE
  * ZBADARGUMENTS - invalid input parameters
  * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory
- * ZSYSTEMERROR - a system error occured
+ * ZSYSTEMERROR - a system error occurred
  */
 ZOOAPI int zoo_aremove_watches(zhandle_t *zh, const char *path,
         ZooWatcherType wtype, watcher_fn watcher, void *watcherCtx, int local,
@@ -1810,7 +1810,7 @@ ZOOAPI int zoo_aremove_watches(zhandle_t *zh, const char *path,
  * or ZOO_AUTH_FAILED_STATE
  * ZBADARGUMENTS - invalid input parameters
  * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory
- * ZSYSTEMERROR - a system error occured
+ * ZSYSTEMERROR - a system error occurred
  */
 ZOOAPI int zoo_remove_all_watches(zhandle_t *zh, const char *path,
         ZooWatcherType wtype, int local);
@@ -1830,7 +1830,7 @@ ZOOAPI int zoo_remove_all_watches(zhandle_t *zh, const char *path,
  * or ZOO_AUTH_FAILED_STATE
  * ZBADARGUMENTS - invalid input parameters
  * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory
- * ZSYSTEMERROR - a system error occured
+ * ZSYSTEMERROR - a system error occurred
 */
 ZOOAPI int zoo_aremove_all_watches(zhandle_t *zh, const char *path,
         ZooWatcherType wtype, int local, void_completion_t *completion,
@@ -2434,7 +2434,7 @@ ZOOAPI int zoo_multi(zhandle_t *zh, int count, const zoo_op_t *ops, zoo_op_resul
  * \param wtype the watcher type to be removed
  * \param watcher the watcher to be removed, if null all watches for that
  * path (and watcher type) will be removed
- * \param watcherCtx the contex associated with the watcher to be removed
+ * \param watcherCtx the context associated with the watcher to be removed
  * \param local whether the watches will be removed locally even if there is
  * no server connection
  * \return the return code for the function call.
@@ -2444,7 +2444,7 @@ ZOOAPI int zoo_multi(zhandle_t *zh, int count, const zoo_op_t *ops, zoo_op_resul
  * or ZOO_AUTH_FAILED_STATE
  * ZBADARGUMENTS - invalid input parameters
  * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory
- * ZSYSTEMERROR - a system error occured
+ * ZSYSTEMERROR - a system error occurred
  */
 ZOOAPI int zoo_remove_watches(zhandle_t *zh, const char *path,
         ZooWatcherType wtype, watcher_fn watcher, void *watcherCtx, int local);

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/addrvec.h

@@ -74,7 +74,7 @@ int addrvec_grow(addrvec_t *avec, uint32_t grow_amount);
 int addrvec_grow_default(addrvec_t *avec);
 
 /**
- * Check if an addrvec contains the specificed sockaddr_storage value.
+ * Check if an addrvec contains the specified sockaddr_storage value.
  * \returns 1 if it contains the value and 0 otherwise.
  */
 int addrvec_contains(const addrvec_t *avec, const struct sockaddr_storage *addr);

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/hashtable/hashtable.c

@@ -70,7 +70,7 @@ hash(struct hashtable *h, void *k)
 static int
 hashtable_expand(struct hashtable *h)
 {
-    /* Double the size of the table to accomodate more entries */
+    /* Double the size of the table to accommodate more entries */
     struct entry **newtable;
     struct entry *e;
     struct entry **pE;

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/mt_adaptor.c

@@ -121,7 +121,7 @@ int handle_error(zhandle_t* zh, SOCKET sock, char* message)
        return -1;
 }
 
-//--create socket pair for interupting selects.
+//--create socket pair for interrupting selects.
 int create_socket_pair(zhandle_t* zh, SOCKET fds[2]) 
 { 
     struct sockaddr_in inaddr; 

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/recordio.c

@@ -145,7 +145,7 @@ int oa_serialize_buffer(struct oarchive *oa, const char *name,
         return rc;
     // this means a buffer of NUll 
     // with size of -1. This is 
-    // waht we use in java serialization for NULL
+    // what we use in java serialization for NULL
     if (b->len == -1) {
       return rc;
     }

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/winport.c

@@ -83,7 +83,7 @@ int pthread_detach(pthread_t _thread)
 }
 
 void pthread_mutexattr_init(pthread_mutexattr_t* ignore){}
-void pthread_mutexattr_settype(pthread_mutexattr_t* ingore_attr, int ignore){}
+void pthread_mutexattr_settype(pthread_mutexattr_t* ignore_attr, int ignore){}
 void pthread_mutexattr_destroy(pthread_mutexattr_t* ignore_attr){}
        
 int 

+ 1 - 1
zookeeper-client/zookeeper-client-c/src/winport.h

@@ -80,7 +80,7 @@ int pthread_join(pthread_t _thread, void** ignore);
 int pthread_detach(pthread_t _thread);
 
 void pthread_mutexattr_init(pthread_mutexattr_t* ignore);
-void pthread_mutexattr_settype(pthread_mutexattr_t* ingore_attr, int ignore);
+void pthread_mutexattr_settype(pthread_mutexattr_t* ignore_attr, int ignore);
 void pthread_mutexattr_destroy(pthread_mutexattr_t* ignore_attr);
 
 

+ 3 - 3
zookeeper-client/zookeeper-client-c/src/zookeeper.c

@@ -1571,7 +1571,7 @@ static int get_next_server_in_reconfig(zhandle_t *zh)
 /**
  * Cycle through our server list to the correct 'next' server. The 'next' server
  * to connect to depends upon whether we're in a 'reconfig' mode or not. Reconfig
- * mode means we've upated the server list and are now trying to find a server
+ * mode means we've updated the server list and are now trying to find a server
  * to connect to. Once we get connected, we are no longer in the reconfig mode.
  * Similarly, if we try to connect to all the servers in the new configuration
  * and failed, reconfig mode is set to false.
@@ -1622,7 +1622,7 @@ const char* zoo_get_current_server(zhandle_t* zh)
 }
 
 /**
- * deallocated the free_path only its beeen allocated
+ * deallocated the free_path only its been allocated
  * and not equal to path
  */
 void free_duplicate_path(const char *free_path, const char* path) {
@@ -5008,7 +5008,7 @@ const char* zerror(int c)
     case ZINVALIDSTATE:
       return "invalid zhandle state";
     case ZNEWCONFIGNOQUORUM:
-      return "no quorum of new config is connected and up-to-date with the leader of last commmitted config - try invoking reconfiguration after new servers are connected and synced";
+      return "no quorum of new config is connected and up-to-date with the leader of last committed config - try invoking reconfiguration after new servers are connected and synced";
     case ZRECONFIGINPROGRESS:
       return "Another reconfiguration is in progress -- concurrent reconfigs not supported (yet)";
     case ZAPIERROR:

+ 1 - 1
zookeeper-client/zookeeper-client-c/tests/TestClient.cc

@@ -1005,7 +1005,7 @@ public:
     void testChroot() {
         // the c client async callbacks do
         // not callback with the path, so
-        // we dont need to test taht for now
+        // we dont need to test that for now
         // we should fix that though soon!
         watchctx_t ctx, ctx_ch;
         zhandle_t *zk, *zk_ch;

+ 2 - 2
zookeeper-client/zookeeper-client-c/tests/TestOperations.cc

@@ -582,7 +582,7 @@ public:
         CPPUNIT_ASSERT_EQUAL((int)ZCLOSING,res2.rc_);
     }
 
-    // ZOOKEEPER-2891: Invalid processing of zookeeper_close for mutli-request
+    // ZOOKEEPER-2891: Invalid processing of zookeeper_close for multi-request
     // while there is a multi request waiting for being processed
     // call zookeeper_close() from the main event loop
     // assert the completion callback is called with status ZCLOSING
@@ -626,7 +626,7 @@ public:
         CPPUNIT_ASSERT_EQUAL((int)ZCLOSING,res1.rc_);
     }
 
-    // ZOOKEEPER-2891: Invalid processing of zookeeper_close for mutli-request
+    // ZOOKEEPER-2891: Invalid processing of zookeeper_close for multi-request
     // send some request #1 (not a multi request)
     // then, while there is a multi request #2 waiting for being processed
     // call zookeeper_close() from the completion callback of request #1

+ 1 - 1
zookeeper-client/zookeeper-client-c/tests/TestWatchers.cc

@@ -456,7 +456,7 @@ public:
         zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID,
                 &watcher,0);
         CPPUNIT_ASSERT(zh!=0);
-        // wait till watcher proccessing has completed (the connection 
+        // wait till watcher processing has completed (the connection
         // established event)
         CPPUNIT_ASSERT(ensureCondition(
                 deliveryTracker.isWatcherProcessingCompleted(),1000)<1000);

+ 1 - 1
zookeeper-client/zookeeper-client-c/tests/ThreadingUtil.h

@@ -38,7 +38,7 @@ class AtomicInt{
 public:
     explicit AtomicInt(int32_t init=0):v_(init){}
     AtomicInt(const AtomicInt& other):v_(other){}
-    // assigment
+    // assignment
     AtomicInt& operator=(const AtomicInt& lhs){
         atomic_fetch_store(&v_,lhs);
         return *this;

+ 1 - 1
zookeeper-client/zookeeper-client-c/tests/ZKMocks.h

@@ -443,7 +443,7 @@ public:
     void returnSessionExpired(){ sessionExpired=true; }
     
     // this is a one shot trigger that gets reset back to false
-    // next recv call will return 0 length, thus simulating a connecton loss
+    // next recv call will return 0 length, thus simulating a connection loss
     volatile bool connectionLost;
     void setConnectionLost() {connectionLost=true;}
     

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-loggraph/README.md

@@ -44,7 +44,7 @@ To filter by time simply move the slider to the desired start time. The time win
 Content filtering uses a adhoc filtering language, using prefix notation. The language looks somewhat similar to lisp. A statement in the language takes the form (op arg arg ....). A statement resolves to a boolean value. Statements can be nested. 
 
 ### 4.1 - Filter arguments
-An argument can be a number, a string or a symbol. A number is any argument which starts with -, + or 0 to 9. If the number starts with 0x it is interpretted as hexadecimal. Otherwise it is interpretted as decimal. If the argument begins with a double-quote, (") it is interpretted as a string. Anything else is interpretted as a symbol.
+An argument can be a number, a string or a symbol. A number is any argument which starts with -, + or 0 to 9. If the number starts with 0x it is interpreted as hexadecimal. Otherwise it is interpreted as decimal. If the argument begins with a double-quote, (") it is interpreted as a string. Anything else is interpreted as a symbol.
 
 ### 4.2 - Filter symbols
 The possible filter symbols are: 

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-loggraph/src/main/java/org/apache/zookeeper/graph/Log4JSource.java

@@ -289,7 +289,7 @@ public class Log4JSource implements LogSource {
 	String line = in.readLine();
 	Matcher m = null;
 
-	// if we have read data from the file, and it matchs the timep pattern
+	// if we have read data from the file, and it matches the timep pattern
 	if ((line != null) && (m = timep.matcher(line)).lookingAt()) {
 	    starttime = timestampFromText(dateformat, m.group(1));
 	} else {

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.raphael.js

@@ -58,7 +58,7 @@
     };
 
     Raphael.fn.g.finger = function (x, y, width, height, dir, ending, isPath) {
-        // dir 0 for horisontal and 1 for vertical
+        // dir 0 for horizontal and 1 for vertical
         if ((dir && !height) || (!dir && !width)) {
             return isPath ? "" : this.path();
         }

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/loggraph.js

@@ -99,7 +99,7 @@ LogGraph = function(canvas, status) {
 
 
     /***
-     * TODO: refactor these to load the data first, before handing to a draw funciton. 
+     * TODO: refactor these to load the data first, before handing to a draw function.
      *       We shouldn't pass the async q into the drawing function
      */
     this.showLogs = function() {

+ 2 - 2
zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/loggraph.server.js

@@ -250,8 +250,8 @@ LogGraph.ServerGraph.message = function(graph, src, srctime, dst, zxid) {
 	var ty = (this.src.y + this.dst.y)/2;
 	var t = paper.text(tx, ty, this.name);
 	
-	var gradiant = (this.dst.y - this.src.y)/(dstx - srcx);
-	var angle = Math.atan(gradiant) * 57.2958;
+	var gradient = (this.dst.y - this.src.y)/(dstx - srcx);
+	var angle = Math.atan(gradient) * 57.2958;
 	t.rotate(angle, true);
 	
 	var arrowl = paper.path("M" + dstx + " " + this.dst.y + " L" + (dstx - 10) +" " + this.dst.y);

+ 3 - 3
zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/raphael.js

@@ -3018,9 +3018,9 @@ Raphael = (function () {
                         };
                         break;
                     case "path":
-                        var pathes = path2curve(from[attr], to[attr]);
-                        from[attr] = pathes[0];
-                        var toPath = pathes[1];
+                        var paths = path2curve(from[attr], to[attr]);
+                        from[attr] = paths[0];
+                        var toPath = paths[1];
                         diff[attr] = [];
                         for (var i = 0, ii = from[attr][length]; i < ii; i++) {
                             diff[attr][i] = [0];

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-monitoring/cacti/README

@@ -29,7 +29,7 @@ WARNING: I have wrote these instructions while installing and configuring the pl
 
 WARNING: I'm going to make the assumption that you know how to work with Cacti and how to setup Data Input Methods for custom scripts. I'm also going to assume that you have already installed Cacti and everything works as expected.
 
-You can extend the Cacti's data gathering functionality through external scripts. Cacti comes with a number of scripts out of the box wich are localted in the scripts/ directory. 
+You can extend the Cacti's data gathering functionality through external scripts. Cacti comes with a number of scripts out of the box which are located in the scripts/ directory.
 
 
 The check_zookeeper.py script can be used a  custom data input method for Cacti.

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py

@@ -19,7 +19,7 @@
 Generic monitoring script that could be used with multiple platforms (Ganglia, Nagios, Cacti).
 
 It requires ZooKeeper 3.4.0 or greater. The script needs the 'mntr' 4letter word 
-command (patch ZOOKEEPER-744) that was now commited to the trunk.
+command (patch ZOOKEEPER-744) that was now committed to the trunk.
 The script also works with ZooKeeper 3.3.x but in a limited way.
 """
 

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-monitoring/nagios/README.txt

@@ -39,7 +39,7 @@ $ cp zookeeper.cfg /etc/nagios-plugins/config
 
 4. Create a virtual host in Nagios used for monitoring the cluster as a whole -OR-  Create a hostgroup named 'zookeeper-servers' and add all the zookeeper cluster nodes. 
 
-5. Define service checks like I have ilustrated bellow or just use the provided definitions.
+5. Define service checks like I have illustrated bellow or just use the provided definitions.
 
 define service {
     use         generic-service

+ 5 - 5
zookeeper-contrib/zookeeper-contrib-rest/SPEC.txt

@@ -39,7 +39,7 @@ that are easy and familiar to program against, and deployed as part of
 the language runtime. Thus, for simple CRUD clients, an HTTP gateway
 would be a less cumbersome interface than the ZooKeeper library.
 
-This document describes a gatway for using HTTP to interact with a
+This document describes a gateway for using HTTP to interact with a
 ZooKeeper repository.
 
 Binding ZooKeeper to HTTP
@@ -72,7 +72,7 @@ best practice.
 Root
 ----
 
-The following examples assume that the ZooKeeper znode heirarchy is
+The following examples assume that the ZooKeeper znode hierarchy is
 bound to the root of the HTTP servers namespace. This may not be the
 case in practice however, the gateway may bind to some prefix, for
 example the URL for accessing /a/b/c may be:
@@ -128,14 +128,14 @@ a new session.
 
 If the session creation is successful, then a 201 code will be returned.
 
-A session is just an UUID that you can pass around as a parameter and
-the REST server will foward your request on the attached persistent 
+A session is just a UUID that you can pass around as a parameter and
+the REST server will forward your request on the attached persistent
 connection.
 
 Keeping a session alive
 -----------------------
 
-To keep a session alive you must send hearbeat requests:
+To keep a session alive you must send heartbeat requests:
 
   PUT /sessions/v1/<SESSION-UUID> HTTP/1.1
 

+ 2 - 2
zookeeper-contrib/zookeeper-contrib-rest/src/main/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java

@@ -307,7 +307,7 @@ public class ZNodeResource {
             throw new WebApplicationException(Response.status(
                     Response.Status.BAD_REQUEST).entity(
                     new ZError(ui.getRequestUri().toString(), path
-                            + " bad operaton " + op)).build());
+                            + " bad operation " + op)).build());
         }
 
         if (setNull.equals("true")) {
@@ -358,7 +358,7 @@ public class ZNodeResource {
             throw new WebApplicationException(Response.status(
                     Response.Status.BAD_REQUEST).entity(
                     new ZError(ui.getRequestUri().toString(), path
-                            + " bad operaton " + op)).build());
+                            + " bad operation " + op)).build());
         }
 
         if (setNull.equals("true")) {

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkfuse/src/blockingqueue.h

@@ -50,7 +50,7 @@ class BlockingQueue {
          * \brief Retrieves and removes the head of this queue, waiting if 
          * \brief no elements are present in this queue.
          * 
-         * @param timeout how long to wait until an element becomes availabe, 
+         * @param timeout how long to wait until an element becomes available,
          *                in milliseconds; if <code>0</code> then wait forever
          * @param timedOut if not NULL then set to true whether this function timed out
          * @return the element from the queue

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkfuse/src/doxygen.cfg

@@ -401,7 +401,7 @@ SHOW_DIRECTORIES       = YES
 # version control system). Doxygen will invoke the program by executing (via 
 # popen()) the command <command> <input-file>, where <command> is the value of 
 # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the progam writes to standard output 
+# provided by doxygen. Whatever the program writes to standard output
 # is used as the file version. See the manual for examples.
 
 FILE_VERSION_FILTER    = 

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkfuse/src/event.h

@@ -183,7 +183,7 @@ class GenericEvent {
          * \brief Constructor.
          * 
          * @param type the type of this event
-         * @param eventWarpper the wrapper around event's data
+         * @param eventWrapper the wrapper around event's data
          */
         GenericEvent(int type, AbstractEventWrapper *eventWrapper) : 
             m_type(type), m_eventWrapper(eventWrapper) {

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkfuse/src/thread.h

@@ -41,7 +41,7 @@ class Thread {
 
     void Create(void* ctx, ThreadFunc func);
     void Join() {
-        //avoid SEGFAULT because of unitialized mThread
+        //avoid SEGFAULT because of uninitialized mThread
         //in case Create(...) was never called
         if (_func != NULL) {
             pthread_join(mThread, 0);

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkadapter.cc

@@ -505,7 +505,7 @@ ZooKeeperAdapter::verifyConnection() throw(ZooKeeperException)
             if (m_state != AS_CONNECTING) {
                 LOG_TRACE( LOG, 
                            "yes. Checking if allowed to auto-reconnect..." );
-                //...not in progres, so check if we can reconnect
+                //...not in progress, so check if we can reconnect
                 if (!m_zkConfig.getAutoReconnect()) {
                     //...too bad, disallowed :(
                     LOG_TRACE( LOG, "no. Sorry." );

+ 2 - 2
zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkadapter.h

@@ -160,7 +160,7 @@ class ZooKeeperConfig
         const int m_leaseTimeout;
         
         /**
-         * True if this adapater should attempt to autoreconnect in case 
+         * True if this adapter should attempt to autoreconnect in case
          * the current session has been dropped.
          */
         const bool m_autoReconnect;
@@ -616,7 +616,7 @@ class ZooKeeperAdapter
 
         /**
          * Returns the remaining connect timeout. The timeout resets
-         * to {@link #m_connectTimeout} on a successfull connection to the ZK.
+         * to {@link #m_connectTimeout} on a successful connection to the ZK.
          * 
          * @return the remaining connect timeout, in milliseconds
          */

+ 10 - 10
zookeeper-contrib/zookeeper-contrib-zkfuse/src/zkfuse.cc

@@ -320,7 +320,7 @@ enum ZkFuseNameType {
      */
     ZkFuseNameRegType = 1,
     /**
-      ZkFuse path is synthesized and identifies the chidlren part of a
+      ZkFuse path is synthesized and identifies the children part of a
       ZooKeeper node, i.e.  Posix directory semantics is expected.
      */
     ZkFuseNameDirType = 2
@@ -707,7 +707,7 @@ class ZkFuseHandleManager : boost::noncopyable
   ZkFuseHandleManagerFactory - factory for ZkFuseHandleManager.
   
   This is the only way to create a ZkFuseHandleManager instance. 
-  to make sure that _thisWeakPtr of the instance is intialized 
+  to make sure that _thisWeakPtr of the instance is initialized
   after the instance is created.
  */
 class ZkFuseHandleManagerFactory
@@ -1354,7 +1354,7 @@ class ZkFuseFile : boost::noncopyable
          */
         uint32_t version;
         /**
-          Acces time in milliseconds.
+          Access time in milliseconds.
          */
         uint64_t atime;
         /**
@@ -1535,7 +1535,7 @@ class ZkFuseFile : boost::noncopyable
     /**
       Remove a ZkFuse directory.
 
-      If force is true, then the ZooKeeper node and its decendants
+      If force is true, then the ZooKeeper node and its descendants
       will be deleted.
 
       If force is false, then this method implements the semantics
@@ -1614,7 +1614,7 @@ class ZkFuseFile : boost::noncopyable
         the ZooKeeper node has no data.
       - If the ZkFuse regular file represents the data part of the 
         ZooKeeper node which is presented as a ZkFuse regular file,
-        the ZooKeeper node and its decendants are deleted.
+        the ZooKeeper node and its descendants are deleted.
 
       Returns -EISDIR if the ZkFuse regular file cannot be deleted
       because ZkFuse consider it to be a directory.
@@ -1711,7 +1711,7 @@ class ZkFuseFile : boost::noncopyable
       Get attributes without accessing metadata.
       
       The atime and mtime returned does not take into consideration
-      overrides present in a matadata file.
+      overrides present in a metadata file.
 
       \return 0 if successful, otherwise negative errno.
       \param stbuf return attributes here.
@@ -1836,7 +1836,7 @@ class ZkFuseFile : boost::noncopyable
       a client is trying to open the path. \see _refCount.
       Sets deleted to true. \see _deleted.
       Sets number of currently directory opens to zero. \see _openDirCount.
-      Invalidate cach for children information and data. 
+      Invalidate cache for children information and data.
 
       \param manager the ZkFuseHandleManager instance who is creating this 
                      ZkFuseFile instance.
@@ -2909,7 +2909,7 @@ class ZkFuseFile : boost::noncopyable
     /**
       Remove a ZkFuse directory.
 
-      If force is true, then the ZooKeeper node and its decendants
+      If force is true, then the ZooKeeper node and its descendants
       will be deleted.
 
       If force is false, then this method implements the semantics
@@ -2956,7 +2956,7 @@ class ZkFuseFile : boost::noncopyable
         the ZooKeeper node has no data.
       - If the ZkFuse regular file represents the data part of the 
         ZooKeeper node which is presented as a ZkFuse regular file,
-        the ZooKeeper node and its decendants are deleted.
+        the ZooKeeper node and its descendants are deleted.
 
       Returns -EISDIR if the ZkFuse regular file cannot be deleted
       because ZkFuse consider it to be a directory.
@@ -3043,7 +3043,7 @@ ZkFuseHandleManager::allocate(const std::string & path, bool & newFile)
             /* Not really supposed to invoke the new ZkFuseFile instance 
              * because this method is not supposed to invoke ZkFuseFile
              * methods that while holding _mutex. However, it is safe
-             * to do without casuing deadlock because these methods
+             * to do without causing deadlock because these methods
              * are known not to invoke other methods, especially one
              * that invoke this ZkFuseHandleManager instance.
              */

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/close_deadlock_test.py

@@ -26,7 +26,7 @@ class CloseDeadlockTest(zktestbase.TestBase):
   https://issues.apache.org/jira/browse/ZOOKEEPER-763
 
   zookeeper.close blocks on waiting for all completions to
-  finish. Previously it was doing so while holding teh GIL, stopping
+  finish. Previously it was doing so while holding the GIL, stopping
   any completions from actually continuing.
 
   This test is a failure if it does not exit within a few seconds.

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/create_test.py

@@ -59,7 +59,7 @@ class CreationTest(zktestbase.TestBase):
 
     def test_exception_paths(self):
         """
-        Make sure common exceptions due to API misuse are correctly propogated
+        Make sure common exceptions due to API misuse are correctly propagated
         """
         self.assertRaises(zookeeper.BadArgumentsException,
                           zookeeper.create,

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/get_set_test.py

@@ -70,7 +70,7 @@ class GetSetTest(zktestbase.TestBase):
     def test_stat_deleted_node(self):
         """
         Test for a bug that surfaced when trying to build a
-        stat object from a non-existant node.
+        stat object from a non-existent node.
 
         """
         self.ensureDeleted("/zk-python-test-deleteme")

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zktreeutil/README.txt

@@ -26,7 +26,7 @@ UPDATE: Make the incremental changes into the live ZK-tree from saved XML, essen
 lly after running the diff.
 
 DUMP: Dumps the ZK-tree on the standard output device reading either from live ZK
-server or XML file. Like export, ZK-subtree can be dumped with optionaly
+server or XML file. Like export, ZK-subtree can be dumped with optionally
 providing the path to the ZK-subtree, and till a certain depth of the (sub)tree.
 
 The exported ZK data into XML file can be shortened by only keeping the static ZK

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkAdaptor.cc

@@ -500,7 +500,7 @@ namespace zktreeutil
                     0,
                     buffer, &len, stat );
         } while (rc != ZOK && rh.handleRC(rc));
-        if (rc != ZOK) // checl return code
+        if (rc != ZOK) // check return code
         {
             std::cerr << "[zktreeutil] Error in fetching value of " << path << std::endl;
             throw ZooKeeperException( string("Unable to get data of node ") + path, rc );

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkAdaptor.h

@@ -164,7 +164,7 @@ namespace zktreeutil
             const int m_leaseTimeout;
 
             /**
-             * True if this adapater should attempt to autoreconnect in case 
+             * True if this adapter should attempt to autoreconnect in case
              * the current session has been dropped.
              */
             const bool m_autoReconnect;

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zktreeutil/src/ZkTreeUtil.h

@@ -271,7 +271,7 @@ namespace zktreeutil
         private:
 
             ZkTreeNodeSptr zkRootSptr_;     // ZK tree root node
-            bool loaded_;                        // Falg indicating whether ZK tree loaded into memory
+            bool loaded_;                        // Flag indicating whether ZK tree loaded into memory
             string sslParams_;              // Comma separated parameters to initiate SSL connection
     };
 }

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zooinspector/TODO

@@ -10,7 +10,7 @@
   http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
   http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
 
-- Rename classes to avoid redundand "ZooInspector" prefix.
+- Rename classes to avoid redundant "ZooInspector" prefix.
 
 - Ant build file has hard coded log4j dependency. (ZK will move to maven anyways...)
 

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/com/nitido/utils/toaster/Toaster.java

@@ -142,7 +142,7 @@ public class Toaster
 
 
 		/***
-		 * Simple costructor that initialized components...
+		 * Simple constructor that initialized components...
 		 */
 		public SingleToaster()
 		{

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeSelectionListener.java

@@ -18,7 +18,7 @@
 package org.apache.zookeeper.inspector.gui.nodeviewer;
 
 /**
- * An interface to be implented by any component that needs notification when a new element
+ * An interface to be implemented by any component that needs notification when a new element
  * is selected in the UI JTree representing the set of available ZNodes.
  */
 public interface NodeSelectionListener {

+ 3 - 3
zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java

@@ -167,17 +167,17 @@ public class NodeViewerMetaData extends ZooInspectorNodeViewer {
 
                 private String formatValByKeyType(String key, String value) {
                     if(key==null) return value;
-                    String formatedVal=value;
+                    String formattedVal=value;
                     switch (key){
                         case "Ephemeral Owner":
                             try{
-                                formatedVal = String.format("0x%x", Long.parseLong(value));
+                                formattedVal = String.format("0x%x", Long.parseLong(value));
                             }catch (NumberFormatException e){
                                 LoggerFactory.getLogger().warn("parse {}'s value {} to hex fail",key,value,e);
                             }
                             break;
                     }
-                    return formatedVal;
+                    return formattedVal;
                 }
             };
             worker.execute();

+ 2 - 2
zookeeper-docs/src/main/resources/markdown/releasenotes.md

@@ -184,7 +184,7 @@ Version 2.2.1 code, documentation, binaries, etc... are still accessible on [Sou
 |[ZOOKEEPER-189](https://issues.apache.org/jira/browse/ZOOKEEPER-189)|forrest build not validated xml of input documents|
 |[ZOOKEEPER-188](https://issues.apache.org/jira/browse/ZOOKEEPER-188)|Check that election port is present for all servers|
 |[ZOOKEEPER-185](https://issues.apache.org/jira/browse/ZOOKEEPER-185)|Improved version of FLETest|
-|[ZOOKEEPER-184](https://issues.apache.org/jira/browse/ZOOKEEPER-184)|tests: An explicit include derective is needed for the usage of memcpy functions|
+|[ZOOKEEPER-184](https://issues.apache.org/jira/browse/ZOOKEEPER-184)|tests: An explicit include directive is needed for the usage of memcpy functions|
 |[ZOOKEEPER-183](https://issues.apache.org/jira/browse/ZOOKEEPER-183)|Array subscript is above array bounds in od_completion, src/cli.c.|
 |[ZOOKEEPER-182](https://issues.apache.org/jira/browse/ZOOKEEPER-182)|zookeeper_init accepts empty host-port string and returns valid pointer to zhandle_t.|
 |[ZOOKEEPER-17](https://issues.apache.org/jira/browse/ZOOKEEPER-17)|zookeeper_init doc needs clarification|
@@ -228,7 +228,7 @@ Version 2.2.1 code, documentation, binaries, etc... are still accessible on [Sou
 |[ZOOKEEPER-56](https://issues.apache.org/jira/browse/ZOOKEEPER-56)|Add clover support to build.xml.|
 |[ZOOKEEPER-75](https://issues.apache.org/jira/browse/ZOOKEEPER-75)|register the ZooKeeper mailing lists with nabble.com|
 |[ZOOKEEPER-54](https://issues.apache.org/jira/browse/ZOOKEEPER-54)|remove sleeps in the tests.|
-|[ZOOKEEPER-55](https://issues.apache.org/jira/browse/ZOOKEEPER-55)|build.xml failes to retrieve a release number from SVN and the ant target "dist" fails|
+|[ZOOKEEPER-55](https://issues.apache.org/jira/browse/ZOOKEEPER-55)|build.xml fails to retrieve a release number from SVN and the ant target "dist" fails|
 |[ZOOKEEPER-89](https://issues.apache.org/jira/browse/ZOOKEEPER-89)|invoke WhenOwnerListener.whenNotOwner when the ZK connection fails|
 |[ZOOKEEPER-90](https://issues.apache.org/jira/browse/ZOOKEEPER-90)|invoke WhenOwnerListener.whenNotOwner when the ZK session expires and the znode is the leader|
 |[ZOOKEEPER-82](https://issues.apache.org/jira/browse/ZOOKEEPER-82)|Make the ZooKeeperServer more DI friendly.|

+ 1 - 1
zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md

@@ -1211,7 +1211,7 @@ property, when available, is noted below.
     The default value is false.
 
 * *serializeLastProcessedZxid.enabled*
-  (Jave system property: **zookeeper.serializeLastProcessedZxid.enabled**)
+  (Java system property: **zookeeper.serializeLastProcessedZxid.enabled**)
   **New in 3.9.0:**
   If enabled, ZooKeeper serializes the lastProcessedZxid when snapshot and deserializes it
   when restore. Defaults to true. Needs to be enabled for performing snapshot and restore

+ 1 - 1
zookeeper-jute/src/main/java/org/apache/jute/compiler/JFile.java

@@ -81,7 +81,7 @@ public class JFile {
                     outputDirectory);
             gen.genCode();
         } else {
-            throw new IOException("Cannnot recognize language:" + language);
+            throw new IOException("Cannot recognize language:" + language);
         }
     }
 }

+ 2 - 2
zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java

@@ -407,7 +407,7 @@ public class JRecord extends JCompType {
         if (!pkgdir.exists()) {
             // create the pkg directory
             if (!pkgdir.mkdirs()) {
-                throw new IOException("Cannnot create directory: " + pkgpath);
+                throw new IOException("Cannot create directory: " + pkgpath);
             }
         } else if (!pkgdir.isDirectory()) {
             throw new IOException(pkgpath + " is not a directory.");
@@ -580,7 +580,7 @@ public class JRecord extends JCompType {
         if (!outputDirectory.exists()) {
             // create the pkg directory
             if (!outputDirectory.mkdirs()) {
-                throw new IOException("Cannnot create directory: " + outputDirectory);
+                throw new IOException("Cannot create directory: " + outputDirectory);
             }
         } else if (!outputDirectory.isDirectory()) {
             throw new IOException(outputDirectory + " is not a directory.");

+ 1 - 1
zookeeper-jute/src/main/java/org/apache/jute/compiler/package.html

@@ -24,7 +24,7 @@
   This package contains classes needed for code generation
   from the hadoop record compiler. CppGenerator and JavaGenerator
   are the main entry points from the parser. There are classes
-  corrsponding to every primitive type and compound type
+  corresponding to every primitive type and compound type
   included in Hadoop record I/O syntax.
   </body>
 </html>

+ 3 - 3
zookeeper-jute/src/main/java/org/apache/jute/package.html

@@ -29,7 +29,7 @@
   
   Software systems of any significant complexity require mechanisms for data 
 interchange with the outside world. These interchanges typically involve the
-marshaling and unmarshaling of logical units of data to and from data streams
+marshaling and unmarshalling of logical units of data to and from data streams
 (files, network connections, memory buffers etc.). Applications usually have
 some code for serializing and deserializing the data types that they manipulate
 embedded in them. The work of serialization has several features that make
@@ -49,7 +49,7 @@ at
 <ul> 
 <li> enabling the specification of simple serializable data types (records) 
 <li> enabling the generation of code in multiple target languages for
-marshaling and unmarshaling such types
+marshaling and unmarshalling such types
 <li> providing target language specific support that will enable application 
 programmers to incorporate generated code into their applications
 </ul>
@@ -397,7 +397,7 @@ namespace links {
 
 Each field within the record will cause the generation of a private member
 declaration of the appropriate type in the class declaration, and one or more
-acccessor methods. The generated class will implement the serialize and
+accessor methods. The generated class will implement the serialize and
 deserialize methods defined in hadoop::Record+. It will also 
 implement the inspection methods type and signature from
 hadoop::Record. A default constructor and virtual destructor will also

+ 1 - 1
zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java

@@ -437,7 +437,7 @@ public class PrometheusMetricsProvider implements MetricsProvider {
         }
 
         /**
-         * Call the callack and update Prometheus Gauge. This method is called
+         * Call the callback and update Prometheus Gauge. This method is called
          * when the server is polling for a value.
          */
         private void sample() {

+ 1 - 1
zookeeper-recipes/README.txt

@@ -19,7 +19,7 @@ Zookeeper is used (and can be used) for more than what we have listed in the doc
 
 7) To run the c tests in all the recipes, 
 - make sure the main zookeeper c libraries in
-{top}/src/c/ are compiled. Run autoreconf -if;./configure; make. The libaries
+{top}/src/c/ are compiled. Run autoreconf -if;./configure; make. The libraries
 will be installed in {top}/src/c/.libs. 
 - run autoreconf if;./configure;make run-check 
   in zookeeper-recipes/$recipename/src/c

+ 1 - 1
zookeeper-recipes/zookeeper-recipes-lock/README.txt

@@ -19,7 +19,7 @@
 mentioned in ../../docs/recipes.[html,pdf].
 
 2) To compile the lock java recipe you can just run ant jar from 
-this directory. For compiling the c libarary go to zookeeper-client/zookeeper-client-c and read
+this directory. For compiling the c library go to zookeeper-client/zookeeper-client-c and read
 the INSTALLATION instructions. 
 Please report any bugs on the jira 
 

+ 3 - 3
zookeeper-recipes/zookeeper-recipes-lock/src/main/c/acinclude.m4

@@ -10,7 +10,7 @@
 # DX_???_FEATURE(ON|OFF) - control the default setting of a Doxygen feature.
 # Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
 # 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
-# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
+# for generating a separate .chi file by the .chm file, and 'MAN', 'RTF',
 # 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
 # variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
 # paper size.
@@ -239,8 +239,8 @@ DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
              DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
             [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
 
-# Seperate CHI file generation.
-DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
+# Separate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
             [DX_CHECK_DEPEND(chm, 1)],
             [DX_CLEAR_DEPEND(chm, 1)],
             [],

+ 2 - 2
zookeeper-recipes/zookeeper-recipes-lock/src/main/c/include/zoo_lock.h

@@ -27,7 +27,7 @@ extern "C" {
 /**
  * \brief the call back function called on status change of lock
  * 
- * the call back funtion is called with a rc of 0 if lock is acquired and 
+ * the call back function is called with a rc of 0 if lock is acquired and
  * with an rc of 1 if the lock is released
  * \param rc the value to let us know if its locked or unlocked
  * \param cbdata the callback data that we passed when initializing 
@@ -124,7 +124,7 @@ ZOOAPI void zkr_lock_setcallback(zkr_lock_mutex_t *mutex,
 /**
  * \brief get the callback function for zookeeper mutex
  *
- * this method gets the callback funtion for zookeeper mutex
+ * this method gets the callback function for zookeeper mutex
  * \param mutex the zookeeper mutex
  * \return the lock completion function
  */

+ 5 - 5
zookeeper-recipes/zookeeper-recipes-lock/src/main/java/org/apache/zookeeper/recipes/lock/WriteLock.java

@@ -57,7 +57,7 @@ public class WriteLock extends ProtocolSupport {
     private LockZooKeeperOperation zop;
 
     /**
-     * zookeeper contructor for writelock.
+     * zookeeper constructor for writelock.
      *
      * @param zookeeper zookeeper client instance
      * @param dir the parent path you want to use for locking
@@ -73,7 +73,7 @@ public class WriteLock extends ProtocolSupport {
     }
 
     /**
-     * zookeeper contructor for writelock with callback.
+     * zookeeper constructor for writelock with callback.
      *
      * @param zookeeper the zookeeper client instance
      * @param dir the parent path you want to use for locking
@@ -174,10 +174,10 @@ public class WriteLock extends ProtocolSupport {
     private class LockZooKeeperOperation implements ZooKeeperOperation {
 
         /**
-         * find if we have been created earler if not create our node.
+         * find if we have been created earlier if not create our node.
          *
          * @param prefix the prefix node
-         * @param zookeeper teh zookeeper client
+         * @param zookeeper the zookeeper client
          * @param dir the dir paretn
          * @throws KeeperException
          * @throws InterruptedException
@@ -225,7 +225,7 @@ public class WriteLock extends ProtocolSupport {
                     // lets force the recreation of the id
                     id = null;
                 } else {
-                    // lets sort them explicitly (though they do seem to come back in order ususally :)
+                    // lets sort them explicitly (though they do seem to come back in order usually :)
                     SortedSet<ZNodeName> sortedNames = new TreeSet<>();
                     for (String name : names) {
                         sortedNames.add(new ZNodeName(dir + "/" + name));

+ 3 - 3
zookeeper-recipes/zookeeper-recipes-queue/src/main/c/acinclude.m4

@@ -10,7 +10,7 @@
 # DX_???_FEATURE(ON|OFF) - control the default setting of a Doxygen feature.
 # Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
 # 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
-# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
+# for generating a separate .chi file by the .chm file, and 'MAN', 'RTF',
 # 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
 # variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
 # paper size.
@@ -239,8 +239,8 @@ DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
              DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
             [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
 
-# Seperate CHI file generation.
-DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
+# Separate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
             [DX_CHECK_DEPEND(chm, 1)],
             [DX_CLEAR_DEPEND(chm, 1)],
             [],

+ 1 - 1
zookeeper-recipes/zookeeper-recipes-queue/src/main/c/src/zoo_queue.c

@@ -249,7 +249,7 @@ ZOOAPI int zkr_queue_remove(zkr_queue_t *queue, char *buffer, int *buffer_len){
  *
  * Whichever thread is last to call their required function disposes of the latch.
  *
- * The latch may disposed if no threads will call the waiting, marking, or triggering functions using take_latch_destroy_syncrhonized().
+ * The latch may disposed if no threads will call the waiting, marking, or triggering functions using take_latch_destroy_synchronized().
  */
 
 struct take_latch {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNIO.java

@@ -154,12 +154,12 @@ public class ClientCnxnSocketNIO extends ClientCnxnSocket {
         }
     }
 
-    private Packet findSendablePacket(LinkedBlockingDeque<Packet> outgoingQueue, boolean tunneledAuthInProgres) {
+    private Packet findSendablePacket(LinkedBlockingDeque<Packet> outgoingQueue, boolean tunneledAuthInProgress) {
         if (outgoingQueue.isEmpty()) {
             return null;
         }
         // If we've already starting sending the first packet, we better finish
-        if (outgoingQueue.getFirst().bb != null || !tunneledAuthInProgres) {
+        if (outgoingQueue.getFirst().bb != null || !tunneledAuthInProgress) {
             return outgoingQueue.getFirst();
         }
         // Since client's authentication with server is in progress,

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java

@@ -356,7 +356,7 @@ public abstract class KeeperException extends Exception {
         OPERATIONTIMEOUT(OperationTimeout),
         /** Invalid arguments */
         BADARGUMENTS(BadArguments),
-        /** No quorum of new config is connected and up-to-date with the leader of last commmitted config - try
+        /** No quorum of new config is connected and up-to-date with the leader of last committed config - try
          *  invoking reconfiguration after new servers are connected and synced */
         NEWCONFIGNOQUORUM(NewConfigNoQuorum),
         /** Another reconfiguration is in progress -- concurrent reconfigs not supported (yet) */

+ 3 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java

@@ -1357,7 +1357,7 @@ public class ZooKeeper implements AutoCloseable {
      * of the node by getChildren calls.
      * <p>
      * The maximum allowable size of the data array is 1 MB (1,048,576 bytes).
-     * Arrays larger than this will cause a KeeperExecption to be thrown.
+     * Arrays larger than this will cause a KeeperException to be thrown.
      *
      * @param path
      *                the path for the node
@@ -1439,7 +1439,7 @@ public class ZooKeeper implements AutoCloseable {
      * of the node by getChildren calls.
      * <p>
      * The maximum allowable size of the data array is 1 MB (1,048,576 bytes).
-     * Arrays larger than this will cause a KeeperExecption to be thrown.
+     * Arrays larger than this will cause a KeeperException to be thrown.
      *
      * @param path
      *                the path for the node
@@ -2319,7 +2319,7 @@ public class ZooKeeper implements AutoCloseable {
      * @return the stat of the node.
      * @throws InterruptedException If the server transaction is interrupted.
      * @throws KeeperException If the server signals an error with a non-zero error code.
-     * @throws org.apache.zookeeper.KeeperException.InvalidACLException If the acl is invalide.
+     * @throws org.apache.zookeeper.KeeperException.InvalidACLException If the acl is invalid.
      * @throws IllegalArgumentException if an invalid path is specified
      */
     public Stat setACL(final String path, List<ACL> acl, int aclVersion) throws KeeperException, InterruptedException {

+ 4 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java

@@ -311,15 +311,15 @@ public class ZooKeeperMain {
             // only use jline if it's in the classpath
             try {
                 Class<?> consoleC = Class.forName("jline.console.ConsoleReader");
-                Class<?> completorC = Class.forName("org.apache.zookeeper.JLineZNodeCompleter");
+                Class<?> completerC = Class.forName("org.apache.zookeeper.JLineZNodeCompleter");
 
                 System.out.println("JLine support is enabled");
 
                 Object console = consoleC.getConstructor().newInstance();
 
-                Object completor = completorC.getConstructor(ZooKeeper.class).newInstance(zk);
-                Method addCompletor = consoleC.getMethod("addCompleter", Class.forName("jline.console.completer.Completer"));
-                addCompletor.invoke(console, completor);
+                Object completer = completerC.getConstructor(ZooKeeper.class).newInstance(zk);
+                Method addCompleter = consoleC.getMethod("addCompleter", Class.forName("jline.console.completer.Completer"));
+                addCompleter.invoke(console, completer);
 
                 String line;
                 Method readLine = consoleC.getMethod("readLine", String.class);

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliWrapperException.java

@@ -52,7 +52,7 @@ public class CliWrapperException extends CliException {
                 return "Another reconfiguration is in progress -- concurrent " + "reconfigs not supported (yet)";
             } else if (keeperException instanceof KeeperException.NewConfigNoQuorum) {
                 return "No quorum of new config is connected and "
-                       + "up-to-date with the leader of last commmitted config - try invoking reconfiguration after "
+                       + "up-to-date with the leader of last committed config - try invoking reconfiguration after "
                        + "new servers are connected and synced";
             } else if (keeperException instanceof KeeperException.QuotaExceededException) {
                 return "Quota has exceeded : " + keeperException.getPath();

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java

@@ -44,7 +44,7 @@ public final class ConnectStringParser {
     private final ArrayList<InetSocketAddress> serverAddresses = new ArrayList<>();
 
     /**
-     * Parse host and port by spliting client connectString
+     * Parse host and port by splitting client connectString
      * with support for IPv6 literals
      * @throws IllegalArgumentException
      *             for an invalid chroot path.

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/common/IOUtils.java

@@ -70,7 +70,7 @@ public class IOUtils {
      * Copies from one stream to another.
      *
      * @param in
-     *            InputStrem to read from
+     *            InputStream to read from
      * @param out
      *            OutputStream to write to
      * @param buffSize
@@ -100,7 +100,7 @@ public class IOUtils {
      * Copies from one stream to another.
      *
      * @param in
-     *            InputStrem to read from
+     *            InputStream to read from
      * @param out
      *            OutputStream to write to
      * @param buffSize

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/metrics/Summary.java

@@ -20,7 +20,7 @@ package org.apache.zookeeper.metrics;
 
 /**
  * Summaries track the size and number of events.
- * They are able to publish minumum, maximum, average values, depending on the capabilities of the MetricsProvider.
+ * They are able to publish minimum, maximum, average values, depending on the capabilities of the MetricsProvider.
  */
 public interface Summary {
 

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/metrics/SummarySet.java

@@ -20,7 +20,7 @@ package org.apache.zookeeper.metrics;
 
 /**
  * Summaries track the size and number of events.
- * They are able to publish minumum, maximum, average values, depending on the capabilities of the MetricsProvider.
+ * They are able to publish minimum, maximum, average values, depending on the capabilities of the MetricsProvider.
  * A SummarySet is a set of {@link Summary}.
  */
 public interface SummarySet {

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/BlueThrottle.java

@@ -204,7 +204,7 @@ public class BlueThrottle {
         logWeighedThrottlingSetting();
     }
 
-    /* Varation of Integer.getInteger for real number properties */
+    /* Variation of Integer.getInteger for real number properties */
     private static double getDoubleProp(String name, double def) {
         String val = System.getProperty(name);
         if (val != null) {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ConnectionMXBean.java

@@ -48,7 +48,7 @@ public interface ConnectionMXBean {
      */
     long getPacketsSent();
     /**
-     * @return number of requets being processed
+     * @return number of requests being processed
      */
     long getOutstandingRequests();
     /**
@@ -62,7 +62,7 @@ public interface ConnectionMXBean {
      */
     void terminateSession();
     /**
-     * Terminate thei client connection. The client will immediately attempt to
+     * Terminate the client connection. The client will immediately attempt to
      * reconnect with the same session id.
      */
     void terminateConnection();

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ContainerManager.java

@@ -52,7 +52,7 @@ public class ContainerManager {
 
     /**
      * @param zkDb the ZK database
-     * @param requestProcessor request processer - used to inject delete
+     * @param requestProcessor request processor - used to inject delete
      *                         container requests
      * @param checkIntervalMs how often to check containers in milliseconds
      * @param maxPerMinute the max containers to delete per second - avoids
@@ -64,7 +64,7 @@ public class ContainerManager {
 
     /**
      * @param zkDb the ZK database
-     * @param requestProcessor request processer - used to inject delete
+     * @param requestProcessor request processor - used to inject delete
      *                         container requests
      * @param checkIntervalMs how often to check containers in milliseconds
      * @param maxPerMinute the max containers to delete per second - avoids

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/ExpiryQueue.java

@@ -77,7 +77,7 @@ public class ExpiryQueue<E> {
      * Adds or updates expiration time for element in queue, rounding the
      * timeout to the expiry interval bucketed used by this queue.
      * @param elem     element to add/update
-     * @param timeout  timout in milliseconds
+     * @param timeout  timeout in milliseconds
      * @return time at which the element is now set to expire if
      *                 changed, or null if unchanged
      */

+ 4 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxnFactory.java

@@ -192,7 +192,7 @@ public class NIOServerCnxnFactory extends ServerCnxnFactory {
                 if (!reconfiguring) {
                     NIOServerCnxnFactory.this.stop();
                 }
-                LOG.info("accept thread exitted run method");
+                LOG.info("accept thread exited run method");
             }
         }
 
@@ -394,7 +394,7 @@ public class NIOServerCnxnFactory extends ServerCnxnFactory {
                 // This will wake up the accept thread and the other selector
                 // threads, and tell the worker thread pool to begin shutdown.
                 NIOServerCnxnFactory.this.stop();
-                LOG.info("selector thread exitted run method");
+                LOG.info("selector thread exited run method");
             }
         }
 
@@ -543,7 +543,7 @@ public class NIOServerCnxnFactory extends ServerCnxnFactory {
     private class ConnectionExpirerThread extends ZooKeeperThread {
 
         ConnectionExpirerThread() {
-            super("ConnnectionExpirer");
+            super("ConnectionExpirer");
         }
 
         public void run() {
@@ -561,7 +561,7 @@ public class NIOServerCnxnFactory extends ServerCnxnFactory {
                 }
 
             } catch (InterruptedException e) {
-                LOG.info("ConnnectionExpirerThread interrupted");
+                LOG.info("ConnectionExpirerThread interrupted");
             }
         }
 

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java

@@ -976,7 +976,7 @@ public class PrepRequestProcessor extends ZooKeeperCriticalThread implements Req
     /**
      * This method checks out the acl making sure it isn't null or empty,
      * it has valid schemes and ids, and expanding any relative ids that
-     * depend on the requestor's authentication information.
+     * depend on the requester's authentication information.
      *
      * @param authInfo list of ACL IDs associated with the client connection
      * @param acls list of ACLs being assigned to the node (create or setACL operation)
@@ -1004,7 +1004,7 @@ public class PrepRequestProcessor extends ZooKeeperCriticalThread implements Req
                 rv.add(a);
             } else if (id.getScheme().equals("auth")) {
                 // This is the "auth" id, so we have to expand it to the
-                // authenticated ids of the requestor
+                // authenticated ids of the requester
                 boolean authIdValid = false;
                 for (Id cid : authInfo) {
                     ServerAuthenticationProvider ap = ProviderRegistry.getServerProvider(cid.getScheme());

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/ReferenceCountedACLCache.java

@@ -110,7 +110,7 @@ public class ReferenceCountedACLCache {
             List<ACL> aclList = new ArrayList<>();
             Index j = ia.startVector("acls");
             if (j == null) {
-                throw new RuntimeException("Incorrent format of InputArchive when deserialize DataTree - missing acls");
+                throw new RuntimeException("Incorrect format of InputArchive when deserialize DataTree - missing acls");
             }
             while (!j.done()) {
                 ACL acl = new ACL();

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/RequestThrottler.java

@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
  * the connection layer always allows a connection to send at least one request
  * before disabling selection on that connection. Thus, in a scenario with 40000
  * client connections, the total number of requests inflight may be as high as
- * 40000 even if the <code>globalOustandingLimit</code> was set lower.
+ * 40000 even if the <code>globalOutstandingLimit</code> was set lower.
  *
  * The RequestThrottler addresses this issue by adding additional queueing. When
  * enabled, client connections no longer submit requests directly to the request

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxnFactory.java

@@ -130,7 +130,7 @@ public abstract class ServerCnxnFactory {
         startup(zkServer, true);
     }
 
-    // This method is to maintain compatiblity of startup(zks) and enable sharing of zks
+    // This method is to maintain compatibility of startup(zks) and enable sharing of zks
     // when we add secureCnxnFactory.
     public abstract void startup(ZooKeeperServer zkServer, boolean startServer) throws IOException, InterruptedException;
 

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java

@@ -258,7 +258,7 @@ public class SyncRequestProcessor extends ZooKeeperCriticalThread implements Req
             this.join();
             this.flush();
         } catch (InterruptedException e) {
-            LOG.warn("Interrupted while wating for {} to finish", this);
+            LOG.warn("Interrupted while waiting for {} to finish", this);
             Thread.currentThread().interrupt();
         } catch (IOException e) {
             LOG.warn("Got IO exception during shutdown");

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java

@@ -468,7 +468,7 @@ public class ZKDatabase {
     }
 
     /**
-     * the process txn on the data and perform digest comparision.
+     * the process txn on the data and perform digest comparison.
      * @param hdr the txnheader for the txn
      * @param txn the transaction that needs to be processed
      * @param digest the expected digest. A null value would skip the check
@@ -666,7 +666,7 @@ public class ZKDatabase {
     /**
      * append to the underlying transaction log
      * @param si the request to append
-     * @return true if the append was succesfull and false if not
+     * @return true if the append was successful and false if not
      */
     public boolean append(Request si) throws IOException {
         if (this.snapLog.append(si)) {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java

@@ -259,7 +259,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
     private static volatile int maxBatchSize;
 
     /**
-     * Starting size of read and write ByteArroyOuputBuffers. Default is 32 bytes.
+     * Starting size of read and write ByteArrayOutputBuffers. Default is 32 bytes.
      * Flag not used for small transfers like connectResponses.
      */
     public static final String INT_BUFFER_STARTING_SIZE_BYTES = "zookeeper.intBufferStartingSizeBytes";
@@ -1829,7 +1829,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
                     int error;
                     if (authHelper.isSaslAuthRequired()) {
                         LOG.warn(
-                            "Closing client connection due to server requires client SASL authenticaiton,"
+                            "Closing client connection due to server requires client SASL authentication,"
                                 + "but client SASL authentication has failed, or client is not configured with SASL "
                                 + "authentication.");
                         error = Code.SESSIONCLOSEDREQUIRESASLAUTH.intValue();

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ExitHandler.java

@@ -21,7 +21,7 @@ package org.apache.zookeeper.server.embedded;
 /**
  * Behaviour of the server in case of internal error.
  * When you are running tests you will use {@link #LOG_ONLY},
- * but please take care of using {@link #EXIT} when runnning in production.
+ * but please take care of using {@link #EXIT} when running in production.
  */
 public enum ExitHandler {
     /**

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ZooKeeperServerEmbedded.java

@@ -51,7 +51,7 @@ public interface ZooKeeperServerEmbedded extends AutoCloseable {
         /**
          * Base directory of the server.
          * The system will create a temporary configuration file inside this directory.
-         * Please remember that dynamic configuration files wil be saved into this directory by default.
+         * Please remember that dynamic configuration files will be saved into this directory by default.
          * <p>
          * If you do not set a 'dataDir' configuration entry the system will use a subdirectory of baseDir.
          * @param baseDir

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/embedded/ZooKeeperServerEmbeddedImpl.java

@@ -128,7 +128,7 @@ class ZooKeeperServerEmbeddedImpl implements ZooKeeperServerEmbedded {
                     try {
                         maincluster.runFromConfig(config);
                         maincluster.close();
-                        LOG.info("ZK server died. Requsting stop on JVM");
+                        LOG.info("ZK server died. Requesting stop on JVM");
                         if (!stopping) {
                             ServiceUtils.requestSystemExit(ExitCode.EXECUTION_FINISHED.getValue());
                         }

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java

@@ -182,7 +182,7 @@ public class SnapStream {
     /**
      * Verifies that the file is a valid snapshot. Snapshot may be invalid if
      * it's incomplete as in a situation when the server dies while in the
-     * process of storing a snapshot. Any files that are improperly formated
+     * process of storing a snapshot. Any files that are improperly formatted
      * or corrupted are invalid. Any file that is not a snapshot is also an
      * invalid snapshot.
      *

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FastLeaderElection.java

@@ -1074,7 +1074,7 @@ public class FastLeaderElection implements Election {
                         * In ZOOKEEPER-3922, we separate the behaviors of FOLLOWING and LEADING.
                         * To avoid the duplication of codes, we create a method called followingBehavior which was used to
                         * shared by FOLLOWING and LEADING. This method returns a Vote. When the returned Vote is null, it follows
-                        * the original idea to break swtich statement; otherwise, a valid returned Vote indicates, a leader
+                        * the original idea to break switch statement; otherwise, a valid returned Vote indicates, a leader
                         * is generated.
                         *
                         * The reason why we need to separate these behaviors is to make the algorithm runnable for 2-node

+ 4 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java

@@ -873,7 +873,7 @@ public class Leader extends LearnerMaster {
             closeSockets();
         }
 
-        // NIO should not accept conenctions
+        // NIO should not accept connections
         self.setZooKeeperServer(null);
         self.adminServer.setZooKeeperServer(null);
         self.closeAllConnections();
@@ -904,8 +904,8 @@ public class Leader extends LearnerMaster {
     }
 
     /** In a reconfig operation, this method attempts to find the best leader for next configuration.
-     *  If the current leader is a voter in the next configuartion, then it remains the leader.
-     *  Otherwise, choose one of the new voters that acked the reconfiguartion, such that it is as
+     *  If the current leader is a voter in the next configuration, then it remains the leader.
+     *  Otherwise, choose one of the new voters that acked the reconfiguration, such that it is as
      * up-to-date as possible, i.e., acked as many outstanding proposals as possible.
      *
      * @param reconfigProposal
@@ -982,7 +982,7 @@ public class Leader extends LearnerMaster {
         // commit proposals in order
         if (zxid != lastCommitted + 1) {
             LOG.warn(
-                "Commiting zxid 0x{} from {} not first!",
+                "Committing zxid 0x{} from {} not first!",
                 Long.toHexString(zxid),
                 followerAddr);
             LOG.warn("First is 0x{}", Long.toHexString(lastCommitted + 1));

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java

@@ -295,7 +295,7 @@ public class Learner {
 
     /**
      * Overridable helper method to simply call sock.connect(). This can be
-     * overriden in tests to fake connection success/failure for connectToLeader.
+     * overridden in tests to fake connection success/failure for connectToLeader.
      */
     protected void sockConnect(Socket sock, InetSocketAddress addr, int timeout) throws IOException {
         sock.connect(addr, timeout);

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java

@@ -82,7 +82,7 @@ public class ObserverZooKeeperServer extends LearnerZooKeeperServer {
 
     /**
      * Set up the request processors for an Observer:
-     * firstProcesor-&gt;commitProcessor-&gt;finalProcessor
+     * firstProcessor-&gt;commitProcessor-&gt;finalProcessor
      */
     @Override
     protected void setupRequestProcessors() {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java

@@ -862,7 +862,7 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
      * This class simply responds to requests for the current leader of this
      * node.
      * <p>
-     * The request contains just an xid generated by the requestor.
+     * The request contains just an xid generated by the requester.
      * <p>
      * The response has the xid, the id of this server, the id of the leader,
      * and the zxid of the leader.
@@ -1036,7 +1036,7 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
     /**
      * Resolves hostname for a given server ID.
      *
-     * This method resolves hostname for a given server ID in both quorumVerifer
+     * This method resolves hostname for a given server ID in both quorumVerifier
      * and lastSeenQuorumVerifier. If the server ID matches the local server ID,
      * it also updates myAddrs.
      */

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/util/OSMXBean.java

@@ -84,7 +84,7 @@ public class OSMXBean {
                 return (Long) mBeanMethod.invoke(unixos);
             }
         } catch (Exception e) {
-            LOG.warn("Not able to load class or method for com.sun.managment.UnixOperatingSystemMXBean.", e);
+            LOG.warn("Not able to load class or method for com.sun.management.UnixOperatingSystemMXBean.", e);
         }
         return null;
     }

+ 3 - 3
zookeeper-server/src/main/java/org/apache/zookeeper/server/util/RequestPathMetricsCollector.java

@@ -83,7 +83,7 @@ public class RequestPathMetricsCollector {
     public static final String PATH_STATS_COLLECTOR_DELAY = "zookeeper.pathStats.delay";
     public static final String PATH_STATS_TOP_PATH_MAX = "zookeeper.pathStats.topPathMax";
     public static final String PATH_STATS_ENABLED = "zookeeper.pathStats.enabled";
-    private static final String PATH_SEPERATOR = "/";
+    private static final String PATH_SEPARATOR = "/";
 
     private final Map<String, PathStatsQueue> immutableRequestsMap;
     private final ScheduledThreadPoolExecutor scheduledExecutor;
@@ -155,9 +155,9 @@ public class RequestPathMetricsCollector {
     static String trimPathDepth(String path, int maxDepth) {
         int count = 0;
         StringBuilder sb = new StringBuilder();
-        StringTokenizer pathTokenizer = new StringTokenizer(path, PATH_SEPERATOR);
+        StringTokenizer pathTokenizer = new StringTokenizer(path, PATH_SEPARATOR);
         while (pathTokenizer.hasMoreElements() && count++ < maxDepth) {
-            sb.append(PATH_SEPERATOR);
+            sb.append(PATH_SEPARATOR);
             sb.append(pathTokenizer.nextToken());
         }
         path = sb.toString();

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/WatchManager.java

@@ -137,7 +137,7 @@ public class WatchManager implements IWatchManager {
     }
 
     @Override
-    public WatcherOrBitSet triggerWatch(String path, EventType type, long zxid, List<ACL> acl, WatcherOrBitSet supress) {
+    public WatcherOrBitSet triggerWatch(String path, EventType type, long zxid, List<ACL> acl, WatcherOrBitSet suppress) {
         WatchedEvent e = new WatchedEvent(type, KeeperState.SyncConnected, path, zxid);
         Set<Watcher> watchers = new HashSet<>();
         synchronized (this) {
@@ -182,7 +182,7 @@ public class WatchManager implements IWatchManager {
         }
 
         for (Watcher w : watchers) {
-            if (supress != null && supress.contains(w)) {
+            if (suppress != null && suppress.contains(w)) {
                 continue;
             }
             if (w instanceof ServerWatcher) {

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/ClientCnxnSocketFragilityTest.java

@@ -316,7 +316,7 @@ public class ClientCnxnSocketFragilityTest extends QuorumPeerTestBase {
         @Override
         protected void onConnecting(InetSocketAddress addr) {
             if (closing) {
-                LOG.info("Attempt to connnecting {} {} {}", addr, closing, state);
+                LOG.info("Attempt to connecting {} {} {}", addr, closing, state);
                 ///////// Unsafe Region ////////
                 // Slow down and zoom out the unsafe point to make risk
                 // The unsafe point is that startConnect happens after sendThread.close

+ 2 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/GetAllChildrenNumberTest.java

@@ -91,12 +91,12 @@ public class GetAllChildrenNumberTest extends ClientBase {
         }
     }
 
-    private void generatePaths(int persistantCnt, int ephemeralCnt) throws KeeperException, InterruptedException {
+    private void generatePaths(int persistentCnt, int ephemeralCnt) throws KeeperException, InterruptedException {
 
         zk.create(BASE, BASE.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create(BASE_EXT, BASE_EXT.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
-        for (int p = 0; p < persistantCnt; p++) {
+        for (int p = 0; p < persistentCnt; p++) {
             String base = BASE + "/" + p;
             zk.create(base, base.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
             for (int e = 0; e < ephemeralCnt; e++) {

+ 3 - 3
zookeeper-server/src/test/java/org/apache/zookeeper/GetEphemeralsTest.java

@@ -174,10 +174,10 @@ public class GetEphemeralsTest extends ClientBase {
         }
     }
 
-    private String[] generatePaths(int persistantCnt, int ephemeralCnt) throws KeeperException, InterruptedException {
+    private String[] generatePaths(int persistentCnt, int ephemeralCnt) throws KeeperException, InterruptedException {
 
-        final String[] expected = new String[persistantCnt * ephemeralCnt];
-        for (int p = 0; p < persistantCnt; p++) {
+        final String[] expected = new String[persistentCnt * ephemeralCnt];
+        for (int p = 0; p < persistentCnt; p++) {
             String base = BASE + p;
             zk.create(base, base.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
             for (int e = 0; e < ephemeralCnt; e++) {

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/JaasConfiguration.java

@@ -31,7 +31,7 @@ import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
  * Example:
  *   jaas = new JaasConfiguration();
  *   jaas.addSection("Server", "org.apache.zookeeper.server.auth.DigestLoginModule",
- *                   "username", "passowrd");
+ *                   "username", "password");
  */
 public class JaasConfiguration extends javax.security.auth.login.Configuration {
 

+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/PortAssignment.java

@@ -107,7 +107,7 @@ public final class PortAssignment {
      * uses these 2 pieces of information to split the available ports into
      * disjoint ranges.  Each JUnit process only assigns ports from its own range
      * in order to prevent bind errors during concurrent test runs.  If any of
-     * this information is unavailable or unparseable, then the default behavior
+     * this information is unavailable or unparsable, then the default behavior
      * is for this process to use the entire available port range.  This is
      * expected when running tests outside of Ant.
      *

+ 5 - 5
zookeeper-server/src/test/java/org/apache/zookeeper/ZooKeeperTest.java

@@ -292,7 +292,7 @@ public class ZooKeeperTest extends ClientBase {
     }
 
     @Test
-    public void testNonexistantCommand() throws Exception {
+    public void testNonexistentCommand() throws Exception {
         testInvalidCommand("cret -s /node1", 127);
     }
 
@@ -363,7 +363,7 @@ public class ZooKeeperTest extends ClientBase {
     }
 
     @Test
-    public void testACLWithExtraAgruments() throws Exception {
+    public void testACLWithExtraArguments() throws Exception {
         final ZooKeeper zk = createClient();
         ZooKeeperMain zkMain = new ZooKeeperMain(zk);
         // create persistent sequential node
@@ -397,7 +397,7 @@ public class ZooKeeperTest extends ClientBase {
     }
 
     @Test
-    public void testDeleteNonexistantNode() throws Exception {
+    public void testDeleteNonexistentNode() throws Exception {
         testInvalidCommand("delete /blahblahblah", 1);
     }
 
@@ -614,7 +614,7 @@ public class ZooKeeperTest extends ClientBase {
     }
 
     @Test
-    public void testLsrNonexistantZnodeCommand() throws Exception {
+    public void testLsrNonexistentZnodeCommand() throws Exception {
         final ZooKeeper zk = createClient();
         ZooKeeperMain zkMain = new ZooKeeperMain(zk);
 
@@ -678,7 +678,7 @@ public class ZooKeeperTest extends ClientBase {
                 aHostProvider,
                 clientConfig);
             watcher.waitForConnected(CONNECTION_TIMEOUT);
-            assertEquals(zk.getSessionId(), newZKClient.getSessionId(), "Old client session id and new clinet session id must be same");
+            assertEquals(zk.getSessionId(), newZKClient.getSessionId(), "Old client session id and new client session id must be same");
         } finally {
             zk.close();
             newZKClient.close();

Some files were not shown because too many files changed in this diff