swamirishi commented on code in PR #7440:
URL: https://github.com/apache/ozone/pull/7440#discussion_r1846058185
##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java:
##########
@@ -549,6 +558,31 @@ private FileStatusAdapter
toFileStatusAdapter(OzoneFileStatus status,
);
}
+ private FileStatusAdapter toFileStatusAdapter(OzoneFileStatusLight status,
+ String owner, URI defaultUri,
Path workingDir) {
+ BasicOmKeyInfo keyInfo = status.getKeyInfo();
+ short replication = (short) keyInfo.getReplicationConfig()
+ .getRequiredNodes();
+ return new FileStatusAdapter(
+ keyInfo.getDataSize(),
+ keyInfo.getReplicatedSize(),
+ new Path(OZONE_URI_DELIMITER + keyInfo.getKeyName())
+ .makeQualified(defaultUri, workingDir),
+ status.isDirectory(),
+ replication,
+ status.getBlockSize(),
+ keyInfo.getModificationTime(),
+ keyInfo.getModificationTime(),
+ status.isDirectory() ? (short) 00777 : (short) 00666,
Review Comment:
yeah we should pursue this in a followup task for this. There is too much
duplication b/w BasicOzoneFIleSystem & BasicRootedOzoneFileSystem,
BasicOzoneClientAdapterImpl & BasicRootedOzoneClientAdapterImpl. This created a
lot of confusion while implementing it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]