Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21760 )

Change subject: IMPALA-12349: Support Apache Hive 2.x in Impala
......................................................................


Patch Set 111:

(5 comments)

I tried building the patch on Ubuntu 22.04 using -noclean -notests -format 
options.

The build succeeded but initializing the cluster failed:

 ERROR in /root/impala/bin/create-test-configuration.sh at line 204: 
CLASSPATH={$CLASSPATH}:${CONFIG_DIR} ${HIVE_HOME}/bin/schematool -initSchema 
-dbType \
Generated: 
/root/impala/logs/extra_junit_xml_logs/generate_junitxml.buildall.create-test-configuration.20251118_03_23_26.xml

Checked logs/cluster/schematool.log,

 Metastore connection URL:        
jdbc:postgresql://localhost:5432/HMS_root_impala_apache
Metastore Connection Driver :    org.postgresql.Driver
Metastore connection User:       hiveuser
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema 
version.
Underlying cause: org.postgresql.util.PSQLException : The authentication type 
10 is not supported. Check that you have configured the pg_hba.conf file to 
include the client's IP address or subnet, and that it is using an 
authentication scheme supported by the driver.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***

It seems we need to upgrade the PostgreSQL JDBC Driver used by Apache Hive 2.

http://gerrit.cloudera.org:8080/#/c/21760/111//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21760/111//COMMIT_MSG@18
PS111, Line 18: intrusion into the code
nit: "invasive changes"


http://gerrit.cloudera.org:8080/#/c/21760/111//COMMIT_MSG@24
PS111, Line 24:
Please also mention that there are some duplicate classes under 
compat-apache-hive2 dir, e.g. 
fe/src/compat-apache-hive-2/java/org/apache/impala/catalog/events/MetastoreEvents.java
 duplicates 
fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java

The class in compat-apache-hive2 is a simplified version that works with Apache 
Hive 2. So we don't need to extract lots of Hive-dependent codes in 
MetastoreEvents.java into the metastore shim.

Due to this, the build process simply remove the original source code when 
building on Apache Hive 2.

BTW, can we do this better by moving the original source code to somewhere that 
won't be compiled?


http://gerrit.cloudera.org:8080/#/c/21760/111/fe/src/compat-apache-hive-2/java/org/apache/impala/compat/MetastoreShim.java
File 
fe/src/compat-apache-hive-2/java/org/apache/impala/compat/MetastoreShim.java:

http://gerrit.cloudera.org:8080/#/c/21760/111/fe/src/compat-apache-hive-2/java/org/apache/impala/compat/MetastoreShim.java@100
PS111, Line 100: Apache Hive 3
nit: "Apache Hive 2"?


http://gerrit.cloudera.org:8080/#/c/21760/111/fe/src/compat-apache-hive-2/java/org/apache/impala/compat/MetastoreShim.java@188
PS111, Line 188:   /**
               :    * Wrapper method around message factory's build alter table 
message due to added
               :    * arguments in hive 3.
               :    */
               :   //  @VisibleForTesting
               :   //  public static AlterTableMessage 
buildAlterTableMessage(Table before, Table after,
               :   //      boolean isTruncateOp, long writeId) {
               :   //    return 
JSONMessageFactory.getInstance().buildAlterTableMessage(before, after,
               :   //        isTruncateOp);
               :   //  }
nit: Please remove these if we don't need them.


http://gerrit.cloudera.org:8080/#/c/21760/111/fe/src/main/java/org/apache/impala/catalog/FeCatalogUtils.java
File fe/src/main/java/org/apache/impala/catalog/FeCatalogUtils.java:

http://gerrit.cloudera.org:8080/#/c/21760/111/fe/src/main/java/org/apache/impala/catalog/FeCatalogUtils.java@284
PS111, Line 284: ArrayList
nit: use the generic type List in definition.



--
To view, visit http://gerrit.cloudera.org:8080/21760
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5f104dc8d131835b8118b9d54077471db65681c
Gerrit-Change-Number: 21760
Gerrit-PatchSet: 111
Gerrit-Owner: ttttttz <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Pranav Lodha <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Zihao Ye <[email protected]>
Gerrit-Reviewer: ttttttz <[email protected]>
Gerrit-Comment-Date: Tue, 18 Nov 2025 03:32:38 +0000
Gerrit-HasComments: Yes

Reply via email to