code: public static Path validateAndNormalizeUri(URI archiveDirUri) {
  		final String scheme = archiveDirUri.getScheme();
  		final String path = archiveDirUri.getPath();
  
  		// some validity checks
  		if (scheme == null) {
  			throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " +
  				"Please specify the file system scheme explicitly in the URI.");
  		}
  		if (path == null) {
  			throw new IllegalArgumentException("The path to store the job archive data in is null. " +
  				"Please specify a directory path for the archiving the job data.");
  		}
  
  		return new Path(archiveDirUri);
  	}
docs: Checks and normalizes the given URI. This method first checks the validity of the
  URI (scheme and path are not null) and then normalizes the URI to a path.
  
  @param archiveDirUri The URI to check and normalize.
  @return A normalized URI as a Path.
  
  @throws IllegalArgumentException Thrown, if the URI misses scheme or path.