Skip to content

Commit

Permalink
Only log formatted code in debug mode (apache#181)
Browse files Browse the repository at this point in the history
Don't log the full compiled code unless debug mode is on, to prevent ooming and crashing the spark driver in certain scenarios
  • Loading branch information
glentakahashi authored and robert3005 committed May 27, 2017
1 parent 8d5ed79 commit fc6d8f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,11 @@ object CodeGenerator extends Logging {
recordCompilationStats(evaluator)
} catch {
case e: JaninoRuntimeException =>
val msg = s"failed to compile: $e\n$formatted"
val msg = s"failed to compile: $e"
logError(msg, e)
throw new JaninoRuntimeException(msg, e)
case e: CompileException =>
val msg = s"failed to compile: $e\n$formatted"
val msg = s"failed to compile: $e"
logError(msg, e)
throw new CompileException(msg, e.getLocation)
}
Expand Down

0 comments on commit fc6d8f3

Please sign in to comment.