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

Add hash node key #31

Merged
merged 1 commit into from
Apr 5, 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
3 changes: 2 additions & 1 deletion alluxiofs/client/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
ALLUXIO_ETCD_PASSWORD_KEY = "alluxio.etcd.password"
ALLUXIO_PAGE_SIZE_KEY = "alluxio.worker.page.store.page.size"
ALLUXIO_PAGE_SIZE_DEFAULT_VALUE = "1MB"
ALLUXIO_HASH_NODE_PER_WORKER_KEY = (
ALLUXIO_HASH_NODE_PER_WORKER_KEY1 = (
"alluxio.user.consistent.hash.virtual.node.count.per.worker"
)
ALLUXIO_HASH_NODE_PER_WORKER_KEY2 = "alluxio.user.worker.selection.policy.consistent.hash.virtual.node.count.per.worker"
ALLUXIO_WORKER_HTTP_SERVER_PORT_KEY = "alluxio.worker.http.server.port"
ALLUXIO_WORKER_HTTP_SERVER_PORT_DEFAULT_VALUE = 28080
ALLUXIO_HASH_NODE_PER_WORKER_DEFAULT_VALUE = 5
Expand Down
14 changes: 11 additions & 3 deletions alluxiofs/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from requests.adapters import HTTPAdapter

from .const import ALLUXIO_HASH_NODE_PER_WORKER_DEFAULT_VALUE
from .const import ALLUXIO_HASH_NODE_PER_WORKER_KEY
from .const import ALLUXIO_HASH_NODE_PER_WORKER_KEY1
from .const import ALLUXIO_HASH_NODE_PER_WORKER_KEY2
from .const import ALLUXIO_PAGE_SIZE_DEFAULT_VALUE
from .const import ALLUXIO_PAGE_SIZE_KEY
from .const import ALLUXIO_SUCCESS_IDENTIFIER
Expand Down Expand Up @@ -180,9 +181,16 @@ def __init__(
if ALLUXIO_PAGE_SIZE_KEY in options:
page_size = options[ALLUXIO_PAGE_SIZE_KEY]
self.logger.debug(f"Page size is set to {page_size}")
if ALLUXIO_HASH_NODE_PER_WORKER_KEY in options:
if ALLUXIO_HASH_NODE_PER_WORKER_KEY1 in options:
hash_node_per_worker = int(
options[ALLUXIO_HASH_NODE_PER_WORKER_KEY]
options[ALLUXIO_HASH_NODE_PER_WORKER_KEY1]
)
self.logger.debug(
f"Hash node per worker is set to {hash_node_per_worker}"
)
if ALLUXIO_HASH_NODE_PER_WORKER_KEY2 in options:
hash_node_per_worker = int(
options[ALLUXIO_HASH_NODE_PER_WORKER_KEY2]
)
self.logger.debug(
f"Hash node per worker is set to {hash_node_per_worker}"
Expand Down
Loading