Apache Kudu - Apache Kudu Quickstart


本站和网页 https://kudu.apache.org/docs/quickstart.html 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

Apache Kudu - Apache Kudu Quickstart
Toggle navigation
Home
Overview
Documentation
Releases
Blog
Community
GET IN TOUCH
Mailing Lists
Slack Channel
Events and Meetups
Project Committers
Ecosystem
How to Contribute
DEVELOPER RESOURCES
GitHub
Gerrit Code Review
JIRA Issue Tracker
SOCIAL MEDIA
Twitter
Reddit
APACHE SOFTWARE FOUNDATION
Security
Sponsorship
Thanks
License
FAQ
Apache Kudu Quickstart
Follow these instructions to set up and run a local Kudu Cluster using Docker,
and get started using Apache Kudu in minutes.
This is intended for demonstration purposes only and shouldn’t
be used for production or performance/scale testing.
Install Docker
Follow the Docker install documentation
to install docker in your Linux, Mac, or Windows environment.
Configure the Docker install to have enough resources to run the quickstart guides.
Docker for Mac Resource Configuration Guide
A minimum configuration that can run all the quickstart examples comfortably is:
4 CPUs
6 GB Memory
50 GB Disk
You can likely get by with a lower resource configuration, but you may lose some performance and stability.
You may also want to read through the Docker getting started guide, but that isn’t a requirement.
Clone the Repository
Clone the Apache Kudu repository using Git and change to the kudu directory:
git clone https://github.com/apache/kudu
cd kudu
Start the Quickstart Cluster
Set KUDU_QUICKSTART_IP
Set the KUDU_QUICKSTART_IP environment variable to your ip address:
export KUDU_QUICKSTART_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | tail -1)
Bring up the Cluster
Then use docker-compose to start a cluster with 3 master servers and 5 tablet servers.
When inside the docker network/containers the master addresses will be
kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251 and when on the host machine
you can specify the master addresses with localhost:7051,localhost:7151,localhost:7251.
docker-compose -f docker/quickstart.yml up -d
You can remove the -d flag to run the cluster in the foreground.
View the Web-UI
Once the cluster is started you can view the master web-ui by visiting localhost:8050.
Check the cluster health
Use the command below to get a bash shell in the kudu-master-1 container:
docker exec -it $(docker ps -aqf "name=kudu-master-1") /bin/bash
You can now run the Kudu ksck tool to verify the cluster is healthy:
kudu cluster ksck kudu-master-1:7051,kudu-master-2:7151,kudu-master-3:7251
Alternatively, if you have a kudu binary available on your host machine,
you can run ksck there via:
export KUDU_USER_NAME=kudu
kudu cluster ksck localhost:7051,localhost:7151,localhost:7251
Setting KUDU_USER_NAME=kudu simplifies using Kudu from various user
accounts in a non-secure environment.
Running a Brief Example
Now that a Kudu cluster is up and running, examples and integrations can be
run against the cluster. The commands below run the java-example against
the quickstart cluster:
export KUDU_USER_NAME=kudu
cd examples/java/java-example
mvn package
java -DkuduMasters=localhost:7051,localhost:7151,localhost:7251 -jar target/kudu-java-example-1.0-SNAPSHOT.jar
More Examples
More complete walkthroughs using the quickstart Kudu cluster can be found in the
examples/quickstart directory. For convenience you can browse them on
Github.
NiFi Quickstart Guide
Spark Quickstart Guide
Impala Quickstart Guide
Destroying the Cluster
Once you are done with the quickstart cluster you can shutdown in a couple of ways.
If you ran docker-compose without the -d flag, you can use ctrl + c to
stop the cluster.
If you ran docker-compose with the -d flag, you can use the following to
gracefully shutdown the cluster:
docker-compose -f docker/quickstart.yml down
Another alternative is to stop all of the Kudu containers via:
docker stop $(docker ps -aqf "name=kudu")
If you want to remove the cluster state you can also remove the docker
containers and volumes via:
docker rm $(docker ps -aqf "name=kudu")
docker volume rm $(docker volume ls --filter name=kudu -q)
Troubleshooting
Viewing the logs
To view the logs you can use the docker logs command. Below is an example
that will show the logs one of the tablet servers:
docker logs $(docker ps -aqf "name=kudu-tserver-1")
Changing the Kudu version
To change the version of Kudu Docker images used you can override the default value
of latest by setting the KUDU_QUICKSTART_VERSION environment variable.
export KUDU_QUICKSTART_VERSION="1.14.0"
Changing the Kudu configuration
To change the configuration flags passed to the master and tablet servers you
can edit the docker/quickstart.yml file before starting the cluster.
Killing a Kudu master
Due to KUDU-1620 master hosts
are always expected to be reachable.
Next Steps
Installing Kudu
Configuring Kudu
Introducing Kudu
Kudu Release Notes
Quickstart Guide
Install Docker
Clone the Repository
Start the Quickstart Cluster
Set KUDU_QUICKSTART_IP
Bring up the Cluster
View the Web-UI
Check the cluster health
Running a Brief Example
More Examples
Destroying the Cluster
Troubleshooting
Viewing the logs
Changing the Kudu version
Changing the Kudu configuration
Killing a Kudu master
Next Steps
Installation Guide
Configuring Kudu
Using the Hive Metastore with Kudu
Using Impala with Kudu
Administering Kudu
Troubleshooting Kudu
Developing Applications with Kudu
Kudu Schema Design
Kudu Scaling Guide
Kudu Security
Kudu Transaction Semantics
Background Maintenance Tasks
Kudu Configuration Reference
Kudu Command Line Tools Reference
Kudu Metrics Reference
Known Issues and Limitations
Contributing to Kudu
Export Control Notice
Copyright 2020 The Apache Software Foundation. Last updated 2021-02-26 12:06:48 +0100
Apache Kudu, Kudu, Apache, the Apache feather logo, and the Apache Kudu
project logo are either registered trademarks or trademarks of The
Apache Software Foundation in the United States and other countries.