@Test
  public void testGetInputSummaryWithASingleThread() throws IOException {
    final int BYTES_PER_FILE = 5;

    // Set to zero threads to disable thread pool
    jobConf.setInt(
        HiveConf.ConfVars.HIVE_EXEC_INPUT_LISTING_MAX_THREADS.varname, 0);

    final Collection<Path> testPaths = Arrays.asList(new Path("p1/test.txt"),
        new Path("p2/test.txt"), new Path("p3/test.txt"),
        new Path("p4/test.txt"), new Path("p5/test.txt"));

    ContentSummary summary =
        runTestGetInputSummary(jobConf, properties, testPaths, BYTES_PER_FILE,
            HiveInputFormat.class, Collections.emptyMap());
    assertEquals(testPaths.size() * BYTES_PER_FILE, summary.getLength());
    assertEquals(testPaths.size(), summary.getFileCount());
    assertEquals(testPaths.size(), summary.getDirectoryCount());
  }
Read several files so that their information is cached, then delete those
files and read them again to see if the results were cached from the first
read. If the cache is not working, the sizes will be off since the files no
longer exist in the file system.

@throws Exception e
ql/src/test/org/apache/hadoop/hive/ql/exec/TestGetInputSummary.java