changing property name to "zeppelin.*" to make it match with rest of the project.

This commit is contained in:
Rohit Choudhary 2016-07-12 11:33:58 +05:30
parent 0a77e801e7
commit b0300e89e3
4 changed files with 14 additions and 14 deletions

View file

@ -24,15 +24,15 @@ You can modify the interpreter configuration in the `Interpreter` section. The m
<td>Shell command time out in millisecs. Default = 60000</td>
</tr>
<tr>
<td>shell.auth.type</td>
<td>zeppelin.shell.auth.type</td>
<td>Types of authentications' methods supported are SIMPLE, and KERBEROS</td>
</tr>
<tr>
<td>shell.principal</td>
<td>zeppelin.shell.principal</td>
<td>The principal name to load from the keytab</td>
</tr>
<tr>
<td>shell.keytab.location</td>
<td>zeppelin.shell.keytab.location</td>
<td>The path to the keytab file</td>
</tr>
</table>

View file

@ -60,7 +60,7 @@ public class ShellInterpreter extends Interpreter {
public void open() {
LOGGER.info("Command timeout property: {}", getProperty(TIMEOUT_PROPERTY));
executors = new HashMap<String, DefaultExecutor>();
if (!StringUtils.isAnyEmpty(getProperty("shell.auth.type"))) {
if (!StringUtils.isAnyEmpty(getProperty("zeppelin.shell.auth.type"))) {
ShellSecurityImpl.createSecureCinfiguration(getProperty(), shell);
}
}

View file

@ -41,11 +41,11 @@ public class ShellSecurityImpl {
UserGroupInformation.AuthenticationMethod authType;
try {
authType = UserGroupInformation
.AuthenticationMethod.valueOf(properties.getProperty("shell.auth.type")
.AuthenticationMethod.valueOf(properties.getProperty("zeppelin.shell.auth.type")
.trim().toUpperCase());
} catch (Exception e) {
LOGGER.error(String.format("Invalid auth.type detected with value %s, defaulting " +
"auth.type to SIMPLE", properties.getProperty("shell.auth.type").trim()));
"auth.type to SIMPLE", properties.getProperty("zeppelin.shell.auth.type").trim()));
authType = SIMPLE;
}
@ -55,8 +55,8 @@ public class ShellSecurityImpl {
CommandLine cmdLine = CommandLine.parse(shell);
cmdLine.addArgument("-c", false);
String kinitCommand = String.format("kinit -k -t %s %s",
properties.getProperty("shell.keytab.location"),
properties.getProperty("shell.principal"));
properties.getProperty("zeppelin.shell.keytab.location"),
properties.getProperty("zeppelin.shell.principal"));
cmdLine.addArgument(kinitCommand, false);
DefaultExecutor executor = new DefaultExecutor();

View file

@ -10,21 +10,21 @@
"defaultValue": "60000",
"description": "Shell command time out in millisecs. Default = 60000"
},
"shell.auth.type": {
"zeppelin.shell.auth.type": {
"envName": null,
"propertyName": "shell.auth.type",
"propertyName": "zeppelin.shell.auth.type",
"defaultValue": "",
"description": "If auth type is needed, Example: KERBEROS"
},
"shell.keytab.location": {
"zeppelin.shell.keytab.location": {
"envName": null,
"propertyName": "shell.keytab.location",
"propertyName": "zeppelin.shell.keytab.location",
"defaultValue": "",
"description": "Kerberos keytab location"
},
"shell.principal": {
"zeppelin.shell.principal": {
"envName": null,
"propertyName": "shell.principal",
"propertyName": "zeppelin.shell.principal",
"defaultValue": "",
"description": "Kerberos principal"
}