...
- Don't make any changes to
hive_metastore.thrift
until instructed below. - Use the approved version of thrift. This is currently
thrift-0.9.0
, which you can obtain from http://thrift.apache.org/. - Build the thrift compiler from its sources, then install it:
cd /path/to/thrift-0.9.0
./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 ant maven 'thriftif' target profile to generate the Thrift code: (or if using maven, see the command below)
cd /path/to/hive-trunk/
mvn clean install -Phadoop-1,thriftif -DskipTests -Dthrift.home=/
usr/local
- 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
- 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. - Now make your changes to
hive_metastore.thrift
, and then run the compiler again:ant thriftif
mvn clean install -Phadoop-1,thriftif -DskipTests -Dthrift.home=/usr/local
- Now use
svn status
andsvn diff
to verify that the regenerated code corresponds only to the changes you made tohive_metastore.thrift
. You may also needsvn add
if new files were generated (andsvn remove
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.
MVN:
The maven equivalent of ant thriftif
is:
...
- .
...
Stay involved
Contributors should join the Hive mailing lists. In particular the dev list (to join discussions of changes) and the user list (to help others).
...