private boolean partitionDescriptorExists(String streamName) {
    if (StringUtils.isBlank(stagingDirectory) || StringUtils.isBlank(streamName)) {
      LOG.warn("Staging directory ({}) or stream name ({}) is empty", stagingDirectory, streamName);
      return false;
    }
    Path targetPath = PartitionDescriptorUtil.getPartitionDescriptorPath(stagingDirectory, streamName);
    try (FileSystem fs = targetPath.getFileSystem(new Configuration())) {
      return fs.exists(targetPath);
    } catch (IOException e) {
      throw new SamzaException("Failed to obtain information about path: " + targetPath);
    }
  }
Fetch metadata from hdfs system for a set of streams. This has the potential side effect
to persist partition description to the staging directory on hdfs if staging directory
is not empty. See getStagingDirectory on {@link HdfsConfig}

@param streamNames
         The streams to to fetch metadata for.
@return A map from stream name to SystemStreamMetadata for each stream
        requested in the parameter set.
samza-hdfs/src/main/java/org/apache/samza/system/hdfs/HdfsSystemAdmin.java