static List<String> getBucketFileNames(FileSystem fs, Table table, String partitionName, String deltaName)
      throws IOException {
    Path path = partitionName == null ? new Path(table.getSd().getLocation(), deltaName) : new Path(
        new Path(table.getSd().getLocation()), new Path(partitionName, deltaName));
    return Arrays.stream(fs.listStatus(path, AcidUtils.bucketFileFilter)).map(FileStatus::getPath).map(Path::getName).sorted()
        .collect(Collectors.toList());
  }
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