org.apache.nutch.indexer
Class FsDirectory
java.lang.Object
org.apache.lucene.store.Directory
org.apache.nutch.indexer.FsDirectory
- All Implemented Interfaces:
- Closeable
public class FsDirectory
- extends Directory
Reads a Lucene index stored in DFS.
FsDirectory
public FsDirectory(FileSystem fs,
Path directory,
boolean create,
Configuration conf)
throws IOException
- Throws:
IOException
listAll
public String[] listAll()
throws IOException
- Specified by:
listAll
in class Directory
- Throws:
IOException
fileExists
public boolean fileExists(String name)
throws IOException
- Specified by:
fileExists
in class Directory
- Throws:
IOException
fileModified
public long fileModified(String name)
- Specified by:
fileModified
in class Directory
touchFile
public void touchFile(String name)
- Specified by:
touchFile
in class Directory
fileLength
public long fileLength(String name)
throws IOException
- Specified by:
fileLength
in class Directory
- Throws:
IOException
deleteFile
public void deleteFile(String name)
throws IOException
- Specified by:
deleteFile
in class Directory
- Throws:
IOException
renameFile
public void renameFile(String from,
String to)
throws IOException
- Throws:
IOException
createOutput
public IndexOutput createOutput(String name)
throws IOException
- Specified by:
createOutput
in class Directory
- Throws:
IOException
openInput
public IndexInput openInput(String name)
throws IOException
- Specified by:
openInput
in class Directory
- Throws:
IOException
makeLock
public Lock makeLock(String name)
- Overrides:
makeLock
in class Directory
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Directory
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2006 The Apache Software Foundation