File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
paimon-filesystems/paimon-s3-impl/src/main/java/org/apache/paimon/s3 Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change 3030import org .apache .hadoop .fs .FileSystem ;
3131
3232import java .io .IOException ;
33- import java .io .UncheckedIOException ;
3433import java .util .Map ;
3534import java .util .concurrent .ConcurrentHashMap ;
3635
@@ -146,19 +145,12 @@ private FileSystem getFileSystem(org.apache.hadoop.fs.Path path) throws IOExcept
146145 if (authority == null ) {
147146 authority = "DEFAULT" ;
148147 }
149- try {
150- return map .computeIfAbsent (
151- authority ,
152- k -> {
153- try {
154- return createFileSystem (path );
155- } catch (IOException e ) {
156- throw new UncheckedIOException (e );
157- }
158- });
159- } catch (UncheckedIOException e ) {
160- throw e .getCause ();
148+ FileSystem fs = map .get (authority );
149+ if (fs == null ) {
150+ fs = createFileSystem (path );
151+ map .put (authority , fs );
161152 }
153+ return fs ;
162154 }
163155
164156 protected abstract FileSystem createFileSystem (org .apache .hadoop .fs .Path path )
You can’t perform that action at this time.
0 commit comments