Skip to content

Commit

Permalink
update kudu to 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eskabetxe authored and kokosing committed Jul 23, 2019
1 parent 1628227 commit e2fe578
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 71 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -127,9 +127,9 @@ script:
fi
- |
if [[ -v KUDU_TESTS ]]; then
presto-kudu/bin/run_kudu_tests.sh 3 null &&
presto-kudu/bin/run_kudu_tests.sh 1 "" &&
presto-kudu/bin/run_kudu_tests.sh 1 presto:: &&
presto-kudu/bin/run_kudu_tests.sh null &&
presto-kudu/bin/run_kudu_tests.sh "" &&
presto-kudu/bin/run_kudu_tests.sh presto:: &&
true
fi
Expand Down
29 changes: 8 additions & 21 deletions presto-kudu/bin/run_kudu_tests.sh
Expand Up @@ -2,9 +2,8 @@
#
# Runs all tests with Kudu server in docker containers.
#
# ./run_kudu_tests.sh <nodes> <inferSchemaPrefix>
# ./run_kudu_tests.sh <inferSchemaPrefix>
#
# <nodes> Number of tablet servers (1 oder 3). Also used for number of replicas.
# <inferSchemaPrefix> InferSchema setup: "null" = disabled,
# "" = enabled, using empty prefix,
# "presto::" = enabled, using standard prefix
Expand All @@ -13,25 +12,11 @@

set -euo pipefail -x

export KUDU_MASTER_RPC_PORT=17051
export DOCKER_HOST_IP=$(docker network inspect bridge --format='{{index .IPAM.Config 0 "Gateway"}}')
export KUDU_VERSION="1.10.0"
export KUDU_CLUSTERIP=$(docker network inspect bridge --format='{{index .IPAM.Config 0 "Gateway"}}')

PROJECT_ROOT="${BASH_SOURCE%/*}/../.."

# single or three tablet nodes?
if [ $# -eq 0 ]
then
DOCKER_COMPOSE_LOCATION="${BASH_SOURCE%/*}/../conf/docker-compose-single-node.yaml"
elif [ $1 -eq 1 ]
then
DOCKER_COMPOSE_LOCATION="${BASH_SOURCE%/*}/../conf/docker-compose-single-node.yaml"
elif [ $1 -eq 3 ]
then
DOCKER_COMPOSE_LOCATION="${BASH_SOURCE%/*}/../conf/docker-compose-three-nodes.yaml"
else
echo unknown node configuration
exit 1
fi
DOCKER_COMPOSE_LOCATION="${BASH_SOURCE%/*}/../conf/docker-compose.yml"

# emulate schemas ?
if [ $# -lt 2 ]
Expand All @@ -53,14 +38,16 @@ function cleanup_docker_container() {
docker-compose -f "${DOCKER_COMPOSE_LOCATION}" down
}


start_docker_container

# run product tests
pushd ${PROJECT_ROOT}
# sleep to allow cluster be up
sleep 15s

set +e
./mvnw -pl presto-kudu test -P integration \
-Dkudu.client.master-addresses=${DOCKER_HOST_IP}:${KUDU_MASTER_RPC_PORT} \
-Dkudu.client.master-addresses=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251 \
-Dkudu.schema-emulation.prefix=${TEST_SCHEMA_EMULATION_PREFIX}
EXIT_CODE=$?
set -e
Expand Down
13 changes: 0 additions & 13 deletions presto-kudu/conf/docker-compose-single-node.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions presto-kudu/conf/docker-compose-three-nodes.yaml

This file was deleted.

118 changes: 118 additions & 0 deletions presto-kudu/conf/docker-compose.yml
@@ -0,0 +1,118 @@
version: "3"
services:
kudu-master1:
image: apache/kudu:${KUDU_VERSION:-latest}
ports:
- "7051:7051"
- "8051:8051"
command: ["master"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
MASTER_ARGS=--fs_wal_dir=/var/lib/kudu/master
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7051
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7051
--webserver_port=8051
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8051
--use_hybrid_clock=false
kudu-master2:
image: apache/kudu:${KUDU_VERSION:-latest}
ports:
- "7151:7151"
- "8151:8151"
command: ["master"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
MASTER_ARGS=--fs_wal_dir=/var/lib/kudu/master
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7151
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7151
--webserver_port=8151
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8151
--use_hybrid_clock=false
kudu-master3:
image: apache/kudu:${KUDU_VERSION:-latest}
ports:
- "7251:7251"
- "8251:8251"
command: ["master"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
MASTER_ARGS=--fs_wal_dir=/var/lib/kudu/master
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7251
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7251
--webserver_port=8251
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8251
--use_hybrid_clock=false
kudu-tserver1:
image: apache/kudu:${KUDU_VERSION:-latest}
depends_on:
- kudu-master1
- kudu-master2
- kudu-master3
ports:
- "7050:7050"
- "8050:8050"
command: ["tserver"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
TSERVER_ARGS=--fs_wal_dir=/var/lib/kudu/tserver
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7050
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7050
--webserver_port=8050
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8050
--use_hybrid_clock=false
kudu-tserver2:
image: apache/kudu:${KUDU_VERSION:-latest}
depends_on:
- kudu-master1
- kudu-master2
- kudu-master3
ports:
- "7150:7150"
- "8150:8150"
command: ["tserver"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
TSERVER_ARGS=--fs_wal_dir=/var/lib/kudu/tserver
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7150
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7150
--webserver_port=8150
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8150
--use_hybrid_clock=false
kudu-tserver3:
image: apache/kudu:${KUDU_VERSION:-latest}
depends_on:
- kudu-master1
- kudu-master2
- kudu-master3
ports:
- "7250:7250"
- "8250:8250"
command: ["tserver"]
environment:
- KUDU_MASTERS=${KUDU_CLUSTERIP}:7051,${KUDU_CLUSTERIP}:7151,${KUDU_CLUSTERIP}:7251
- >
TSERVER_ARGS=--fs_wal_dir=/var/lib/kudu/tserver
--webserver_doc_root=/opt/kudu/www
--logtostderr
--rpc_bind_addresses=0.0.0.0:7250
--rpc_advertised_addresses=${KUDU_CLUSTERIP}:7250
--webserver_port=8250
--webserver_advertised_addresses=${KUDU_CLUSTERIP}:8250
--use_hybrid_clock=false
8 changes: 7 additions & 1 deletion presto-kudu/pom.xml
Expand Up @@ -13,14 +13,20 @@

<properties>
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
<kudu.version>1.8.0</kudu.version>
<kudu.version>1.10.0</kudu.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.kudu</groupId>
<artifactId>kudu-client</artifactId>
<version>${kudu.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down

0 comments on commit e2fe578

Please sign in to comment.