private boolean canArchive(HdfsIdFile idFile, Path rootPath) throws FileNotFoundException, IOException {
        FileSystem fs = idFile.getFs();
        FileStatus[] fileStatusArray = fs.listStatus(rootPath);
        long currentTime = System.currentTimeMillis();
        long fileArchiveDelayTime = currentTime
                - context.getFileArchiveDelayMinute() * MINUTE_MS;
        LOG.info("start to PartitionCreateRunnable id:{},currentTime:{},fileArchiveDelayTime:{},"
                + "FileArchiveDelayMinute:{},MINUTE_MS:{}", idConfig.getInlongGroupId(),
                currentTime, fileArchiveDelayTime, context.getFileArchiveDelayMinute(), MINUTE_MS);
        for (FileStatus fileStatus : fileStatusArray) {
            Path filePath = fileStatus.getPath();
            if (filePath.equals(idFile.getIntmpFilePath())) {
                continue;
            }
            // check all file that have overtimed.
            if (fileStatus.getModificationTime() > fileArchiveDelayTime) {
                this.state = PartitionState.ERROR;
                LOG.info("error PartitionCreateRunnable id:{},fileStatus:{},getModificationTime:{},"
                        + "fileArchiveDelayTime:{}", idConfig.getInlongGroupId(),
                        filePath.toString(),
                        fileStatus.getModificationTime(), fileArchiveDelayTime);
                LOG.info("inlongGroupId:{},partition:{} can not archived in path:{}.", idConfig.getInlongGroupId(),
                        strPartitionValue, rootPath);
                return false;
            }
            LOG.info("ok PartitionCreateRunnable id:{},fileStatus:{},getModificationTime:{},"
                    + "fileArchiveDelayTime:{}", idConfig.getInlongGroupId(),
                    filePath.toString(),
                    fileStatus.getModificationTime(), fileArchiveDelayTime);
        }
        return true;
    }
canArchive

@param  idFile
@param  rootPath
@return                       boolean
@throws IOException
@throws FileNotFoundException
inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/hive/PartitionCreateRunnable.java