org.apache.blur.store.hdfs
Class HdfsDirectory

java.lang.Object
  extended by org.apache.lucene.store.Directory
      extended by org.apache.blur.store.hdfs.HdfsDirectory
All Implemented Interfaces:
Closeable, LastModified, HdfsSymlink

public class HdfsDirectory
extends org.apache.lucene.store.Directory
implements LastModified, HdfsSymlink


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.store.Directory
org.apache.lucene.store.Directory.IndexInputSlicer
 
Field Summary
static String LNK
           
 
Constructor Summary
HdfsDirectory(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path path)
           
 
Method Summary
 void close()
           
 void copy(org.apache.lucene.store.Directory to, String src, String dest, org.apache.lucene.store.IOContext context)
           
 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 getFileModified(String name)
           
 org.apache.hadoop.fs.Path getPath()
           
 HdfsDirectory getSymlinkDirectory()
           
 String[] listAll()
           
 org.apache.lucene.store.IndexInput openInput(String name, org.apache.lucene.store.IOContext context)
           
static org.apache.hadoop.fs.Path readRealPathDataFromSymlinkPath(org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path linkPath)
           
 void sync(Collection<String> names)
           
 String toString()
           
 
Methods inherited from class org.apache.lucene.store.Directory
clearLock, createSlicer, getLockFactory, getLockID, makeLock, setLockFactory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LNK

public static final String LNK
See Also:
Constant Field Values
Constructor Detail

HdfsDirectory

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

toString

public String toString()
Overrides:
toString in class org.apache.lucene.store.Directory

createOutput

public org.apache.lucene.store.IndexOutput createOutput(String name,
                                                        org.apache.lucene.store.IOContext context)
                                                 throws IOException
Specified by:
createOutput in class org.apache.lucene.store.Directory
Throws:
IOException

openInput

public org.apache.lucene.store.IndexInput openInput(String name,
                                                    org.apache.lucene.store.IOContext context)
                                             throws IOException
Specified by:
openInput in class org.apache.lucene.store.Directory
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

deleteFile

public void deleteFile(String name)
                throws IOException
Specified by:
deleteFile in class org.apache.lucene.store.Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Specified by:
fileLength in class org.apache.lucene.store.Directory
Throws:
IOException

sync

public void sync(Collection<String> names)
          throws IOException
Specified by:
sync in class org.apache.lucene.store.Directory
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class org.apache.lucene.store.Directory
Throws:
IOException

getPath

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

readRealPathDataFromSymlinkPath

public static org.apache.hadoop.fs.Path readRealPathDataFromSymlinkPath(org.apache.hadoop.fs.FileSystem fileSystem,
                                                                        org.apache.hadoop.fs.Path linkPath)
                                                                 throws IOException,
                                                                        UnsupportedEncodingException
Throws:
IOException
UnsupportedEncodingException

getFileModified

public long getFileModified(String name)
                     throws IOException
Specified by:
getFileModified in interface LastModified
Throws:
IOException

copy

public void copy(org.apache.lucene.store.Directory to,
                 String src,
                 String dest,
                 org.apache.lucene.store.IOContext context)
          throws IOException
Overrides:
copy in class org.apache.lucene.store.Directory
Throws:
IOException

getSymlinkDirectory

public HdfsDirectory getSymlinkDirectory()
Specified by:
getSymlinkDirectory in interface HdfsSymlink


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.