You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wsjz (via GitHub)" <gi...@apache.org> on 2023/06/28 08:23:25 UTC

[GitHub] [doris] wsjz commented on a diff in pull request #21283: [fix](catalog) disable FileSystem Cache to avoid too many fs cache

wsjz commented on code in PR #21283:
URL: https://github.com/apache/doris/pull/21283#discussion_r1244864299


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java:
##########
@@ -328,6 +329,17 @@ private FileCacheValue loadFiles(FileCacheKey key) {
         try {
             Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
             String finalLocation = S3Util.convertToS3IfNecessary(key.location);
+            // disable the fs cache in FileSystem, or it will always from new FileSystem
+            // and save it in cache when calling FileInputFormat.setInputPaths().
+            try {
+                Path path = new Path(finalLocation);
+                URI uri = path.toUri();
+                if (uri.getScheme() != null) {
+                    updateJobConf("fs." + uri.getScheme() + ".impl.disable.cache", "true");

Review Comment:
   s3 scheme: s3 and s3a
   cos scheme: cosn



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org