Index: ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java (revision 1183507) +++ ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java (working copy) @@ -52,7 +52,7 @@ // IndexBucket static class IBucket { private String name = null; - private SortedSet offsets = new TreeSet(); + private final SortedSet offsets = new TreeSet(); public IBucket(String n) { name = n; @@ -70,6 +70,7 @@ return offsets; } + @Override public boolean equals(Object obj) { if (obj.getClass() != this.getClass()) { return false; @@ -91,10 +92,10 @@ ignoreHdfsLoc = HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_INDEX_IGNORE_HDFS_LOC); if (indexFiles != null && indexFiles.size() > 0) { - FileSystem fs = FileSystem.get(conf); List paths = new ArrayList(); for (String indexFile : indexFiles) { Path indexFilePath = new Path(indexFile); + FileSystem fs = indexFilePath.getFileSystem(conf); FileStatus indexStat = fs.getFileStatus(indexFilePath); if (indexStat.isDir()) { FileStatus[] fss = fs.listStatus(indexFilePath); @@ -113,6 +114,7 @@ long lineCounter = 0; for (Path indexFinalPath : paths) { + FileSystem fs = indexFinalPath.getFileSystem(conf); FSDataInputStream ifile = fs.open(indexFinalPath); LineReader lr = new LineReader(ifile, conf); try {