ShellInterpreter extends KerberosInterpreter { @Override public void cancel(InterpreterContext context) { DefaultExecutor executor = executors.remove(context.getParagraphId()); if (executor != null) { try { executor.getWatchdog().destroyProcess(); } catch (Exception e){ LOGGER.error("error destroying executor for paragraphId: " + context.getParagraphId(), e); } } } ShellInterpreter(Properties property); @Override void open(); @Override void close(); @Override ZeppelinContext getZeppelinContext(); @Override InterpreterResult internalInterpret(String cmd,
                                             InterpreterContext contextInterpreter); @Override void cancel(InterpreterContext context); @Override FormType getFormType(); @Override int getProgress(InterpreterContext context); @Override Scheduler getScheduler(); @Override List<InterpreterCompletion> completion(String buf, int cursor,
                                                InterpreterContext interpreterContext); void createSecureConfiguration();  }
@Test public void test() throws InterpreterException { if (System.getProperty("os.name").startsWith("Windows")) { result = shell.interpret("dir", context); } else { result = shell.interpret("ls", context); } assertEquals(InterpreterResult.Code.SUCCESS, result.code()); assertTrue(shell.executors.isEmpty()); shell.cancel(context); assertTrue(shell.executors.isEmpty()); }