public class HdfsDirectory
extends org.apache.lucene.store.BaseDirectory
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
protected org.apache.hadoop.conf.Configuration |
configuration |
protected org.apache.hadoop.fs.Path |
hdfsDirPath |
static org.slf4j.Logger |
LOG |
protected static String |
SEGMENTS_GEN |
| Constructor and Description |
|---|
HdfsDirectory(org.apache.hadoop.fs.Path hdfsDirPath,
org.apache.hadoop.conf.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.lucene.store.IndexOutput |
createOutput(String name,
org.apache.lucene.store.IOContext context) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
long |
fileModified(String name) |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
org.apache.hadoop.fs.Path |
getHdfsDirPath() |
String[] |
listAll() |
org.apache.lucene.store.IndexInput |
openInput(String name,
org.apache.lucene.store.IOContext context) |
void |
sync(Collection<String> names) |
clearLock, ensureOpen, getLockFactory, makeLock, setLockFactorypublic static org.slf4j.Logger LOG
public static final int BUFFER_SIZE
protected static final String SEGMENTS_GEN
protected org.apache.hadoop.fs.Path hdfsDirPath
protected org.apache.hadoop.conf.Configuration configuration
public HdfsDirectory(org.apache.hadoop.fs.Path hdfsDirPath,
org.apache.hadoop.conf.Configuration configuration)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexOutput createOutput(String name, org.apache.lucene.store.IOContext context) throws IOException
createOutput in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexInput openInput(String name, org.apache.lucene.store.IOContext context) throws IOException
openInput in class org.apache.lucene.store.DirectoryIOExceptionpublic void deleteFile(String name) throws IOException
deleteFile in class org.apache.lucene.store.DirectoryIOExceptionpublic boolean fileExists(String name) throws IOException
fileExists in class org.apache.lucene.store.DirectoryIOExceptionpublic long fileLength(String name) throws IOException
fileLength in class org.apache.lucene.store.DirectoryIOExceptionpublic long fileModified(String name) throws IOException
IOExceptionpublic String[] listAll() throws IOException
listAll in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.hadoop.fs.Path getHdfsDirPath()
public org.apache.hadoop.fs.FileSystem getFileSystem()
public org.apache.hadoop.conf.Configuration getConfiguration()
public void sync(Collection<String> names) throws IOException
sync in class org.apache.lucene.store.DirectoryIOExceptionCopyright © 2000–2014 The Apache Software Foundation. All rights reserved.