diff --git a/bin/bookkeeper-daemon.sh b/bin/bookkeeper-daemon.sh index d6b0dbec5eb..ed144533fb0 100755 --- a/bin/bookkeeper-daemon.sh +++ b/bin/bookkeeper-daemon.sh @@ -206,9 +206,9 @@ case $startStop in if [ "$?" == 0 ] then sleep 3 - paramaters="$*" - startParamaters=${paramaters//-force/} - start "$startParamaters" + parameters="$*" + startParameters=${parameters//-force/} + start "$startParameters" else echo "WARNNING : $command failed restart, for $command is not stopped completely." fi diff --git a/dev/publish-docker-images.sh b/dev/publish-docker-images.sh index 66d3e805e5f..7ed40bbb99f 100755 --- a/dev/publish-docker-images.sh +++ b/dev/publish-docker-images.sh @@ -45,7 +45,7 @@ DOCKER_ORG="${DOCKER_ORG:-apachebookkeeper}" docker login ${DOCKER_REGISTRY} -u="${DOCKER_USER}" -p="${DOCKER_PASSWORD}" if [ $? -ne 0 ]; then - echo "Failed to loging to Docker Hub" + echo "Failed to login to Docker Hub" exit 1 fi diff --git a/stream/clients/python/bookkeeper/common/datetime_helpers.py b/stream/clients/python/bookkeeper/common/datetime_helpers.py index a4671648d8e..025b5a7ab80 100644 --- a/stream/clients/python/bookkeeper/common/datetime_helpers.py +++ b/stream/clients/python/bookkeeper/common/datetime_helpers.py @@ -152,7 +152,7 @@ def to_rfc3339(value, ignore_zone=True): ignore_zone (bool): If True, then the timezone (if any) of the datetime object is ignored and the datetime is treated as UTC. Returns: - str: The RFC3339 formated string representing the datetime. + str: The RFC3339 formatted string representing the datetime. """ if not ignore_zone and value.tzinfo is not None: # Convert to UTC and remove the time zone info. diff --git a/stream/clients/python/bookkeeper/common/protobuf_helpers.py b/stream/clients/python/bookkeeper/common/protobuf_helpers.py index 7cfdfa51ad9..939f0242358 100644 --- a/stream/clients/python/bookkeeper/common/protobuf_helpers.py +++ b/stream/clients/python/bookkeeper/common/protobuf_helpers.py @@ -251,10 +251,10 @@ def field_mask(original, modified): """Create a field mask by comparing two messages. Args: original (~google.protobuf.message.Message): the original message. - If set to None, this field will be interpretted as an empty + If set to None, this field will be interpreted as an empty message. modified (~google.protobuf.message.Message): the modified message. - If set to None, this field will be interpretted as an empty + If set to None, this field will be interpreted as an empty message. Returns: google.protobuf.field_mask_pb2.FieldMask: field mask that contains diff --git a/stream/clients/python/bookkeeper/common/retry.py b/stream/clients/python/bookkeeper/common/retry.py index fac1fcc3c77..2ac93ef881c 100644 --- a/stream/clients/python/bookkeeper/common/retry.py +++ b/stream/clients/python/bookkeeper/common/retry.py @@ -13,7 +13,7 @@ """Helpers for retrying functions with exponential back-off. The :class:`Retry` decorator can be used to retry functions that raise exceptions using exponential backoff. Because a exponential sleep algorithm is -used, the retry is limited by a `deadline`. The deadline is the maxmimum amount +used, the retry is limited by a `deadline`. The deadline is the maximum amount of time a method can block. This is used instead of total number of retries because it is difficult to ascertain the amount of time a function can block when using total number of retries and exponential backoff. diff --git a/stream/clients/python/bookkeeper/common/router/router.py b/stream/clients/python/bookkeeper/common/router/router.py index 8e67dc97df8..adcfb620e27 100644 --- a/stream/clients/python/bookkeeper/common/router/router.py +++ b/stream/clients/python/bookkeeper/common/router/router.py @@ -11,7 +11,7 @@ # limitations under the License. try: - # Try with C based implemenation if available + # Try with C based implementation if available import mmh3 except ImportError: # Fallback to pure python diff --git a/stream/clients/python/bookkeeper/common/timeout.py b/stream/clients/python/bookkeeper/common/timeout.py index 6b208bb2bc4..2edd83b328c 100644 --- a/stream/clients/python/bookkeeper/common/timeout.py +++ b/stream/clients/python/bookkeeper/common/timeout.py @@ -154,9 +154,9 @@ class ExponentialTimeout(object): deadline (Optional[float]): The overall deadline across all invocations. This is used to prevent a very large calculated timeout from pushing the overall execution time over the deadline. - This is especially useful in conjuction with + This is especially useful in conjunction with :mod:`bookkeeper.common.retry`. If ``None``, the timeouts will not - be adjusted to accomodate an overall deadline. + be adjusted to accommodate an overall deadline. """ def __init__( self, diff --git a/stream/clients/python/bookkeeper/common/util.py b/stream/clients/python/bookkeeper/common/util.py index cb47176406e..bbd0e8c6849 100644 --- a/stream/clients/python/bookkeeper/common/util.py +++ b/stream/clients/python/bookkeeper/common/util.py @@ -17,13 +17,13 @@ __PYTHON3__ = sys.version_info >= (3, 0) -def to_bytes(n, length, endianess='big'): +def to_bytes(n, length, endianness='big'): if __PYTHON3__: - return n.to_bytes(length, endianess) + return n.to_bytes(length, endianness) else: h = '%x' % n s = ('0'*(len(h) % 2) + h).zfill(length*2).decode('hex') - return s if endianess == 'big' else s[::-1] + return s if endianness == 'big' else s[::-1] def new_hostname_with_port(hostname, default_port=4181): diff --git a/stream/clients/python/bookkeeper/kv/futures.py b/stream/clients/python/bookkeeper/kv/futures.py index ae626a7e98c..2946d78d573 100644 --- a/stream/clients/python/bookkeeper/kv/futures.py +++ b/stream/clients/python/bookkeeper/kv/futures.py @@ -21,7 +21,7 @@ class Future(bookkeeper.common.future.Future): """Encapsulation of the asynchronous execution of an action. - This object is returned from asychronous bookkeeper calls, and is the + This object is returned from asynchronous bookkeeper calls, and is the interface to determine the status of those calls. This object should not be created directly, but is returned by other methods in this library. diff --git a/stream/clients/python/tests/unit/bookkeeper/common/future/test__helpers.py b/stream/clients/python/tests/unit/bookkeeper/common/future/test__helpers.py index 804e3bef880..880141d52c0 100644 --- a/stream/clients/python/tests/unit/bookkeeper/common/future/test__helpers.py +++ b/stream/clients/python/tests/unit/bookkeeper/common/future/test__helpers.py @@ -16,9 +16,9 @@ @mock.patch('threading.Thread', autospec=True) -def test_start_deamon_thread(unused_thread): - deamon_thread = _helpers.start_daemon_thread(target=mock.sentinel.target) - assert deamon_thread.daemon is True +def test_start_daemon_thread(unused_thread): + daemon_thread = _helpers.start_daemon_thread(target=mock.sentinel.target) + assert daemon_thread.daemon is True def test_safe_invoke_callback(): diff --git a/stream/clients/python/tests/unit/bookkeeper/common/test_grpc_helpers.py b/stream/clients/python/tests/unit/bookkeeper/common/test_grpc_helpers.py index ad9daf8b396..f139ee3cf19 100644 --- a/stream/clients/python/tests/unit/bookkeeper/common/test_grpc_helpers.py +++ b/stream/clients/python/tests/unit/bookkeeper/common/test_grpc_helpers.py @@ -77,7 +77,7 @@ def test_wrap_stream_okay(): assert responses == expected_responses -def test_wrap_stream_iterable_iterface(): +def test_wrap_stream_iterable_interface(): response_iter = mock.create_autospec(grpc.Call, instance=True) callable_ = mock.Mock(spec=['__call__'], return_value=response_iter) diff --git a/tests/scripts/src/test/bash/bk_test.sh b/tests/scripts/src/test/bash/bk_test.sh index 3c7b02e6fe1..1de7caeca25 100755 --- a/tests/scripts/src/test/bash/bk_test.sh +++ b/tests/scripts/src/test/bash/bk_test.sh @@ -113,7 +113,7 @@ uname -mprsv for shell in ${shells}; do echo - # check for existance of shell + # check for existence of shell if [ ! -x ${shell} ]; then bk_warn "unable to run tests with the ${shell} shell" continue