LocalFileSystem (Hadoop 0.20.1+169.127 API)
Date: 2011-01-16

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.fs
Class LocalFileSystem

    java.lang.Object
      org.apache.hadoop.conf.Configured
          org.apache.hadoop.fs.FileSystem
              org.apache.hadoop.fs.FilterFileSystem
                  org.apache.hadoop.fs.ChecksumFileSystem
                      org.apache.hadoop.fs.LocalFileSystem

All Implemented Interfaces:
  Closeable, Configurable

    public class LocalFileSystem

extends ChecksumFileSystem

Implement the FileSystem API for the checksumed local filesystem.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem
`FileSystem.Statistics`

Field Summary

Fields inherited from class org.apache.hadoop.fs.FilterFileSystem
`fs`

Fields inherited from class org.apache.hadoop.fs.FileSystem
`FS_DEFAULT_NAME_KEY, LOG, statistics`

Constructor Summary
`LocalFileSystem()`
`LocalFileSystem(FileSystem rawLocalFileSystem)`

Method Summary
`void` | `copyFromLocalFile(boolean delSrc, Path src, Path dst)` The src file is on the local disk.
`void` | `copyToLocalFile(boolean delSrc, Path src, Path dst)` The src file is under FS, and the dst is on the local disk.
`FileSystem` | `getRaw()`
`File` | `pathToFile(Path path)` Convert a path to a File.
`boolean` | `reportChecksumFailure(Path p, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)` Moves files to a bad file directory on the same device, so that their storage will not be reused.

Methods inherited from class org.apache.hadoop.fs.ChecksumFileSystem
`append, completeLocalOutput, copyToLocalFile, create, delete, getApproxChkSumLength, getBytesPerSum, getChecksumFile, getChecksumFileLength, getChecksumLength, getRawFileSystem, isChecksumFile, listStatus, mkdirs, open, rename, setConf, setReplication, setVerifyChecksum, startLocalOutput`

Methods inherited from class org.apache.hadoop.fs.FilterFileSystem
`checkPath, close, delete, getConf, getDefaultBlockSize, getDefaultReplication, getFileBlockLocations, getFileChecksum, getFileStatus, getHomeDirectory, getName, getStatus, getUri, getWorkingDirectory, initialize, makeQualified, mkdirs, setOwner, setPermission, setWorkingDirectory`

Methods inherited from class org.apache.hadoop.fs.FileSystem
`append, append, clearStatistics, closeAll, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, deleteOnExit, exists, get, get, getAllStatistics, getBlockSize, getContentSummary, getDefaultUri, getLength, getLocal, getNamed, getReplication, getStatistics, getStatistics, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, listStatus, listStatus, listStatus, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstanceLocal, open, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri, setTimes`

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

Constructor Detail

### LocalFileSystem

    public LocalFileSystem()

### LocalFileSystem

    public LocalFileSystem(FileSystem rawLocalFileSystem)

Method Detail

### getRaw

    public FileSystem getRaw()

### pathToFile

    public File pathToFile(Path path)

  Convert a path to a File.

### copyFromLocalFile

    public void copyFromLocalFile(boolean delSrc,
                                  Path src,
                                  Path dst)
                           throws IOException

  Description copied from class: `FilterFileSystem`
  The src file is on the local disk. Add it to FS at the given dst name. delSrc indicates if the source should be removed

  Overrides:
    `copyFromLocalFile` in class `ChecksumFileSystem`
  Throws:
    `IOException`

### copyToLocalFile

    public void copyToLocalFile(boolean delSrc,
                                Path src,
                                Path dst)
                         throws IOException

  Description copied from class: `ChecksumFileSystem`
  The src file is under FS, and the dst is on the local disk. Copy it from FS control to the local dst name.

  Overrides:
    `copyToLocalFile` in class `ChecksumFileSystem`
  Throws:
    `IOException`

### reportChecksumFailure

    public boolean reportChecksumFailure(Path p,
                                         FSDataInputStream in,
                                         long inPos,
                                         FSDataInputStream sums,
                                         long sumsPos)

  Moves files to a bad file directory on the same device, so that their storage will not be reused.

  Overrides:
    `reportChecksumFailure` in class `ChecksumFileSystem`
  Parameters:
    `p` - the file name containing the error
    `in` - the stream open on the file
    `inPos` - the position of the beginning of the bad data in the file
    `sums` - the stream open on the checksum file
    `sumsPos` - the position of the beginning of the bad data in the checksum file
  Returns:
    if retry is neccessary

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