code: public String getApplicationName() {
      String applicationName;
      if (containsKey(CONNECTION_APPLICATION_NAME_PROP)) {
        applicationName = getString(CONNECTION_APPLICATION_NAME_PROP);
      } else if (containsKey(CLIENT_APPLICATION_NAME_PROP)) {
        applicationName = getString(CLIENT_APPLICATION_NAME_PROP);
      } else {
        throw new NoSuchElementException(CONNECTION_APPLICATION_NAME_PROP + " was not set");
      }
      verifyApplicationName(applicationName);
      return applicationName;
    }
docs: Returns the application name after verification to avoid characters Zookeeper does not like in
  nodes and Hadoop does not like in HDFS paths.
  <p>
  Gets the value of the property {@value #CONNECTION_APPLICATION_NAME_PROP} if set
  
  @return The application name
  @throws NoSuchElementException if the property has not been set