hdfs-protolib/src/main/java/com/streamsets/pipeline/stage/destination/hdfs/metadataexecutor/HdfsMetadataExecutor.java
private void ensureDirectoryExists(FileSystem fs, Path path) throws IOException {
    if(!fs.exists(path)) {
      LOG.debug("Creating directory: {}", path);
      if(!fs.mkdirs(path)) {
        throw new IOException("Can't create directory: " + path);
      }
    }
  }
private void ensureDirectoryExists(FileSystem fs, Path path) throws IOException {
    if(!fs.exists(path)) {
      LOG.debug("Creating directory: {}", path);
      if(!fs.mkdirs(path)) {
        throw new IOException("Can't create directory: " + path);
      }
    }
  }
Ensure that given directory exists.

Creates the directory if it doesn't exists. No-op if it does.