public static Path[] getDirectInsertDirectoryCandidates(FileSystem fs, Path path, int dpLevels,
      PathFilter filter, long writeId, int stmtId, Configuration conf,
      Boolean isBaseDir, AcidUtils.Operation acidOperation) throws IOException {
    int skipLevels = dpLevels;
    if (filter == null) {
      filter = new AcidUtils.IdPathFilter(writeId, stmtId);
    }
    if (skipLevels == 0) {
      return statusToPath(fs.listStatus(path, filter));
    }
    // TODO: for some reason, globStatus doesn't work for masks like "...blah/*/delta_0000007_0000007*"
    //       the last star throws it off. So, for now, if stmtId is missing use recursion.
    //       For the same reason, we cannot use it if we don't know isBaseDir. Currently, we don't
    //       /want/ to know isBaseDir because that is error prone; so, it ends up never being used.
    if (stmtId < 0 || isBaseDir == null
        || (HiveConf.getBoolVar(conf, ConfVars.HIVE_MM_AVOID_GLOBSTATUS_ON_S3) && isS3(fs))) {
      return getDirectInsertDirectoryCandidatesRecursive(fs, path, skipLevels, filter);
    }
    return getDirectInsertDirectoryCandidatesGlobStatus(fs, path, skipLevels, filter, writeId, stmtId, isBaseDir,
        acidOperation);
  }
Create row key and value object inspectors for reduce vectorization.
The row object inspector used by ReduceWork needs to be a **standard**
struct object inspector, not just any struct object inspector.
@param keyInspector
@param valueInspector
@return OI
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java