code: private static Optional<String[]> getTrimmedStrings(final YarnConfiguration configuration, final String key) {
      final String[] result = configuration.getTrimmedStrings(key);
      if (null == result || result.length == 0) {
        return Optional.empty();
      } else {
        return Optional.of(result);
      }
    }
docs: Fetches the string[] under the given key, if it exists and contains entries (.length >0).
  
  @param configuration
  @param key
  @return