This is an automated email from the ASF dual-hosted git repository.

cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 582dc40dac DRILL-8523: Remove Support for Java 8 (#2987)
582dc40dac is described below

commit 582dc40dacf0c85de18f0a4a0d72cac966da73f6
Author: Charles S. Givre <cgi...@apache.org>
AuthorDate: Thu May 8 07:48:15 2025 -0400

    DRILL-8523: Remove Support for Java 8 (#2987)
---
 .github/workflows/ci.yml                           |  7 +-
 .../drill/exec/compile/ClassCompilerSelector.java  | 12 +--
 .../drill/exec/compile/ClassTransformer.java       | 89 ++++++++++------------
 .../drill/exec/compile/QueryClassLoader.java       | 21 ++---
 .../test/java/org/apache/drill/PlanningBase.java   | 33 ++++----
 .../exec/compile/TestClassTransformation.java      | 16 ++--
 .../physical/impl/TestNestedDateTimeTimestamp.java | 24 +++---
 .../physical/impl/writer/TestParquetWriter.java    | 12 ++-
 .../org/apache/drill/exec/rpc/data/TestBitRpc.java |  2 +-
 .../exec/vector/accessor/GenericAccessorTest.java  |  2 +-
 .../work/fragment/FragmentStatusReporterTest.java  |  8 +-
 exec/jdbc-all/pom.xml                              |  2 +-
 pom.xml                                            | 45 +++++++----
 13 files changed, 147 insertions(+), 126 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 243c009185..c148858e70 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -34,11 +34,8 @@ jobs:
     strategy:
       matrix:
         # Java versions to run unit tests
-        java: [ '8', '11', '17' ]
+        java: [ '11', '17', '21' ]
         profile: ['default-hadoop']
-        include:
-          - java: '8'
-            profile: 'hadoop-2'
       fail-fast: false
     steps:
       - name: Checkout
@@ -82,7 +79,7 @@ jobs:
         uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
-          java-version: '8'
+          java-version: '11'
           cache: 'maven'
       # Caches built protobuf library
       - name: Cache protobufs
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassCompilerSelector.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassCompilerSelector.java
index f35942eac8..e5c40139bf 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassCompilerSelector.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassCompilerSelector.java
@@ -17,10 +17,6 @@
  */
 package org.apache.drill.exec.compile;
 
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Map;
-
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.exceptions.UserException;
 import org.apache.drill.exec.compile.ClassTransformer.ClassNames;
@@ -34,6 +30,12 @@ import 
org.apache.drill.exec.server.options.TypeValidators.BooleanValidator;
 import org.apache.drill.exec.server.options.TypeValidators.LongValidator;
 import org.apache.drill.exec.server.options.TypeValidators.StringValidator;
 import org.codehaus.commons.compiler.CompileException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Map;
 
 /**
  * Selects between the two supported Java compilers: Janino and
@@ -65,7 +67,7 @@ import org.codehaus.commons.compiler.CompileException;
  */
 
 public class ClassCompilerSelector {
-  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ClassCompilerSelector.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(ClassCompilerSelector.class);
 
   public enum CompilerPolicy {
     DEFAULT, JDK, JANINO;
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
index e777a883d1..83e401f248 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
@@ -17,11 +17,11 @@
  */
 package org.apache.drill.exec.compile;
 
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Set;
-
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.DrillFileUtils;
@@ -35,11 +35,10 @@ import org.codehaus.commons.compiler.CompileException;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.tree.ClassNode;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Compiles generated code, merges the resulting class with the
@@ -52,7 +51,7 @@ import com.google.common.collect.Sets;
 public class ClassTransformer {
   private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ClassTransformer.class);
 
-  private static final int MAX_SCALAR_REPLACE_CODE_SIZE = 2*1024*1024; // 2meg
+  private static final int MAX_SCALAR_REPLACE_CODE_SIZE = 2 * 1024 * 1024; // 
2meg
 
   private final ByteCodeLoader byteCodeLoader = new ByteCodeLoader();
   private final DrillConfig config;
@@ -72,7 +71,7 @@ public class ClassTransformer {
      * @throws IllegalArgumentException if the string doesn't match any of the 
enum values
      */
     public static ScalarReplacementOption fromString(final String s) {
-      switch(s) {
+      switch (s) {
       case "off":
         return OFF;
       case "try":
@@ -228,8 +227,11 @@ public class ClassTransformer {
       final TemplateClassDefinition<?> templateDefinition,
       final String entireClass,
       final String materializedClassName) throws ClassTransformationException {
-    // unfortunately, this hasn't been set up at construction time, so we have 
to do it here
-    final ScalarReplacementOption scalarReplacementOption = 
ScalarReplacementOption.fromString(optionManager.getOption(ExecConstants.SCALAR_REPLACEMENT_VALIDATOR));
+    final ScalarReplacementOption scalarReplacementOption =
+        
ScalarReplacementOption.fromString(optionManager.getOption(ExecConstants.SCALAR_REPLACEMENT_VALIDATOR));
+
+    // Track injected class names to avoid duplicates
+    Set<String> injectedClassNames = new java.util.HashSet<>();
 
     try {
       final long t1 = System.nanoTime();
@@ -251,7 +253,7 @@ public class ClassTransformer {
       final Set<ClassSet> namesCompleted = Sets.newHashSet();
       names.add(set);
 
-      while ( !names.isEmpty() ) {
+      while (!names.isEmpty()) {
         final ClassSet nextSet = names.removeFirst();
         if (namesCompleted.contains(nextSet)) {
           continue;
@@ -259,45 +261,24 @@ public class ClassTransformer {
         final ClassNames nextPrecompiled = nextSet.precompiled;
         final byte[] precompiledBytes = 
byteCodeLoader.getClassByteCodeFromPath(nextPrecompiled.clazz);
         final ClassNames nextGenerated = nextSet.generated;
-        // keeps only classes that have not be merged
+        // keeps only classes that have not been merged
         Pair<byte[], ClassNode> classNodePair = 
classesToMerge.remove(nextGenerated.slash);
-        final ClassNode generatedNode;
-        if (classNodePair != null) {
-          generatedNode = classNodePair.getValue();
-        } else {
-          generatedNode = null;
-        }
+        final ClassNode generatedNode = (classNodePair != null) ? 
classNodePair.getValue() : null;
 
-        /*
-         * TODO
-         * We're having a problem with some cases of scalar replacement, but 
we want to get
-         * the code in so it doesn't rot anymore.
-         *
-         *  Here, we use the specified replacement option. The loop will allow 
us to retry if
-         *  we're using TRY.
-         */
         MergedClassResult result = null;
-        boolean scalarReplace = scalarReplacementOption != 
ScalarReplacementOption.OFF && entireClass.length() < 
MAX_SCALAR_REPLACE_CODE_SIZE;
-        while(true) {
+        boolean scalarReplace = scalarReplacementOption != 
ScalarReplacementOption.OFF
+            && entireClass.length() < MAX_SCALAR_REPLACE_CODE_SIZE;
+        while (true) {
           try {
             result = MergeAdapter.getMergedClass(nextSet, precompiledBytes, 
generatedNode, scalarReplace);
             break;
-          } catch(RuntimeException e) {
-            // if we had a problem without using scalar replacement, then 
rethrow
+          } catch (RuntimeException e) {
             if (!scalarReplace) {
               throw e;
             }
-
-            // if we did try to use scalar replacement, decide if we need to 
retry or not
             if (scalarReplacementOption == ScalarReplacementOption.ON) {
-              // option is forced on, so this is a hard error
               throw e;
             }
-
-            /*
-             * We tried to use scalar replacement, with the option to fall 
back to not using it.
-             * Log this failure before trying again without scalar replacement.
-             */
             logger.info("scalar replacement failure (retrying)\n", e);
             scalarReplace = false;
           }
@@ -307,26 +288,38 @@ public class ClassTransformer {
           s = s.replace(DrillFileUtils.SEPARATOR_CHAR, '.');
           names.add(nextSet.getChild(s));
         }
-        classLoader.injectByteCode(nextGenerated.dot, result.bytes);
+
+        // Only inject bytecode if not already injected
+        if (!injectedClassNames.contains(nextGenerated.dot)) {
+          classLoader.injectByteCode(nextGenerated.dot, result.bytes);
+          injectedClassNames.add(nextGenerated.dot);
+        }
+
         namesCompleted.add(nextSet);
       }
 
       // adds byte code of the classes that have not been merged to make them 
accessible for outer class
       for (Map.Entry<String, Pair<byte[], ClassNode>> clazz : 
classesToMerge.entrySet()) {
-        
classLoader.injectByteCode(clazz.getKey().replace(DrillFileUtils.SEPARATOR_CHAR,
 '.'), clazz.getValue().getKey());
+        String classNameDot = 
clazz.getKey().replace(DrillFileUtils.SEPARATOR_CHAR, '.');
+        if (!injectedClassNames.contains(classNameDot)) {
+          classLoader.injectByteCode(classNameDot, clazz.getValue().getKey());
+          injectedClassNames.add(classNameDot);
+        }
       }
+
       Class<?> c = classLoader.findClass(set.generated.dot);
       if (templateDefinition.getExternalInterface().isAssignableFrom(c)) {
         logger.debug("Compiled and merged {}: bytecode size = {}, time = {} 
ms.",
-             c.getSimpleName(),
-             DrillStringUtils.readable(totalBytecodeSize),
-             (System.nanoTime() - t1 + 500_000) / 1_000_000);
+            c.getSimpleName(),
+            DrillStringUtils.readable(totalBytecodeSize),
+            (System.nanoTime() - t1 + 500_000) / 1_000_000);
         return c;
       }
 
       throw new ClassTransformationException("The requested class did not 
implement the expected interface.");
     } catch (CompileException | IOException | ClassNotFoundException e) {
-      throw new ClassTransformationException(String.format("Failure generating 
transformation classes for value: \n %s", entireClass), e);
+      throw new ClassTransformationException(
+          String.format("Failure generating transformation classes for value: 
\n %s", entireClass), e);
     }
   }
 }
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/QueryClassLoader.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/QueryClassLoader.java
index a9858b2847..825d6e9563 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/QueryClassLoader.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/QueryClassLoader.java
@@ -17,32 +17,33 @@
  */
 package org.apache.drill.exec.compile;
 
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicLong;
-
+import com.google.common.collect.MapMaker;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.exec.compile.ClassTransformer.ClassNames;
 import org.apache.drill.exec.exception.ClassTransformationException;
 import org.apache.drill.exec.server.options.OptionSet;
 import org.codehaus.commons.compiler.CompileException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.MapMaker;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicLong;
 
 /**
  * Per-compilation unit class loader that holds both caching and compilation
  * steps. */
 
 public class QueryClassLoader extends URLClassLoader {
-  static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(QueryClassLoader.class);
+  static final Logger logger = LoggerFactory.getLogger(QueryClassLoader.class);
 
-  private ClassCompilerSelector compilerSelector;
+  private final ClassCompilerSelector compilerSelector;
 
   private AtomicLong index = new AtomicLong(0);
 
-  private ConcurrentMap<String, byte[]> customClasses = new 
MapMaker().concurrencyLevel(4).makeMap();
+  private final ConcurrentMap<String, byte[]> customClasses = new 
MapMaker().concurrencyLevel(4).makeMap();
 
   public QueryClassLoader(DrillConfig config, OptionSet sessionOptions) {
     super(new URL[0], Thread.currentThread().getContextClassLoader());
diff --git a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java 
b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
index 1106ea18f4..1cdc07afd5 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
@@ -17,29 +17,26 @@
  */
 package org.apache.drill;
 
-import java.io.IOException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-
-import org.apache.calcite.jdbc.DynamicSchema;
-import org.apache.drill.exec.alias.AliasRegistryProvider;
-import org.apache.drill.exec.ops.ViewExpansionContext;
+import com.codahale.metrics.MetricRegistry;
 import com.google.common.base.Function;
+import com.google.common.collect.ImmutableList;
+import com.google.common.io.Resources;
 import io.netty.buffer.DrillBuf;
+import org.apache.calcite.jdbc.DynamicSchema;
 import org.apache.calcite.schema.SchemaPlus;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.config.LogicalPlanPersistence;
 import org.apache.drill.common.scanner.ClassPathScanner;
 import org.apache.drill.common.scanner.persistence.ScanResult;
 import org.apache.drill.common.types.TypeProtos;
-import org.apache.drill.exec.expr.holders.ValueHolder;
-import org.apache.drill.exec.vector.ValueHolderHelper;
-import org.apache.drill.test.TestTools;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.alias.AliasRegistryProvider;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
+import org.apache.drill.exec.expr.holders.ValueHolder;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.RootAllocatorFactory;
 import org.apache.drill.exec.ops.QueryContext;
+import org.apache.drill.exec.ops.ViewExpansionContext;
 import org.apache.drill.exec.physical.PhysicalPlan;
 import org.apache.drill.exec.planner.physical.PlannerSettings;
 import org.apache.drill.exec.planner.sql.DrillOperatorTable;
@@ -55,16 +52,18 @@ import org.apache.drill.exec.store.StoragePluginRegistry;
 import org.apache.drill.exec.store.StoragePluginRegistryImpl;
 import 
org.apache.drill.exec.store.sys.store.provider.LocalPersistentStoreProvider;
 import org.apache.drill.exec.testing.ExecutionControls;
+import org.apache.drill.exec.vector.ValueHolderHelper;
+import org.apache.drill.test.TestTools;
 import org.junit.Rule;
 import org.junit.rules.TestRule;
+import org.mockito.ArgumentMatchers;
 
-import com.codahale.metrics.MetricRegistry;
-import com.google.common.collect.ImmutableList;
-import com.google.common.io.Resources;
-import org.mockito.Matchers;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
 
 import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -131,11 +130,11 @@ public class PlanningBase extends ExecTest {
     when(context.getManagedBuffer()).thenReturn(allocator.buffer(4));
     when(context.getConstantValueHolder(eq("0.03"),
         eq(TypeProtos.MinorType.VARDECIMAL),
-        Matchers.<Function<DrillBuf, ValueHolder>>any()))
+        ArgumentMatchers.<Function<DrillBuf, ValueHolder>>any()))
       .thenReturn(ValueHolderHelper.getVarDecimalHolder(allocator.buffer(4), 
"0.03"));
     when(context.getConstantValueHolder(eq("0.01"),
         eq(TypeProtos.MinorType.VARDECIMAL),
-        Matchers.<Function<DrillBuf, ValueHolder>>any()))
+        ArgumentMatchers.<Function<DrillBuf, ValueHolder>>any()))
       .thenReturn(ValueHolderHelper.getVarDecimalHolder(allocator.buffer(4), 
"0.01"));
     when(context.getOption(anyString())).thenCallRealMethod();
     when(context.getViewExpansionContext()).thenReturn(viewExpansionContext);
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
index de12fd7450..52d1951648 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
@@ -17,15 +17,10 @@
  */
 package org.apache.drill.exec.compile;
 
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-
 import org.apache.drill.common.util.DrillFileUtils;
 import org.apache.drill.exec.ExecConstants;
-import org.apache.drill.exec.compile.bytecode.ValueHolderReplacementVisitor;
-import org.apache.drill.test.BaseTestQuery;
 import org.apache.drill.exec.compile.ClassTransformer.ClassSet;
+import org.apache.drill.exec.compile.bytecode.ValueHolderReplacementVisitor;
 import org.apache.drill.exec.compile.sig.GeneratorMapping;
 import org.apache.drill.exec.compile.sig.MappingSet;
 import org.apache.drill.exec.exception.ClassTransformationException;
@@ -33,6 +28,7 @@ import org.apache.drill.exec.expr.ClassGenerator;
 import org.apache.drill.exec.expr.CodeGenerator;
 import org.apache.drill.exec.rpc.user.UserSession;
 import org.apache.drill.exec.server.options.SessionOptionManager;
+import org.apache.drill.test.BaseTestQuery;
 import org.codehaus.commons.compiler.CompileException;
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -40,9 +36,15 @@ import org.junit.Test;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassWriter;
 import org.objectweb.asm.tree.ClassNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
 
 public class TestClassTransformation extends BaseTestQuery {
-  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(TestClassTransformation.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(TestClassTransformation.class);
 
   private static final int ITERATION_COUNT = 
Integer.parseInt(System.getProperty("TestClassTransformation.iteration", "1"));
 
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestNestedDateTimeTimestamp.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestNestedDateTimeTimestamp.java
index 05697aa60a..a47db151de 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestNestedDateTimeTimestamp.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestNestedDateTimeTimestamp.java
@@ -17,6 +17,15 @@
  */
 package org.apache.drill.exec.physical.impl;
 
+import org.apache.drill.categories.FlakyTest;
+import org.apache.drill.exec.expr.fn.impl.DateUtility;
+import org.apache.drill.exec.rpc.user.QueryDataBatch;
+import org.apache.drill.test.BaseTestQuery;
+import org.apache.drill.test.TestBuilder;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -29,17 +38,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
-import org.apache.drill.categories.FlakyTest;
-import org.apache.drill.exec.expr.fn.impl.DateUtility;
-import org.apache.drill.exec.rpc.user.QueryDataBatch;
-import org.apache.drill.test.BaseTestQuery;
-import org.apache.drill.test.TestBuilder;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 /**
  * For DRILL-6242, output for Date, Time, Timestamp should use different 
classes
+ *
+ * Note that Drill treats all timestanps as naive (without timezone 
information).  When running tests locally,
+ * these tests may fail if the local timezone is not UTC.  To run tests on a 
machine with a non-UTC timezone,
+ * you should run the tests with the following command:
+ *
+ * mvn test -Duser.timezone=UTC
  */
 @Category(FlakyTest.class)
 public class TestNestedDateTimeTimestamp extends BaseTestQuery {
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
index 076bb2b45b..8a0e3ad3ed 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
@@ -17,6 +17,8 @@
  */
 package org.apache.drill.exec.physical.impl.writer;
 
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
 import org.apache.calcite.util.Pair;
 import org.apache.commons.io.FileUtils;
 import org.apache.drill.categories.ParquetTest;
@@ -30,8 +32,6 @@ import org.apache.drill.exec.planner.physical.PlannerSettings;
 import org.apache.drill.exec.store.dfs.FileSystemConfig;
 import org.apache.drill.exec.store.parquet.ParquetFormatConfig;
 import org.apache.drill.exec.util.JsonStringArrayList;
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
 import org.apache.drill.test.ClusterFixture;
 import org.apache.drill.test.ClusterTest;
 import org.apache.drill.test.TestBuilder;
@@ -41,16 +41,18 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.parquet.hadoop.ParquetFileReader;
 import org.apache.parquet.hadoop.metadata.ParquetMetadata;
-import org.apache.parquet.schema.MessageType;
 import org.apache.parquet.schema.LogicalTypeAnnotation;
+import org.apache.parquet.schema.MessageType;
 import org.apache.parquet.schema.PrimitiveType;
 import org.joda.time.Period;
-
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.api.condition.OS;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -1002,6 +1004,8 @@ public class TestParquetWriter extends ClusterTest {
   // Only attempt this test on Linux / amd64 because com.rdblue.brotli-codec
   // only bundles natives for Mac and Linux on AMD64.  See PARQUET-1975.
   @Test
+  @EnabledIfSystemProperty(named = "os.arch", matches = "(amd64|x86_64)")
+  @DisabledOnOs({ OS.WINDOWS, OS.MAC })
   public void testTPCHReadWriteBrotli() throws Exception {
     try {
       client.alterSession(ExecConstants.PARQUET_WRITER_COMPRESSION_TYPE, 
"brotli");
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/rpc/data/TestBitRpc.java 
b/exec/java-exec/src/test/java/org/apache/drill/exec/rpc/data/TestBitRpc.java
index c162a7625f..439dedd8db 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/rpc/data/TestBitRpc.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/rpc/data/TestBitRpc.java
@@ -56,7 +56,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/accessor/GenericAccessorTest.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/accessor/GenericAccessorTest.java
index 57a01911cd..41afede8c1 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/accessor/GenericAccessorTest.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/accessor/GenericAccessorTest.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/FragmentStatusReporterTest.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/FragmentStatusReporterTest.java
index b4bc9cc76e..5eb7f80680 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/FragmentStatusReporterTest.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/FragmentStatusReporterTest.java
@@ -34,11 +34,11 @@ import static 
org.apache.drill.exec.proto.UserBitShared.FragmentState.CANCELLATI
 import static org.apache.drill.exec.proto.UserBitShared.FragmentState.FAILED;
 import static org.apache.drill.exec.proto.UserBitShared.FragmentState.RUNNING;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
 import static org.mockito.Mockito.when;
 
 public class FragmentStatusReporterTest extends BaseTest {
@@ -93,14 +93,14 @@ public class FragmentStatusReporterTest extends BaseTest {
   @Test
   public void testClose() throws Exception {
     statusReporter.close();
-    verifyZeroInteractions(foremanTunnel);
+    verifyNoInteractions(foremanTunnel);
   }
 
   @Test
   public void testCloseClosed() throws Exception {
     statusReporter.close();
     statusReporter.close();
-    verifyZeroInteractions(foremanTunnel);
+    verifyNoInteractions(foremanTunnel);
   }
 
   @Test
diff --git a/exec/jdbc-all/pom.xml b/exec/jdbc-all/pom.xml
index 1b7fef416c..6a2159c221 100644
--- a/exec/jdbc-all/pom.xml
+++ b/exec/jdbc-all/pom.xml
@@ -33,7 +33,7 @@
        "package.namespace.prefix" equals to "oadd.". It can be overridden if 
necessary within any profile -->
   <properties>
     <package.namespace.prefix>oadd.</package.namespace.prefix>
-    <jdbc-all-jar.maxsize>55000000</jdbc-all-jar.maxsize>
+    <jdbc-all-jar.maxsize>56000000</jdbc-all-jar.maxsize>
   </properties>
 
   <dependencies>
diff --git a/pom.xml b/pom.xml
index 5e96f05fe2..4cffc55d72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
     <httpdlog-parser.version>5.10.0</httpdlog-parser.version>
     <iceberg.version>0.12.1</iceberg.version>
     <jackson.version>2.18.3</jackson.version>
-    <janino.version>3.1.11</janino.version>
+    <janino.version>3.1.12</janino.version>
     <javassist.version>3.29.2-GA</javassist.version>
     <javax.el.version>3.0.0</javax.el.version>
     <javax.validation.api>2.0.1.Final</javax.validation.api>
@@ -113,13 +113,15 @@
     <log4j.version>2.23.1</log4j.version>
     <!-- Upgrading logback further breaks JDK 8 build compatibility -->
     <logback.version>1.3.15</logback.version>
-    <maven.compiler.source>1.8</maven.compiler.source>
-    <maven.compiler.target>1.8</maven.compiler.target>
+    <maven.compiler.release>11</maven.compiler.release>
+    <maven.compiler.source>11</maven.compiler.source>
+    <maven.compiler.target>11</maven.compiler.target>
     <maven.min.version>3.6.3</maven.min.version>
     <maven.version>3.8.4</maven.version>
-    <memoryMb>3072</memoryMb>
+    <memoryMb>4096</memoryMb>
     <metrics.version>4.2.19</metrics.version>
-    <mockito.version>3.11.2</mockito.version>
+    <mockito.version>5.17.0</mockito.version>
+    <mockito_inline.version>5.2.0</mockito_inline.version>
     <mongo.version>4.11.1</mongo.version>
     <msgpack.version>0.6.6</msgpack.version>
     <netty.tcnative.classifier />
@@ -162,27 +164,27 @@
       <subscribe>user-subscr...@drill.apache.org</subscribe>
       <unsubscribe>user-unsubscr...@drill.apache.org</unsubscribe>
       <post>u...@drill.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/drill-user/</archive>
+      <archive>https://mail-archives.apache.org/mod_mbox/drill-user/</archive>
     </mailingList>
     <mailingList>
       <name>Developer List</name>
       <subscribe>dev-subscr...@drill.apache.org</subscribe>
       <unsubscribe>dev-unsubscr...@drill.apache.org</unsubscribe>
       <post>d...@drill.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/drill-dev/</archive>
+      <archive>https://mail-archives.apache.org/mod_mbox/drill-dev/</archive>
     </mailingList>
     <mailingList>
       <name>Commits List</name>
       <subscribe>commits-subscr...@drill.apache.org</subscribe>
       <unsubscribe>commits-unsubscr...@drill.apache.org</unsubscribe>
       <post>commits@drill.apache.org</post>
-      
<archive>http://mail-archives.apache.org/mod_mbox/drill-commits/</archive>
+      
<archive>https://mail-archives.apache.org/mod_mbox/drill-commits/</archive>
     </mailingList>
     <mailingList>
       <name>Issues List</name>
       <subscribe>issues-subscr...@drill.apache.org</subscribe>
       <unsubscribe>issues-unsubscr...@drill.apache.org</unsubscribe>
-      <archive>http://mail-archives.apache.org/mod_mbox/drill-issues/</archive>
+      
<archive>https://mail-archives.apache.org/mod_mbox/drill-issues/</archive>
     </mailingList>
   </mailingLists>
 
@@ -215,7 +217,7 @@
       <plugin>
         <groupId>org.owasp</groupId>
         <artifactId>dependency-check-maven</artifactId>
-        <version>6.4.1</version>
+        <version>12.1.1</version>
       </plugin>
     </plugins>
   </reporting>
@@ -352,7 +354,6 @@
         </dependencies>
         <configuration>
           <includes>**/*.java</includes>
-          <encoding>UTF-8</encoding>
           <failsOnError>true</failsOnError>
           <consoleOutput>true</consoleOutput>
           <includeResources>true</includeResources>
@@ -505,7 +506,7 @@
                   <version>[${maven.version.min},4)</version>
                 </requireMavenVersion>
                 <requireJavaVersion>
-                  <version>[1.8,18)</version>
+                  <version>[1.8,22)</version>
                 </requireJavaVersion>
               </rules>
             </configuration>
@@ -627,6 +628,7 @@
               -XX:MaxDirectMemorySize=${directMemoryMb}M
               -Djava.net.preferIPv4Stack=true
               -Djava.awt.headless=true
+              -Duser.timezone=UTC
               -ea
               ${junit.args}
               -Djdk.attach.allowAttachSelf=true
@@ -883,6 +885,7 @@
       <version>${junit.platform.version}</version>
       <scope>test</scope>
     </dependency>
+
     <dependency>
       <groupId>org.junit.platform</groupId>
       <artifactId>junit-platform-suite-engine</artifactId>
@@ -913,13 +916,25 @@
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
       <version>${mockito.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.mockito</groupId>
+          <artifactId>mockito-core</artifactId>
+        </exclusion>
+      </exclusions>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-inline</artifactId>
-      <version>${mockito.version}</version>
+      <version>${mockito_inline.version}</version>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <artifactId>mockito-core</artifactId>
+          <groupId>org.mockito</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>de.huxhorn.lilith</groupId>
@@ -2923,7 +2938,9 @@
         <jdk>[9,)</jdk>
       </activation>
       <properties>
-        <maven.compiler.release>8</maven.compiler.release>
+        <maven.compiler.source>11</maven.compiler.source>
+        <maven.compiler.target>11</maven.compiler.target>
+        <maven.compiler.release>11</maven.compiler.release>
         <junit.args>
           --add-opens java.base/java.lang=ALL-UNNAMED
           --add-opens java.base/java.net=ALL-UNNAMED

Reply via email to