static List<String> getBucketFileNamesWithoutAttemptId(FileSystem fs, Table table, String partitionName,
      List<String> deltaDirs) throws IOException {
    Set<String> bucketFiles = new HashSet<>();
    for (String deltaDir : deltaDirs) {
      bucketFiles.addAll(getBucketFileNames(fs, table, partitionName, deltaDir));
    }
    Pattern p = Pattern.compile("(bucket_[0-9]+)(_[0-9]+)?");
    List<String> bucketFilesWithoutAttemptId = new ArrayList<>();
    for (String bucketFile : bucketFiles) {
      Matcher m = p.matcher(bucketFile);
      if (m.matches()) {
        bucketFilesWithoutAttemptId.add(m.group(1));
      }
    }
    Collections.sort(bucketFilesWithoutAttemptId);
    return bucketFilesWithoutAttemptId;
  }
Get the bucket files under a delta directory.
@param fs the resolved file system
@param table resolved table, where to search for bucket files
@param partitionName he name of the partition, can be null, if table is not partitioned
@param deltaName the name of the delta directory, underneath the search begins
@return Collection of bucket file names, always non-null.
@throws IOException if the table or delta directory location is unreachable.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorTestUtil.java