zeppelin/docs/interpreter/shell.md
Prabhjyot Singh 629e21769e [ZEPPELIN-2903] Make setting of working directory to user-home optional for shell interpreter
### What is this PR for?
With ZEPPELIN-2841, it had changed the default working directory of Shell Interpreter from the relative path where Zeppelin is running to user-home. This is to make the configuration optional.

### What type of PR is it?
[Improvement]

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2903

### How should this be tested?
by default when the user runs shell interpreter and executes `pwd` will the path where Zeppelin server is running, but when `shell.working.directory.user.home` is set to true in Zeppelin's interpreter setting, it will point to the user's home directory by which the interpreter is running.

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes #2566 from prabhjyotsingh/ZEPPELIN-2903 and squashes the following commits:

9934df52a [Prabhjyot Singh] add doc for shell.working.directory.user.home
9164ed2c0 [Prabhjyot Singh] Make setting of working directory to user-home optional for shell interpreter
2017-09-06 16:34:51 +05:30

2.9 KiB

layout title description group
page Shell interpreter for Apache Zeppelin Shell interpreter uses Apache Commons Exec to execute external processes. interpreter

{% include JB/setup %}

Shell interpreter for Apache Zeppelin

Overview

Shell interpreter uses Apache Commons Exec to execute external processes. In Zeppelin notebook, you can use %sh in the beginning of a paragraph to invoke system shell and run commands.

Note : Currently each command runs as the user Zeppelin server is running as.

Configuration

At the "Interpreters" menu in Zeppelin dropdown menu, you can set the property value for Shell interpreter.

Name Value Description
shell.command.timeout.millisecs 60000 Shell command time out in millisecs
shell.working.directory.user.home false If this set to true, the shell's working directory will be set to user home
zeppelin.shell.auth.type Types of authentications' methods supported are SIMPLE, and KERBEROS
zeppelin.shell.principal The principal name to load from the keytab
zeppelin.shell.keytab.location The path to the keytab file

Example

The following example demonstrates the basic usage of Shell in a Zeppelin notebook.

If you need further information about Zeppelin Interpreter Setting for using Shell interpreter, please read What is interpreter setting? section first.

Kerberos refresh interval

For changing the default behavior of when to renew Kerberos ticket following changes can be made in conf/zeppelin-env.sh.

# Change Kerberos refresh interval (default value is 1d). Allowed postfix are ms, s, m, min, h, and d.
export LAUNCH_KERBEROS_REFRESH_INTERVAL=4h
# Change kinit number retries (default value is 5), which means if the kinit command fails for 5 retries consecutively it will close the interpreter. 
export KINIT_FAIL_THRESHOLD=10