ConfX created ZEPPELIN-5942: ------------------------------- Summary: Missing null check in InterpreterLauncher Key: ZEPPELIN-5942 URL: https://issues.apache.org/jira/browse/ZEPPELIN-5942 Project: Zeppelin Issue Type: Bug Reporter: ConfX Attachments: reproduce.sh
h2. What happened: Got NullPointerException when launching an interpreter in Mapreduce. h2. Where's the bug: In {{InterpreterLauncher}} there is an attempt to recover the interpreter in {{{}launch{}}}: {noformat} // try to recover it first if (zConf.isRecoveryEnabled()) { InterpreterClient recoveredClient = recoveryStorage.getInterpreterClient(context.getInterpreterGroupId()); if (recoveredClient != null) {{noformat} The problem with this is that {{recoveryStorage}} might be null, causing the code to throw a NPE without any message. h2. StackTrace: {noformat} java.lang.NullPointerException: null at org.apache.zeppelin.interpreter.launcher.InterpreterLauncher.launch(InterpreterLauncher.java:95) at org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncherTest.testLauncher(StandardInterpreterLauncherTest.java:50){noformat} h2. How to reproduce: (1) Set {{zeppelin.recovery.storage.class}} to {{org.apache.zeppelin.interpreter.recovery.FileSystemRecoveryStorage }} (2) Run test: {{org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncherTest#testLauncher}} For an easy reproduction, run the reproduce.sh in the attachment. -- This message was sent by Atlassian Jira (v8.20.10#820010)