Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@
<exclude>conf/zeppelin-env.sh</exclude>
<exclude>spark-*-bin*/**</exclude>
<exclude>.spark-dist/**</exclude>
<exclude>**/interpreter-setting.json</exclude>

<!-- bundled from bootstrap -->
<exclude>docs/assets/themes/zeppelin/bootstrap/**</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,12 @@ public class ShellInterpreter extends Interpreter {
Logger logger = LoggerFactory.getLogger(ShellInterpreter.class);
private static final String EXECUTOR_KEY = "executor";
public static final String SHELL_COMMAND_TIMEOUT = "shell.command.timeout.millisecs";
public static final String DEFAULT_COMMAND_TIMEOUT = "600000";
int commandTimeOut;
private static final boolean isWindows = System
.getProperty("os.name")
.startsWith("Windows");
final String shell = isWindows ? "cmd /c" : "bash -c";

static {
Interpreter.register(
"sh",
"sh",
ShellInterpreter.class.getName(),
new InterpreterPropertyBuilder()
.add(
SHELL_COMMAND_TIMEOUT,
DEFAULT_COMMAND_TIMEOUT,
"Shell command time out in millisecs. Default = 600000")
.build()
);
}

public ShellInterpreter(Properties property) {
super(property);
}
Expand Down
15 changes: 15 additions & 0 deletions shell/src/main/resources/interpreter-setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"group": "sh",
"name": "sh",
"className": "org.apache.zeppelin.shell.ShellInterpreter",
"properties": {
"shell.command.timeout.millisecs": {
"envName": "SHELL_COMMAND_TIMEOUT",
"propertyName": "shell.command.timeout.millisecs",
"defaultValue": "60000",
"description": "Shell command time out in millisecs. Default = 60000"
}
}
}
]