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

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

commit 276f48ee85944f87ebb43a5b404020dcb38a5e66
Author: stiga-huang <[email protected]>
AuthorDate: Mon Jun 16 13:30:56 2025 +0800

    IMPALA-14152: Fix wrong Hikari CP config name when build on Apache Hive 3
    
    Before HIVE-19486, hive-site.xml configs for Hikari CP use "hikari." as
    the prefix. After HIVE-19486, the prefix is "hikaricp.".
    
    HIVE-19486 is not in Apache Hive 3.1.3 so we should use
    "hikari.connectionTimeout" instead of "hikaricp.connectionTimeout" when
    building on it.
    
    Tests:
     - Verified testdata load in a build on Apache Hive 3.
    
    Change-Id: Id3ea2ef710bba345629aefba240503fdff3a26fc
    Reviewed-on: http://gerrit.cloudera.org:8080/23032
    Tested-by: Impala Public Jenkins <[email protected]>
    Reviewed-by: Riza Suminto <[email protected]>
---
 fe/src/test/resources/hive-site.xml.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/fe/src/test/resources/hive-site.xml.py 
b/fe/src/test/resources/hive-site.xml.py
index 6f5aa04ed..30c45477e 100644
--- a/fe/src/test/resources/hive-site.xml.py
+++ b/fe/src/test/resources/hive-site.xml.py
@@ -21,6 +21,7 @@ from __future__ import absolute_import, division, 
print_function
 import os
 
 HIVE_MAJOR_VERSION = int(os.environ['IMPALA_HIVE_VERSION'][0])
+USE_APACHE_HIVE = os.environ['USE_APACHE_HIVE']
 KERBERIZE = os.environ.get('IMPALA_KERBERIZE') == 'true'
 VARIANT = os.environ.get('HIVE_VARIANT')
 IMPALA_JAVA_TOOL_OPTIONS=os.environ.get("IMPALA_JAVA_TOOL_OPTIONS")
@@ -227,8 +228,18 @@ CONFIG.update({
   'datanucleus.connectionPool.maxPoolSize': 20,
   'javax.jdo.option.ConnectionUserName': 'hiveuser',
   'javax.jdo.option.ConnectionPassword': 'password',
-  'hikaricp.connectionTimeout': 60000,
 })
+# Before HIVE-19486 (in Apache Hive 4 and CDP Hive versions), Hikari CP 
configs are prefixed with "hikari.*".
+# After HIVE-19486, the prefix is "hikaricp.*".
+if USE_APACHE_HIVE and HIVE_MAJOR_VERSION == 3:
+  CONFIG.update({
+    'hikari.connectionTimeout': 60000,
+  })
+else:
+  CONFIG.update({
+    'hikaricp.connectionTimeout': 60000,
+  })
+
 if db_type == 'postgres':
   CONFIG.update({
    'javax.jdo.option.ConnectionDriverName': 'org.postgresql.Driver',

Reply via email to