public CompletionStage<Void> cleanSnapshotIndex(String snapshotIndexBlobId, Metadata requestMetadata, boolean getDeleted) {
    Metadata getSnapshotRequest = new Metadata(Metadata.SNAPSHOT_INDEX_PAYLOAD_PATH, Optional.empty(), requestMetadata.getJobName(),
        requestMetadata.getJobId(), requestMetadata.getTaskName(), requestMetadata.getStoreName());
    return getSnapshotIndex(snapshotIndexBlobId, getSnapshotRequest, getDeleted)
        .thenCompose(snapshotIndex -> cleanSnapshotIndex(snapshotIndexBlobId, snapshotIndex, requestMetadata));
  }
Gets SnapshotIndex blob, cleans up a SnapshotIndex by recursively deleting all blobs associated with files/subdirs
inside the SnapshotIndex and finally deletes SnapshotIndex blob itself.
@param snapshotIndexBlobId Blob id of SnapshotIndex
@param requestMetadata Metadata of the request
@param getDeleted Determines whether to try to get deleted SnapshotIndex or not.
samza-core/src/main/java/org/apache/samza/storage/blobstore/util/BlobStoreUtil.java