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=13&rev2=14

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

  
  First of all, you need the HBase source code.<<BR>>
  
- Get the source code on your local drive using 
[[http://svn.apache.org/repos/asf/hadoop/hbase|SVN]]. Most development is done 
on the "trunk":
+ Get the source code on your local drive using 
[[http://svn.apache.org/repos/asf/hbase|SVN]]. Most development is done on the 
"trunk":
  
  {{{
- svn co http://svn.apache.org/repos/asf/hadoop/hbase/trunk hbase-core-trunk
+ svn co http://svn.apache.org/repos/asf/hbase/trunk hbase-core-trunk
  }}}
  
  If you prefer to use Eclipse for development, there are instructions for 
setting up SVN access from within Eclipse at [[Hbase/EclipseEnvironment| 
Working with HBase under Eclipse]].
  
+ Alternatively, if you prefer to use [[http://git.apache.org/hbase.git/|git]], 
there is a git repository available that mirrors the svn repository. You can 
retrieve the latest information via git with the following:
+ 
+ {{{
+ git clone git://git.apache.org/hbase.git
+ }}}
+ 
  === Making Changes ===
- 
- Before you start, send a message to the <<MailTo(hbase-dev AT SPAMFREE hadoop 
DOT apache DOT org)>> HBase developer mailing list, or file a bug report in 
[[https://issues.apache.org/jira/browse/HBASE|Hbase JIRA]].  Describe your 
proposed changes and check that they fit in with what others are doing and have 
planned for the project.  Be patient, it may take folks a while to understand 
your requirements.
+ Before you start, send a message to the <<MailTo(dev AT SPAMFREE hbase DOT 
apache DOT org)>> HBase developer mailing list, or file a bug report in 
[[https://issues.apache.org/jira/browse/HBASE|Hbase JIRA]].  Describe your 
proposed changes and check that they fit in with what others are doing and have 
planned for the project.  Be patient, it may take folks a while to understand 
your requirements.
  
  Modify the source code and add some (very) nice features using your favorite 
IDE.<<BR>>
  
@@ -31, +36 @@

   * 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 extends {{{junit.framework.TestCase}}}, 
{{{org.apache.hadoop.hbase.HBaseTestCase}}} or 
{{{org.apache.hadoop.hbase.HBaseClusterTestCase}}} and whose class name starts 
with {{{Test}}}.
-   * 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}}}.
+   * 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}}}.
    * 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.
    * 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}}}.
    * Place your class in the {{{src/test}}} tree.
-   * you can run all the unit test with the command {{{ant test}}}, or you can 
run a specific unit test with the command {{{ant test -Dtestcase=<ClassName>}}} 
(For example {{{ant test -Dtestcase=TestHBaseCluster}}})
+   * 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}}})
+   * if you want to quickly build the code without running the tests you can 
run the command {{{mvn install -DskipTests}}}
  
  <<Anchor(eclipse)>>
  === Eclipse is your friend ===
@@ -65, +71 @@

  
  {{{
  > cd hbase-core-trunk
- > ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar
+ > mvn -Djavac.args="-Xlint -Xmaxwarns 1000" clean install
  }}}
  After a while, if you see
  {{{
@@ -73, +79 @@

  }}}
  all is ok, but if you see
  {{{
- BUILD FAILED
+ BUILD FAILURE
  }}}
- then please examine error messages in {{{build/test}}} and fix things before 
proceeding.
+ then please examine error messages in {{{target/surefire-reports}}} and fix 
things before proceeding.
  
  === Javadoc ===
  
  Please also check the javadoc.
  
  {{{
- > ant javadoc
- > firefox build/docs/api/index.html
+ > mvn javadoc:javadoc
+ > firefox target/site/apidocs/index.html
  }}}
  
  Examine all public classes you've changed to see that documentation is 
complete and informative.  Your patch must not generate any javadoc warnings.
@@ -94, +100 @@

  svn stat
  }}}
  
+ or if you're using git:
+ {{{
+ git status
+ }}}
+ 
  Add any new files with:
  {{{
  svn add src/.../MyNewClass.java
  }}}
  
+ or if you're using git:
+ {{{
+ git add src/.../MyNewClass.java
+ }}}
  
  In order to create a patch, just type:
  
  {{{
  svn diff > patchname.patch
+ }}}
+ 
+ or if you're using git:
+ 
+ {{{
+ git diff > patchname.patch
  }}}
  
  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.  
@@ -147, +168 @@

  
  Finally, patches should be ''attached'' to a bug report in 
[[https://issues.apache.org/jira/browse/HBASE|HBase JIRA]] via the '''Attach 
File''' link on the jira. Please add a comment that asks for a code review 
following our [[CodeReviewChecklist| code review checklist]]. Please note that 
the attachment should be granted license to ASF for inclusion in ASF works (as 
per the [[http://www.apache.org/licenses/LICENSE-2.0|Apache License]] ยง5). 
  
+ If you're patch contains more than 2 files that are changed, in addition to 
submitting the patch to JIRA, please also submit to  [[http://review.hbase.org 
|Review Board]]. Reviewers can examine and approve patches via the Review Board 
application.
+ 
  When you believe that your patch is ready to be committed, select the 'Submit 
Patch' link from the 'Available Workflow Actions' section in Jira. Until there 
are automated Hudson patch builds, this will notify others that the patch is 
ready to be reviewed.
  
  ## The following section commented out until there are automated Hudson
@@ -154, +177 @@

  ##
  ## 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 'ant clean test 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).
  
@@ -180, +203 @@

  
  == Stay involved ==
  
- Contributors should join the developer's mailing list <<MailTo(hbase-dev AT 
SPAMFREE hadoop DOT apache DOT org)>>, the user's mailing list 
<<MailTo(hbase-user AT SPAMFREE hadoop DOT apache DOT org)>> and the commit's 
mailing list <<MailTo(hbase-commits AT SPAMFREE hadoop DOT apache DOT org)>>.
+ Contributors should join the developer's mailing list <<MailTo(dev AT 
SPAMFREE hbase DOT apache DOT org)>>, the user's mailing list <<MailTo(user AT 
SPAMFREE hbase DOT apache DOT org)>> and the commit's mailing list 
<<MailTo(commits AT SPAMFREE hbase DOT apache DOT org)>>.
  
  == See Also ==
  

Reply via email to