YARN-10308. Update javadoc and variable names for YARN service.
Contributed by Bilwa S T via eyang
This commit is contained in:
parent
2bfb22840a
commit
89689c52c3
|
@ -71,8 +71,9 @@ public class KerberosPrincipal implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URI of the kerberos keytab. It supports two schemes \"
|
* The URI of the kerberos keytab. It supports hadoop supported schemes
|
||||||
* hdfs\" and \"file\". If the URI starts with \"
|
* like \"hdfs\" \"file\" \"s3\"
|
||||||
|
* \"viewfs\" etc.If the URI starts with \"
|
||||||
* hdfs://\" scheme, it indicates the path on hdfs where the keytab is
|
* hdfs://\" scheme, it indicates the path on hdfs where the keytab is
|
||||||
* stored. The keytab will be localized by YARN and made available to AM in
|
* stored. The keytab will be localized by YARN and made available to AM in
|
||||||
* its local directory. If the URI starts with \"file://\"
|
* its local directory. If the URI starts with \"file://\"
|
||||||
|
@ -81,13 +82,14 @@ public class KerberosPrincipal implements Serializable {
|
||||||
*
|
*
|
||||||
* @return keytab
|
* @return keytab
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "The URI of the kerberos keytab. It supports two " +
|
@ApiModelProperty(value = "The URI of the kerberos keytab. It supports"
|
||||||
"schemes \"hdfs\" and \"file\". If the URI starts with \"hdfs://\" " +
|
+ " Hadoop supported filesystem types like \"hdfs\", \"file\","
|
||||||
"scheme, it indicates the path on hdfs where the keytab is stored. The " +
|
+ " \"viewfs\", \"s3\" etc.If the URI starts with \"hdfs://\" scheme, "
|
||||||
"keytab will be localized by YARN and made available to AM in its local" +
|
+ "it indicates the path on hdfs where the keytab is stored. The "
|
||||||
" directory. If the URI starts with \"file://\" scheme, it indicates a " +
|
+ "keytab will be localized by YARN and made available to AM in its local"
|
||||||
"path on the local host where the keytab is presumbaly installed by " +
|
+ " directory. If the URI starts with \"file://\" scheme, it indicates a "
|
||||||
"admins upfront. ")
|
+ "path on the local host where the keytab is presumbaly installed by "
|
||||||
|
+ "admins upfront. ")
|
||||||
public String getKeytab() {
|
public String getKeytab() {
|
||||||
return keytab;
|
return keytab;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1478,18 +1478,18 @@ public class ServiceClient extends AppAdminClient implements SliderExitCodes,
|
||||||
if ("file".equals(keytabURI.getScheme())) {
|
if ("file".equals(keytabURI.getScheme())) {
|
||||||
LOG.info("Using a keytab from localhost: " + keytabURI);
|
LOG.info("Using a keytab from localhost: " + keytabURI);
|
||||||
} else {
|
} else {
|
||||||
Path keytabOnhdfs = new Path(keytabURI);
|
Path keytabPath = new Path(keytabURI);
|
||||||
if (!fileSystem.getFileSystem().exists(keytabOnhdfs)) {
|
if (!fileSystem.getFileSystem().exists(keytabPath)) {
|
||||||
LOG.warn(service.getName() + "'s keytab (principalName = "
|
LOG.warn(service.getName() + "'s keytab (principalName = "
|
||||||
+ principalName + ") doesn't exist at: " + keytabOnhdfs);
|
+ principalName + ") doesn't exist at: " + keytabPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LocalResource keytabRes = fileSystem.createAmResource(keytabOnhdfs,
|
LocalResource keytabRes = fileSystem.createAmResource(keytabPath,
|
||||||
LocalResourceType.FILE, LocalResourceVisibility.PRIVATE);
|
LocalResourceType.FILE, LocalResourceVisibility.PRIVATE);
|
||||||
localResource.put(String.format(YarnServiceConstants.KEYTAB_LOCATION,
|
localResource.put(String.format(YarnServiceConstants.KEYTAB_LOCATION,
|
||||||
service.getName()), keytabRes);
|
service.getName()), keytabRes);
|
||||||
LOG.info("Adding " + service.getName() + "'s keytab for "
|
LOG.info("Adding " + service.getName() + "'s keytab for "
|
||||||
+ "localization, uri = " + keytabOnhdfs);
|
+ "localization, uri = " + keytabPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue