This is a classic example of a query that fails due to a bad udf in local mode:
Ended Job = job_local_0001 with errors
Error during job, obtaining debugging information...
Execution failed with exit status: 2
Obtaining error information
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
But actually local mr job in /tmp/gang/gang_20120808181010_b716b5fb-5b8f-49d2-94e9-95bb8f465342.log