Skip to content

Instantly share code, notes, and snippets.

@stanislavkozlovski
Created April 4, 2019 18:38
Show Gist options
  • Save stanislavkozlovski/955c48849be20938a0d8292fc1a38e31 to your computer and use it in GitHub Desktop.
Save stanislavkozlovski/955c48849be20938a0d8292fc1a38e31 to your computer and use it in GitHub Desktop.
Trogdor Cheat Sheet

Quickrun a test on a single agent node

export JSON_SPEC=./tests/spec/simple_produce_bench.json # JSON file with the appropriate specification
./bin/trogdor.sh agent -n node0 -c ./config/trogdor.conf --exec $JSON_SPEC

Spin up Trogdor cluster consisting of 1 Agent and the Coordinator

./bin/trogdor.sh coordinator -c ./config/trogdor.conf -n node0
./bin/trogdor.sh agent -c ./config/trogdor.conf -n node0

Create a task via the Coordinator

./bin/trogdor.sh client createTask --id test-produce --target localhost:8889 --spec '''
{
  "class": "org.apache.kafka.trogdor.workload.ProduceBenchSpec",
  "durationMs": 10000000,
  "producerNode": "node0",
  "bootstrapServers": "localhost:9092",
  "targetMessagesPerSec": 10000,
  "maxMessages": 50000,
  "activeTopics": {
    "foo[1-3]": {
      "numPartitions": 10,
      "replicationFactor": 1
    }
  },
  "inactiveTopics": {
    "foo[4-5]": {
      "numPartitions": 10,
      "replicationFactor": 1
    }
  }
}
'''

See all tasks in the Coordinator

./bin/trogdor.sh client showTasks --target localhost:8889

See all running tasks in the Coordinator

curl localhost:8889/coordinator/tasks?state=RUNNING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment