diff --git a/alluxiofs/client/const.py b/alluxiofs/client/const.py index 3f68e67..898d3f0 100644 --- a/alluxiofs/client/const.py +++ b/alluxiofs/client/const.py @@ -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 diff --git a/alluxiofs/client/core.py b/alluxiofs/client/core.py index 902071a..87bd375 100644 --- a/alluxiofs/client/core.py +++ b/alluxiofs/client/core.py @@ -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 @@ -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}"