You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/04/15 23:06:02 UTC

[impala] 01/02: IMPALA-8380: Bump Postgres JDBC driver version to 42.2.5

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 7bba2e4e4fc4d774f6970473cc7df30a2cbb2be3
Author: Laszlo Gaal <la...@cloudera.com>
AuthorDate: Mon Mar 25 14:57:32 2019 +0100

    IMPALA-8380: Bump Postgres JDBC driver version to 42.2.5
    
    Testing on Ubuntu 18.04 with PostgreSQL 10 (the default for the OS)
    revealed that HMS fails to start with the existing v9.0 Postgres JDBC
    driver.
    
    The patch bumps the driver version to 42.2.5, which allows HMS
    and Sentry to start with PostreSQL 10.
    
    To ensure that existing platforms are not broken, core tests were run:
    - in Docker for CentOS 6, CentOS 7 and Ubuntu 16.04
    - on Amazon VMs for CentOS 6.4 and CentOS 7.4
    - Ubuntu 18.04 was tested on a VM and in Docker as well.
    
    This is a joint effort with Lars Volker and Fredy Wijaya.
    
    Change-Id: Ica5423c18a9f8346dda7dae617b1764638b57b6c
    Reviewed-on: http://gerrit.cloudera.org:8080/12894
    Reviewed-by: Lars Volker <lv...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/create-test-configuration.sh | 6 +++---
 bin/impala-config.sh             | 4 ++--
 fe/pom.xml                       | 7 ++++---
 impala-parent/pom.xml            | 1 +
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bin/create-test-configuration.sh b/bin/create-test-configuration.sh
index 6d8916d..72dfed2 100755
--- a/bin/create-test-configuration.sh
+++ b/bin/create-test-configuration.sh
@@ -227,10 +227,10 @@ if [[ -f "${POSTGRES_JDBC_DRIVER}" ]]; then
   cp -f "${POSTGRES_JDBC_DRIVER}" "${RANGER_SERVER_LIB_DIR}"
 else
   # IMPALA-8261: Running this script should not fail when FE has not been built.
-  MAVEN_URL="http://central.maven.org/maven2/postgresql/postgresql"
-  JDBC_JAR="postgresql-${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}.jdbc4.jar"
+  MAVEN_URL="http://central.maven.org/maven2/org/postgresql/postgresql"
+  JDBC_JAR="postgresql-${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}.jar"
   wget -P "${RANGER_SERVER_LIB_DIR}" \
-    "${MAVEN_URL}/${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}.jdbc4/${JDBC_JAR}"
+    "${MAVEN_URL}/${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}/${JDBC_JAR}"
 fi
 
 pushd "${RANGER_SERVER_CONF_DIR}"
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index eae7c06..7f9f019 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -126,7 +126,7 @@ export IMPALA_ORC_VERSION=1.4.3-p3
 unset IMPALA_ORC_URL
 export IMPALA_PROTOBUF_VERSION=3.5.1
 unset IMPALA_PROTOBUF_URL
-export IMPALA_POSTGRES_JDBC_DRIVER_VERSION=9.0-801
+export IMPALA_POSTGRES_JDBC_DRIVER_VERSION=42.2.5
 unset IMPALA_POSTGRES_JDBC_DRIVER_URL
 export IMPALA_RAPIDJSON_VERSION=1.1.0
 unset IMPALA_RAPIDJSON_URL
@@ -564,7 +564,7 @@ export HIVE_CONF_DIR="$IMPALA_FE_DIR/./src/test/resources"
 # any jars in AUX_CLASSPATH. (Or a list of jars in HIVE_AUX_JARS_PATH.)
 # The Postgres JDBC driver is downloaded by maven when building the frontend.
 # Export the location of Postgres JDBC driver so Sentry can pick it up.
-export POSTGRES_JDBC_DRIVER="${IMPALA_FE_DIR}/target/dependency/postgresql-${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}.jdbc4.jar"
+export POSTGRES_JDBC_DRIVER="${IMPALA_FE_DIR}/target/dependency/postgresql-${IMPALA_POSTGRES_JDBC_DRIVER_VERSION}.jar"
 
 export HIVE_AUX_JARS_PATH="$POSTGRES_JDBC_DRIVER"
 export AUX_CLASSPATH="${LZO_JAR_PATH}"
diff --git a/fe/pom.xml b/fe/pom.xml
index f0fb6ab..bac4555 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -448,12 +448,13 @@ under the License.
       <version>${kudu.version}</version>
     </dependency>
 
-    <!-- This driver supports PostgreSQL 7.2 and newer -->
+    <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
     <dependency>
-      <groupId>postgresql</groupId>
+      <groupId>org.postgresql</groupId>
       <artifactId>postgresql</artifactId>
-      <version>9.0-801.jdbc4</version>
+      <version>${postgres.jdbc.version}</version>
     </dependency>
+
     <dependency>
       <groupId>org.antlr</groupId>
       <artifactId>antlr-runtime</artifactId>
diff --git a/impala-parent/pom.xml b/impala-parent/pom.xml
index d4f9f03..5b4c6fc 100644
--- a/impala-parent/pom.xml
+++ b/impala-parent/pom.xml
@@ -39,6 +39,7 @@ under the License.
     <hive.version>${env.IMPALA_HIVE_VERSION}</hive.version>
     <hive.major.version>${env.IMPALA_HIVE_MAJOR_VERSION}</hive.major.version>
     <ranger.version>${env.IMPALA_RANGER_VERSION}</ranger.version>
+    <postgres.jdbc.version>${env.IMPALA_POSTGRES_JDBC_DRIVER_VERSION}</postgres.jdbc.version>
     <sentry.version>${env.IMPALA_SENTRY_VERSION}</sentry.version>
     <hbase.version>${env.IMPALA_HBASE_VERSION}</hbase.version>
     <parquet.version>${env.IMPALA_PARQUET_VERSION}</parquet.version>