hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hbase/HowToContribute" by DanielPloeg
Date Tue, 25 May 2010 20:36:26 GMT
Dear Wiki user,

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

The "Hbase/HowToContribute" page has been changed by DanielPloeg.
http://wiki.apache.org/hadoop/Hbase/HowToContribute?action=diff&rev1=14&rev2=15

--------------------------------------------------

  But take care about the following points
   * All public classes and methods should have informative [[http://java.sun.com/j2se/javadoc/writingdoccomments/|Javadoc
comments]].
    * Do not use @author tags.
+   * Please include the Apache License header at the start of each file.
   * Code should be formatted according to [[http://java.sun.com/docs/codeconv/|Sun's conventions]],
with two exceptions:
    1. Indent two spaces per level, not four.
    2. Use spaces and not tabs.
   * 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:
+  * New unit tests should be provided to demonstrate bugs and fixes.  [[http://www.junit.org|JUnit4]]
is our test framework:
-   * You must implement a class that extends {{{junit.framework.TestCase}}}, {{{org.apache.hadoop.hbase.HBaseTestCase}}}
or {{{org.apache.hadoop.hbase.HBaseClusterTestCase}}} and whose class name starts with {{{Test}}}.
+   * All test class names should start with {{{Test}}}.
+   * Use JUnit4 annotations for defining before and after method / class invocations, for
example {{{@Before}}}
+   * Some classes may still extend {{{junit.framework.TestCase}}} based on the old version
of JUnit. If you need to modify these files, migrate them to the JUnit4 convention.
-   * 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 {{{mvn
install}}}.
+   * Define methods within your class whose names begin with {{{test}}} and annotate them
with {{{@Test}}}, and call JUnit's many assert methods to verify conditions; these methods
will be executed when you run {{{mvn test}}}.
-   * By default, do not let tests write any temporary files to {{{/tmp}}}.  Instead, the
tests should write to the location specified by the {{{test.build.data}}} system property.
+   * By default, do not let tests write any temporary files to {{{/tmp}}}.  Instead, the
tests should write to the location specified by the {{{test.build.data}}} system property.
The {{{org.apache.hadoop.hbase.HBaseTestingUtility}}} class has some utility methods to assist
with this.
-   * If a HBase cluster is needed by your test, either subclass {{{org.apache.hadoop.hbase.HBaseClusterTestCase}}}
or use {{{org.apache.hadoop.hbase.MiniHBaseCluster}}}. If you also need to use a !MapReduce
cluster, use {{{org.apache.hadoop.mapred.MiniMRCluster}}}.
+   * If a HBase cluster is needed by your test, you should use the {{{org.apache.hadoop.hbase.HBaseTestingUtility}}}
to start and stop the cluster. See the {{{org.apache.hadoop.hbase.client.TestAdmin}}} and
{{{org.apache.hadoop.hbase.client.TestFromClientSide}}} classes as these are good examples
of how the testing utilities can be used.
    * Place your class in the {{{src/test}}} tree.
-   * you can run all the unit test with the command {{{mvn install}}}, or you can run a specific
unit test with the command {{{mvn install -Dtest=<ClassName>}}} (For example {{{mvn
install -Dtest=TestHBaseCluster}}})
+   * you can run all the unit test with the command {{{mvn test}}}, or you can run a specific
unit test with the command {{{mvn test -Dtest=<ClassName>}}} (For example {{{mvn test
-Dtest=TestHBaseCluster}}})
    * if you want to quickly build the code without running the tests you can run the command
{{{mvn install -DskipTests}}}
+ 
+ === New to Hbase ===
+ For those contributors that are new to HBase, there is a label that is added to jira items
that are appropriate for you. When finding issues, add a search criteria for the label "noob"
to find all of these tasks. Furthermore, all contributors when logging jira items should consider
whether the new issue could be assigned to a HBase noob and add the label appropriately.
  
  <<Anchor(eclipse)>>
  === Eclipse is your friend ===
@@ -118, +124 @@

  In order to create a patch, just type:
  
  {{{
- svn diff > patchname.patch
+ svn diff > patchname.txt
  }}}
  
  or if you're using git:
  
  {{{
- git diff > patchname.patch
+ git diff > patchname.txt
  }}}
  
- This will report all modifications done on Hadoop sources on your local disk and save them
into the ''patchname.patch'' file.  Read the patch file.  
+ This will report all modifications done on HBase sources on your local disk and save them
into the ''patchname.txt'' file.  Read the patch file.  
  Make sure it includes ONLY the modifications required to fix a single issue.
  
  Patch names should use the following convention:
@@ -177, +183 @@

  ##
  ## Submitted patches will be automatically tested against "trunk" by [http://hudson.zones.apache.org/hudson/
Hudson], the project's continuous integration engine.  Upon test completion, Hudson will add
a success ("+1") message or failure ("-1") to your bug report in Jira.  If your issue contains
multiple patch versions, Hudson tests the last patch uploaded.
  
- Folks should run 'mvn clean install javadoc:javadoc before selecting 'Submit Patch'.  Tests
should all pass.  Javadoc should report no warnings or errors.
+ Folks should run 'mvn clean install javadoc:javadoc' before selecting 'Submit Patch'.  Tests
should all pass.  Javadoc should report no warnings or errors.
  
  ## Hudson's tests should only 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).
  
@@ -194, +200 @@

  ## Should your patch earn a -1 on the Hudson test, set the issue status to 'Resume Progress',
upload a patch with necessary fixes and then set the status to 'Submit Patch' again.
  
  Committers: for non-trivial changes, it is __'''required'''__ to get another committer to
review your patches before commit.  Use "Submit Patch" like other contributors, and then wait
for a "+1" from another committer before committing.  Please also try to frequently review
things in the patch queue.
+ 
+ === Releases prior to 0.21 ===
+ 
+ Previously HBase was using ant for builds. The commands above are intended for releases
0.21 and subsequent that use maven. If you want to make changes to the codebase prior to that,
please refer to the commands below that describe the modified steps.
+ 
+ Unit Tests:
+ 
+ {{{ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar}}}
+ 
+ alternatively, if you wanted to run just the tests alone use {{{ant test}}}, or you can
run a specific unit test with the command {{{ant test -Dtestcase=<ClassName>}}} (For
example {{{ant test -Dtestcase=TestHBaseCluster}}}) :
+ 
+ Javadoc:
+ 
+ {{{ant javadoc}}}
+ 
  
  == Jira Guidelines ==
  

Mime
View raw message