Trying to make Andrea's Hadoop fixes by hand on this branch [ci skip]