public static boolean isLocalFile(HiveConf conf, URI fileUri) {
    try {
      // do best effort to determine if this is a local file
      FileSystem fsForFile = FileSystem.get(fileUri, conf);
      return LocalFileSystem.class.isInstance(fsForFile);
    } catch (IOException e) {
      LOG.warn("Unable to get FileSystem for " + fileUri, e);
    }
    return false;
  }
A best effort attempt to determine if if the file is a local file
@param conf
@param fileUri
@return true if it was successfully able to determine that it is a local file
common/src/java/org/apache/hadoop/hive/common/FileUtils.java