File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
paimon-common/src/main/java/org/apache/paimon/fs
paimon-core/src/main/java/org/apache/paimon/rest Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ default FileStatus[] listDirectories(Path path) throws IOException {
237237 * and do not have the ability to close them.
238238 */
239239 @ Override
240- default void close () {}
240+ default void close () throws IOException {}
241241
242242 // -------------------------------------------------------------------------
243243 // utils
Original file line number Diff line number Diff line change 2727import org .apache .paimon .fs .SeekableInputStream ;
2828import org .apache .paimon .options .Options ;
2929import org .apache .paimon .rest .responses .GetTableTokenResponse ;
30+ import org .apache .paimon .utils .IOUtils ;
3031import org .apache .paimon .utils .ThreadUtils ;
3132
3233import org .apache .paimon .shade .caffeine2 .com .github .benmanes .caffeine .cache .Cache ;
@@ -53,11 +54,7 @@ public class RESTTokenFileIO implements FileIO {
5354 .expireAfterAccess (30 , TimeUnit .MINUTES )
5455 .maximumSize (100 )
5556 .removalListener (
56- (ignored , value , cause ) -> {
57- if (value != null ) {
58- ((FileIO ) value ).close ();
59- }
60- })
57+ (ignored , value , cause ) -> IOUtils .closeQuietly ((FileIO ) value ))
6158 .scheduler (
6259 Scheduler .forScheduledExecutorService (
6360 Executors .newSingleThreadScheduledExecutor (
You can’t perform that action at this time.
0 commit comments