org.apache.solr.store.hdfs
Class HdfsDirectory

java.lang.Object
  extended by org.apache.lucene.store.Directory
      extended by org.apache.lucene.store.BaseDirectory
          extended by org.apache.solr.store.hdfs.HdfsDirectory
All Implemented Interfaces:
Closeable

public class HdfsDirectory
extends BaseDirectory


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.store.Directory
Directory.IndexInputSlicer
 
Field Summary
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
           
 
Fields inherited from class org.apache.lucene.store.BaseDirectory
isOpen, lockFactory
 
Constructor Summary
HdfsDirectory(org.apache.hadoop.fs.Path hdfsDirPath, org.apache.hadoop.conf.Configuration configuration)
           
 
Method Summary
 void close()
           
 IndexOutput createOutput(String name, 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()
           
 IndexInput openInput(String name, IOContext context)
           
 void sync(Collection<String> names)
           
 
Methods inherited from class org.apache.lucene.store.BaseDirectory
clearLock, ensureOpen, getLockFactory, makeLock, setLockFactory
 
Methods inherited from class org.apache.lucene.store.Directory
copy, createSlicer, getLockID, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static org.slf4j.Logger LOG

BUFFER_SIZE

public static final int BUFFER_SIZE
See Also:
Constant Field Values

SEGMENTS_GEN

protected static final String SEGMENTS_GEN
See Also:
Constant Field Values

hdfsDirPath

protected org.apache.hadoop.fs.Path hdfsDirPath

configuration

protected org.apache.hadoop.conf.Configuration configuration
Constructor Detail

HdfsDirectory

public HdfsDirectory(org.apache.hadoop.fs.Path hdfsDirPath,
                     org.apache.hadoop.conf.Configuration configuration)
              throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Directory
Throws:
IOException

createOutput

public IndexOutput createOutput(String name,
                                IOContext context)
                         throws IOException
Specified by:
createOutput in class Directory
Throws:
IOException

openInput

public IndexInput openInput(String name,
                            IOContext context)
                     throws IOException
Specified by:
openInput in class Directory
Throws:
IOException

deleteFile

public void deleteFile(String name)
                throws IOException
Specified by:
deleteFile in class Directory
Throws:
IOException

fileExists

public boolean fileExists(String name)
                   throws IOException
Specified by:
fileExists in class Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Specified by:
fileLength in class Directory
Throws:
IOException

fileModified

public long fileModified(String name)
                  throws IOException
Throws:
IOException

listAll

public String[] listAll()
                 throws IOException
Specified by:
listAll in class Directory
Throws:
IOException

getHdfsDirPath

public org.apache.hadoop.fs.Path getHdfsDirPath()

getFileSystem

public org.apache.hadoop.fs.FileSystem getFileSystem()

getConfiguration

public org.apache.hadoop.conf.Configuration getConfiguration()

sync

public void sync(Collection<String> names)
          throws IOException
Specified by:
sync in class Directory
Throws:
IOException


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.