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 JimKellerman
Date Wed, 30 Jul 2008 17:54:04 GMT
Dear Wiki user,

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

The following page has been changed by JimKellerman:
http://wiki.apache.org/hadoop/Hbase/HowToContribute

The comment on the change is:
Add patch name guidelines, comment out text about automated patch builds

------------------------------------------------------------------------------
  
  === Getting the source code ===
  
- First of all, you need the Hadoop source code.[[BR]]
+ 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":
  
@@ -30, +30 @@

    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:
-   * You must implement a class that extends {{{junit.framework.TestCase}}}, {{{org.apache.hadoop.hbase.HBaseTestCase}}}
or {{{org.apache.hadoop.HBaseClusterTestCase}}} and whose class name starts with {{{Test}}}.
+   * 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}}}.
    * 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.MiniMRCluster}}}.
+   * 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}}})
  
@@ -64, +64 @@

  Please make sure that all unit tests succeed before constructing your patch and that no
new javac compiler warnings are introduced by your patch.
  
  {{{
- > cd hadoop-trunk
+ > cd hbase-core-trunk
  > ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar
  }}}
  After a while, if you see
@@ -104, +104 @@

  In order to create a patch, just type:
  
  {{{
- svn diff > myBeautifulPatch.patch
+ svn diff > patchname.patch
  }}}
  
- This will report all modifications done on Hadoop sources on your local disk and save them
into the ''myBeautifulPath.patch'' file.  Read the patch file.  
+ 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.  
  Make sure it includes ONLY the modifications required to fix a single issue.
+ 
+ Patch names should use the following convention:
+ 
+ {{{
+ <jira_number>[<hbase_version_patch_applies_to>].patch
+ }}}
+ 
+ The jira_number is required. hbase_version_patch_applies_to is optional in two cases:
+  1. The patch is for trunk
+  2. The Jira only fixes one version
  
  Please do not:
   * reformat code unrelated to the bug being fixed: formatting changes should be separate
patches/commits.
@@ -138, +148 @@

  
  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). 
  
- When you believe that your patch is ready to be committed, select the 'Submit Patch' link
from the 'Available Workflow Actions' section in Jira.  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.
+ 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
+ ## patch builds
+ ##
+ ## 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 'ant clean test 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).
+ ## 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).
  
  If your patch involves performance optimizations, they should be validated by benchmarks
that demonstrate an improvement.
  
+ Once a "+1, code reviewed" comment is received from a code reviewer, a committer should
then evaluate it within a few days and either: commit it; or reject it with an explanation.
+ 
- Once a "+1" comment is received from the automated patch testing system and a "+1, code
reviewed" comment is received from a code reviewer, a committer should then evaluate it within
a few days and either: commit it; or reject it with an explanation.
+ ## Once a "+1" comment is received from the automated patch testing system and a "+1, code
reviewed" comment is received from a code reviewer, a committer should then evaluate it within
a few days and either: commit it; or reject it with an explanation.
  
  Please be patient.  Committers are busy people too.  If no one responds to your patch after
a few days, please make friendly reminders.  Please incorporate other's suggestions into into
your patch if you think they're reasonable.  Finally, remember that even a patch that is not
committed is useful to the community.
  
+ Should your patch earn a -1 review, set the issue status to 'Resume Progress', upload a
patch with necessary fixes and then set the status to 'Submit Patch' again.
+ 
- 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.
+ ## 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.
  

Mime
View raw message