You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hexiaoqiao (via GitHub)" <gi...@apache.org> on 2023/07/18 13:06:36 UTC
[GitHub] [hadoop] Hexiaoqiao commented on a diff in pull request #5847: HADOOP-18807. Close child file systems in ViewFileSystem when cache is disabled.
Hexiaoqiao commented on code in PR #5847:
URL: https://github.com/apache/hadoop/pull/5847#discussion_r1266746765
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java:
##########
@@ -1926,12 +1926,41 @@ enum RenameStrategy {
SAME_FILESYSTEM_ACROSS_MOUNTPOINT
}
+ private void closeChildFileSystems(FileSystem fs) throws IOException {
+ if (fs != null) {
+ FileSystem[] childFs = fs.getChildFileSystems();
+ for (FileSystem child : childFs) {
+ if (child != null) {
+ String disableCacheName = String.format("fs.%s.impl.disable.cache",
+ child.getUri().getScheme());
+ if (config.getBoolean(disableCacheName, false)) {
Review Comment:
@steveloughran means that we should only check viewfs config, rather than every child config here. As you mentioned code segment, it also shows that check viewfs only is enough IMO.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org