core/src/main/java/com/twitter/elephantbird/mapreduce/input/LzoInputFormat.java
protected void addInputPath(List<FileStatus> results, FileSystem fs,
                 FileStatus pathStat, boolean recursive) throws IOException {
    Path path = pathStat.getPath();
    if (pathStat.isDir()) {
      if (recursive) {
        for(FileStatus stat: fs.listStatus(path, hiddenPathFilter)) {
          addInputPath(results, fs, stat, recursive);
        }
      }
    } else if ( visibleLzoFilter.accept(path) ) {
      results.add(pathStat);
      lzoSplitStatus(path).lzoFileStatus = pathStat;
    } else if (lzoIndexFilter.accept(path)) {
      final String lzoIndexName = path.getName();
      final String lzoName = lzoIndexName.substring(0, lzoIndexName.length() -
          LzoIndex.LZO_INDEX_SUFFIX.length());
      final Path lzoPath = new Path(path.getParent(), lzoName);
      lzoSplitStatus(lzoPath).lzoIndexFileStatus = pathStat;
    }
  }
protected void addInputPath(List<FileStatus> results, FileSystem fs,
                 FileStatus pathStat, boolean recursive) throws IOException {
    Path path = pathStat.getPath();
    if (pathStat.isDir()) {
      if (recursive) {
        for(FileStatus stat: fs.listStatus(path, hiddenPathFilter)) {
          addInputPath(results, fs, stat, recursive);
        }
      }
    } else if ( visibleLzoFilter.accept(path) ) {
      results.add(pathStat);
      lzoSplitStatus(path).lzoFileStatus = pathStat;
    } else if (lzoIndexFilter.accept(path)) {
      final String lzoIndexName = path.getName();
      final String lzoName = lzoIndexName.substring(0, lzoIndexName.length() -
          LzoIndex.LZO_INDEX_SUFFIX.length());
      final Path lzoPath = new Path(path.getParent(), lzoName);
      lzoSplitStatus(lzoPath).lzoIndexFileStatus = pathStat;
    }
  }
protected void addInputPath ( List < FileStatus > results , FileSystem fs , FileStatus pathStat , boolean recursive ) throws IOException { Path path = pathStat . getPath ( ) ; if ( pathStat . isDir ( ) ) { if ( recursive ) { for ( FileStatus stat : fs . listStatus ( path , hiddenPathFilter ) ) { addInputPath ( results , fs , stat , recursive ) ; } } } else if ( visibleLzoFilter . accept ( path ) ) { results . add ( pathStat ) ; lzoSplitStatus ( path ) . lzoFileStatus = pathStat ; } else if ( lzoIndexFilter . accept ( path ) ) { final String lzoIndexName = path . getName ( ) ; final String lzoName = lzoIndexName . substring ( 0 , lzoIndexName . length ( ) - LzoIndex . LZO_INDEX_SUFFIX . length ( ) ) ; final Path lzoPath = new Path ( path . getParent ( ) , lzoName ) ; lzoSplitStatus ( lzoPath ) . lzoIndexFileStatus = pathStat ; } }
Add lzo file(s). If recursive is set, traverses the directories.
@param results
The List to store all files.
@param fs
The FileSystem.
@param pathStat
The input path.
@param recursive
Traverse in to directory
@throws IOException
Add lzo file ( s ) . If recursive is set traverses the directories .