public static boolean isEmptyPath(JobConf job, Path dirPath, Context ctx)
      throws Exception {
    if (ctx != null) {
      ContentSummary cs = ctx.getCS(dirPath);
      if (cs != null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Content Summary cached for {} length: {} num files: {} " +
              "num directories: {}", dirPath, cs.getLength(), cs.getFileCount(),
              cs.getDirectoryCount());
        }
        return (cs.getLength() == 0 && cs.getFileCount() == 0 && cs.getDirectoryCount() <= 1);
      } else {
        LOG.debug("Content Summary not cached for {}", dirPath);
      }
    }
    return isEmptyPath(job, dirPath);
  }
Performs a ContentSummary lookup over a set of paths using 1 or more
threads. The 'summary' argument is directly modified.

@param ctx
@param pathNeedProcess
@param work
@param summary
@param executor
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java