diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java index 449bef8..eb852d8 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java @@ -387,7 +387,10 @@ private static BaseWork getBaseWork(Configuration conf, String name) { path = getPlanPath(conf, name); LOG.info("PLAN PATH = " + path); - assert path != null; + if (path == null) { // Map/reduce plan may not be generated + return null; + } + BaseWork gWork = gWorkMap.get(conf).get(path); if (gWork == null) { Path localPath = path; @@ -443,12 +446,11 @@ private static BaseWork getBaseWork(Configuration conf, String name) { return gWork; } catch (FileNotFoundException fnf) { // happens. e.g.: no reduce work. - LOG.debug("File not found: " + fnf.getMessage()); - LOG.info("No plan file found: "+path); + LOG.debug("No plan file found: " + path, fnf); return null; } catch (Exception e) { - String msg = "Failed to load plan: " + path + ": " + e; - LOG.error(msg, e); + String msg = "Failed to load plan: " + path; + LOG.error("Failed to load plan: " + path, e); throw new RuntimeException(msg, e); } finally { SerializationUtilities.releaseKryo(kryo);