Skip to content

Commit 89689c5

Browse files
committed
YARN-10308. Update javadoc and variable names for YARN service.
Contributed by Bilwa S T via eyang
1 parent 2bfb228 commit 89689c5

File tree

2 files changed

+16
-14
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service

2 files changed

+16
-14
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ public KerberosPrincipal keytab(String keytab) {
7171
}
7272

7373
/**
74-
* The URI of the kerberos keytab. It supports two schemes \"
75-
* hdfs\" and \"file\". If the URI starts with \"
74+
* The URI of the kerberos keytab. It supports hadoop supported schemes
75+
* like \"hdfs\" \"file\" \"s3\"
76+
* \"viewfs\" etc.If the URI starts with \"
7677
* hdfs://\" scheme, it indicates the path on hdfs where the keytab is
7778
* stored. The keytab will be localized by YARN and made available to AM in
7879
* its local directory. If the URI starts with \"file://\"
@@ -81,13 +82,14 @@ public KerberosPrincipal keytab(String keytab) {
8182
*
8283
* @return keytab
8384
**/
84-
@ApiModelProperty(value = "The URI of the kerberos keytab. It supports two " +
85-
"schemes \"hdfs\" and \"file\". If the URI starts with \"hdfs://\" " +
86-
"scheme, it indicates the path on hdfs where the keytab is stored. The " +
87-
"keytab will be localized by YARN and made available to AM in its local" +
88-
" directory. If the URI starts with \"file://\" scheme, it indicates a " +
89-
"path on the local host where the keytab is presumbaly installed by " +
90-
"admins upfront. ")
85+
@ApiModelProperty(value = "The URI of the kerberos keytab. It supports"
86+
+ " Hadoop supported filesystem types like \"hdfs\", \"file\","
87+
+ " \"viewfs\", \"s3\" etc.If the URI starts with \"hdfs://\" scheme, "
88+
+ "it indicates the path on hdfs where the keytab is stored. The "
89+
+ "keytab will be localized by YARN and made available to AM in its local"
90+
+ " directory. If the URI starts with \"file://\" scheme, it indicates a "
91+
+ "path on the local host where the keytab is presumbaly installed by "
92+
+ "admins upfront. ")
9193
public String getKeytab() {
9294
return keytab;
9395
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,18 +1478,18 @@ private void addKeytabResourceIfSecure(SliderFileSystem fileSystem,
14781478
if ("file".equals(keytabURI.getScheme())) {
14791479
LOG.info("Using a keytab from localhost: " + keytabURI);
14801480
} else {
1481-
Path keytabOnhdfs = new Path(keytabURI);
1482-
if (!fileSystem.getFileSystem().exists(keytabOnhdfs)) {
1481+
Path keytabPath = new Path(keytabURI);
1482+
if (!fileSystem.getFileSystem().exists(keytabPath)) {
14831483
LOG.warn(service.getName() + "'s keytab (principalName = "
1484-
+ principalName + ") doesn't exist at: " + keytabOnhdfs);
1484+
+ principalName + ") doesn't exist at: " + keytabPath);
14851485
return;
14861486
}
1487-
LocalResource keytabRes = fileSystem.createAmResource(keytabOnhdfs,
1487+
LocalResource keytabRes = fileSystem.createAmResource(keytabPath,
14881488
LocalResourceType.FILE, LocalResourceVisibility.PRIVATE);
14891489
localResource.put(String.format(YarnServiceConstants.KEYTAB_LOCATION,
14901490
service.getName()), keytabRes);
14911491
LOG.info("Adding " + service.getName() + "'s keytab for "
1492-
+ "localization, uri = " + keytabOnhdfs);
1492+
+ "localization, uri = " + keytabPath);
14931493
}
14941494
}
14951495

0 commit comments

Comments
 (0)