Skip to content
This repository

A command-line client for Gizzard

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 gizzmo.gemspec
README.rdoc

gizzmo

Gizzmo is a command-line client for managing gizzard clusters.

Installation and setup

Installation is a simple gem install. You may find it useful to create a ~/.gizzmorc file, which is simply YAML key/values. The keys are the long-style command line option keys converted into Ruby-style variables. A common .gizzmorc will simply be:

host: localhost
port: 7917

Usage

Run `gizzmo help` for up-to-date usage.

Recipes

Block and unblock a shard

BLOCKER=`gizzmo wrap com.twitter.gizzard.shards.BlockedShard a_shard`

gizzmo unwrap $BLOCKER

Reweight a shard safely (the hard way)

NEW_WEIGHT=1
REPL=`gizzmo wrap com.twitter.service.flock.edges.ReplicatingShard a_shard`
PARENT=`gizzmo links $REPL | cut -f 1 | grep -v $REPL | head -1`
gizzmo addlink $PARENT a_shard $NEW_WEIGHT
gizzmo unwrap $REPL

Contributing

Contributions are welcome! Please send a pull request, or if you're internal to Twitter, please make a branch! Commits to master, and/or patches without minimal test coverage will be rejected/reverted.

Running tests

The tests may be somewhat difficult to run outside of Twitter. They assume the following:

  1. You have a running FlockDB development environment exposing a ShardManager over thrift on localhost:7917

  2. You don't mind blowing away the data in your dev environment.

  3. Your MySQL username and password are in the environment variables DB_USERNAME and DB_PASSWORD

Assuming you've put together the dependencies, ./test/test.sh should run fine.

Copyright

Copyright © 2010 Twitter, Inc. See LICENSE for details.

Something went wrong with that request. Please try again.