Skip to content

Commit

Permalink
fix: set default connector jar path
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Jun 21, 2024
1 parent 067f659 commit 45a51ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [5.0.2] - 2024-06-21
### Fixed
- Set default `AUX_CLASSPATH` based on `MYSQL_TYPE`.
- When `mysql`, then set to `/usr/share/java/mysql-connector-java.jar`.
- When `mariadb` then set to `/usr/share/java/mariadb-connector-java.jar`.
- Else set to `MYSQL_DRIVER_JAR`.

## [5.0.1] - 2024-06-19
### Fixed
- Added `MYSQL_DRIVER_JAR` to add the driver connector JAR to the system classpath. By default it is now using `/usr/share/java/mysql-connector-java.jar`.
Expand Down
13 changes: 12 additions & 1 deletion files/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,18 @@ sed "s/METASTORE_PRELISTENERS/${METASTORE_PRELISTENERS}/" -i /etc/hive/conf/hive
#required to debug ranger plugin, todo: send apache common logs to cloudwatch
#export HADOOP_OPTS="$HADOOP_OPTS -Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"

export AUX_CLASSPATH="${MYSQL_DRIVER_JAR:-/usr/share/java/mysql-connector-java.jar}"
# Set AUX_CLASSPATH to mysql-connector-java.jar or mariadb-connector-java.jar as default.
case ${MYSQL_TYPE:-mysql} in
mysql)
export AUX_CLASSPATH=/usr/share/java/mysql-connector-java.jar
;;
mariadb)
export AUX_CLASSPATH=/usr/share/java/mariadb-connector-java.jar
;;
*)
export AUX_CLASSPATH=$MYSQL_DRIVER_JAR
esac

[[ ! -z $SNS_ARN ]] && export AUX_CLASSPATH="$AUX_CLASSPATH:/usr/lib/apiary/apiary-metastore-listener-${APIARY_EXTENSIONS_VERSION}-all.jar"
[[ ! -z $KAFKA_BOOTSTRAP_SERVERS ]] && export AUX_CLASSPATH="$AUX_CLASSPATH:/usr/lib/apiary/kafka-metastore-listener-${APIARY_EXTENSIONS_VERSION}-all.jar:/usr/lib/apiary/kafka-clients-${KAFKA_VERSION}.jar"
[[ ! -z $ENABLE_GLUESYNC ]] && export AUX_CLASSPATH="$AUX_CLASSPATH:/usr/lib/apiary/apiary-gluesync-listener-${APIARY_GLUESYNC_LISTENER_VERSION}-all.jar"
Expand Down

0 comments on commit 45a51ba

Please sign in to comment.