mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fix shell intp streaming output result
This commit is contained in:
parent
062b90a5d0
commit
34d3021032
1 changed files with 3 additions and 4 deletions
|
|
@ -20,9 +20,7 @@ package org.apache.zeppelin.shell;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
|
@ -86,7 +84,8 @@ public class ShellInterpreter extends Interpreter {
|
|||
|
||||
try {
|
||||
DefaultExecutor executor = new DefaultExecutor();
|
||||
executor.setStreamHandler(new PumpStreamHandler(outStream, outStream));
|
||||
executor.setStreamHandler(new PumpStreamHandler(
|
||||
contextInterpreter.out, contextInterpreter.out));
|
||||
executor.setWatchdog(new ExecuteWatchdog(Long.valueOf(getProperty(TIMEOUT_PROPERTY))));
|
||||
executors.put(contextInterpreter.getParagraphId(), executor);
|
||||
int exitVal = executor.execute(cmdLine);
|
||||
|
|
@ -100,7 +99,7 @@ public class ShellInterpreter extends Interpreter {
|
|||
String message = outStream.toString();
|
||||
if (exitValue == 143) {
|
||||
code = Code.INCOMPLETE;
|
||||
message += "Paragraph received a SIGTERM.\n";
|
||||
message += "Paragraph received a SIGTERM\n";
|
||||
LOGGER.info("The paragraph " + contextInterpreter.getParagraphId()
|
||||
+ " stopped executing: " + message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue