org.apache.hadoop.yarn.util
Class FSDownload

java.lang.Object
  extended by org.apache.hadoop.yarn.util.FSDownload
All Implemented Interfaces:
Callable<org.apache.hadoop.fs.Path>

@InterfaceAudience.LimitedPrivate(value={"YARN","MapReduce"})
public class FSDownload
extends Object
implements Callable<org.apache.hadoop.fs.Path>

Download a single URL to the local disk.


Constructor Summary
FSDownload(org.apache.hadoop.fs.FileContext files, org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path destDirPath, org.apache.hadoop.yarn.api.records.LocalResource resource)
           
FSDownload(org.apache.hadoop.fs.FileContext files, org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path destDirPath, org.apache.hadoop.yarn.api.records.LocalResource resource, com.google.common.cache.LoadingCache<org.apache.hadoop.fs.Path,Future<org.apache.hadoop.fs.FileStatus>> statCache)
           
 
Method Summary
 org.apache.hadoop.fs.Path call()
           
static com.google.common.cache.CacheLoader<org.apache.hadoop.fs.Path,Future<org.apache.hadoop.fs.FileStatus>> createStatusCacheLoader(org.apache.hadoop.conf.Configuration conf)
          Creates the cache loader for the status loading cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSDownload

public FSDownload(org.apache.hadoop.fs.FileContext files,
                  org.apache.hadoop.security.UserGroupInformation ugi,
                  org.apache.hadoop.conf.Configuration conf,
                  org.apache.hadoop.fs.Path destDirPath,
                  org.apache.hadoop.yarn.api.records.LocalResource resource)

FSDownload

public FSDownload(org.apache.hadoop.fs.FileContext files,
                  org.apache.hadoop.security.UserGroupInformation ugi,
                  org.apache.hadoop.conf.Configuration conf,
                  org.apache.hadoop.fs.Path destDirPath,
                  org.apache.hadoop.yarn.api.records.LocalResource resource,
                  com.google.common.cache.LoadingCache<org.apache.hadoop.fs.Path,Future<org.apache.hadoop.fs.FileStatus>> statCache)
Method Detail

createStatusCacheLoader

public static com.google.common.cache.CacheLoader<org.apache.hadoop.fs.Path,Future<org.apache.hadoop.fs.FileStatus>> createStatusCacheLoader(org.apache.hadoop.conf.Configuration conf)
Creates the cache loader for the status loading cache. This should be used to create an instance of the status cache that is passed into the FSDownload constructor.


call

public org.apache.hadoop.fs.Path call()
                               throws Exception
Specified by:
call in interface Callable<org.apache.hadoop.fs.Path>
Throws:
Exception


Copyright © 2014 Apache Software Foundation. All Rights Reserved.