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

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

commit 35aa2e2adde5ced53c3768e4695039e7358c89a2
Author: Riza Suminto <[email protected]>
AuthorDate: Wed Jun 25 13:29:21 2025 -0700

    IMPALA-14187: Add IMPALA_JAVA_TARGET env var
    
    Impala is preparing to switch to JDK17 for Java compilation by default.
    While the source version might remain in 1.8 for longer, we should
    experiment with targeting binary version 17.
    
    This patch adds IMPALA_JAVA_TARGET env var to control target binary
    version. It is initialized in impala-config-java.sh, depending on value
    of IMPALA_JDK_VERSION env var.
    
    Testing:
    Pass data load and FE tests with IMPALA_JDK_VERSION=17.
    
    Change-Id: If194d87c542d416b878661403c32c6adc2930199
    Reviewed-on: http://gerrit.cloudera.org:8080/23096
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 bin/impala-config-java.sh              | 3 +++
 fe/pom.xml                             | 2 +-
 java/TableFlattener/pom.xml            | 2 +-
 java/calcite-planner/pom.xml           | 2 +-
 java/datagenerator/pom.xml             | 2 +-
 java/ext-data-source/api/pom.xml       | 2 +-
 java/ext-data-source/jdbc/pom.xml      | 2 +-
 java/ext-data-source/sample/pom.xml    | 2 +-
 java/ext-data-source/test/pom.xml      | 2 +-
 java/external-frontend/pom.xml         | 2 +-
 java/iceberg-rest-catalog-test/pom.xml | 2 +-
 java/pom.xml                           | 1 +
 java/puffin-data-generator/pom.xml     | 2 +-
 java/query-event-hook-api/pom.xml      | 2 +-
 java/test-corrupt-hive-udfs/pom.xml    | 2 +-
 java/test-hive-udfs/pom.xml            | 2 +-
 java/yarn-extras/pom.xml               | 2 +-
 17 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/bin/impala-config-java.sh b/bin/impala-config-java.sh
index 48da4d718..2a4f7f8cd 100644
--- a/bin/impala-config-java.sh
+++ b/bin/impala-config-java.sh
@@ -22,10 +22,12 @@ if [[ "${IMPALA_JDK_VERSION}" == "system" || 
"${IMPALA_JDK_VERSION}" == "8" ]];
   UBUNTU_JAVA_VERSION=8
   REDHAT_JAVA_VERSION=1.8.0
   export IMPALA_JDK_VERSION_NUM=8
+  export IMPALA_JAVA_TARGET=1.8
 else
   UBUNTU_JAVA_VERSION="${IMPALA_JDK_VERSION}"
   REDHAT_JAVA_VERSION="${IMPALA_JDK_VERSION}"
   export IMPALA_JDK_VERSION_NUM="${IMPALA_JDK_VERSION}"
+  export IMPALA_JAVA_TARGET="${IMPALA_JDK_VERSION}"
 fi
 
 if [[ "$(uname -p)" == 'aarch64' ]]; then
@@ -37,3 +39,4 @@ fi
 echo "JAVA_HOME: ${JAVA_HOME:-}"
 echo "IMPALA_JDK_VERSION: $IMPALA_JDK_VERSION"
 echo "IMPALA_JDK_VERSION_NUM: $IMPALA_JDK_VERSION_NUM"
+echo "IMPALA_JAVA_TARGET: $IMPALA_JAVA_TARGET"
diff --git a/fe/pom.xml b/fe/pom.xml
index c07d78942..ce32f71a7 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -667,7 +667,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
 
diff --git a/java/TableFlattener/pom.xml b/java/TableFlattener/pom.xml
index c36fe71fa..721d45853 100644
--- a/java/TableFlattener/pom.xml
+++ b/java/TableFlattener/pom.xml
@@ -37,7 +37,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/calcite-planner/pom.xml b/java/calcite-planner/pom.xml
index 28fb47069..6b75a1a35 100644
--- a/java/calcite-planner/pom.xml
+++ b/java/calcite-planner/pom.xml
@@ -95,7 +95,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
       <plugin>
diff --git a/java/datagenerator/pom.xml b/java/datagenerator/pom.xml
index c1210ca8c..9ad6b3c00 100644
--- a/java/datagenerator/pom.xml
+++ b/java/datagenerator/pom.xml
@@ -89,7 +89,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
 
diff --git a/java/ext-data-source/api/pom.xml b/java/ext-data-source/api/pom.xml
index ab914c48f..9b4d970e6 100644
--- a/java/ext-data-source/api/pom.xml
+++ b/java/ext-data-source/api/pom.xml
@@ -60,7 +60,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
 
diff --git a/java/ext-data-source/jdbc/pom.xml 
b/java/ext-data-source/jdbc/pom.xml
index 1d5e90160..de6cc10ac 100644
--- a/java/ext-data-source/jdbc/pom.xml
+++ b/java/ext-data-source/jdbc/pom.xml
@@ -69,7 +69,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/ext-data-source/sample/pom.xml 
b/java/ext-data-source/sample/pom.xml
index fa3a260dd..c2b35b27d 100644
--- a/java/ext-data-source/sample/pom.xml
+++ b/java/ext-data-source/sample/pom.xml
@@ -64,7 +64,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/ext-data-source/test/pom.xml 
b/java/ext-data-source/test/pom.xml
index f40b79085..850b1eebe 100644
--- a/java/ext-data-source/test/pom.xml
+++ b/java/ext-data-source/test/pom.xml
@@ -51,7 +51,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/external-frontend/pom.xml b/java/external-frontend/pom.xml
index 9ce4a9601..f81354d9f 100644
--- a/java/external-frontend/pom.xml
+++ b/java/external-frontend/pom.xml
@@ -48,7 +48,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/iceberg-rest-catalog-test/pom.xml 
b/java/iceberg-rest-catalog-test/pom.xml
index 4400bc8a1..66e6c44cb 100644
--- a/java/iceberg-rest-catalog-test/pom.xml
+++ b/java/iceberg-rest-catalog-test/pom.xml
@@ -113,7 +113,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
       <plugin>
diff --git a/java/pom.xml b/java/pom.xml
index f98edd3b8..e4c61b837 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -88,6 +88,7 @@ under the License.
     
<dropwizard-metrics.version>${env.IMPALA_DROPWIZARD_METRICS_VERSION}</dropwizard-metrics.version>
     
<aircompressor.version>${env.IMPALA_AIRCOMPRESSOR_VERSION}</aircompressor.version>
     
<datasketches.version>${env.IMPALA_DATASKETCHES_VERSION}</datasketches.version>
+    
<impala.java.target.version>${env.IMPALA_JAVA_TARGET}</impala.java.target.version>
   </properties>
 
   <repositories>
diff --git a/java/puffin-data-generator/pom.xml 
b/java/puffin-data-generator/pom.xml
index 656d0c55f..6175e252a 100644
--- a/java/puffin-data-generator/pom.xml
+++ b/java/puffin-data-generator/pom.xml
@@ -91,7 +91,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
 
diff --git a/java/query-event-hook-api/pom.xml 
b/java/query-event-hook-api/pom.xml
index b4c078e1f..ecbd0880a 100644
--- a/java/query-event-hook-api/pom.xml
+++ b/java/query-event-hook-api/pom.xml
@@ -51,7 +51,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/test-corrupt-hive-udfs/pom.xml 
b/java/test-corrupt-hive-udfs/pom.xml
index 6b0581bb9..43e309d36 100644
--- a/java/test-corrupt-hive-udfs/pom.xml
+++ b/java/test-corrupt-hive-udfs/pom.xml
@@ -45,7 +45,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/test-hive-udfs/pom.xml b/java/test-hive-udfs/pom.xml
index f4152718a..e5564116c 100644
--- a/java/test-hive-udfs/pom.xml
+++ b/java/test-hive-udfs/pom.xml
@@ -84,7 +84,7 @@ under the License.
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>
diff --git a/java/yarn-extras/pom.xml b/java/yarn-extras/pom.xml
index a521b39f3..f6d1ed78c 100644
--- a/java/yarn-extras/pom.xml
+++ b/java/yarn-extras/pom.xml
@@ -92,7 +92,7 @@
         <version>3.11.0</version>
         <configuration>
           <source>1.8</source>
-          <target>1.8</target>
+          <target>${impala.java.target.version}</target>
         </configuration>
       </plugin>
     </plugins>

Reply via email to