fixes to enable code examples to run against Hadoop 2