Repository: hive Updated Branches: refs/heads/spark fc48b075a -> 85fb4d23a
HIVE-10476 - Hive query should fail when it fails to initialize a session in SetSparkReducerParallelism [Spark Branch] (Chao, reviewed by Rui) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/85fb4d23 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/85fb4d23 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/85fb4d23 Branch: refs/heads/spark Commit: 85fb4d23acc4ea976c65a59bd8d6c84d090eeee5 Parents: fc48b07 Author: Chao Sun <sunc...@apache.org> Authored: Tue Apr 28 09:39:18 2015 -0700 Committer: Chao Sun <sunc...@apache.org> Committed: Tue Apr 28 09:39:32 2015 -0700 ---------------------------------------------------------------------- .../hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/85fb4d23/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java index dcfbc6b..f9ef474 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SetSparkReducerParallelism.java @@ -115,6 +115,8 @@ public class SetSparkReducerParallelism implements NodeProcessor { sparkSession = SparkUtilities.getSparkSession( context.getConf(), sparkSessionManager); sparkMemoryAndCores = sparkSession.getMemoryAndCores(); + } catch (HiveException e) { + throw new SemanticException("Failed to get a spark session: " + e); } catch (Exception e) { LOG.warn("Failed to get spark memory/core info", e); } finally {