forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ci Initial hive support (apache#10593)
* Initial hive support * Clone hive setup * Make hive tests work locally * Debugging presto failure * sleep in dataset test * Address comments * Address comments * Pin ipython, exclude new pylint rules Co-authored-by: bogdan kyryliuk <[email protected]>
- Loading branch information
1 parent
81525c3
commit 19a9bcc
Showing
31 changed files
with
531 additions
and
186 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -152,6 +152,63 @@ jobs: | |
run: | | ||
bash <(curl -s https://codecov.io/bash) -cF python | ||
test-postgres-hive: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
# run unit tests in multiple version just for fun | ||
python-version: [3.7, 3.8] | ||
env: | ||
PYTHONPATH: ${{ github.workspace }} | ||
SUPERSET_CONFIG: tests.superset_test_config | ||
REDIS_PORT: 16379 | ||
SUPERSET__SQLALCHEMY_DATABASE_URI: | ||
postgresql+psycopg2://superset:[email protected]:15432/superset | ||
SUPERSET__SQLALCHEMY_EXAMPLES_URI: hive://localhost:10000/default | ||
UPLOAD_FOLDER: /tmp/.superset/uploads/ | ||
services: | ||
postgres: | ||
image: postgres:10-alpine | ||
env: | ||
POSTGRES_USER: superset | ||
POSTGRES_PASSWORD: superset | ||
ports: | ||
# Use custom ports for services to avoid accidentally connecting to | ||
# GitHub action runner's default installations | ||
- 15432:5432 | ||
redis: | ||
image: redis:5-alpine | ||
ports: | ||
- 16379:6379 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create csv upload directory | ||
run: sudo mkdir -p /tmp/.superset/uploads | ||
- name: Give write access to the csv upload directory | ||
run: sudo chown -R $USER:$USER /tmp/.superset | ||
- name: Start hadoop and hive | ||
run: docker-compose -f scripts/databases/hive/docker-compose.yml up -d | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
uses: apache-superset/cached-dependencies@b90713b | ||
with: | ||
run: | | ||
apt-get-install | ||
pip-upgrade | ||
pip install -r requirements/testing.txt | ||
setup-postgres | ||
- name: Run celery | ||
run: celery worker --app=superset.tasks.celery_app:app -Ofair -c 2 & | ||
- name: Python unit tests (PostgreSQL) | ||
run: | | ||
./scripts/python_tests.sh | ||
- name: Upload code coverage | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) -cF python | ||
test-postgres: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# 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. | ||
# | ||
current_branch := $(shell git rev-parse --abbrev-ref HEAD) | ||
build: | ||
docker build -t bde2020/hive:$(current_branch) ./ |
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,79 @@ | ||
# | ||
# 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.2" | ||
|
||
services: | ||
namenode: | ||
container_name: namenode | ||
image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8 | ||
volumes: | ||
- namenode:/hadoop/dfs/name | ||
- type: bind | ||
source: "$UPLOAD_FOLDER" | ||
target: /tmp/superset_uploads | ||
environment: | ||
- CLUSTER_NAME=test | ||
env_file: | ||
- ./hadoop-hive.env | ||
ports: | ||
- "50070:50070" | ||
datanode: | ||
image: bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8 | ||
volumes: | ||
- datanode:/hadoop/dfs/data | ||
- type: bind | ||
source: "$UPLOAD_FOLDER" | ||
target: /tmp/superset_uploads | ||
env_file: | ||
- ./hadoop-hive.env | ||
environment: | ||
SERVICE_PRECONDITION: "namenode:50070" | ||
ports: | ||
- "50075:50075" | ||
hive-server: | ||
image: bde2020/hive:2.3.2-postgresql-metastore | ||
env_file: | ||
- ./hadoop-hive.env | ||
environment: | ||
HIVE_CORE_CONF_javax_jdo_option_ConnectionURL: "jdbc:postgresql://hive-metastore/metastore" | ||
SERVICE_PRECONDITION: "hive-metastore:9083" | ||
ports: | ||
- "10000:10000" | ||
volumes: | ||
- type: bind | ||
source: "$UPLOAD_FOLDER" | ||
target: /tmp/superset_uploads | ||
hive-metastore: | ||
image: bde2020/hive:2.3.2-postgresql-metastore | ||
env_file: | ||
- ./hadoop-hive.env | ||
command: /opt/hive/bin/hive --service metastore | ||
environment: | ||
SERVICE_PRECONDITION: "namenode:50070 datanode:50075 hive-metastore-postgresql:5432" | ||
ports: | ||
- "9083:9083" | ||
volumes: | ||
- type: bind | ||
source: "$UPLOAD_FOLDER" | ||
target: /tmp/superset_uploads | ||
hive-metastore-postgresql: | ||
image: bde2020/hive-metastore-postgresql:2.3.0 | ||
|
||
volumes: | ||
namenode: | ||
datanode: |
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,46 @@ | ||
# | ||
# 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 | ||
HDFS_CONF_dfs_namenode_datanode_registration_ip___hostname___check=false | ||
|
||
CORE_CONF_fs_defaultFS=hdfs://namenode:8020 | ||
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 | ||
|
||
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 |
Oops, something went wrong.