Skip to content

Commit

Permalink
fix again.
Browse files Browse the repository at this point in the history
  • Loading branch information
YichuanSun committed Jul 31, 2024
1 parent 689cdcf commit 1ea5903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions alluxiofs/client/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
FULL_PAGE_URL_FORMAT = (
"http://{worker_host}:{http_port}/v1/file/{path_id}/page/{page_index}?ufsFullPath={file_path}"
)
PAGE_URL_FORMAT = ("http://{worker_host}:{http_port}/v1/file/{path_id}/page/{page_index}"
"?offset={page_offset}&length={page_length}&ufsFullPath={file_path}")
PAGE_URL_FORMAT = ("http://{worker_host}:{http_port}/v1/file/{path_id}"
"/page/{page_index}?offset={page_offset}&length={page_length}&ufsFullPath={file_path}")
WRITE_PAGE_URL_FORMAT = (
"http://{worker_host}:{http_port}/v1/file/{path_id}/page/{page_index}/?ufsFullPath={file_path}"
"http://{worker_host}:{http_port}/v1/file/{path_id}/page/{page_index}?ufsFullPath={file_path}"
)
PAGE_PATH_URL_FORMAT = (
"/v1/file/{path_id}/page/{page_index}?ufsFullPath={file_path}"
"/v1/file/{path_id}/page/{page_index}"
)
GET_FILE_STATUS_URL_FORMAT = "http://{worker_host}:{http_port}/v1/info"
LOAD_URL_FORMAT = "http://{worker_host}:{http_port}/v1/load"
Expand Down
6 changes: 3 additions & 3 deletions tests/client/test_fake_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def server(event_loop):
async def get_file_handler(request: web.Request) -> web.Response:
alluxio: dict = request.app["alluxio"]
bytes = alluxio[request.match_info["file_path"]][
bytes = alluxio[request.match_info["path_id"]][
request.match_info["page_index"]
]

Expand All @@ -28,12 +28,12 @@ async def get_file_handler(request: web.Request) -> web.Response:
async def put_file_handler(request: web.Request) -> web.Response:
data = await request.read()
alluxio: dict = request.app["alluxio"]
alluxio[request.match_info["file_path"]] = {
alluxio[request.match_info["path_id"]] = {
request.match_info["page_index"]: data
}
return web.json_response(
{
"file_path": request.match_info["file_path"],
"path_id": request.match_info["path_id"],
}
)

Expand Down

0 comments on commit 1ea5903

Please sign in to comment.