private List<Path> getApplicableFilePaths(final Path dataDir, final FileSystem fs) throws IOException {
    try {
      return applicablePathCache.get(dataDir, new Callable<List<Path>>() {

        @Override
        public List<Path> call() throws Exception {
          if (!MRCompactorJobRunner.this.fs.exists(dataDir)) {
            return Lists.newArrayList();
          }
          List<Path> paths = Lists.newArrayList();
          for (FileStatus fileStatus : FileListUtils.listFilesRecursively(fs, dataDir,
              new PathFilter() {
            @Override
            public boolean accept(Path path) {
              for (String validExtention : getApplicableFileExtensions()) {
                if (path.getName().endsWith(validExtention)) {
                  return true;
                }
              }
              return false;
            }
          })) {
            paths.add(fileStatus.getPath());
          }
          return paths;
        }
      });
    } catch (ExecutionException e) {
      throw new IOException(e);
    }
  }
private List < Path > getApplicableFilePaths ( final Path dataDir , final FileSystem fs ) throws IOException { try { return applicablePathCache . get ( dataDir , new Callable < List < Path > > ( ) { @ Override public List < Path > call ( ) throws Exception { if ( ! MRCompactorJobRunner . this . fs . exists ( dataDir ) ) { return Lists . newArrayList ( ) ; } List < Path > paths = Lists . newArrayList ( ) ; for ( FileStatus fileStatus : FileListUtils . listFilesRecursively ( fs , dataDir , new PathFilter ( ) { @ Override public boolean accept ( Path path ) { for ( String validExtention : getApplicableFileExtensions ( ) ) { if ( path . getName ( ) . endsWith ( validExtention ) ) { return true ; } } return false ; } } ) ) { paths . add ( fileStatus . getPath ( ) ) ; } return paths ; } } ) ; } catch ( ExecutionException e ) { throw new IOException ( e ) ; } }
Get the list of file {@link Path}s in the given dataDir, which satisfy the extension requirements
of {@link #getApplicableFileExtensions()}.