code: protected List<HivePartitionDataset> sortHiveDatasets(List<HivePartitionDataset> datasets) {
      Collections.sort(datasets, new Comparator<HivePartitionDataset>() {
        @Override
        public int compare(HivePartitionDataset o1, HivePartitionDataset o2) {
          return o1.datasetURN().compareTo(o2.datasetURN());
        }
      });
      return datasets;
    }
docs: Sort all HiveDatasets on the basis of complete name ie dbName.tableName