This is an automated email from the ASF dual-hosted git repository.
dkuzmenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 1307adff95c HIVE-29565: Add DB configs to HS2 to enable Hive
compaction (#6430)
1307adff95c is described below
commit 1307adff95c358db9f51794e410a37ab072b0603
Author: Denys Kuzmenko <[email protected]>
AuthorDate: Fri Apr 17 13:12:25 2026 +0300
HIVE-29565: Add DB configs to HS2 to enable Hive compaction (#6430)
---
packaging/src/docker/conf/hive-site.xml.template | 12 ++++++++++++
packaging/src/docker/docker-compose.yml | 8 ++++++++
packaging/src/docker/start-hive.sh | 7 +++----
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/packaging/src/docker/conf/hive-site.xml.template
b/packaging/src/docker/conf/hive-site.xml.template
index 616ecc23a60..c3d28b29691 100644
--- a/packaging/src/docker/conf/hive-site.xml.template
+++ b/packaging/src/docker/conf/hive-site.xml.template
@@ -16,6 +16,14 @@
limitations under the License.
-->
<configuration>
+ <property>
+ <name>hive.support.concurrency</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>hive.txn.manager</name>
+ <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
+ </property>
<property>
<name>hive.server2.enable.doAs</name>
<value>false</value>
@@ -40,6 +48,10 @@
<name>hive.exec.submit.local.task.via.child</name>
<value>false</value>
</property>
+ <property>
+ <name>hive.compactor.crud.query.based</name>
+ <value>true</value>
+ </property>
<property>
<name>hive.compactor.worker.threads</name>
<value>1</value>
diff --git a/packaging/src/docker/docker-compose.yml
b/packaging/src/docker/docker-compose.yml
index c01dbbeb287..37b9d70e138 100644
--- a/packaging/src/docker/docker-compose.yml
+++ b/packaging/src/docker/docker-compose.yml
@@ -84,9 +84,14 @@ services:
HIVE_SCRATCH_DIR: /opt/hive/scratch
HIVE_QUERY_RESULTS_CACHE_DIRECTORY: /opt/hive/scratch/_resultscache_
+ DB_DRIVER: postgres
SERVICE_OPTS: >-
-Xmx1G
-Dhive.metastore.uris=thrift://metastore:9083
+ -Djavax.jdo.option.ConnectionDriverName=org.postgresql.Driver
+
-Djavax.jdo.option.ConnectionURL=jdbc:postgresql://postgres:5432/metastore_db
+ -Djavax.jdo.option.ConnectionUserName=hive
+ -Djavax.jdo.option.ConnectionPassword=password
-Dhive.execution.mode=${HIVE_EXECUTION_MODE:-container}
-Dhive.zookeeper.quorum=${HIVE_ZOOKEEPER_QUORUM:-}
@@ -103,6 +108,9 @@ services:
volumes:
- warehouse:/opt/hive/data/warehouse
- scratch:/opt/hive/scratch
+ - type: bind
+ source: ${POSTGRES_LOCAL_PATH}
+ target: /opt/hive/lib/postgres.jar
# Mount local jars to a temporary staging area (Read-Only)
- ./jars:/tmp/ext-jars:ro
networks:
diff --git a/packaging/src/docker/start-hive.sh
b/packaging/src/docker/start-hive.sh
index e8c9fcf77c3..d40aed56958 100755
--- a/packaging/src/docker/start-hive.sh
+++ b/packaging/src/docker/start-hive.sh
@@ -33,11 +33,10 @@ for arg in "$@"; do
export HIVE_ZOOKEEPER_QUORUM=zookeeper:2181
export HIVE_LLAP_DAEMON_SERVICE_HOSTS=@llap0
;;
---ozone)
- COMPOSE_FILES="docker-compose.yml:storage/ozone/docker-compose.yml"
+ --ozone)
+ COMPOSE_FILES+=":storage/ozone/docker-compose.yml"
# DEFAULT_FS defines the bucket authority
export DEFAULT_FS="s3a://hive"
-
export HIVE_WAREHOUSE_PATH="/warehouse"
export S3_ENDPOINT_URL="http://s3.ozone:9878"
@@ -54,6 +53,6 @@ done
export HIVE_EXECUTION_MODE="$MODE"
export COMPOSE_FILE="$COMPOSE_FILES"
-echo "Starting Hive cluster (mode=$HIVE_EXECUTION_MODE,
compose_files=$COMPOSE_FILE)"
+echo "Starting Hive cluster (mode=$HIVE_EXECUTION_MODE)"
docker compose $PROFILE up -d $SCALE