code: public static Optional<HivePartitionDataset> findDataset(String partitionName, List<HivePartitionDataset> datasets) {
      for (HivePartitionDataset dataset : datasets) {
        if (dataset.datasetURN().equalsIgnoreCase(partitionName)) {
          return Optional.fromNullable(dataset);
        }
      }
      log.warn("Unable to find dataset corresponding to " + partitionName);
      return Optional.<HivePartitionDataset>absent();
    }
docs: Find {@link HivePartitionDataset} given complete partition name from a list of datasets
  @param partitionName Complete partition name ie dbName@tableName@partitionName