TaskDistributedCacheManager (Hadoop 0.20.2+737 API)
Date: 2010-10-11

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.filecache
Class TaskDistributedCacheManager

    java.lang.Object
      org.apache.hadoop.filecache.TaskDistributedCacheManager

    public class TaskDistributedCacheManager

extends Object

Helper class of `TrackerDistributedCacheManager` that represents the cached files of a single task. This class is used by TaskRunner/LocalJobRunner to parse out the job configuration and setup the local caches. This class is internal to Hadoop, and should not be treated as a public interface.

Method Summary
`List<String>` | `getClassPaths()` Retrieves class paths (as local references) to add.
`ClassLoader` | `makeClassLoader(ClassLoader parent)` Creates a class loader that includes the designated files and archives.
`void` | `release()` Releases the cached files/archives, so that space can be reclaimed by the `TrackerDistributedCacheManager`.
`void` | `setup(LocalDirAllocator lDirAlloc, File workDir, String privateCacheSubdir, String publicCacheSubDir)` Retrieve files into the local cache and updates the task configuration (which has been passed in via the constructor).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### setup

    public void setup(LocalDirAllocator lDirAlloc,
                      File workDir,
                      String privateCacheSubdir,
                      String publicCacheSubDir)
               throws IOException

  Retrieve files into the local cache and updates the task configuration (which has been passed in via the constructor). It is the caller's responsibility to re-write the task configuration XML file, if necessary.

  Throws:
    `IOException`

### getClassPaths

    public List<String> getClassPaths()
                               throws IOException

  Retrieves class paths (as local references) to add. Should be called after setup().

  Throws:
    `IOException`

### release

    public void release()
                 throws IOException

  Releases the cached files/archives, so that space can be reclaimed by the `TrackerDistributedCacheManager`.

  Throws:
    `IOException`

### makeClassLoader

    public ClassLoader makeClassLoader(ClassLoader parent)
                                throws MalformedURLException

  Creates a class loader that includes the designated files and archives.

  Throws:
    `MalformedURLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation