From ddb7b099c669941ae2b780653f25d93c41c5bfa4 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Fri, 2 Jun 2023 21:50:17 +0200 Subject: [PATCH] Update airbase to 140 This change makes it possible to build project with project.build.targetJdk 21. Additionally suppress error-prone `CheckReturnValue` violations with Guava 32.0.0 These are the result of following changes: - https://github.com/google/guava/commit/a7f6b089d71b853728e0885334f6dafd2e51be25 - https://github.com/google/guava/commit/0ef6688750d6432e42830dbe5b522cf8c8182790 --- client/trino-cli/src/main/java/io/trino/cli/Console.java | 3 ++- .../plugin/hudi/split/HudiBackgroundSplitLoader.java | 2 +- .../raptor/legacy/util/TestPrioritizedFifoExecutor.java | 9 ++++++--- pom.xml | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/trino-cli/src/main/java/io/trino/cli/Console.java b/client/trino-cli/src/main/java/io/trino/cli/Console.java index 37323207226f..8d41397e2177 100644 --- a/client/trino-cli/src/main/java/io/trino/cli/Console.java +++ b/client/trino-cli/src/main/java/io/trino/cli/Console.java @@ -147,7 +147,8 @@ public boolean run() Runtime.getRuntime().addShutdownHook(new Thread(() -> { exiting.set(true); interruptor.interrupt(); - awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS); + @SuppressWarnings("CheckReturnValue") + boolean ignored = awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS); // Terminal closing restores terminal settings and releases underlying system resources closeTerminal(); })); diff --git a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/split/HudiBackgroundSplitLoader.java b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/split/HudiBackgroundSplitLoader.java index 96db782362ff..f00602f878fb 100644 --- a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/split/HudiBackgroundSplitLoader.java +++ b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/split/HudiBackgroundSplitLoader.java @@ -74,7 +74,7 @@ public void start() .map(partition -> Futures.submit(() -> loadSplits(partition), executor)) .peek(this::hookErrorListener) .collect(Collectors.toList()); - Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor()); + hookErrorListener(Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor())); return null; }, directExecutor()); diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/util/TestPrioritizedFifoExecutor.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/util/TestPrioritizedFifoExecutor.java index 00dbc2ff5a6d..08ee76ad5830 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/util/TestPrioritizedFifoExecutor.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/util/TestPrioritizedFifoExecutor.java @@ -70,7 +70,8 @@ public void testCounter() futures.add(executor.submit(() -> { try { // wait for the go signal - awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES); + @SuppressWarnings("CheckReturnValue") + boolean ignored = awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES); assertFalse(futures.get(taskNumber).isDone()); @@ -90,7 +91,8 @@ public void testCounter() // signal go and wait for tasks to complete startLatch.countDown(); - awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES); + @SuppressWarnings("CheckReturnValue") + boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES); assertEquals(counter.get(), totalTasks); // since this is a fifo executor with one thread and completeLatch is decremented inside the future, @@ -142,7 +144,8 @@ private void testBound(int maxThreads, int totalTasks) // signal go and wait for tasks to complete startLatch.countDown(); - awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES); + @SuppressWarnings("CheckReturnValue") + boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES); assertFalse(failed.get()); } diff --git a/pom.xml b/pom.xml index 1ffddd941bf6..075a67cd89b3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.airlift airbase - 139 + 140 io.trino