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 instruction for using alluxiocommon #47

Merged
merged 2 commits into from
Jun 4, 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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@ ds2.count()
# End of Python example
```

#### Enable alluxiocommon enhancement module

alluxiocommon package is a native enhancement module for alluxiofs based on PyO3 rust bindings.
Currently it enhances big reads (multi-page reads from alluxio) by issuing multi-threaded requests to alluxio.

to enable it, first install alluxiocommon package:
```
pip install alluxiocommon
```
and when start the Alluxio fsspec instance, add an additional option flag:
```
alluxio_options = {"alluxio.common.extension.enable" : "True"}
alluxio_fs = fsspec.filesystem(
"alluxiofs", etcd_hosts="localhost", target_protocol="s3",
options=alluxio_options
)
```

### Running examples with Pyarrow

```
Expand Down
4 changes: 2 additions & 2 deletions alluxiofs/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ def __init__(
ALLUXIO_COMMON_EXTENSION_ENABLE in options
and options[ALLUXIO_COMMON_EXTENSION_ENABLE].lower() == "true"
):
print("Using alluxiocommon extension..")
logger.debug("alluxiocommon extension enabled.")
print("alluxiocommon extension enabled.")
logger.info("alluxiocommon extension enabled.")
ondemand_pool_disabled = (
ALLUXIO_COMMON_ONDEMANDPOOL_DISABLE in options
and options[ALLUXIO_COMMON_ONDEMANDPOOL_DISABLE].lower()
Expand Down
7 changes: 4 additions & 3 deletions alluxiofs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,10 @@ def tail(self, path, *args, **kwargs):
def expand_path(self, path, *args, **kwargs):
raise NotImplementedError

@fallback_handler
def find(self, path, *args, **kwargs):
raise NotImplementedError
# Comment it out as s3fs will return folder as well.
# @fallback_handler
# def find(self, path, *args, **kwargs):
# raise NotImplementedError

@fallback_handler
def mv(self, path1, path2, *args, **kwargs):
Expand Down
3 changes: 2 additions & 1 deletion benchmark/ray_single_node_image_loader_microbenchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ def setup_alluxio(args):
alluxio_options["alluxio.cluster.name"] = args.alluxio_cluster_name
if alluxio_options:
alluxio_kwargs["options"] = alluxio_options
return fsspec.filesystem("alluxio", **alluxio_kwargs)
# alluxio_kwargs["test_options"] = {"log_level" : "DEBUG"}
return fsspec.filesystem("alluxiofs", **alluxio_kwargs)


if __name__ == "__main__":
Expand Down
Loading