Created
August 30, 2019 17:44
-
-
Save andrwng/75471fd1c522dc26ecdb1d91397e29b8 to your computer and use it in GitHub Desktop.
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
docker pull apache/kudu:latest | |
docker run -it --network="docker_default" -p 8050:8050 -p 7050:7050 -p 8051:8051 -p 7051:7051 apache/kudu:latest bash | |
mkdir master | |
mkdir tserver | |
# Run a tablet server and master. | |
./bin/kudu-tserver --fs_wal_dir=/opt/kudu/tserver/test-wal --logtostderr --use_hybrid_clock=false --rpc_bind_addresses=0.0.0.0:7050 --rpc_advertised_addresses=${KUDU_QUICKSTART_IP}:7050 --webserver_port=8050 --webserver_advertised_addresses=${KUDU_QUICKSTART_IP}:8050 --webserver_doc_root=/opt/kudu/www --stderrthreshold=0 &> tserver.log & | |
./bin/kudu-master --fs_wal_dir=/opt/kudu/master/test-wal --logtostderr --use_hybrid_clock=false --rpc_bind_addresses=0.0.0.0:7051 --rpc_advertised_addresses=${KUDU_QUICKSTART_IP}:7051 --webserver_port=8051 --webserver_advertised_addresses=${KUDU_QUICKSTART_IP}:8051 --webserver_doc_root=/opt/kudu/www --stderrthreshold=0 &> master.log & | |
# Now create a table. | |
bin/kudu perf loadgen 0.0.0.0:7051 --table_num_replicas=1 --keep_auto_table | |
# Look at some data through the CLI. | |
bin/kudu table scan 0.0.0.0:7051 <table> | |
# Explore what we just learned. | |
kudu fs list | |
kudu local_replica dump wals | |
# Try exploring the client. | |
docker run -it andrwng/kudu-demos:kudu-python-latest | |
##### | |
# Set up the network across containers so we can look into them. | |
export KUDU_QUICKSTART_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | tail -1) | |
# Start up all the nodes. | |
docker-compose -f docker/quickstart.yml up | |
# Log into one of the containers | |
docker exec -it $(docker ps -aqf "name=kudu-master-1") /bin/bash | |
# Run ksck to check the health of the cluster. | |
bin/kudu cluster ksck kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251 | |
# Generate some rows. | |
bin/kudu perf loadgen kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251 --keep_auto_table --num_rows_per_thread=-1 --table_num_replicas=3 --flush_per_n_rows=1 | |
##### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment