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

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.1.0
    • 3.1.0
    • yarn-native-services
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: