Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Dot (.) instead of dash before branch name in patch filename (since HIVE-20191).

...

Code Block
HIVE-<JIRA-NUMBER>[.<patch-num>][-.<branch-name>].patch

<patch-num> is only required if it is not the first patch.

...

A patch for the same JIRA intended to be applied to the llap branch-1 branch would be named HIVE-9999.branch-llap1.patch".

The following git command creates a patch:

...

  1. Don't make any changes to hive_metastore.thrift until instructed below.
  2. Use the approved version of Thrift. This is currently thrift-0.9.3, which you can obtain from http://thrift.apache.org/.
  3. Build the Thrift compiler from its sources, then install it:
    1. cd /path/to/thrift-0.9.3
    2. ./configure --without-csharp --without-ruby
    3. make
    4. sudo make install
  4. 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.
  5. Now you can run the Maven 'thriftif' profile to generate the Thrift code:
    1. cd /path/to/hive-trunk/
    2. mvn clean install -Pthriftif -DskipTests -Dthrift.home=/usr/local  -Phadoop-2
    3. 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
  6. Use svn status to 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. If you can't figure out what is going wrong, ask for help from a committer.
  7. Now make your changes to hive_metastore.thrift, and then run the compiler again, from /path/to/hive-trunk/<hive_metastore.thrift's module>:
    1. mvn clean install -Pthriftif -DskipTests -Dthrift.home=/usr/local  -Phadoop-2
  8. Now use svn status and svn diff to verify that the regenerated code corresponds only to the changes you made to hive_metastore.thrift. You may also need svn add if new files were generated (and svn remove if files have been obsoleted).
  9. cd /path/to/hive-trunk
  10. ant clean package
  11. Verify that Hive is still working correctly with both embedded and remote metastore configurations.

...