You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by at...@apache.org on 2020/07/24 04:29:50 UTC
[lucene-solr] branch master updated: Use FileSystem.newInstance
instead of FileSystem.get in HDFSBackupRepository (#1682)
This is an automated email from the ASF dual-hosted git repository.
atri pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new ec007c4 Use FileSystem.newInstance instead of FileSystem.get in HDFSBackupRepository (#1682)
ec007c4 is described below
commit ec007c4bf27ea4e9ff7d77ae6c79a846b9f6a1a4
Author: Atri Sharma <at...@gmail.com>
AuthorDate: Fri Jul 24 09:57:58 2020 +0530
Use FileSystem.newInstance instead of FileSystem.get in HDFSBackupRepository (#1682)
FileSystem.get can cause FileSystem closed exceptions, especially with S3.
---
.../org/apache/solr/core/backup/repository/HdfsBackupRepository.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java b/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java
index 30d58fe..ada0b57 100644
--- a/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java
+++ b/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java
@@ -98,7 +98,7 @@ public class HdfsBackupRepository implements BackupRepository {
}
try {
- this.fileSystem = FileSystem.get(this.baseHdfsPath.toUri(), this.hdfsConfig);
+ this.fileSystem = FileSystem.newInstance(this.baseHdfsPath.toUri(), this.hdfsConfig);
} catch (IOException e) {
throw new SolrException(ErrorCode.SERVER_ERROR, e);
}