Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10308

Update javadoc and variable names for keytab in yarn services as it supports filesystems other than hdfs and local file system

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • documentation
    • None

    Description

      1. Below description should be updated

      @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. ")
        public String getKeytab() {
          return keytab;
        }
      

      2. Variables below are still named on hdfs which is confusing

      if ("file".equals(keytabURI.getScheme())) {
            LOG.info("Using a keytab from localhost: " + keytabURI);
          } else {
            Path keytabOnhdfs = new Path(keytabURI);
            if (!fileSystem.getFileSystem().exists(keytabOnhdfs)) {
              LOG.warn(service.getName() + "'s keytab (principalName = "
                  + principalName + ") doesn't exist at: " + keytabOnhdfs);
              return;
            }
            LocalResource keytabRes = fileSystem.createAmResource(keytabOnhdfs,
                LocalResourceType.FILE);
            localResource.put(String.format(YarnServiceConstants.KEYTAB_LOCATION,
                service.getName()), keytabRes);
            LOG.info("Adding " + service.getName() + "'s keytab for "
                + "localization, uri = " + keytabOnhdfs);
          }
      

      Attachments

        1. YARN-10308.002.patch
          5 kB
          Bilwa S T
        2. YARN-10308.001.patch
          5 kB
          Bilwa S T

        Issue Links

          Activity

            People

              BilwaST Bilwa S T
              BilwaST Bilwa S T
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: