org.apache.hadoop.mapred
Class LocatedFileStatusFetcher

java.lang.Object
  extended by org.apache.hadoop.mapred.LocatedFileStatusFetcher

@InterfaceAudience.Private
public class LocatedFileStatusFetcher
extends Object

Utility class to fetch block locations for specified Input paths using a configured number of threads.


Constructor Summary
LocatedFileStatusFetcher(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path[] dirs, boolean recursive, org.apache.hadoop.fs.PathFilter inputFilter, boolean newApi)
           
 
Method Summary
 Iterable<org.apache.hadoop.fs.FileStatus> getFileStatuses()
          Start executing and return FileStatuses based on the parameters specified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatedFileStatusFetcher

public LocatedFileStatusFetcher(org.apache.hadoop.conf.Configuration conf,
                                org.apache.hadoop.fs.Path[] dirs,
                                boolean recursive,
                                org.apache.hadoop.fs.PathFilter inputFilter,
                                boolean newApi)
                         throws InterruptedException,
                                IOException
Parameters:
conf - configuration for the job
dirs - the initial list of paths
recursive - whether to traverse the patchs recursively
inputFilter - inputFilter to apply to the resulting paths
newApi - whether using the mapred or mapreduce API
Throws:
InterruptedException
IOException
Method Detail

getFileStatuses

public Iterable<org.apache.hadoop.fs.FileStatus> getFileStatuses()
                                                          throws InterruptedException,
                                                                 IOException
Start executing and return FileStatuses based on the parameters specified

Returns:
fetched file statuses
Throws:
InterruptedException
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.