...
Get the source code on your local drive using git. See Understanding Hive Branches 83527164 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.
- To review patches for JIRA tickets, use the Review Board. If you need an account, register here. See Review Process83527164 below for more information.
- 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.
...
<branch-name> is only required if it is not master. (See Understanding Hive Branches 83527164 above.)
So the first patch for JIRA HIVE-9999 intended to be applied to master would be named "HIVE-9999.patch
".
...
- 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 Add a Unit Test 83527164 above);
- update documentation (such as Javadocs including package.html files and this wiki).
...
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.
...
This section only gives the basic procedures for attaching and submitting a patch. See Contributing Your Work 83527164 below for more information.
...
- Don't make any changes to
hive_metastore.thrift
until instructed below. - Use the approved version of Thrift. This is currently
thrift-0.9.3
, which you can obtain from http://thrift.apache.org/. (Or on Mac: brew install thrift@0.9, and no need to build, skip to step 4.) - Build the Thrift compiler from its sources, then install it:
cd /path/to/thrift-0.9.3
./configure --without-csharp --without-ruby
make
sudo make install
- Before proceeding, verify that
which thrift
returns the build of Thrift you just installed (typically/usr/local/bin
on Linux); if not, edit your PATH and repeat the verification. Also verify that the command 'thrift -version' returns the expected version number of Thrift. - Now you can run the Maven 'thriftif' profile to generate the Thrift code:
cd /path/to/hive-trunk/
mvn clean install -Pthriftif -DskipTests -Dthrift.home=/usr/local -Phadoop-2
- If you see an error about fb303.thrift not being found, copy it to the appropriate directory and run above command again.
- On centOS/RHEL:
cp /path/to/thrift-0.9.3/contrib/fb303/if/fb303.thrift /usr/local/share/fb303/if/fb303.thrift
- On Mac with homebrew:
$ cd /usr/local/Cellar/thrift@0.9/0.9.3 && mkdir -p share/fb303/if && cd share/fb303/if && curl -o fb303.thrift https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift
- On centOS/RHEL:
- Verify that the code generation was a no-op, which should be the case if you have the correct Thrift version and everyone has been following these instructions. You may use
git status
orsvn status
for the same. If you can't figure out what is going wrong, ask for help from a committer. - Now make your changes to
hive_metastore.thrift
, and then run the compiler again, from /path/to/hive-trunk/<hive_metastore.thrift's module>:mvn clean install -Pthriftif -DskipTests -Dthrift.home=/usr/local -Phadoop-2
- Now use
svn status
andsvn diff
orgit status and git diff
to verify that the regenerated code corresponds only to the changes you made tohive_metastore.thrift
. You may also needsvn add
orgit add
if new files were generated (andsvn remove
orgit rm
if files have been obsoleted). cd /path/to/hive-trunk
ant clean package
- Verify that Hive is still working correctly with both embedded and remote metastore configurations.
...
...