-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker](hive) add hive3 docker compose and modify scripts (#33115)
add hive3 docker compose from: big-data-europe/docker-hive#56
- Loading branch information
1 parent
c7c8916
commit c3f126b
Showing
20 changed files
with
304 additions
and
121 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
docker/thirdparties/docker-compose/hive/hadoop-hive-metastore.env.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
HIVE_SITE_CONF_javax_jdo_option_ConnectionURL=jdbc:postgresql://hive-metastore-postgresql/metastore | ||
HIVE_SITE_CONF_javax_jdo_option_ConnectionDriverName=org.postgresql.Driver | ||
HIVE_SITE_CONF_javax_jdo_option_ConnectionUserName=hive | ||
HIVE_SITE_CONF_javax_jdo_option_ConnectionPassword=hive | ||
HIVE_SITE_CONF_datanucleus_autoCreateSchema=false | ||
HIVE_SITE_CONF_hive_metastore_uris=thrift://hive-metastore:9083 | ||
HIVE_SITE_CONF_hive_server2_thrift_bind_host=0.0.0.0 | ||
HIVE_SITE_CONF_hive_server2_thrift_port=10000 | ||
HIVE_SITE_CONF_metastore_storage_schema_reader_impl=org.apache.hadoop.hive.metastore.SerDeStorageSchemaReader | ||
|
||
CORE_CONF_fs_defaultFS=hdfs://${IP_HOST}:${FS_PORT} | ||
CORE_CONF_hadoop_http_staticuser_user=root | ||
CORE_CONF_hadoop_proxyuser_hue_hosts=* | ||
CORE_CONF_hadoop_proxyuser_hue_groups=* | ||
|
||
HDFS_CONF_dfs_webhdfs_enabled=true | ||
HDFS_CONF_dfs_permissions_enabled=false | ||
HDFS_CONF_dfs_namenode_datanode_registration_ip___hostname___check=false | ||
|
||
YARN_CONF_yarn_log___aggregation___enable=true | ||
YARN_CONF_yarn_resourcemanager_recovery_enabled=true | ||
YARN_CONF_yarn_resourcemanager_store_class=org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore | ||
YARN_CONF_yarn_resourcemanager_fs_state___store_uri=/rmstate | ||
YARN_CONF_yarn_nodemanager_remote___app___log___dir=/app-logs | ||
YARN_CONF_yarn_log_server_url=http://historyserver:8188/applicationhistory/logs/ | ||
YARN_CONF_yarn_timeline___service_enabled=true | ||
YARN_CONF_yarn_timeline___service_generic___application___history_enabled=true | ||
YARN_CONF_yarn_resourcemanager_system___metrics___publisher_enabled=true | ||
YARN_CONF_yarn_resourcemanager_hostname=resourcemanager | ||
YARN_CONF_yarn_timeline___service_hostname=historyserver | ||
YARN_CONF_yarn_resourcemanager_address=resourcemanager:8032 | ||
YARN_CONF_yarn_resourcemanager_scheduler_address=resourcemanager:8030 | ||
YARN_CONF_yarn_resourcemanager_resource__tracker_address=resourcemanager:8031 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
|
||
version: "3.8" | ||
|
||
services: | ||
namenode: | ||
image: bde2020/hadoop-namenode:2.0.0-hadoop3.2.1-java8 | ||
environment: | ||
- CLUSTER_NAME=test | ||
env_file: | ||
- ./hadoop-hive.env | ||
container_name: ${CONTAINER_UID}hadoop3-namenode | ||
ports: | ||
- "${FS_PORT}:8020" | ||
healthcheck: | ||
test: [ "CMD", "curl", "http://localhost:9870/" ] | ||
interval: 5s | ||
timeout: 120s | ||
retries: 120 | ||
|
||
datanode: | ||
image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8 | ||
env_file: | ||
- ./hadoop-hive.env | ||
environment: | ||
SERVICE_PRECONDITION: "namenode:9870" | ||
container_name: ${CONTAINER_UID}hadoop3-datanode | ||
healthcheck: | ||
test: [ "CMD", "curl", "http://localhost:9864" ] | ||
interval: 5s | ||
timeout: 60s | ||
retries: 120 | ||
|
||
hive-server: | ||
image: lishizhen/hive:3.1.2-postgresql-metastore | ||
env_file: | ||
- ./hadoop-hive-metastore.env | ||
environment: | ||
HIVE_CORE_CONF_javax_jdo_option_ConnectionURL: "jdbc:postgresql://hive-metastore/metastore" | ||
SERVICE_PRECONDITION: "hive-metastore:9083" | ||
container_name: ${CONTAINER_UID}hive3-server | ||
ports: | ||
- "${HS_PORT}:10000" | ||
depends_on: | ||
- datanode | ||
- namenode | ||
healthcheck: | ||
test: beeline -u "jdbc:hive2://127.0.0.1:10000/default" -n health_check -e "show databases;" | ||
interval: 10s | ||
timeout: 120s | ||
retries: 120 | ||
|
||
|
||
hive-metastore: | ||
image: lishizhen/hive:3.1.2-postgresql-metastore | ||
env_file: | ||
- ./hadoop-hive-metastore.env | ||
command: /bin/bash /mnt/scripts/hive-metastore.sh | ||
# command: /opt/hive/bin/hive --service metastore | ||
environment: | ||
SERVICE_PRECONDITION: "namenode:9870 datanode:9864 hive-metastore-postgresql:5432" | ||
container_name: ${CONTAINER_UID}hive3-metastore | ||
ports: | ||
- "${HMS_PORT}:9083" | ||
volumes: | ||
- ./scripts:/mnt/scripts | ||
depends_on: | ||
- hive-metastore-postgresql | ||
|
||
hive-metastore-postgresql: | ||
image: bde2020/hive-metastore-postgresql:3.1.0 | ||
container_name: ${CONTAINER_UID}hive3-metastore-postgresql | ||
ports: | ||
- "${PG_PORT}:5432" | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 5s | ||
timeout: 60s | ||
retries: 120 | ||
|
||
# solve HiveServer2 connect error: | ||
# java.net.URISyntaxException Illegal character in hostname :thrift://${CONTAINER_UID}hive3_default:9083 | ||
|
||
networks: | ||
default: | ||
name: ${CONTAINER_UID}hive3-default |
26 changes: 26 additions & 0 deletions
26
docker/thirdparties/docker-compose/hive/hive-3x_settings.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# Change this to a specific string. | ||
# Do not use "_" or other sepcial characters, only number and alphabeta. | ||
# NOTICE: change this uid will modify hive-*.yaml | ||
|
||
export FS_PORT=8020 #should be same in regression-conf.groovy | ||
export HMS_PORT=9083 #should be same in regression-conf.groovy | ||
export HS_PORT=10000 #should be same in regression-conf.groovy | ||
export PG_PORT=5432 #should be same in regression-conf.groovy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.