Description
Using the CachingPrintStream we are storing errors that occur locally in Hive, but because local map reduce jobs are run in a separate JVM we are not storing that occur for these. We can use this same construct to store errors written to the subprocesses error stream. This way, when we log failed queries, these will give us a decent idea of why those queries failed.
See related issues:
https://issues.apache.org/jira/browse/HIVE-2832
https://issues.apache.org/jira/browse/HIVE-2858