xiaoyuyao commented on a change in pull request #547: HDDS-2928. Implement
ofs://: listStatus
URL: https://github.com/apache/hadoop-ozone/pull/547#discussion_r382219605
##########
File path:
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -664,17 +732,73 @@ private FileStatusAdapter
toFileStatusAdapter(OzoneFileStatus status) {
);
}
+ /**
+ * Generate a FileStatusAdapter for a volume.
+ * @param ozoneVolume OzoneVolume object
+ * @param uri Full URI to OFS root.
+ * @return FileStatusAdapter for a volume.
+ */
+ private static FileStatusAdapter getFileStatusAdapterForVolume(
+ OzoneVolume ozoneVolume, URI uri) {
+ String pathStr = uri.toString() +
+ OZONE_URI_DELIMITER + ozoneVolume.getName();
+ LOG.debug("getFileStatusAdapterForVolume(pathStr=" + pathStr);
+ Path path = new Path(pathStr);
+ return new FileStatusAdapter(
+ 0L,
+ path,
+ true,
+ (short)0,
+ 0L,
+ ozoneVolume.getCreationTime().getEpochSecond() * 1000,
+ 0L,
+ (short)00755, // Default directory permission, derive from ACLs later?
Review comment:
NIT: can we define as a const?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]