-
Notifications
You must be signed in to change notification settings - Fork 475
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
HDDS-3947: Sort DNs for client when the key is a file for #getFileStatus #listStatus APIs #1385
Changes from all commits
98663c8
b016bfa
0ec0ee3
088e40d
b48a1ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,28 @@ | |
* Ozone Manager FileSystem interface. | ||
*/ | ||
public interface OzoneManagerFS extends IOzoneAcl { | ||
|
||
/** | ||
* Get file status for a file or a directory. | ||
* | ||
* @param args the args of the key provided by client. | ||
* @return file status. | ||
* @throws IOException if file or bucket or volume does not exist | ||
*/ | ||
OzoneFileStatus getFileStatus(OmKeyArgs args) throws IOException; | ||
|
||
/** | ||
* Get file status for a file or a directory. | ||
* | ||
* @param args the args of the key provided by client. | ||
* @param clientAddress a hint to key manager, order the datanode in returned | ||
* pipeline by distance between client and datanode. | ||
* @return file status. | ||
* @throws IOException if file or bucket or volume does not exist | ||
*/ | ||
OzoneFileStatus getFileStatus(OmKeyArgs args, String clientAddress) | ||
throws IOException; | ||
|
||
void createDirectory(OmKeyArgs args) throws IOException; | ||
|
||
OpenKeySession createFile(OmKeyArgs args, boolean isOverWrite, | ||
|
@@ -49,6 +69,37 @@ OpenKeySession createFile(OmKeyArgs args, boolean isOverWrite, | |
*/ | ||
OmKeyInfo lookupFile(OmKeyArgs args, String clientAddress) throws IOException; | ||
|
||
/** | ||
* List the status for a file or a directory and its contents. | ||
* | ||
* @param keyArgs the args of the key provided by client. | ||
* @param recursive For a directory if true all the descendants of a | ||
* particular directory are listed | ||
* @param startKey Key from which listing needs to start. If startKey | ||
* exists its status is included in the final list. | ||
* @param numEntries Number of entries to list from the start key | ||
* @return list of file status | ||
* @throws IOException if file or bucket or volume does not exist | ||
*/ | ||
List<OzoneFileStatus> listStatus(OmKeyArgs keyArgs, boolean recursive, | ||
String startKey, long numEntries) | ||
throws IOException; | ||
|
||
/** | ||
* List the status for a file or a directory and its contents. | ||
* | ||
* @param keyArgs the args of the key provided by client. | ||
* @param recursive For a directory if true all the descendants of a | ||
* particular directory are listed | ||
* @param startKey Key from which listing needs to start. If startKey | ||
* exists its status is included in the final list. | ||
* @param numEntries Number of entries to list from the start key | ||
* @param clientAddress a hint to key manager, order the datanode in returned | ||
* pipeline by distance between client and datanode. | ||
* @return list of file status | ||
* @throws IOException if file or bucket or volume does not exist | ||
*/ | ||
List<OzoneFileStatus> listStatus(OmKeyArgs keyArgs, boolean recursive, | ||
String startKey, long numEntries) throws IOException; | ||
String startKey, long numEntries, String clientAddress) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my comment on the previous PR:
I meant both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I will make the changes in my next commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adoroszlai , Sorry for re-opening the discussion on this comment. On a second thought There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It is also used by several tests, which all pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, addressed in my new commit |
||
throws IOException; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenSammi Was this instance of
getRefreshPipeline
condition retained in HDDS-3658 intentionally?