rebase tez-0.5.x to match HIVE-6988