Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updates ; remove some outdated things

...

Get the source code on your local drive using git. See 83527164 Understanding Hive Branches below to understand which branch you should be using.

...

  •  Create an Apache Software Foundation JIRA account if you do not already have one: Sign Up for JIRA.
    • The ASF JIRA system dashboard is here.
    • The Hive JIRA is here. 
  •  To review patches for JIRA tickets, use the Review Board. If you need an account, register here. See 83527164 below for more information.you could do that on Github
    • All Hive patches posted for review are listed here.
    • Individual JIRA tickets provide a link to the issue on the review board when a review request has been made.
    • For simple reviews, you can just read the patch attached to the JIRA ticket and post a comment.
  •  To contribute to the Hive wiki, follow the instructions in About This Wiki.
  •  To edit the Hive website, follow the instructions in How to edit the website.
  •  Join the Hive mailing lists to receive email about issues and discussions.

...

Understanding Hive Branches

Hive has sa a few "main lines", master and branch-X.

...

  • Add a new XXXXXX.q file in ql/src/test/queries/clientpositive. (Optionally, add a new XXXXXX.q file for a query that is expected to fail in ql/src/test/queries/clientnegative.)
  • Run mvn test -Dtest=TestCliDriver TestMiniLlapLocalCliDriver -Dqfile=XXXXXX.q -Dtest.output.overwrite=true. This will generate a new XXXXXX.q.out file in ql/src/test/results/clientpositive.
    • If you want to run multiple .q files in the test run, you can specify comma separated .q files, for example -Dqfile="X1.q,X2.q". You can also specify a Java regex, for example -Dqfile_regex='join.*'. (Note that it takes Java regex, i.e., 'join.*' and not 'join*'.) The regex match first removes the .q from the file name before matching regex, so specifying join*.q will not work.

...

If you need to make changes you just need to push further changes to the branch - but keep in mind that any new commit will trigger a new testrun; and the time needed to execute tests is measured in hours - so keep this in mind when you are pushing in changes.

Please do not:

.

Please do not:

  • reformat code unrelated to the bug issue being fixed: formatting changes should be separate patches/commits;
  • comment out code that is now obsolete: just remove it;
  • insert comments around each change, marking the change: folks can use git to figure out what's changed and by whom;
  • make things public that are not required by end-users.

...

  • try to adhere to the coding style of files you edit;
  • comment code whose function or rationale is not obvious;
  • add one or more unit tests (see 83527164 Add a Unit Test above);
  • update documentation (such as Javadocs including package.html files and this wiki).

Precommit Tests by Hive QA

If the name of your patch conforms to the naming convention shown above, the automated testing system will run precommit tests and post the results as a JIRA comment from Hive QA. The results give advisory +1 or -1 votes (SUCCESS or ERROR) based on whether all of the tests executed successfully and, more recently, whether existing tests are modified or new tests are included in the patch to cover the code changes. For examples, see the Hive QA comments on HIVE-9534 and HIVE-11752. Note that sometimes tests fail for reasons unrelated to the patch.

To prevent precommit testing, include the case-sensitive phrase NO PRECOMMIT TESTS in the Description section of the JIRA issue. You can remove it later as needed. For examples, see HIVE-5289, HIVE-7343, and HIVE-7375.

Applying a Patch

To apply a patch that you either generated or found from JIRA, you can issue:

Code Block
patch -p0 < cool_patch.patch

If you prefer to use git to apply the patch, the following patches the tree and runs git add on them ( this is very usefull, since it will not miss added/renamed files; and also enables git to oversee the conflicts...so git mergetool can be used to resolve the conflicts)

Code Block
git apply -3 -p0 HIVE-1111.1.patch

If you just want to check whether the patch applies you can run patch with --dry-run option:

Code Block
patch -p0 --dry-run < cool_patch.patch

If you are an Eclipse user, you can apply a patch by:

  1. Right click project name in Package Explorer.
  2. Team -> Apply Patch.

Review Process

See Review Board for instructions.

  • Use Hadoop's code review checklist as a rough guide when doing reviews.
  • In JIRA, use 'Submit Patch' to get your review request into the queue.
  • If a committer requests changes, set the issue status to 'Resume Progress', then once you're ready, submit an updated patch with necessary fixes and then request another round of review with 'Submit Patch' again.
  • Once your patch is accepted, be sure to upload a final version which grants rights to the ASF.

Contributing Your Work

Finally, patches should be attached to an issue report in JIRA via the Attach File link on the issue's JIRA. Please add a comment that asks for a code review. Please note that the attachment should be granted license to ASF for inclusion in ASF works (as per the Apache License).

Fetching a PR from Github

you could do that using:

Code Block
git fetch origin pull/ID/head:BRANCHNAME

Suppose you want to pull the changes of PR-1234 into a local branch named "radiator"

Code Block
git fetch origin pull/1234/head:radiator

Contributing Your Work

You should open a JIRA ticket about the issue you are about to fix.

Upload your changes to your github fork and open a PR against the hive repoWhen you believe that your patch is ready to be committed, select the Submit Patch link on the issue's JIRA. Unit tests will run automatically if the file is named according to the naming standards. See Hive PreCommit Patch Testing. Tests should all pass. If your patch involves performance optimizations, they should be validated by benchmarks that demonstrate an improvement.

If your patch creates an incompatibility with the latest major release, then you must set the Incompatible change flag on the issue's JIRA and fill in the Release Note field with an explanation of the impact of the incompatibility and the necessary steps users must take.

...