Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#23: Use cassandra driver's DNS resolution
Summary: Instead of resolving nodes to IP addresses inside sample app, used appropariate cassandra driver's client builder. Also restricted to only allow use the same CQL port number for all specified `--nodes` parameters, since different ports are not supported by client builder. Test Plan: - Need https://kubernetes.io/docs/getting-started-guides/minikube for testing. - Build docker image to be used for minikube: ``` minikube start eval $(minikube docker-env) cd ~/code/devops/docker/images/yugabyte docker build -t yugabytedb/yugabyte:test . ``` - Run local k8s cluster using https://github.com/YugaByte/yugabyte-db/blob/master/cloud/kubernetes/README.md. Before running replace `yugabytedb/yugabyte:latest` with `yugabytedb/yugabyte:test` and set `imagePullPolicy: Never` in `yugabyte-statefulset.yaml`. - kubectl exec -it yb-master-0 -- yum -y install java-1.8.0-openjdk-headless.x86_64 - kubectl exec -it yb-master-0 -- java -jar /home/yugabyte/java/yb-sample-apps.jar --num_reads 1000000 --num_threads_read 4 --num_unique_keys 1000000 --num_writes 10000000 --num_threads_write 12 --workload CassandraKeyValue --nodes yb-tservers.default.svc.cluster.local:9042 It should log line similar to and list 3 IPs: ``` 2018-04-10 17:31:53,814 [INFO|com.yugabyte.sample.apps.AppBase|AppBase] Connecting to nodes: yb-tservers.default.svc.cluster.local/172.17.0.7:9042,yb-tservers.default.svc.cluster.local/172.17.0.8:9042,yb-tservers.default.svc.cluster.local/172.17.0.9:9042 ``` - Check the same with `--workload CassandraHelloWorld` Reviewers: mihnea, karthik Reviewed By: karthik Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D4584
- Loading branch information