You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2011/09/23 13:20:11 UTC

[Hadoop Wiki] Update of "HowToContribute" by SteveLoughran

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "HowToContribute" page has been changed by SteveLoughran:
http://wiki.apache.org/hadoop/HowToContribute?action=diff&rev1=61&rev2=62

Comment:
use must instead of should as per the relevant RFC

  
   * All public classes and methods should have informative [[http://java.sun.com/j2se/javadoc/writingdoccomments/|Javadoc comments]].
    * Do not use @author tags.
-  * Code should be formatted according to [[http://java.sun.com/docs/codeconv/|Sun's conventions]], with one exception:
+  * Code must be formatted according to [[http://java.sun.com/docs/codeconv/|Sun's conventions]], with one exception:
    * Indent two spaces per level, not four.
-  * Contributions should pass existing unit tests.
+  * Contributions must pass existing unit tests.
   * New unit tests should be provided to demonstrate bugs and fixes.  [[http://www.junit.org|JUnit]] is our test framework:
    * You must implement a class that uses {{{@Test}}} annotations for all test methods. Please note, [[http://wiki.apache.org/hadoop/HowToDevelopUnitTests|Hadoop uses JUnit v4]].
    * Define methods within your class whose names begin with {{{test}}}, and call JUnit's many assert methods to verify conditions; these methods will be executed when you run {{{ant test}}} (or {{{mvn test}}}). Please add meaningful messages to the assert statement to facilitate diagnostics.
@@ -46, +46 @@

    * For HDFS and MapReduce, you can run all the unit tests with the command {{{ant test}}}, or you can run a specific unit test with the command {{{ant -Dtestcase=<class name without package prefix> test}}} (for example {{{ant -Dtestcase=TestFileSystem test}}})
  
  ==== Using Maven ====
- Hadoop built using [[http://maven.apache.org/|Apache Maven]], version 3 or later. (Parts of MapReduce are still built using Ant, see the instructions in the {{{INSTALL}}} file in {{{hadoop-mapreduce}}} for details.)
+ Hadoop 0.23 and later is built using [[http://maven.apache.org/|Apache Maven]], version 3 or later. (Parts of MapReduce are still built using Ant, see the instructions in the {{{INSTALL}}} file in {{{hadoop-mapreduce}}} for details.)
  
  === Generating a patch ===
  ==== Unit Tests ====
@@ -179, +179 @@

  
  When you believe that your patch is ready to be committed, select the '''Submit Patch''' link on the issue's Jira.  Submitted patches will be automatically tested against "trunk" by [[http://hudson.zones.apache.org/hudson/view/Hadoop/|Hudson]], the project's continuous integration engine.  Upon test completion, Hudson will add a success ("+1") message or failure ("-1") to your issue report in Jira.  If your issue contains multiple patch versions, Hudson tests the last patch uploaded.
  
- Folks should run {{{ant clean test javadoc checkstyle}}} (or {{{mvn clean install javadoc:javadoc checkstyle:checkstyle}}} in the case of Common or HDFS) before selecting '''Submit Patch'''.  Tests should all pass.  Javadoc should report '''no''' warnings or errors. Checkstyle's error count should not exceed that listed at [[http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/lastSuccessfulBuild/artifact/trunk/build/test/checkstyle-errors.html|Checkstyle Errors]]  Hudson's tests are meant to double-check things, and not be used as a primary patch tester, which would create too much noise on the mailing list and in Jira.  Submitting patches that fail Hudson testing is frowned on, (unless the failure is not actually due to the patch).
+ Folks should run {{{ant clean test javadoc checkstyle}}} (or {{{mvn clean install javadoc:javadoc checkstyle:checkstyle}}} in the case of Common or HDFS) before selecting '''Submit Patch'''.  Tests must all pass.  Javadoc should report '''no''' warnings or errors. Checkstyle's error count should not exceed that listed at [[http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/lastSuccessfulBuild/artifact/trunk/build/test/checkstyle-errors.html|Checkstyle Errors]]  Hudson's tests are meant to double-check things, and not be used as a primary patch tester, which would create too much noise on the mailing list and in Jira.  Submitting patches that fail Hudson testing is frowned on, (unless the failure is not actually due to the patch).
  
  If your patch involves performance optimizations, they should be validated by benchmarks that demonstrate an improvement.