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.
Fields inherited from class org.apache.lucene.store.Directory |
lockFactory |
Method Summary |
void |
close()
|
org.apache.lucene.store.IndexOutput |
createOutput(java.lang.String name)
|
void |
deleteFile(java.lang.String name)
|
boolean |
fileExists(java.lang.String name)
|
long |
fileLength(java.lang.String name)
|
long |
fileModified(java.lang.String name)
|
java.lang.String[] |
list()
|
org.apache.lucene.store.Lock |
makeLock(java.lang.String name)
|
org.apache.lucene.store.IndexInput |
openInput(java.lang.String name)
|
org.apache.lucene.store.IndexInput |
openInput(java.lang.String name,
int bufferSize)
|
void |
renameFile(java.lang.String from,
java.lang.String to)
|
java.lang.String |
toString()
|
void |
touchFile(java.lang.String name)
|
Methods inherited from class org.apache.lucene.store.Directory |
clearLock, copy, ensureOpen, getLockFactory, getLockID, setLockFactory, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileSystemDirectory
public FileSystemDirectory(FileSystem fs,
Path directory,
boolean create,
Configuration conf)
throws java.io.IOException
- Constructor
- Parameters:
fs
- directory
- create
- conf
-
- Throws:
java.io.IOException
list
public java.lang.String[] list()
throws java.io.IOException
- Specified by:
list
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
fileExists
public boolean fileExists(java.lang.String name)
throws java.io.IOException
- Specified by:
fileExists
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
fileModified
public long fileModified(java.lang.String name)
- Specified by:
fileModified
in class org.apache.lucene.store.Directory
touchFile
public void touchFile(java.lang.String name)
- Specified by:
touchFile
in class org.apache.lucene.store.Directory
fileLength
public long fileLength(java.lang.String name)
throws java.io.IOException
- Specified by:
fileLength
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
deleteFile
public void deleteFile(java.lang.String name)
throws java.io.IOException
- Specified by:
deleteFile
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
renameFile
public void renameFile(java.lang.String from,
java.lang.String to)
throws java.io.IOException
- Specified by:
renameFile
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
createOutput
public org.apache.lucene.store.IndexOutput createOutput(java.lang.String name)
throws java.io.IOException
- Specified by:
createOutput
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
openInput
public org.apache.lucene.store.IndexInput openInput(java.lang.String name)
throws java.io.IOException
- Specified by:
openInput
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
openInput
public org.apache.lucene.store.IndexInput openInput(java.lang.String name,
int bufferSize)
throws java.io.IOException
- Overrides:
openInput
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
makeLock
public org.apache.lucene.store.Lock makeLock(java.lang.String name)
- Overrides:
makeLock
in class org.apache.lucene.store.Directory
close
public void close()
throws java.io.IOException
- Specified by:
close
in class org.apache.lucene.store.Directory
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009 The Apache Software Foundation