Index: ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveInputFormat.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveInputFormat.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveInputFormat.java @@ -435,14 +435,16 @@ List retLists = new ArrayList(); Map> aliasToSplitList = new HashMap>(); Map> pathToAliases = mrwork.getPathToAliases(); + Map> pathToAliasesNoScheme = removeScheme(pathToAliases); // Populate list of exclusive splits for every sampled alias // for (InputSplitShim split : splits) { String alias = null; for (Path path : split.getPaths()) { + boolean schemeless = path.toUri().getScheme() == null; List l = HiveFileFormatUtils.doGetAliasesFromPath( - pathToAliases, path); + schemeless ? pathToAliasesNoScheme : pathToAliases, path); // a path for a split unqualified the split from being sampled if: // 1. it serves more than one alias // 2. the alias it serves is not sampled @@ -500,6 +502,15 @@ return retLists; } + Map> removeScheme(Map> pathToAliases) { + Map> result = new HashMap>(); + for (Map.Entry > entry : pathToAliases.entrySet()) { + String newKey = new Path(entry.getKey()).toUri().getPath(); + result.put(newKey, entry.getValue()); + } + return result; + } + /** * Create a generic Hive RecordReader than can iterate over all chunks in a * CombinedFileSplit.