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

fix typos in sh and py files #4379

Merged
merged 1 commit into from
May 22, 2024
Merged
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
6 changes: 3 additions & 3 deletions bin/bookkeeper-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dev/publish-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions stream/clients/python/bookkeeper/common/protobuf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stream/clients/python/bookkeeper/common/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion stream/clients/python/bookkeeper/common/router/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions stream/clients/python/bookkeeper/common/timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions stream/clients/python/bookkeeper/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion stream/clients/python/bookkeeper/kv/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/src/test/bash/bk_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down