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

Service name is validated twice in ServiceClient when a service is created

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.0
    • Component/s: yarn-native-services
    • Labels:
      None
    • Target Version/s:

      Description

      In ServiceClient.actionCreate() :

      ServiceApiUtil.validateNameFormat(serviceName, getConfig());
      ServiceApiUtil.validateAndResolveService(service, fs, getConfig());

      However, the ServiceApiUtil.validateAndResolveService(...), also validates the service name

      if (StringUtils.isEmpty(service.getName())) {
        throw new IllegalArgumentException(
            RestApiErrorMessages.ERROR_APPLICATION_NAME_INVALID);
      }
      
      validateNameFormat(service.getName(), conf);

      Also, ServiceClientTest  which is a mock client for the ApiServer, can perform the actual validation which is performed by the ServiceClient

        Attachments

        1. YARN-7985.001.patch
          3 kB
          Chandni Singh

          Activity

            People

            • Assignee:
              csingh Chandni Singh
              Reporter:
              csingh Chandni Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: