GithubHelp home page GithubHelp logo

gizzmo's Introduction

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: 7920

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 that:

  • You don’t mind blowing away the data in your dev environment.

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

To execute the tests:

  1. Set up a nameserver database (once):

    // create the database for the local nameserver
    echo "create database gizzard_test_integration_ns;" | mysql
  2. Pull in test server dependencies (once, or whenever you want to change the Gizzard version):

    cd test/test_server ; sbt clean clean-lib update
  3. Run rake (the default target is the test suite: all files ending in ‘_spec’ in the test directory):

    rake
    

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

gizzmo's People

Contributors

freels avatar rcohen avatar boazavital avatar hyungoo avatar caniszczyk avatar jeremycole avatar ksauzz avatar

Watchers

Branko Vukmirovic avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.