ayushtkn commented on a change in pull request #2060:
URL: https://github.com/apache/hadoop/pull/2060#discussion_r443502486
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
##########
@@ -850,9 +850,27 @@ public FsServerDefaults getServerDefaults(Path f) throws
IOException {
@Override
public ContentSummary getContentSummary(Path f) throws IOException {
+ return getContentSummaryInternal(f);
+ }
+
+ private ContentSummary getContentSummaryInternal(Path f) throws IOException {
InodeTree.ResolveResult<FileSystem> res =
- fsState.resolve(getUriPath(f), true);
- return res.targetFileSystem.getContentSummary(res.remainingPath);
+ fsState.resolve(getUriPath(f), true);
+ if (!res.isInternalDir()) {
Review comment:
The logics here are introduced for InternalDirOfViewFs,
I feel rather than touching the normal API, you can implement
getContentSummary() in `InternalDirOfViewFs` and have your logic there, That is
how all API's which have specific logic for Internal Links are handling. Lets
keep the design that way only.
The only thing that you would need there is fsState which isn't there as of
now, that you can pass through the constructor, In HDFS-15427, it is being
passed, so you can utilize that fsState and independently implement it in
`InternalDirOfViewFs`
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]