Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZOOKEEPER-4834] fix typos in Apache ZooKeeper #2167

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -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",
]
2 changes: 1 addition & 1 deletion owaspSuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions zookeeper-client/zookeeper-client-c/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 doesnt 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 doesnt 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.
Expand Down
6 changes: 3 additions & 3 deletions zookeeper-client/zookeeper-client-c/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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.]
Expand Down
6 changes: 3 additions & 3 deletions zookeeper-client/zookeeper-client-c/acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)],
[],
Expand Down
16 changes: 8 additions & 8 deletions zookeeper-client/zookeeper-client-c/include/zookeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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.
Expand All @@ -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,
Expand All @@ -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);
Expand All @@ -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,
Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/src/addrvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/src/mt_adaptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/src/recordio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/src/winport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/src/winport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);


Expand Down
6 changes: 3 additions & 3 deletions zookeeper-client/zookeeper-client-c/src/zookeeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/tests/TestClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,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 dont need to test that for now
// we should fix that though soon!
watchctx_t ctx, ctx_ch;
zhandle_t *zk, *zk_ch;
Expand Down
4 changes: 2 additions & 2 deletions zookeeper-client/zookeeper-client-c/tests/TestOperations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class Zookeeper_operations : public CPPUNIT_NS::TestFixture
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
Expand Down Expand Up @@ -626,7 +626,7 @@ class Zookeeper_operations : public CPPUNIT_NS::TestFixture
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
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/tests/TestWatchers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class Zookeeper_watchers : public CPPUNIT_NS::TestFixture
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);
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/tests/ThreadingUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion zookeeper-client/zookeeper-client-c/tests/ZKMocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class ZookeeperServer: public Mock_socket
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;}

Expand Down
2 changes: 1 addition & 1 deletion zookeeper-contrib/zookeeper-contrib-loggraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private void init() throws IOException {
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading
Loading