Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: tiny typo fix

...

  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.0, which you can obtain from http://thrift.apache.org/.
  3. Build the thrift compiler from its sources, then install it:
  4. cd /path/to/thrift-0.9.0
  5. ./configure --without-csharp --without-ruby
  6. make
  7. sudo make install
  8. 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.
  9. Now you can run the ant 'thriftif' target to generate the Thrift code: (of or if using maven, see the command below).
  10. cd /path/to/hive-trunk/
  11. ant thriftif -Dthrift.home=/path/to/thrift-0.9.0
  12. if you see error about fb303.thrift not being found, copy it to appropriate directory and run above command again. On centOS/RHEL cp /path/to/thrift-0.9.0/contrib/fb303/if/fb303.thrift /usr/local/share/fb303/if/fb303.thrift
  13. 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.
  14. Now make your changes to hive_metastore.thrift, and then run the compiler again:
  15. ant thriftif
  16. 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).
  17. cd /path/to/hive-trunk
  18. ant clean package
  19. Verify that hive is still working correctly with both embedded and remote metastore configurations.

...