From 3e3e8c6d4854e2d31694cc01286999b0782570a9 Mon Sep 17 00:00:00 2001 From: tony mancill Date: Mon, 5 Jun 2017 22:09:51 -0700 Subject: [PATCH 1/2] ZOOKEEPER-2801: address spelling errors/typos --- docs/bookkeeperProgrammer.html | 6 +++--- docs/index.html | 4 ++-- docs/javaExample.html | 10 +++++----- docs/recipes.html | 2 +- docs/releasenotes.html | 4 ++-- docs/skin/prototype.js | 2 +- docs/zookeeperAdmin.html | 4 ++-- docs/zookeeperInternals.html | 4 ++-- docs/zookeeperJMX.html | 2 +- docs/zookeeperProgrammers.html | 8 ++++---- docs/zookeeperTutorial.html | 2 +- src/c/ChangeLog | 2 +- src/c/acinclude.m4 | 6 +++--- src/c/include/zookeeper.h | 6 +++--- src/c/src/hashtable/hashtable.c | 2 +- src/c/src/mt_adaptor.c | 2 +- src/c/src/zk_hashtable.h | 2 +- src/c/src/zookeeper.c | 6 +++--- src/c/tests/TestClient.cc | 4 ++-- src/c/tests/ThreadingUtil.h | 2 +- src/contrib/loggraph/README.txt | 4 ++-- .../apache/zookeeper/graph/RandomAccessFileReader.java | 2 +- .../org/apache/zookeeper/graph/resources/loggraph.js | 2 +- .../org/apache/zookeeper/graph/resources/raphael.js | 6 +++--- src/contrib/monitoring/cacti/README | 2 +- src/contrib/monitoring/check_zookeeper.py | 2 +- src/contrib/monitoring/nagios/README.txt | 2 +- src/contrib/rest/SPEC.txt | 4 ++-- src/contrib/rest/conf/rest.properties | 2 +- src/contrib/zkfuse/src/blockingqueue.h | 2 +- src/contrib/zkfuse/src/thread.h | 2 +- src/contrib/zkfuse/src/zkadapter.h | 4 ++-- src/contrib/zkfuse/src/zkfuse.cc | 6 +++--- src/contrib/zkpython/src/test/close_deadlock_test.py | 2 +- src/contrib/zkpython/src/test/create_test.py | 2 +- src/contrib/zktreeutil/README.txt | 2 +- src/contrib/zktreeutil/src/ZkAdaptor.h | 2 +- src/contrib/zktreeutil/src/ZkTreeUtil.h | 2 +- .../gui/ZooInspectorConnectionPropertiesDialog.java | 2 +- src/docs/src/documentation/TODO.txt | 4 ++-- src/docs/src/documentation/content/xdocs/index.xml | 4 ++-- .../src/documentation/content/xdocs/javaExample.xml | 10 +++++----- src/docs/src/documentation/content/xdocs/recipes.xml | 2 +- .../src/documentation/content/xdocs/zookeeperAdmin.xml | 6 +++--- .../documentation/content/xdocs/zookeeperInternals.xml | 4 ++-- .../src/documentation/content/xdocs/zookeeperJMX.xml | 2 +- .../content/xdocs/zookeeperProgrammers.xml | 8 ++++---- .../documentation/content/xdocs/zookeeperQuotas.xml | 2 +- .../documentation/content/xdocs/zookeeperTutorial.xml | 2 +- src/java/lib/jdiff/zookeeper_3.1.1.xml | 4 ++-- src/java/main/org/apache/jute/package.html | 2 +- .../org/apache/zookeeper/ClientCnxnSocketNetty.java | 2 +- src/java/main/org/apache/zookeeper/StatsTrack.java | 4 ++-- src/java/main/org/apache/zookeeper/ZooKeeperMain.java | 2 +- .../main/org/apache/zookeeper/cli/DelQuotaCommand.java | 4 ++-- .../main/org/apache/zookeeper/cli/ReconfigCommand.java | 2 +- .../main/org/apache/zookeeper/common/PathUtils.java | 2 +- .../main/org/apache/zookeeper/server/DataNode.java | 2 +- .../main/org/apache/zookeeper/server/DataTree.java | 6 +++--- .../main/org/apache/zookeeper/server/ExpiryQueue.java | 2 +- .../org/apache/zookeeper/server/NIOServerCnxn.java | 2 +- .../org/apache/zookeeper/server/ServerCnxnFactory.java | 2 +- .../main/org/apache/zookeeper/server/WatchManager.java | 4 ++-- .../main/org/apache/zookeeper/server/ZKDatabase.java | 2 +- .../org/apache/zookeeper/server/ZooKeeperServer.java | 4 ++-- .../server/command/AbstractFourLetterCommand.java | 2 +- .../zookeeper/server/persistence/FileTxnLog.java | 4 ++-- .../zookeeper/server/persistence/FileTxnSnapLog.java | 2 +- .../apache/zookeeper/server/persistence/TxnLog.java | 2 +- .../org/apache/zookeeper/server/persistence/Util.java | 4 ++-- .../org/apache/zookeeper/server/quorum/Leader.java | 4 ++-- .../org/apache/zookeeper/server/quorum/Learner.java | 2 +- .../apache/zookeeper/server/quorum/LearnerHandler.java | 2 +- .../org/apache/zookeeper/server/quorum/QuorumPeer.java | 4 ++-- .../zookeeper/server/quorum/QuorumPeerConfig.java | 2 +- .../apache/zookeeper/server/quorum/QuorumPeerMain.java | 2 +- .../server/quorum/flexible/QuorumHierarchical.java | 4 ++-- src/java/test/bin/test-scripts.sh | 2 +- .../test/org/apache/zookeeper/JaasConfiguration.java | 4 ++-- .../test/org/apache/zookeeper/server/PurgeTxnTest.java | 2 +- .../org/apache/zookeeper/server/ZxidRolloverTest.java | 2 +- .../server/quorum/CommitProcessorConcurrencyTest.java | 2 +- .../zookeeper/server/quorum/QuorumPeerTestBase.java | 2 +- .../zookeeper/server/quorum/RaceConditionTest.java | 2 +- .../server/quorum/ReconfigDuringLeaderSyncTest.java | 2 +- .../apache/zookeeper/server/quorum/WatchLeakTest.java | 2 +- .../zookeeper/test/FollowerResyncConcurrencyTest.java | 4 ++-- .../org/apache/zookeeper/test/LoadFromLogTest.java | 2 +- .../apache/zookeeper/test/MultiTransactionTest.java | 4 ++-- .../test/org/apache/zookeeper/test/QuorumUtil.java | 4 ++-- .../test/org/apache/zookeeper/test/QuorumUtilTest.java | 2 +- .../apache/zookeeper/test/SessionInvalidationTest.java | 2 +- .../test/org/apache/zookeeper/test/SledgeHammer.java | 6 +++--- .../test/org/apache/zookeeper/test/TruncateTest.java | 4 ++-- src/recipes/README.txt | 2 +- src/recipes/lock/src/c/acinclude.m4 | 6 +++--- src/recipes/lock/src/c/include/zoo_lock.h | 6 +++--- .../org/apache/zookeeper/recipes/lock/WriteLock.java | 6 +++--- src/recipes/queue/src/c/acinclude.m4 | 6 +++--- 99 files changed, 165 insertions(+), 165 deletions(-) diff --git a/docs/bookkeeperProgrammer.html b/docs/bookkeeperProgrammer.html index acb0b2b36f3..b2d885eb0d7 100644 --- a/docs/bookkeeperProgrammer.html +++ b/docs/bookkeeperProgrammer.html @@ -603,7 +603,7 @@

Adding entries to a ledger.

- It also takes a byte array as the sequence of bytes to be stored as an entry. Additionaly, it takes + It also takes a byte array as the sequence of bytes to be stored as an entry. Additionally, it takes a callback object cb and a control object ctx. The callback object must implement the AddCallback interface in org.apache.bookkeeper.client.AsyncCallback, and a class implementing it has to implement a method called addComplete @@ -808,7 +808,7 @@

Opening a ledger.

- It also takes a a ledger identifier and a password. Additionaly, it takes a callback object + It also takes a ledger identifier and a password. Additionally, it takes a callback object cb and a control object ctx. The callback object must implement the OpenCallback interface in org.apache.bookkeeper.client.AsyncCallback, and a class implementing it has to implement a method called openComplete @@ -912,7 +912,7 @@

Reading from ledger

- It also takes a first and a last entry identifiers. Additionaly, it takes a callback object + It also takes a first and a last entry identifiers. Additionally, it takes a callback object cb and a control object ctx. The callback object must implement the ReadCallback interface in org.apache.bookkeeper.client.AsyncCallback, and a class implementing it has to implement a method called readComplete diff --git a/docs/index.html b/docs/index.html index 5fac4e94551..9ca3787a411 100644 --- a/docs/index.html +++ b/docs/index.html @@ -218,7 +218,7 @@

ZooKeeper: Because Coordinating Distributed Systems is a Zoo

  • ZooKeeper Overview -

    Technical Overview Documents for Client Developers, Adminstrators, and Contributors

    +

    Technical Overview Documents for Client Developers, Administrators, and Contributors

    -Of these two requirements only the first, the highest zxid amoung the followers +Of these two requirements only the first, the highest zxid among the followers needs to hold for correct operation. The second requirement, a quorum of followers, just needs to hold with high probability. We are going to recheck the second requirement, so if a failure happens during or after the leader election and quorum is lost, @@ -606,7 +606,7 @@

    Summary

    committed in order; there is only one active leader at a time since followers only follow a single leader at a time; a new leader has seen all committed proposals from the previous epoch since it has seen the highest zxid from a quorum of servers; -any uncommited proposals from a previous epoch seen by a new leader will be committed +any uncommitted proposals from a previous epoch seen by a new leader will be committed by that leader before it becomes active.

    Comparisons

    diff --git a/docs/zookeeperJMX.html b/docs/zookeeperJMX.html index 258010d94e2..568e85cdcc4 100644 --- a/docs/zookeeperJMX.html +++ b/docs/zookeeperJMX.html @@ -239,7 +239,7 @@

    Starting ZooKeeper with JMX enabled

    The class org.apache.zookeeper.server.quorum.QuorumPeerMain will start a JMX manageable ZooKeeper server. This class - registers the proper MBeans during initalization to support JMX + registers the proper MBeans during initialization to support JMX monitoring and management of the instance. See bin/zkServer.sh for one example of starting ZooKeeper using QuorumPeerMain.

    diff --git a/docs/zookeeperProgrammers.html b/docs/zookeeperProgrammers.html index cb8e7f78e2e..2c04a7dcd35 100644 --- a/docs/zookeeperProgrammers.html +++ b/docs/zookeeperProgrammers.html @@ -524,7 +524,7 @@

    ZNodes

    -

    Znodes are the main enitity that a programmer access. They have +

    Znodes are the main entity that a programmer access. They have several characteristics that are worth mentioning here.

    Watches

    @@ -1940,7 +1940,7 @@

    Consistency Guarantees

    to read /a, client B may read the old value of 0, depending on which server it is connected to. If it is important that Client A and Client B read the same value, - Client B should should call the sync() method from the ZooKeeper API + Client B should call the sync() method from the ZooKeeper API method before it performs its read.

    So, ZooKeeper by itself doesn't guarantee that changes occur synchronously across all servers, but ZooKeeper @@ -1971,7 +1971,7 @@

    Java Binding

    generated classes that are used simply as containers.

    The main class used by a ZooKeeper Java client is the ZooKeeper class. Its two constructors differ only by an optional session id and password. ZooKeeper supports session - recovery accross instances of a process. A Java program may save its + recovery across instances of a process. A Java program may save its session id and password to stable storage, restart, and recover the session that was used by the earlier instance of the program.

    When a ZooKeeper object is created, two threads are created as @@ -2315,7 +2315,7 @@

    Building Your Own C Client

    If you are building a multithreaded client, compile with -DTHREADED compiler flag to enable the multi-threaded version of - the library, and then link against against the + the library, and then link against the zookeeper_mt library. If you are building a single-threaded client, do not compile with -DTHREADED, and be sure to link against the zookeeper_st diff --git a/docs/zookeeperTutorial.html b/docs/zookeeperTutorial.html index 3f3def1d2f0..cc76adceea6 100644 --- a/docs/zookeeperTutorial.html +++ b/docs/zookeeperTutorial.html @@ -379,7 +379,7 @@

    Barriers

    First it deletes its corresponding node, and then it gets the children of the root node. If there is at least one child, then it waits for a notification (obs: note that the second parameter of the call to getChildren() is true, meaning that -ZooKeeper has to set a watch on the the root node). Upon reception of a notification, +ZooKeeper has to set a watch on the root node). Upon reception of a notification, it checks once more whether the root node has any children.

             /**
    diff --git a/src/c/ChangeLog b/src/c/ChangeLog
    index c85a6c0ad86..4672114b47d 100644
    --- a/src/c/ChangeLog
    +++ b/src/c/ChangeLog
    @@ -7,7 +7,7 @@ Release 2.1.0
     2008-04-30 Andrew Kornev 
     
         * 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
    diff --git a/src/c/acinclude.m4 b/src/c/acinclude.m4
    index d0041d8c26a..daf905cbda9 100644
    --- a/src/c/acinclude.m4
    +++ b/src/c/acinclude.m4
    @@ -10,7 +10,7 @@
     # DX_???_FEATURE(ON|OFF) - control the default setting fo 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)],
                 [],
    diff --git a/src/c/include/zookeeper.h b/src/c/include/zookeeper.h
    index 799e67246b5..7e8c72edc29 100644
    --- a/src/c/include/zookeeper.h
    +++ b/src/c/include/zookeeper.h
    @@ -543,7 +543,7 @@ ZOOAPI zhandle_t *zookeeper_init2(const char *host, watcher_fn fn,
      * \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);
     
    @@ -1531,7 +1531,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_watchers(zhandle_t *zh, const char *path,
             ZooWatcherType wtype, watcher_fn watcher, void *watcherCtx, int local,
    @@ -2054,7 +2054,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_watchers(zhandle_t *zh, const char *path,
             ZooWatcherType wtype, watcher_fn watcher, void *watcherCtx, int local);
    diff --git a/src/c/src/hashtable/hashtable.c b/src/c/src/hashtable/hashtable.c
    index caa5f6ccc03..bc94a59599b 100644
    --- a/src/c/src/hashtable/hashtable.c
    +++ b/src/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;
    diff --git a/src/c/src/mt_adaptor.c b/src/c/src/mt_adaptor.c
    index fe4792a1719..a8693dbe92f 100644
    --- a/src/c/src/mt_adaptor.c
    +++ b/src/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; 
    diff --git a/src/c/src/zk_hashtable.h b/src/c/src/zk_hashtable.h
    index 5227e07764c..104d78fca8f 100644
    --- a/src/c/src/zk_hashtable.h
    +++ b/src/c/src/zk_hashtable.h
    @@ -68,7 +68,7 @@ char **collect_keys(zk_hashtable *ht, int *count);
     /**
      * check if the completion has a watcher object associated
      * with it. If it does, move the watcher object to the map of
    - * active watchers (only if the checker allows to do so)
    + * active watchers (only if the checker allows one to do so)
      */
         void activateWatcher(zhandle_t *zh, watcher_registration_t* reg, int rc);
         void deactivateWatcher(zhandle_t *zh, watcher_deregistration_t *dereg, int rc);
    diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c
    index f6d09b708fd..d54ec705066 100644
    --- a/src/c/src/zookeeper.c
    +++ b/src/c/src/zookeeper.c
    @@ -577,7 +577,7 @@ static void setup_random()
     /**
      * get the errno from the return code
      * of get addrinfo. Errno is not set
    - * with the call to getaddrinfo, so thats
    + * with the call to getaddrinfo, so that's
      * why we have to do this.
      */
     static int getaddrinfo_errno(int rc) {
    @@ -1302,7 +1302,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.
    @@ -3157,7 +3157,7 @@ int zookeeper_close(zhandle_t *zh)
              * completions from calling zookeeper_close before we have
              * completed the adaptor_finish call below. */
     
    -    /* Signal any syncronous completions before joining the threads */
    +    /* Signal any synchronous completions before joining the threads */
             enter_critical(zh);
             free_completions(zh,1,ZCLOSING);
             leave_critical(zh);
    diff --git a/src/c/tests/TestClient.cc b/src/c/tests/TestClient.cc
    index 92b169906b9..6cecdafc4e9 100644
    --- a/src/c/tests/TestClient.cc
    +++ b/src/c/tests/TestClient.cc
    @@ -500,7 +500,7 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
     
     
         /**
    -       returns false if the vectors dont match
    +       returns false if the vectors don't match
         **/
         bool compareAcl(struct ACL_vector acl1, struct ACL_vector acl2) {
             if (acl1.count != acl2.count) {
    @@ -864,7 +864,7 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
         void testChroot() {
             // the c client async callbacks do
             // not callback with the path, so
    -        // we dont need to test taht for now
    +        // we don't need to test that for now
             // we should fix that though soon!
             watchctx_t ctx, ctx_ch;
             zhandle_t *zk, *zk_ch;
    diff --git a/src/c/tests/ThreadingUtil.h b/src/c/tests/ThreadingUtil.h
    index 9165412bc8b..45791fd2f59 100644
    --- a/src/c/tests/ThreadingUtil.h
    +++ b/src/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;
    diff --git a/src/contrib/loggraph/README.txt b/src/contrib/loggraph/README.txt
    index 1865fa5ab0c..4cb64e54e6b 100644
    --- a/src/contrib/loggraph/README.txt
    +++ b/src/contrib/loggraph/README.txt
    @@ -7,7 +7,7 @@ LogGraph is an application for viewing and filtering zookeeper logs. It can hand
     
     Run "ant jar" in src/contrib/loggraph/. This will download all dependencies and compile all the loggraph code.
     
    -Once compilation has finished, you can run it the the loggraph.sh script in src/contrib/loggraph/bin. This will start and embedded web server on your machine. 
    +Once compilation has finished, you can run it the loggraph.sh script in src/contrib/loggraph/bin. This will start and embedded web server on your machine.
     Navigate to http://localhost:8182/graph/main.html
     
     3 - Usage
    @@ -41,7 +41,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 hexidecimal. 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 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.
     
     4.2 - Filter symbols
     The possible filter symbols are: 
    diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java
    index 13a41a5ae3a..53c65a9bda2 100644
    --- a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java
    +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java
    @@ -94,7 +94,7 @@ private int fill() throws IOException {
            copy what we can from buffer. if it's not enough, fill buffer again and copy again
         */
         synchronized public int read(char[] cbuf, int off, int len) throws IOException {
    -	// This could be faster, but probably wont be used
    +	// This could be faster, but probably won't be used
     	byte[] b = new byte[2];
     	int bytesread = 0;
     	while (len > 0) {
    diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js
    index 87bb7d89da2..51d47795a8a 100644
    --- a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js
    +++ b/src/contrib/loggraph/web/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() {
    diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js
    index 3740d0f02ad..1c5c48050b1 100644
    --- a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js
    +++ b/src/contrib/loggraph/web/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];
    diff --git a/src/contrib/monitoring/cacti/README b/src/contrib/monitoring/cacti/README
    index 8188723e5e2..c0379ef3eff 100644
    --- a/src/contrib/monitoring/cacti/README
    +++ b/src/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 localted in the scripts/ directory.
     
     
     The check_zookeeper.py script can be used a  custom data input method for Cacti.
    diff --git a/src/contrib/monitoring/check_zookeeper.py b/src/contrib/monitoring/check_zookeeper.py
    index c00db8bc0b9..b4640bd29d9 100755
    --- a/src/contrib/monitoring/check_zookeeper.py
    +++ b/src/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.
     """
     
    diff --git a/src/contrib/monitoring/nagios/README.txt b/src/contrib/monitoring/nagios/README.txt
    index 317ae14869b..fa75d3dcae9 100644
    --- a/src/contrib/monitoring/nagios/README.txt
    +++ b/src/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 ilustrated below or just use the provided definitions.
     
     define service {
         use         generic-service
    diff --git a/src/contrib/rest/SPEC.txt b/src/contrib/rest/SPEC.txt
    index 8c5f70175a6..b4709df59bf 100644
    --- a/src/contrib/rest/SPEC.txt
    +++ b/src/contrib/rest/SPEC.txt
    @@ -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:
    @@ -129,7 +129,7 @@ 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 
    +the REST server will forward your request on the attached persistent
     connection.
     
     Keeping a session alive
    diff --git a/src/contrib/rest/conf/rest.properties b/src/contrib/rest/conf/rest.properties
    index f0abb4541fa..4d3ee926cd6 100644
    --- a/src/contrib/rest/conf/rest.properties
    +++ b/src/contrib/rest/conf/rest.properties
    @@ -62,7 +62,7 @@ rest.endpoint.1 = /;localhost:2181,localhost:2182
     
     # rest.http.auth = guest:guest1
     
    -# Uncomment the lines bellow to allow https-only access
    +# Uncomment the lines below to allow https-only access
     
     # rest.ssl = true
     # rest.ssl.jks = keys/rest.jks
    diff --git a/src/contrib/zkfuse/src/blockingqueue.h b/src/contrib/zkfuse/src/blockingqueue.h
    index 4677290d7b6..aad10c29839 100644
    --- a/src/contrib/zkfuse/src/blockingqueue.h
    +++ b/src/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 0 then wait forever
              * @param timedOut if not NULL then set to true whether this function timed out
              * @return the element from the queue
    diff --git a/src/contrib/zkfuse/src/thread.h b/src/contrib/zkfuse/src/thread.h
    index 0ed12d7f645..91321cd6873 100644
    --- a/src/contrib/zkfuse/src/thread.h
    +++ b/src/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);
    diff --git a/src/contrib/zkfuse/src/zkadapter.h b/src/contrib/zkfuse/src/zkadapter.h
    index 8d4d1d57f0a..66312d5c4fd 100644
    --- a/src/contrib/zkfuse/src/zkadapter.h
    +++ b/src/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
              */
    diff --git a/src/contrib/zkfuse/src/zkfuse.cc b/src/contrib/zkfuse/src/zkfuse.cc
    index 6a8216885fa..a7240daff1d 100644
    --- a/src/contrib/zkfuse/src/zkfuse.cc
    +++ b/src/contrib/zkfuse/src/zkfuse.cc
    @@ -246,7 +246,7 @@ class ZkFuseCommon
             return _regMetadataName;
         }
         /**
    -      Get number of not-in-use ZkFuseFile instances to to cache.
    +      Get number of not-in-use ZkFuseFile instances to cache.
           \see _cacheSize
          */
         unsigned getCacheSize() const
    @@ -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
    @@ -2248,7 +2248,7 @@ class ZkFuseFile : boost::noncopyable
                         }
                         else {
                             /* Children information is fresh since 
    -                         * it is initialized and and have been 
    +                         * it is initialized and have been
                              * updated by listener.
                              */
                         }
    diff --git a/src/contrib/zkpython/src/test/close_deadlock_test.py b/src/contrib/zkpython/src/test/close_deadlock_test.py
    index 921d2cc4b05..b56d44eecce 100644
    --- a/src/contrib/zkpython/src/test/close_deadlock_test.py
    +++ b/src/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.
    diff --git a/src/contrib/zkpython/src/test/create_test.py b/src/contrib/zkpython/src/test/create_test.py
    index 8ab80f9565a..29f63a9ffb4 100755
    --- a/src/contrib/zkpython/src/test/create_test.py
    +++ b/src/contrib/zkpython/src/test/create_test.py
    @@ -59,7 +59,7 @@ def test_sync_create_existing(self):
     
         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,
    diff --git a/src/contrib/zktreeutil/README.txt b/src/contrib/zktreeutil/README.txt
    index 43b06fa72c2..99adeeb2e28 100644
    --- a/src/contrib/zktreeutil/README.txt
    +++ b/src/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
    diff --git a/src/contrib/zktreeutil/src/ZkAdaptor.h b/src/contrib/zktreeutil/src/ZkAdaptor.h
    index 4b68e28db1f..7e71b5cab87 100644
    --- a/src/contrib/zktreeutil/src/ZkAdaptor.h
    +++ b/src/contrib/zktreeutil/src/ZkAdaptor.h
    @@ -156,7 +156,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;
    diff --git a/src/contrib/zktreeutil/src/ZkTreeUtil.h b/src/contrib/zktreeutil/src/ZkTreeUtil.h
    index 0a9be03f842..d142eccdb98 100644
    --- a/src/contrib/zktreeutil/src/ZkTreeUtil.h
    +++ b/src/contrib/zktreeutil/src/ZkTreeUtil.h
    @@ -255,7 +255,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
         };
     }
     
    diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java
    index c7db5243b2c..dabae77d052 100644
    --- a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java
    +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java
    @@ -56,7 +56,7 @@ public class ZooInspectorConnectionPropertiesDialog extends JDialog {
         /**
          * @param lastConnectionProps
          *            - the last connection properties used. if this is the first
    -     *            conneciton since starting the applications this will be the
    +     *            connection since starting the applications this will be the
          *            default settings
          * @param connectionPropertiesTemplateAndLabels
          *            - the connection properties and labels to show in this dialog
    diff --git a/src/docs/src/documentation/TODO.txt b/src/docs/src/documentation/TODO.txt
    index 84e7dfaff7f..195c0a6b735 100644
    --- a/src/docs/src/documentation/TODO.txt
    +++ b/src/docs/src/documentation/TODO.txt
    @@ -52,7 +52,7 @@ zookeeperAdmin.xml:445:               When the election algorithm is
     		
     zookeeperAdmin.xml:481:                The default to this option is yes, which
                     means that a leader will accept client connections.
    -                [tbd: how do you specifiy which server is the
    +                [tbd: how do you specify which server is the
                     leader?]
     		
     zookeeperAdmin.xml:495		When the server
    @@ -92,7 +92,7 @@ zookeeperAdmin.xml:755:            Also,
     	    
     zookeeperAdmin.xml:812:     For best results, take note of the following list of good
           Zookeeper practices. [tbd: I just threw this section in. Do we
    -      have list that is is different from the "things to avoid"? If not, I can
    +      have list that is different from the "things to avoid"? If not, I can
           easily remove this section.]
           
     
    diff --git a/src/docs/src/documentation/content/xdocs/index.xml b/src/docs/src/documentation/content/xdocs/index.xml
    index 969e482cabe..b6134908563 100644
    --- a/src/docs/src/documentation/content/xdocs/index.xml
    +++ b/src/docs/src/documentation/content/xdocs/index.xml
    @@ -41,7 +41,7 @@
         

      -
    • ZooKeeper Overview

      Technical Overview Documents for Client Developers, Adminstrators, and Contributors

      +
    • ZooKeeper Overview

      Technical Overview Documents for Client Developers, Administrators, and Contributors

      • Overview - a bird's eye view of ZooKeeper, including design concepts and architecture
      • Getting Started - a tutorial-style guide for developers to install, run, and program to ZooKeeper
      • Release Notes - new developer and user facing features, improvements, and incompatibilities
      • @@ -52,7 +52,7 @@ diff --git a/src/docs/src/documentation/content/xdocs/javaExample.xml b/src/docs/src/documentation/content/xdocs/javaExample.xml index 16f779534b9..33a82d13d72 100644 --- a/src/docs/src/documentation/content/xdocs/javaExample.xml +++ b/src/docs/src/documentation/content/xdocs/javaExample.xml @@ -70,7 +70,7 @@ and the other which monitors data. In this application, the class called the Executor maintains the ZooKeeper connection, and the class called the DataMonitor monitors the data in the ZooKeeper tree. Also, Executor contains the main thread and contains the execution logic. - It is responsible for what little user interaction there is, as well as interaction with the exectuable program you + It is responsible for what little user interaction there is, as well as interaction with the executable program you pass in as an argument and which the sample (per the requirements) shuts down and restarts, according to the state of the znode. @@ -151,9 +151,9 @@ public class Executor implements Watcher, Runnable, DataMonitor.DataMonitorListe The DataMonitorListener - interface, on the other hand, is not part of the the ZooKeeper API. It is a completely custom interface, + interface, on the other hand, is not part of the ZooKeeper API. It is a completely custom interface, designed for this sample application. The DataMonitor object uses it to communicate back to its container, which - is also the the Executor object.The DataMonitorListener interface looks like this: + is also the Executor object.The DataMonitorListener interface looks like this: public interface DataMonitorListener { /** @@ -330,7 +330,7 @@ the connection comes back up. public void process(WatchedEvent event) { String path = event.getPath(); if (event.getType() == Event.EventType.None) { - // We are are being told that the state of the + // We are being told that the state of the // connection has changed switch (event.getState()) { case SyncConnected: @@ -590,7 +590,7 @@ public class DataMonitor implements Watcher, StatCallback { public void process(WatchedEvent event) { String path = event.getPath(); if (event.getType() == Event.EventType.None) { - // We are are being told that the state of the + // We are being told that the state of the // connection has changed switch (event.getState()) { case SyncConnected: diff --git a/src/docs/src/documentation/content/xdocs/recipes.xml b/src/docs/src/documentation/content/xdocs/recipes.xml index f53536fe20d..cb73ad0ecc0 100644 --- a/src/docs/src/documentation/content/xdocs/recipes.xml +++ b/src/docs/src/documentation/content/xdocs/recipes.xml @@ -277,7 +277,7 @@ processing nodes with the lowest number. The client does not need to issue another getChildren( ) until it exhausts the list obtained from the first getChildren( - ) call. If there are are no children in the queue node, the + ) call. If there are no children in the queue node, the reader waits for a watch notification to check the queue again. diff --git a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml index 1e581dbd8a9..7bb9f6912a1 100644 --- a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml +++ b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml @@ -37,7 +37,7 @@ This document contains information about deploying, administering - and mantaining ZooKeeper. It also discusses best practices and common + and maintaining ZooKeeper. It also discusses best practices and common problems. @@ -524,7 +524,7 @@ server.3=zoo3:2888:3888 made to the znodes these changes are appended to a transaction log, occasionally, when a log grows large, a snapshot of the current state of all znodes will be written - to the filesystem. This snapshot supercedes all previous + to the filesystem. This snapshot supersedes all previous logs. @@ -773,7 +773,7 @@ server.3=zoo3:2888:3888 Having a dedicated log device has a large impact on - throughput and stable latencies. It is highly recommened to + throughput and stable latencies. It is highly recommended to dedicate a log device and set dataLogDir to point to a directory on that device, and then make sure to point -Of these two requirements only the first, the highest zxid amoung the followers +Of these two requirements only the first, the highest zxid among the followers needs to hold for correct operation. The second requirement, a quorum of followers, just needs to hold with high probability. We are going to recheck the second requirement, so if a failure happens during or after the leader election and quorum is lost, @@ -331,7 +331,7 @@ to worry about two different values being proposed for the same zxid; followers committed in order; there is only one active leader at a time since followers only follow a single leader at a time; a new leader has seen all committed proposals from the previous epoch since it has seen the highest zxid from a quorum of servers; -any uncommited proposals from a previous epoch seen by a new leader will be committed +any uncommitted proposals from a previous epoch seen by a new leader will be committed by that leader before it becomes active.
        Comparisons diff --git a/src/docs/src/documentation/content/xdocs/zookeeperJMX.xml b/src/docs/src/documentation/content/xdocs/zookeeperJMX.xml index f0ea6368a46..aaf6dd2ee80 100644 --- a/src/docs/src/documentation/content/xdocs/zookeeperJMX.xml +++ b/src/docs/src/documentation/content/xdocs/zookeeperJMX.xml @@ -67,7 +67,7 @@ The class org.apache.zookeeper.server.quorum.QuorumPeerMain will start a JMX manageable ZooKeeper server. This class - registers the proper MBeans during initalization to support JMX + registers the proper MBeans during initialization to support JMX monitoring and management of the instance. See bin/zkServer.sh for one example of starting ZooKeeper using QuorumPeerMain. diff --git a/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml b/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml index 27f2124d22c..d94069d3516 100644 --- a/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml +++ b/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml @@ -181,7 +181,7 @@ which uses a ZooKeeper service. - Znodes are the main enitity that a programmer access. They have + Znodes are the main entity that a programmer access. They have several characteristics that are worth mentioning here.
        @@ -1353,7 +1353,7 @@ public abstract class ServerAuthenticationProvider implements AuthenticationProv to read /a, client B may read the old value of 0, depending on which server it is connected to. If it is important that Client A and Client B read the same value, - Client B should should call the sync() method from the ZooKeeper API method before it performs its read. @@ -1390,7 +1390,7 @@ public abstract class ServerAuthenticationProvider implements AuthenticationProv The main class used by a ZooKeeper Java client is the ZooKeeper class. Its two constructors differ only by an optional session id and password. ZooKeeper supports session - recovery accross instances of a process. A Java program may save its + recovery across instances of a process. A Java program may save its session id and password to stable storage, restart, and recover the session that was used by the earlier instance of the program. @@ -1676,7 +1676,7 @@ public abstract class ServerAuthenticationProvider implements AuthenticationProv If you are building a multithreaded client, compile with -DTHREADED compiler flag to enable the multi-threaded version of - the library, and then link against against the + the library, and then link against the zookeeper_mt library. If you are building a single-threaded client, do not compile with -DTHREADED, and be sure to link against the zookeeper_st diff --git a/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml b/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml index 7668e6ab190..dc9e9a1003f 100644 --- a/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml +++ b/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml @@ -33,7 +33,7 @@ This document contains information about deploying, - administering and mantaining ZooKeeper. It also discusses best + administering and maintaining ZooKeeper. It also discusses best practices and common problems. diff --git a/src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml b/src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml index 0cae91e5d34..598ae401034 100644 --- a/src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml +++ b/src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml @@ -203,7 +203,7 @@ Once the computation is finished, a process calls leave() to leave the barrier. First it deletes its corresponding node, and then it gets the children of the root node. If there is at least one child, then it waits for a notification (obs: note that the second parameter of the call to getChildren() is true, meaning that -ZooKeeper has to set a watch on the the root node). Upon reception of a notification, +ZooKeeper has to set a watch on the root node). Upon reception of a notification, it checks once more whether the root node has any children. diff --git a/src/java/lib/jdiff/zookeeper_3.1.1.xml b/src/java/lib/jdiff/zookeeper_3.1.1.xml index c28b238b86a..e2460be4264 100644 --- a/src/java/lib/jdiff/zookeeper_3.1.1.xml +++ b/src/java/lib/jdiff/zookeeper_3.1.1.xml @@ -1348,7 +1348,7 @@ + @param stats the stat string to be initialized with]]> - diff --git a/src/java/main/org/apache/jute/package.html b/src/java/main/org/apache/jute/package.html index 531a6e37ade..c1891c3feb1 100644 --- a/src/java/main/org/apache/jute/package.html +++ b/src/java/main/org/apache/jute/package.html @@ -408,7 +408,7 @@

        C++

        either the member or a reference to the member. For members that are returned by value, a setter method is also generated. This is true for primitive data members of the types byte, int, long, boolean, float and -double. For example, for a int field called MyField the folowing +double. For example, for a int field called MyField the following code is generated.
        
        diff --git a/src/java/main/org/apache/zookeeper/ClientCnxnSocketNetty.java b/src/java/main/org/apache/zookeeper/ClientCnxnSocketNetty.java
        index 97af9da698b..461c3253a0c 100644
        --- a/src/java/main/org/apache/zookeeper/ClientCnxnSocketNetty.java
        +++ b/src/java/main/org/apache/zookeeper/ClientCnxnSocketNetty.java
        @@ -120,7 +120,7 @@ void connect(InetSocketAddress addr) throws IOException {
                 connectFuture.addListener(new ChannelFutureListener() {
                     @Override
                     public void operationComplete(ChannelFuture channelFuture) throws Exception {
        -                // this lock guarantees that channel won't be assgined after cleanup().
        +                // this lock guarantees that channel won't be assigned after cleanup().
                         connectLock.lock();
                         try {
                             if (!channelFuture.isSuccess() || connectFuture == null) {
        diff --git a/src/java/main/org/apache/zookeeper/StatsTrack.java b/src/java/main/org/apache/zookeeper/StatsTrack.java
        index 623c6d4464b..acd07362875 100644
        --- a/src/java/main/org/apache/zookeeper/StatsTrack.java
        +++ b/src/java/main/org/apache/zookeeper/StatsTrack.java
        @@ -38,7 +38,7 @@ public StatsTrack() {
              * the stat string should be of the form count=int,bytes=long
              * if stats is called with null the count and bytes are initialized
              * to -1.
        -     * @param stats the stat string to be intialized with
        +     * @param stats the stat string to be initialized with
              */
             public StatsTrack(String stats) {
                 if (stats == null) {
        @@ -82,7 +82,7 @@ public long getBytes() {
             }
         
             /**
        -     * set teh bytes for this stat tracker.
        +     * set the bytes for this stat tracker.
              *
              * @param bytes
              *            the bytes to set with
        diff --git a/src/java/main/org/apache/zookeeper/ZooKeeperMain.java b/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
        index 8e39022b4a9..2575e94c543 100644
        --- a/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
        +++ b/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
        @@ -102,7 +102,7 @@ public boolean getPrintWatches( ) {
                 new CreateCommand().addToMap(commandMapCli);
                 new DeleteCommand().addToMap(commandMapCli);
                 new DeleteAllCommand().addToMap(commandMapCli);
        -        // Depricated: rmr
        +        // Deprecated: rmr
                 new DeleteAllCommand("rmr").addToMap(commandMapCli);
                 new SetCommand().addToMap(commandMapCli);
                 new GetCommand().addToMap(commandMapCli);
        diff --git a/src/java/main/org/apache/zookeeper/cli/DelQuotaCommand.java b/src/java/main/org/apache/zookeeper/cli/DelQuotaCommand.java
        index 80054067516..8fefdf36f7d 100644
        --- a/src/java/main/org/apache/zookeeper/cli/DelQuotaCommand.java
        +++ b/src/java/main/org/apache/zookeeper/cli/DelQuotaCommand.java
        @@ -63,7 +63,7 @@ public CliCommand parse(String[] cmdArgs) throws CliParseException {
             @Override
             public boolean exec() throws CliException {
                 //if neither option -n or -b is specified, we delete
        -        // the quota node for thsi node.
        +        // the quota node for this node.
                 String path = args[1];
                 try {
                     if (cl.hasOption("b")) {
        @@ -71,7 +71,7 @@ public boolean exec() throws CliException {
                     } else if (cl.hasOption("n")) {
                         delQuota(zk, path, false, true);
                     } else if (args.length == 2) {
        -                // we dont have an option specified.
        +                // we don't have an option specified.
                         // just delete whole quota node
                         delQuota(zk, path, true, true);
                     }
        diff --git a/src/java/main/org/apache/zookeeper/cli/ReconfigCommand.java b/src/java/main/org/apache/zookeeper/cli/ReconfigCommand.java
        index 342f5d2e3c5..856c73f9afc 100644
        --- a/src/java/main/org/apache/zookeeper/cli/ReconfigCommand.java
        +++ b/src/java/main/org/apache/zookeeper/cli/ReconfigCommand.java
        @@ -52,7 +52,7 @@ public class ReconfigCommand extends CliCommand {
             private String members;
         
             /* version - version of config from which we want to reconfigure - if current config is different
        -     * reconfiguration will fail. Should be ommitted from the CLI to disable this option.
        +     * reconfiguration will fail. Should be omitted from the CLI to disable this option.
              */
             long version = -1;
             private CommandLine cl;
        diff --git a/src/java/main/org/apache/zookeeper/common/PathUtils.java b/src/java/main/org/apache/zookeeper/common/PathUtils.java
        index 3462c618edb..d80feabae08 100644
        --- a/src/java/main/org/apache/zookeeper/common/PathUtils.java
        +++ b/src/java/main/org/apache/zookeeper/common/PathUtils.java
        @@ -90,7 +90,7 @@ public static void validatePath(String path) throws IllegalArgumentException {
                             || c >= '\u007f' && c <= '\u009F'
                             || c >= '\ud800' && c <= '\uf8ff'
                             || c >= '\ufff0' && c <= '\uffff') {
        -                reason = "invalid charater @" + i;
        +                reason = "invalid character @" + i;
                         break;
                     }
                 }
        diff --git a/src/java/main/org/apache/zookeeper/server/DataNode.java b/src/java/main/org/apache/zookeeper/server/DataNode.java
        index 0859aab22c8..21462e52224 100644
        --- a/src/java/main/org/apache/zookeeper/server/DataNode.java
        +++ b/src/java/main/org/apache/zookeeper/server/DataNode.java
        @@ -33,7 +33,7 @@
          * This class contains the data for a node in the data tree.
          * 

        * A data node contains a reference to its parent, a byte array as its data, an - * array of ACLs, a stat object, and a set of its children's paths. + * array of ACLs, a stat object, and a set of its childrens' paths. * */ public class DataNode implements Record { diff --git a/src/java/main/org/apache/zookeeper/server/DataTree.java b/src/java/main/org/apache/zookeeper/server/DataTree.java index f0ab2b39d7f..8b447911a7f 100644 --- a/src/java/main/org/apache/zookeeper/server/DataTree.java +++ b/src/java/main/org/apache/zookeeper/server/DataTree.java @@ -96,7 +96,7 @@ public class DataTree { /** the zookeeper nodes that acts as the management and status node **/ private static final String procZookeeper = Quotas.procZookeeper; - /** this will be the string thats stored as a child of root */ + /** this will be the string that's stored as a child of root */ private static final String procChildZookeeper = procZookeeper.substring(1); /** @@ -105,7 +105,7 @@ public class DataTree { */ private static final String quotaZookeeper = Quotas.quotaZookeeper; - /** this will be the string thats stored as a child of /zookeeper */ + /** this will be the string that's stored as a child of /zookeeper */ private static final String quotaChildZookeeper = quotaZookeeper .substring(procZookeeper.length() + 1); @@ -115,7 +115,7 @@ public class DataTree { */ private static final String configZookeeper = ZooDefs.CONFIG_NODE; - /** this will be the string thats stored as a child of /zookeeper */ + /** this will be the string that's stored as a child of /zookeeper */ private static final String configChildZookeeper = configZookeeper .substring(procZookeeper.length() + 1); diff --git a/src/java/main/org/apache/zookeeper/server/ExpiryQueue.java b/src/java/main/org/apache/zookeeper/server/ExpiryQueue.java index cca1fab3cc8..1826d5aa05d 100644 --- a/src/java/main/org/apache/zookeeper/server/ExpiryQueue.java +++ b/src/java/main/org/apache/zookeeper/server/ExpiryQueue.java @@ -80,7 +80,7 @@ public Long remove(E elem) { * 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 */ diff --git a/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java b/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java index 6dae02da32e..eb280b07a38 100644 --- a/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java +++ b/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java @@ -132,7 +132,7 @@ public void sendCloseSession() { void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking - * so that we dont have to do write in + * so that we don't have to do write in * a tight while loop */ if (bb != ServerCnxnFactory.closeConn) { diff --git a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java index 1d2b04441aa..9902b65aa2b 100644 --- a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java +++ b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java @@ -98,7 +98,7 @@ public void startup(ZooKeeperServer zkServer) throws IOException, InterruptedExc 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; diff --git a/src/java/main/org/apache/zookeeper/server/WatchManager.java b/src/java/main/org/apache/zookeeper/server/WatchManager.java index d00bdb63e6d..22606d6e0a0 100644 --- a/src/java/main/org/apache/zookeeper/server/WatchManager.java +++ b/src/java/main/org/apache/zookeeper/server/WatchManager.java @@ -94,7 +94,7 @@ Set triggerWatch(String path, EventType type) { return triggerWatch(path, type, null); } - Set triggerWatch(String path, EventType type, Set supress) { + Set triggerWatch(String path, EventType type, Set suppress) { WatchedEvent e = new WatchedEvent(type, KeeperState.SyncConnected, path); HashSet watchers; @@ -116,7 +116,7 @@ Set triggerWatch(String path, EventType type, Set supress) { } } for (Watcher w : watchers) { - if (supress != null && supress.contains(w)) { + if (suppress != null && suppress.contains(w)) { continue; } w.process(e); diff --git a/src/java/main/org/apache/zookeeper/server/ZKDatabase.java b/src/java/main/org/apache/zookeeper/server/ZKDatabase.java index 05bbb9177a0..1a13f0c00a6 100644 --- a/src/java/main/org/apache/zookeeper/server/ZKDatabase.java +++ b/src/java/main/org/apache/zookeeper/server/ZKDatabase.java @@ -536,7 +536,7 @@ public void serializeSnapshot(OutputArchive oa) throws IOException, /** * 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 { return this.snapLog.append(si); diff --git a/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java b/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java index 86f8beab2bc..a0f5b8657b9 100644 --- a/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java +++ b/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java @@ -229,7 +229,7 @@ public ZooKeeperServer(File snapDir, File logDir, int tickTime) } /** - * Default constructor, relies on the config for its agrument values + * Default constructor, relies on the config for its argument values * * @throws IOException */ @@ -854,7 +854,7 @@ public long getLastProcessedZxid() { /** * return the outstanding requests - * in the queue, which havent been + * in the queue, which haven't been * processed yet */ public long getOutstandingRequests() { diff --git a/src/java/main/org/apache/zookeeper/server/command/AbstractFourLetterCommand.java b/src/java/main/org/apache/zookeeper/server/command/AbstractFourLetterCommand.java index 5a8a16e798a..0d98d307cd4 100644 --- a/src/java/main/org/apache/zookeeper/server/command/AbstractFourLetterCommand.java +++ b/src/java/main/org/apache/zookeeper/server/command/AbstractFourLetterCommand.java @@ -29,7 +29,7 @@ /** * Set of threads for command ports. All the 4 letter commands are run via a - * thread. Each class maps to a correspoding 4 letter command. CommandThread is + * thread. Each class maps to a corresponding 4 letter command. CommandThread is * the abstract class from which all the others inherit. */ public abstract class AbstractFourLetterCommand { diff --git a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java index ee62bcc2327..21258d069d0 100644 --- a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java +++ b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java @@ -153,7 +153,7 @@ public static void setPreallocSize(long size) { } /** - * creates a checksum alogrithm to be used + * creates a checksum algorithm to be used * @return the checksum used for this txnlog */ protected Checksum makeChecksumAlgorithm(){ @@ -352,7 +352,7 @@ public synchronized void commit() throws IOException { /** * - * @return elapsed sync time of transaction log in miliseconds + * @return elapsed sync time of transaction log in milliseconds */ public long getTxnLogSyncElapsedTime() { return syncElapsedMS; diff --git a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java index 40a5cd6f9e0..7642497ba8e 100644 --- a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java +++ b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java @@ -334,7 +334,7 @@ public long getLastLoggedZxid() { /** * save the datatree and the sessions into a snapshot * @param dataTree the datatree to be serialized onto disk - * @param sessionsWithTimeouts the sesssion timeouts to be + * @param sessionsWithTimeouts the session timeouts to be * serialized onto disk * @throws IOException */ diff --git a/src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java b/src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java index b829e8d5bf9..1db0bec3015 100644 --- a/src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java +++ b/src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java @@ -85,7 +85,7 @@ public interface TxnLog { /** * - * @return transaction log's elapsed sync time in miliseconds + * @return transaction log's elapsed sync time in milliseconds */ long getTxnLogSyncElapsedTime(); diff --git a/src/java/main/org/apache/zookeeper/server/persistence/Util.java b/src/java/main/org/apache/zookeeper/server/persistence/Util.java index 7ef7f9c4144..8ffa74e05dc 100644 --- a/src/java/main/org/apache/zookeeper/server/persistence/Util.java +++ b/src/java/main/org/apache/zookeeper/server/persistence/Util.java @@ -81,7 +81,7 @@ public static URI makeFileLoggerURL(File dataDir, File dataLogDir,String convPol /** * Creates a valid transaction log file name. * - * @param zxid used as a file name suffix (extention) + * @param zxid used as a file name suffix (extension) * @return file name */ public static String makeLogName(long zxid) { @@ -280,7 +280,7 @@ public static void writeTxnBytes(OutputArchive oa, byte[] bytes) /** - * Compare file file names of form "prefix.version". Sort order result + * Compare file names of form "prefix.version". Sort order result * returned in order of version. */ private static class DataDirFileComparator diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Leader.java b/src/java/main/org/apache/zookeeper/server/quorum/Leader.java index 5cd836fc28d..cdcd1d14675 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/Leader.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/Leader.java @@ -636,7 +636,7 @@ void shutdown(String reason) { cnxAcceptor.halt(); } - // NIO should not accept conenctions + // NIO should not accept connections self.setZooKeeperServer(null); self.adminServer.setZooKeeperServer(null); try { @@ -1312,7 +1312,7 @@ public void waitForNewLeaderAck(long sid, long zxid, LearnerType learnerType) if (zxid != currentZxid) { LOG.error("NEWLEADER ACK from sid: " + sid + " is from a different epoch - current 0x" - + Long.toHexString(currentZxid) + " receieved 0x" + + Long.toHexString(currentZxid) + " received 0x" + Long.toHexString(zxid)); return; } diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Learner.java b/src/java/main/org/apache/zookeeper/server/quorum/Learner.java index f048da8a4d9..33541195589 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/Learner.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/Learner.java @@ -220,7 +220,7 @@ protected long nanoTime() { /** * 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 { diff --git a/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java b/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java index dcd1b47c7af..3a33d3f8613 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java @@ -749,7 +749,7 @@ public boolean syncFollower(long peerLastZxid, ZKDatabase db, Leader leader) { } else if (peerLastZxid < minCommittedLog && txnLogSyncEnabled) { // Use txnlog and committedLog to sync - // Calculate sizeLimit that we allow to retrieve txnlog from disk + // Calculate sizeLimit that we allow one to retrieve txnlog from disk long sizeLimit = db.calculateTxnLogSizeLimit(); // This method can return empty iterator if the requested zxid // is older than on-disk txnlog diff --git a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java index 61ef4ca273c..9931b04db88 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java @@ -893,7 +893,7 @@ private static InetSocketAddress getClientAddress(Map quorum throws IOException { QuorumServer quorumServer = quorumPeers.get(myid); if (null == quorumServer) { - throw new IOException("No QuorumServer correspoding to myid " + myid); + throw new IOException("No QuorumServer corresponding to myid " + myid); } if (null == quorumServer.clientAddr) { return new InetSocketAddress(clientPort); @@ -1075,7 +1075,7 @@ public void run() { LOG.warn("Unexpected exception", e); setPeerState(ServerState.LOOKING); } finally { - // If the thread is in the the grace period, interrupt + // If the thread is in the grace period, interrupt // to come out of waiting. roZkMgr.interrupt(); roZk.shutdown(); diff --git a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java index aa13f88ab34..90713c2b5ff 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java @@ -301,7 +301,7 @@ public void parseProperties(Properties zkProp) } // Reset to MIN_SNAP_RETAIN_COUNT if invalid (less than 3) - // PurgeTxnLog.purge(File, File, int) will not allow to purge less + // PurgeTxnLog.purge(File, File, int) will not allow purging less // than 3. if (snapRetainCount < MIN_SNAP_RETAIN_COUNT) { LOG.warn("Invalid autopurge.snapRetainCount: " + snapRetainCount diff --git a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java index cde193e8685..5651aa6bf3e 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java @@ -110,7 +110,7 @@ protected void initializeAndRun(String[] args) config.parse(args[0]); } - // Start and schedule the the purge task + // Start and schedule the purge task DatadirCleanupManager purgeMgr = new DatadirCleanupManager(config .getDataDir(), config.getDataLogDir(), config .getSnapRetainCount(), config.getPurgeInterval()); diff --git a/src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java b/src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java index 404aa8ceadf..9abeca8d5fe 100644 --- a/src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java +++ b/src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java @@ -117,7 +117,7 @@ public boolean equals(Object o){ return true; } /** - * This contructor requires the quorum configuration + * This constructor requires the quorum configuration * to be declared in a separate file, and it takes the * file as an input parameter. */ @@ -146,7 +146,7 @@ public long getWeight(long id){ } /** - * Reads a configration file. Called from the constructor + * Reads a configuration file. Called from the constructor * that takes a file as an input. */ private void readConfigFile(String filename) diff --git a/src/java/test/bin/test-scripts.sh b/src/java/test/bin/test-scripts.sh index ad175badb00..88986eba1fd 100755 --- a/src/java/test/bin/test-scripts.sh +++ b/src/java/test/bin/test-scripts.sh @@ -120,7 +120,7 @@ ls $DATALOGDIR || fail $LINENO stop # -# verify autocreate diabled +# verify autocreate disabled # export ZOO_DATADIR_AUTOCREATE_DISABLE=1 diff --git a/src/java/test/org/apache/zookeeper/JaasConfiguration.java b/src/java/test/org/apache/zookeeper/JaasConfiguration.java index bf145d0249c..af631a06043 100644 --- a/src/java/test/org/apache/zookeeper/JaasConfiguration.java +++ b/src/java/test/org/apache/zookeeper/JaasConfiguration.java @@ -25,7 +25,7 @@ import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag; /** - * This helper class allows to programmatically create a JAAS configuration. + * This helper class allows one to programmatically create a JAAS configuration. * Each section must have a name and a login module, and a set of key/values * to describe login options. * @@ -72,4 +72,4 @@ public void addSection(String name, String loginModuleName, final Map * Verify that there is no deadlock in following ways: * 1) If leader is in LOOKING or FOLLOWING, we are sure there is no deadlock. - * 2) If leader in in LEADING state then we have to check that this LEADING state is + * 2) If leader is in LEADING state then we have to check that this LEADING state is * after the leader election, not the old LEADING state. *

        */ diff --git a/src/java/test/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java b/src/java/test/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java index f7f0c7ce90a..92a4909d906 100644 --- a/src/java/test/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java +++ b/src/java/test/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java @@ -122,7 +122,7 @@ public void testDuringLeaderSync() throws Exception { /** * This server will delay the response to a NEWLEADER message, and run - * reconfig command so that message at this processed in bellow order + * reconfig command so that message at this processed in below order * *
                  * NEWLEADER
        diff --git a/src/java/test/org/apache/zookeeper/server/quorum/WatchLeakTest.java b/src/java/test/org/apache/zookeeper/server/quorum/WatchLeakTest.java
        index 8bc54aa1a76..d4fa4103812 100644
        --- a/src/java/test/org/apache/zookeeper/server/quorum/WatchLeakTest.java
        +++ b/src/java/test/org/apache/zookeeper/server/quorum/WatchLeakTest.java
        @@ -153,7 +153,7 @@ public Boolean answer(InvocationOnMock invocation) throws Throwable {
                     // OK, now the follower knows that the session is valid or invalid, let's try
                     // to send the watches
                     nioCnxn.doIO(sk);
        -            // wait for the the request processor to do his job
        +            // wait for the request processor to do his job
                     Thread.sleep(1000L);
                     LOG.info("Watches processed");
                     // If session has not been validated, there must be NO watches
        diff --git a/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java b/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
        index 50867113653..4a5b81c6fb6 100644
        --- a/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
        +++ b/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
        @@ -343,7 +343,7 @@ public void processResult(int rc, String path, Object ctx, String name) {
         
                 // Wait until all updates return
                 if(!sem.tryAcquire(ClientBase.CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)) {
        -            LOG.warn("Did not aquire semaphore fast enough");
        +            LOG.warn("Did not acquire semaphore fast enough");
                 }
                 mytestfooThread.join(ClientBase.CONNECTION_TIMEOUT);
                 if (mytestfooThread.isAlive()) {
        @@ -517,7 +517,7 @@ public void processResult(int rc, String path, Object ctx, String name) {
         
                 // Wait until all updates return
                 if(!sem.tryAcquire(ClientBase.CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)) {
        -            LOG.warn("Did not aquire semaphore fast enough");
        +            LOG.warn("Did not acquire semaphore fast enough");
                 }
                 mytestfooThread.join(ClientBase.CONNECTION_TIMEOUT);
                 if (mytestfooThread.isAlive()) {
        diff --git a/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java b/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java
        index 591cf239c7a..8a7d8df8b46 100644
        --- a/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java
        +++ b/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java
        @@ -244,7 +244,7 @@ public void testTxnFailure() throws Exception {
             }
             /*
              * Does create/delete depending on the type and verifies
        -     * if cversion before the operation is 1 less than cversion afer.
        +     * if cversion before the operation is 1 less than cversion after.
              */
             private void doOp(FileTxnSnapLog logFile, int type, String path,
                     DataTree dt, DataNode parent, int cversion) throws Exception {
        diff --git a/src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java b/src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java
        index fb864f59f10..a95fc503211 100644
        --- a/src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java
        +++ b/src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java
        @@ -143,10 +143,10 @@ public void processResult(int rc, String path, Object ctx,
                     }
                     for (int i = 0; i < res.results.size(); i++) {
                         OpResult opResult = res.results.get(i);
        -                Assert.assertTrue("Did't recieve proper error response",
        +                Assert.assertTrue("Did't receive proper error response",
                                 opResult instanceof ErrorResult);
                         ErrorResult errRes = (ErrorResult) opResult;
        -                Assert.assertEquals("Did't recieve proper error code",
        +                Assert.assertEquals("Did't receive proper error code",
                                 expectedResultCodes.get(i).intValue(), errRes.getErr());
                     }
                 } else {
        diff --git a/src/java/test/org/apache/zookeeper/test/QuorumUtil.java b/src/java/test/org/apache/zookeeper/test/QuorumUtil.java
        index 314171d873a..eb3104be954 100644
        --- a/src/java/test/org/apache/zookeeper/test/QuorumUtil.java
        +++ b/src/java/test/org/apache/zookeeper/test/QuorumUtil.java
        @@ -40,8 +40,8 @@
         import org.slf4j.LoggerFactory;
         
         /**
        - * Utility for quorum testing. Setups 2n+1 peers and allows to start/stop all
        - * peers, particular peer, n peers etc.
        + * Utility for quorum testing. Setups 2n+1 peers and allows one to
        + * start/stop all peers, particular peer, n peers etc.
          */
         public class QuorumUtil {
         
        diff --git a/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java b/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java
        index 76e6df015cb..1995a8d8323 100644
        --- a/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java
        +++ b/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java
        @@ -41,7 +41,7 @@ public class QuorumUtilTest extends ZKTestCase {
              * 

        * This test ensures that all JXM beans associated to a {@link QuorumPeer} * are unregistered when shuted down ({@link QuorumUtil#shutdown(int)}). It - * allows a successfull restarting of several zookeeper servers ( + * allows a successful restarting of several zookeeper servers ( * {@link QuorumPeer}) running on the same JVM. *

        * See ZOOKEEPER-1214 for details. diff --git a/src/java/test/org/apache/zookeeper/test/SessionInvalidationTest.java b/src/java/test/org/apache/zookeeper/test/SessionInvalidationTest.java index 22a1518d0a8..dbdb928bc68 100644 --- a/src/java/test/org/apache/zookeeper/test/SessionInvalidationTest.java +++ b/src/java/test/org/apache/zookeeper/test/SessionInvalidationTest.java @@ -42,7 +42,7 @@ public class SessionInvalidationTest extends ClientBase { * * We're using our own marshalling here in order to force an operation * after the session is closed (ZooKeeper.class will not allow this). Also - * by filling the pipe with operations it increases the likelyhood that + * by filling the pipe with operations it increases the likelihood that * the server will process the create before FinalRequestProcessor * removes the session from the tracker. */ diff --git a/src/java/test/org/apache/zookeeper/test/SledgeHammer.java b/src/java/test/org/apache/zookeeper/test/SledgeHammer.java index 1e1a20896e9..7d039638172 100644 --- a/src/java/test/org/apache/zookeeper/test/SledgeHammer.java +++ b/src/java/test/org/apache/zookeeper/test/SledgeHammer.java @@ -59,10 +59,10 @@ public void run() { for (int i = 0; i < count; i++) { try { System.out.print(i + "\r"); - List childs = + List children = zk.getChildren("/hammers", false); - Collections.shuffle(childs); - for (String s : childs) { + Collections.shuffle(children); + for (String s : children) { if (s.startsWith("hammer-")) { s = "/hammers/" + s; zk.setData(s, tag, -1); diff --git a/src/java/test/org/apache/zookeeper/test/TruncateTest.java b/src/java/test/org/apache/zookeeper/test/TruncateTest.java index 955eb1e7ad8..c62f4849c98 100644 --- a/src/java/test/org/apache/zookeeper/test/TruncateTest.java +++ b/src/java/test/org/apache/zookeeper/test/TruncateTest.java @@ -227,8 +227,8 @@ public void testTruncate() throws Exception { ZooKeeper zk1 = ClientBase.createZKClient("127.0.0.1:" + port1, 15000); zk1.getData("/9", false, new Stat()); try { - // /10 wont work because the session expiration - // will match the zxid for /10 and so we wont + // /10 won't work because the session expiration + // will match the zxid for /10 and so we won't // actually truncate the zxid for /10 creation // due to an artifact of switching the xid of the standalone // /11 is the last entry in the log for the xid diff --git a/src/recipes/README.txt b/src/recipes/README.txt index 4f880cdfbba..f0f84a45146 100644 --- a/src/recipes/README.txt +++ b/src/recipes/README.txt @@ -18,7 +18,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 src/recipes/$recipename/src/c diff --git a/src/recipes/lock/src/c/acinclude.m4 b/src/recipes/lock/src/c/acinclude.m4 index d0041d8c26a..daf905cbda9 100644 --- a/src/recipes/lock/src/c/acinclude.m4 +++ b/src/recipes/lock/src/c/acinclude.m4 @@ -10,7 +10,7 @@ # DX_???_FEATURE(ON|OFF) - control the default setting fo 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)], [], diff --git a/src/recipes/lock/src/c/include/zoo_lock.h b/src/recipes/lock/src/c/include/zoo_lock.h index 5c06bbf2ff2..e3560984a09 100644 --- a/src/recipes/lock/src/c/include/zoo_lock.h +++ b/src/recipes/lock/src/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 @@ -82,7 +82,7 @@ ZOOAPI int zkr_lock_init(zkr_lock_mutex_t *mutex, zhandle_t* zh, * \param zh the zookeeper handle to use * \param path the path in zookeeper to use for locking * \param acl the acls to use in zookeeper. - * \param completion the callback thats called when lock + * \param completion the callback that's called when lock * is acquired and released. * \param cbdata the callback method is called with data * \return return 0 if successful. @@ -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 */ diff --git a/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java b/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java index 5caebee4667..6a31b155d95 100644 --- a/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java +++ b/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java @@ -53,7 +53,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 * @param acls the acls that you want to use for all the paths, @@ -69,7 +69,7 @@ public WriteLock(ZooKeeper zookeeper, String dir, List acl) { } /** - * 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 * @param acl the acls that you want to use for all the paths @@ -168,7 +168,7 @@ private class LockZooKeeperOperation implements ZooKeeperOperation { /** find if we have been created earler 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 diff --git a/src/recipes/queue/src/c/acinclude.m4 b/src/recipes/queue/src/c/acinclude.m4 index d0041d8c26a..daf905cbda9 100644 --- a/src/recipes/queue/src/c/acinclude.m4 +++ b/src/recipes/queue/src/c/acinclude.m4 @@ -10,7 +10,7 @@ # DX_???_FEATURE(ON|OFF) - control the default setting fo 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)], [], From b152ed3c1073b23a8140d1c778bcea6fbf388bfc Mon Sep 17 00:00:00 2001 From: tony mancill Date: Tue, 6 Jun 2017 17:09:00 -0700 Subject: [PATCH 2/2] ZOOKEEPER-2801: revert changes that modified variable names in code --- .../web/org/apache/zookeeper/graph/resources/raphael.js | 6 +++--- src/java/main/org/apache/zookeeper/server/WatchManager.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js index 1c5c48050b1..3740d0f02ad 100644 --- a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js @@ -3018,9 +3018,9 @@ Raphael = (function () { }; break; case "path": - var paths = path2curve(from[attr], to[attr]); - from[attr] = paths[0]; - var toPath = paths[1]; + var pathes = path2curve(from[attr], to[attr]); + from[attr] = pathes[0]; + var toPath = pathes[1]; diff[attr] = []; for (var i = 0, ii = from[attr][length]; i < ii; i++) { diff[attr][i] = [0]; diff --git a/src/java/main/org/apache/zookeeper/server/WatchManager.java b/src/java/main/org/apache/zookeeper/server/WatchManager.java index 22606d6e0a0..d00bdb63e6d 100644 --- a/src/java/main/org/apache/zookeeper/server/WatchManager.java +++ b/src/java/main/org/apache/zookeeper/server/WatchManager.java @@ -94,7 +94,7 @@ Set triggerWatch(String path, EventType type) { return triggerWatch(path, type, null); } - Set triggerWatch(String path, EventType type, Set suppress) { + Set triggerWatch(String path, EventType type, Set supress) { WatchedEvent e = new WatchedEvent(type, KeeperState.SyncConnected, path); HashSet watchers; @@ -116,7 +116,7 @@ Set triggerWatch(String path, EventType type, Set suppress) { } } for (Watcher w : watchers) { - if (suppress != null && suppress.contains(w)) { + if (supress != null && supress.contains(w)) { continue; } w.process(e);