You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ey...@apache.org on 2020/06/17 16:05:43 UTC
[hadoop] branch trunk updated: YARN-10308. Update javadoc and
variable names for YARN service. Contributed by Bilwa S T via eyang
This is an automated email from the ASF dual-hosted git repository.
eyang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 89689c5 YARN-10308. Update javadoc and variable names for YARN service. Contributed by Bilwa S T via eyang
89689c5 is described below
commit 89689c52c39cdcc498d04508dbd235c6036ec17c
Author: Eric Yang <ey...@apache.org>
AuthorDate: Wed Jun 17 09:04:26 2020 -0700
YARN-10308. Update javadoc and variable names for YARN service.
Contributed by Bilwa S T via eyang
---
.../yarn/service/api/records/KerberosPrincipal.java | 20 +++++++++++---------
.../hadoop/yarn/service/client/ServiceClient.java | 10 +++++-----
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/KerberosPrincipal.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/KerberosPrincipal.java
index 0ff4daa..27125fb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/KerberosPrincipal.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/KerberosPrincipal.java
@@ -71,8 +71,9 @@ public class KerberosPrincipal implements Serializable {
}
/**
- * The URI of the kerberos keytab. It supports two schemes \"
- * hdfs\" and \"file\". If the URI starts with \"
+ * The URI of the kerberos keytab. It supports hadoop supported schemes
+ * like \"hdfs\" \"file\" \"s3\"
+ * \"viewfs\" etc.If the URI starts with \"
* 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
* its local directory. If the URI starts with \"file://\"
@@ -81,13 +82,14 @@ public class KerberosPrincipal implements Serializable {
*
* @return keytab
**/
- @ApiModelProperty(value = "The URI of the kerberos keytab. It supports two " +
- "schemes \"hdfs\" and \"file\". If the URI starts with \"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 its local" +
- " directory. If the URI starts with \"file://\" scheme, it indicates a " +
- "path on the local host where the keytab is presumbaly installed by " +
- "admins upfront. ")
+ @ApiModelProperty(value = "The URI of the kerberos keytab. It supports"
+ + " Hadoop supported filesystem types like \"hdfs\", \"file\","
+ + " \"viewfs\", \"s3\" etc.If the URI starts with \"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 its local"
+ + " directory. If the URI starts with \"file://\" scheme, it indicates a "
+ + "path on the local host where the keytab is presumbaly installed by "
+ + "admins upfront. ")
public String getKeytab() {
return keytab;
}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
index b3ac7bb..41d1e42 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
@@ -1478,18 +1478,18 @@ public class ServiceClient extends AppAdminClient implements SliderExitCodes,
if ("file".equals(keytabURI.getScheme())) {
LOG.info("Using a keytab from localhost: " + keytabURI);
} else {
- Path keytabOnhdfs = new Path(keytabURI);
- if (!fileSystem.getFileSystem().exists(keytabOnhdfs)) {
+ Path keytabPath = new Path(keytabURI);
+ if (!fileSystem.getFileSystem().exists(keytabPath)) {
LOG.warn(service.getName() + "'s keytab (principalName = "
- + principalName + ") doesn't exist at: " + keytabOnhdfs);
+ + principalName + ") doesn't exist at: " + keytabPath);
return;
}
- LocalResource keytabRes = fileSystem.createAmResource(keytabOnhdfs,
+ LocalResource keytabRes = fileSystem.createAmResource(keytabPath,
LocalResourceType.FILE, LocalResourceVisibility.PRIVATE);
localResource.put(String.format(YarnServiceConstants.KEYTAB_LOCATION,
service.getName()), keytabRes);
LOG.info("Adding " + service.getName() + "'s keytab for "
- + "localization, uri = " + keytabOnhdfs);
+ + "localization, uri = " + keytabPath);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org