Repository: hive Updated Branches: refs/heads/master e459a6728 -> e91f69e21
HIVE-13855: select INPUT__FILE__NAME throws NPE exception (Aihua Xu, reviewed by Yongzhi Chen) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e91f69e2 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e91f69e2 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e91f69e2 Branch: refs/heads/master Commit: e91f69e213f6ee78ad8299cda81079104f7141bb Parents: e459a67 Author: Aihua Xu <[email protected]> Authored: Thu May 26 09:26:43 2016 -0400 Committer: Aihua Xu <[email protected]> Committed: Tue May 31 12:07:44 2016 -0400 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hive/ql/exec/Utilities.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/e91f69e2/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java ---------------------------------------------------------------------- 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 7082931..528d663 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 @@ public final class Utilities { 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 @@ public final class Utilities { 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);
