mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix CI, resolve merge conflict
This commit is contained in:
parent
1924b99d3f
commit
3648a1c19d
2 changed files with 29 additions and 14 deletions
|
|
@ -30,6 +30,21 @@ At the "Interpreters" menu in Zeppelin dropdown menu, you can set the property v
|
|||
<td>60000</td>
|
||||
<td>Shell command time out in millisecs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.shell.auth.type</td>
|
||||
<td></td>
|
||||
<td>Types of authentications' methods supported are SIMPLE, and KERBEROS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.shell.principal</td>
|
||||
<td></td>
|
||||
<td>The principal name to load from the keytab</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.shell.keytab.location</td>
|
||||
<td></td>
|
||||
<td>The path to the keytab file</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Example
|
||||
|
|
|
|||
|
|
@ -39,21 +39,21 @@ public class ShellSecurityImpl {
|
|||
.trim().toUpperCase();
|
||||
|
||||
switch (authType) {
|
||||
case "KERBEROS":
|
||||
CommandLine cmdLine = CommandLine.parse(shell);
|
||||
cmdLine.addArgument("-c", false);
|
||||
String kinitCommand = String.format("kinit -k -t %s %s",
|
||||
properties.getProperty("zeppelin.shell.keytab.location"),
|
||||
properties.getProperty("zeppelin.shell.principal"));
|
||||
cmdLine.addArgument(kinitCommand, false);
|
||||
DefaultExecutor executor = new DefaultExecutor();
|
||||
case "KERBEROS":
|
||||
CommandLine cmdLine = CommandLine.parse(shell);
|
||||
cmdLine.addArgument("-c", false);
|
||||
String kinitCommand = String.format("kinit -k -t %s %s",
|
||||
properties.getProperty("zeppelin.shell.keytab.location"),
|
||||
properties.getProperty("zeppelin.shell.principal"));
|
||||
cmdLine.addArgument(kinitCommand, false);
|
||||
DefaultExecutor executor = new DefaultExecutor();
|
||||
|
||||
try {
|
||||
int exitVal = executor.execute(cmdLine);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Unable to run kinit for zeppelin user " + kinitCommand, e);
|
||||
throw new InterpreterException(e);
|
||||
}
|
||||
try {
|
||||
int exitVal = executor.execute(cmdLine);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Unable to run kinit for zeppelin user " + kinitCommand, e);
|
||||
throw new InterpreterException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue