Repository: zeppelin Updated Branches: refs/heads/branch-0.8 1e023b900 -> 23ee74ce0
ZEPPELIN-3484. sc.setJobGroup() shows up in error stack and shifts line numbering This PR would call sc.setJobGroup and the user code separately. [Bug Fix] * [ ] - Task * https://issues.apache.org/jira/browse/ZEPPELIN-3483 * CI pass ![screen shot 2018-05-23 at 8 56 40 am](https://user-images.githubusercontent.com/164491/40397801-3c364d18-5e67-11e8-8fb5-4369d1d78e62.png) * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjf...@apache.org> Closes #2979 from zjffdu/ZEPPELIN-3484 and squashes the following commits: 774db4c00 [Jeff Zhang] ZEPPELIN-3484. sc.setJobGroup() shows up in error stack and shifts line numbering (cherry picked from commit 3b041f46962ad8f3393f38946bd304b485c87c2a) Signed-off-by: Jeff Zhang <zjf...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/23ee74ce Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/23ee74ce Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/23ee74ce Branch: refs/heads/branch-0.8 Commit: 23ee74ce052e073b6f141e9b7ea2830dce0db775 Parents: 1e023b9 Author: Jeff Zhang <zjf...@apache.org> Authored: Wed May 23 08:53:55 2018 +0800 Committer: Jeff Zhang <zjf...@apache.org> Committed: Thu May 24 16:37:07 2018 +0800 ---------------------------------------------------------------------- .../java/org/apache/zeppelin/spark/IPySparkInterpreter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/23ee74ce/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java ---------------------------------------------------------------------- diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java index da7e7e2..35c5729 100644 --- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java +++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java @@ -106,7 +106,11 @@ public class IPySparkInterpreter extends IPythonInterpreter { String jobGroupId = Utils.buildJobGroupId(context); String jobDesc = "Started by: " + Utils.getUserName(context.getAuthenticationInfo()); String setJobGroupStmt = "sc.setJobGroup('" + jobGroupId + "', '" + jobDesc + "')"; - return super.interpret(setJobGroupStmt + "\n" + st, context); + InterpreterResult result = super.interpret(setJobGroupStmt, context); + if (result.code().equals(InterpreterResult.Code.ERROR)) { + return new InterpreterResult(InterpreterResult.Code.ERROR, "Fail to setJobGroup"); + } + return super.interpret(st, context); } @Override