1. Check if someone else has already begun work on the change you have in mind in the issue tracker

  2. If not, create a ticket describing the change you're proposing in the issue tracker
  3. Check out the latest version of the source code
  4. Modify the source to include the improvement/bugfix
    • Verify that you follow Cassandra's CodeStyle.

    • Verify that your change works by adding a unit test.
    • Make sure all tests pass by running "ant test" in the project directory.
  5. When you're happy with the result create a patch:
    • svn add <any new file>

    • svn diff > CASSANDRA-issuenumber.patch

  6. Attach the newly generated patch to the issue and click "Submit patch" in the left side of the JIRA page
  7. Wait for other developers or committers to review it and hopefully +1 the ticket
  8. Wait for a committer to commit it.

Testing and Coverage

Setting up and running system tests:

  1. install python setuptools, if necessary (apt-get install python-setuptools)

  2. easy_install nose

  3. from trunk/interface/, run thrift -gen py cassandra.thrift

  4. nosetests from trunk/

If you need to modify the system tests, you probably only need to care about test/system/test_server.py. (test/system/init.py takes care of spawning new cassandra instances for each test and cleaning up afterwards so they are isolated.)

Running the code coverage task:

  1. Unzip this one: http://prdownloads.sourceforge.net/cobertura/cobertura-1.9.1-bin.zip?download

  2. ant codecoverage -Dcobertura.dir=/path/to/cobertura
  3. check build/cobertura

This is also available on Hudson (which updates about once every 24h) here: http://hudson.zones.apache.org/hudson/job/Cassandra/110/cobertura/

IDE

Subversion Configuration

Add this to your subversion configuration (~/.subversion/config on unix-style installs) so that newly added files have the correct auto-properties once committed:

[auto-props]
*.java = svn:eol-style=native
*.properties = svn:eol-style=native
*.py= svn:eol-style=native
*.sh = svn:eol-style=native;svn:executable
*.thrift = svn:eol-style=native
*.txt = svn:eol-style=native
*.xml = svn:eol-style=native
*.jar = svn:mime-type=application/octet-stream
*.bat = svn:eol-style=CRLF

Note: for this to work you must enable auto-props by setting enable-auto-props = yes in .subversion/config.

Got Git?

Playing nicely with others

HowToContribute (last edited 2009-09-20 23:34:44 by localhost)