README.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. To run the system test we need to create processing containers that we can
  2. spawn tasks, called Instances, in. (how is that for a dangling preposition!?!)
  3. Start up InstanceContainers first. Then run the system test. The system test
  4. finds the InstanceContainers and directs them through ZooKeeper, so you are
  5. going to need an instance of ZooKeeper running that they can all access.
  6. The easiest way to do all of this is to use the zookeeper fat jar.
  7. Steps to run system test
  8. ------------------------
  9. 1) build and transfer the fatjar from the `zookeeper-contrib/zookeeper-contrib-fatjar/target`
  10. directory to all systems participating in the test
  11. Command to build fatjar without executing the tests:
  12. `mvn clean install -P fatjar -DskipTests`
  13. 2) run a zookeeper standalone instance (cluster is ok too)
  14. e.g. java -jar zookeeper-<version>-fatjar.jar server <zoo.cfg>
  15. Note: you must provide zoo.cfg, see sample in conf directory
  16. 3) on each host start the system test container
  17. e.g. java -jar zookeeper-<version>-fatjar.jar ic <name> <zkHostPort> /sysTest
  18. name : name of the test container - must be unique
  19. typically it's a good idea to name after the host to aid debugging
  20. zkHostPort : the host:port of the server from step 2)
  21. 4) initiate the system test using the fatjar:
  22. java -jar build/contrib/fatjar/zookeeper-<version>-fatjar.jar systest org.apache.zookeeper.test.system.SimpleSysTest
  23. by default it will access the zk server started in 2) on localhost:2181
  24. or you can specify a remote host:port using
  25. -DsysTest.zkHostPort=<host>:<port>,<host>:<port>,...
  26. java -DsysTest.zkHostPort=hostA:2181 -jar build/contrib/fatjar/zookeeper-<version>-fatjar.jar systest org.apache.zookeeper.test.system.SimpleSysTest
  27. where hostA is running the zk server started in step 2) above
  28. InstanceContainers can also be used to run a the saturation benchmark. The
  29. first two steps are the same as the system test. Step 3 is almost the same:
  30. 3) start the InstanceContainer on each host:
  31. e.g. java -jar zookeeper-<version>-fatjar.jar ic <name> <zkHostPort> <prefix>
  32. note prefix can be /sysTest or any other path. If you do use /sysTest, make
  33. sure the system test isn't running when you run the benchmark.
  34. 4) run GenerateLoad using the following
  35. java -jar build/contrib/fatjar/zookeeper-<version>-fatjar.jar generateLoad <zkHostPort> <prefix> #servers #clients
  36. Once GenerateLoad is started, it will read commands from stdin. Usually
  37. the only command you need to know is "percentage" which sets the percentage
  38. of writes to use in the requests. Once a percentage is set, the benchmark
  39. will start. "percentage 0" will cause only reads to be issued and
  40. "percentage 100" will cause only writes to be issued.