Compiled and tested with cdh4.4.1