[
https://issues.apache.org/jira/browse/HDDS-7419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Duong updated HDDS-7419:
------------------------
Description:
The target of this task is to deprecate the `lookupFile` interface and use
GetKeyInfo for the OFS use case.
The gap between OFS and object storage use cases (like S3) is that due to a
file system nature, OFS has to answer the file read requests from its client. A
file read input is a file path and OFS needs to be able to decide if the given
path is a valid file. To be specific, if the given path is not a file (but a
directory), OFS should return an error. Reading empty files is a valid use case.
{code:java}
// throws IOException if the given path is not a file.
FileSystem.open(path)
{code}
The *lookupKey* API returns the same content for an empty file and directory.
Today this is solved in Ozone by the *lookupFile* API, detecting if the given
key is a directory and throwing an error on server-side.
{code:java}
throw new OMException(ResultCodes.NOT_A_FILE);
{code}
We design GetKeyInfo to replace *lookupKey* and it inherits the same limit.
was:
The target of this task is to deprecate the `lookupFile` interface and use
GetKeyInfo for OFS use-case.
The gap between OFS and object storage use cases (like S3) is that due to a
file system nature, OFS has to answer the read file requests from its client. A
file read input is a file path and OFS needs to be able to decide if the path
is a valid file.
A read on valid empty files should return empty content, yet a read on a
directory should result in an error.
Today this is solved in Ozone by the lookupFile(keyName) API, detecting if the
given key is a directory and throwing error on server-side.
{code:java}
throw new OMException(ResultCodes.NOT_A_FILE);
{code}
GetKeyInfo returns the same content for a directory key and an empty file key.
> GetKeyInfo integration for OFS.
> -------------------------------
>
> Key: HDDS-7419
> URL: https://issues.apache.org/jira/browse/HDDS-7419
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Duong
> Priority: Major
>
> The target of this task is to deprecate the `lookupFile` interface and use
> GetKeyInfo for the OFS use case.
> The gap between OFS and object storage use cases (like S3) is that due to a
> file system nature, OFS has to answer the file read requests from its client.
> A file read input is a file path and OFS needs to be able to decide if the
> given path is a valid file. To be specific, if the given path is not a file
> (but a directory), OFS should return an error. Reading empty files is a valid
> use case.
> {code:java}
> // throws IOException if the given path is not a file.
> FileSystem.open(path)
> {code}
> The *lookupKey* API returns the same content for an empty file and directory.
> Today this is solved in Ozone by the *lookupFile* API, detecting if the given
> key is a directory and throwing an error on server-side.
> {code:java}
> throw new OMException(ResultCodes.NOT_A_FILE);
> {code}
> We design GetKeyInfo to replace *lookupKey* and it inherits the same limit.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]