private boolean isInScratchDir(Path path) {
    return path.toUri().getPath().startsWith(localScratchDir)
      || path.toUri().getPath().startsWith(nonLocalScratchPath.toUri().getPath());
  }
@param resDir
         the resDir to set
ql/src/java/org/apache/hadoop/hive/ql/Context.java