FileSystemDirectory (Hadoop 1.2.1 API)
Date: 2013-07-22

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.contrib.index.lucene
Class FileSystemDirectory

    java.lang.Object
      org.apache.lucene.store.Directory
          org.apache.hadoop.contrib.index.lucene.FileSystemDirectory

    public class FileSystemDirectory

extends org.apache.lucene.store.Directory

This class implements a Lucene Directory on top of a general FileSystem. Currently it does not support locking.

Field Summary

Fields inherited from class org.apache.lucene.store.Directory
`lockFactory`

Constructor Summary
`FileSystemDirectory(FileSystem fs, Path directory, boolean create, Configuration conf)` Constructor

Method Summary
`void` | `close()`
`org.apache.lucene.store.IndexOutput` | `createOutput(String name)`
`void` | `deleteFile(String name)`
`boolean` | `fileExists(String name)`
`long` | `fileLength(String name)`
`long` | `fileModified(String name)`
`String[]` | `list()`
`org.apache.lucene.store.Lock` | `makeLock(String name)`
`org.apache.lucene.store.IndexInput` | `openInput(String name)`
`org.apache.lucene.store.IndexInput` | `openInput(String name, int bufferSize)`
`void` | `renameFile(String from, String to)`
`String` | `toString()`
`void` | `touchFile(String name)`

Methods inherited from class org.apache.lucene.store.Directory
`clearLock, copy, getLockFactory, getLockID, setLockFactory`

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

Constructor Detail

### FileSystemDirectory

    public FileSystemDirectory(FileSystem fs,
                               Path directory,
                               boolean create,
                               Configuration conf)
                        throws IOException

  Constructor

  Parameters:
    `fs` -
    `directory` -
    `create` -
    `conf` -
  Throws:
    `IOException`

Method Detail

### list

    public String[] list()
                  throws IOException

  Specified by:
    `list` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### fileExists

    public boolean fileExists(String name)
                       throws IOException

  Specified by:
    `fileExists` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### fileModified

    public long fileModified(String name)

  Specified by:
    `fileModified` in class `org.apache.lucene.store.Directory`

### touchFile

    public void touchFile(String name)

  Specified by:
    `touchFile` in class `org.apache.lucene.store.Directory`

### fileLength

    public long fileLength(String name)
                    throws IOException

  Specified by:
    `fileLength` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### deleteFile

    public void deleteFile(String name)
                    throws IOException

  Specified by:
    `deleteFile` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### renameFile

    public void renameFile(String from,
                           String to)
                    throws IOException

  Specified by:
    `renameFile` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### createOutput

    public org.apache.lucene.store.IndexOutput createOutput(String name)
                                                     throws IOException

  Specified by:
    `createOutput` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### openInput

    public org.apache.lucene.store.IndexInput openInput(String name)
                                                 throws IOException

  Specified by:
    `openInput` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### openInput

    public org.apache.lucene.store.IndexInput openInput(String name,
                                                        int bufferSize)
                                                 throws IOException

  Overrides:
    `openInput` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### makeLock

    public org.apache.lucene.store.Lock makeLock(String name)

  Overrides:
    `makeLock` in class `org.apache.lucene.store.Directory`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in class `org.apache.lucene.store.Directory`
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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