com.senseidb.indexing.hadoop.reduce
Class FileSystemDirectory
java.lang.Object
org.apache.lucene.store.Directory
com.senseidb.indexing.hadoop.reduce.FileSystemDirectory
- All Implemented Interfaces:
- Closeable
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 |
isOpen, lockFactory |
|
Constructor Summary |
FileSystemDirectory(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
boolean create,
org.apache.hadoop.conf.Configuration conf)
Constructor |
| Methods inherited from class org.apache.lucene.store.Directory |
clearLock, copy, copy, ensureOpen, getLockFactory, getLockID, setLockFactory, sync, sync |
FileSystemDirectory
public FileSystemDirectory(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
boolean create,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Constructor
- Parameters:
fs - directory - create - conf -
- Throws:
IOException
listAll
public String[] listAll()
throws IOException
- Specified by:
listAll 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
- 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 interface Closeable- Specified by:
close in class org.apache.lucene.store.Directory
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class org.apache.lucene.store.Directory
Copyright © 2010-2012. All Rights Reserved.