Skip to content

Commit

Permalink
Merge pull request #60 from littleEast7/fix-bug
Browse files Browse the repository at this point in the history
fix bugs
  • Loading branch information
JiamingMai authored Dec 9, 2024
2 parents c5aefa6 + 63accf0 commit 604721f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
18 changes: 0 additions & 18 deletions alluxiofs/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,24 +458,6 @@ def read(self, file_path):
if file_status is None:
raise FileNotFoundError(f"File {file_path} not found")
return self.read_range(file_path, 0, file_status.length)
# self._validate_path(file_path)
# worker_host, worker_http_port = self._get_preferred_worker_address(
# file_path
# )
# path_id = self._get_path_hash(file_path)
# try:
# if self.data_manager:
# return b"".join(
# self._all_page_generator_alluxiocommon(
# worker_host, worker_http_port, path_id, file_path
# )
# )
# else:
# return b"".join(
# self._all_page_generator(
# worker_host, worker_http_port, path_id, file_path
# )
# )
except Exception as e:
raise Exception(
f"Error when reading file {file_path}: error {e}"
Expand Down
6 changes: 2 additions & 4 deletions alluxiofs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,12 @@ def modified(self, path, *args, **kwargs):
@fallback_handler
def head(self, path, *args, **kwargs):
path = self.unstrip_protocol(path)
return self.alluxio.head(path, **kwargs)
return self.alluxio.head(path, *args, **kwargs)

@fallback_handler
def tail(self, path, *args, **kwargs):
path = self.unstrip_protocol(path)
return self.alluxio.tail(file_path=path, **kwargs)
return self.alluxio.tail(path, *args, **kwargs)

@fallback_handler
def expand_path(self, path, *args, **kwargs):
Expand Down Expand Up @@ -479,8 +479,6 @@ def put(self, lpath, rpath, *args, **kwargs):
raise NotImplementedError

def write(self, path, value, **kwargs):
# path = self.unstrip_protocol(path)
# return self.alluxio.write(path, value)
return self.upload_data(path, value, **kwargs)

def read(self, path, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion tests/no_mock_tests/other_option_test_disabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"alluxiofs",
etcd_hosts="localhost",
etcd_port=2379,
# target_options=oss_options,
target_protocol="s3",
page_size="1MB",
)
Expand Down

0 comments on commit 604721f

Please sign in to comment.