|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.FilterFileSystem
org.apache.hadoop.fs.HarFileSystem
public class HarFileSystem
This is an implementation of the Hadoop Archive Filesystem. This archive Filesystem has index files of the form _index* and has contents of the form part-*. The index files store the indexes of the real files. The index files are of the form _masterindex and _index. The master index is a level of indirection in to the index file to make the look ups faster. the index file is sorted with hash code of the paths that it contains and the master index contains pointers to the positions in index for ranges of hashcodes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem |
---|
org.apache.hadoop.fs.FileSystem.Statistics |
Field Summary | |
---|---|
static int |
VERSION
|
Fields inherited from class org.apache.hadoop.fs.FilterFileSystem |
---|
fs |
Fields inherited from class org.apache.hadoop.fs.FileSystem |
---|
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, statistics |
Constructor Summary | |
---|---|
HarFileSystem()
public construction of harfilesystem |
|
HarFileSystem(org.apache.hadoop.fs.FileSystem fs)
Constructor to create a HarFileSystem with an underlying filesystem. |
Method Summary | |
---|---|
void |
close()
|
void |
completeLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
not implemented. |
void |
copyFromLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
not implemented. |
void |
copyToLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
copies the file in the har filesystem to a local file. |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
|
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
int bufferSize)
|
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive)
Not implemented. |
org.apache.hadoop.fs.BlockLocation[] |
getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len)
get block locations from the underlying fs |
org.apache.hadoop.fs.FileChecksum |
getFileChecksum(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f)
return the filestatus of files in har archive. |
static int |
getHarHash(org.apache.hadoop.fs.Path p)
the hash of the path p inside iniside the filesystem |
int |
getHarVersion()
|
org.apache.hadoop.fs.Path |
getHomeDirectory()
return the top level archive path. |
URI |
getUri()
Returns the uri of this filesystem. |
org.apache.hadoop.fs.Path |
getWorkingDirectory()
return the top level archive. |
void |
initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
Initialize a Har filesystem per har archive. |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f)
liststatus returns the children of a directory after looking up the index files. |
org.apache.hadoop.fs.Path |
makeQualified(org.apache.hadoop.fs.Path path)
|
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
not implemented. |
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int bufferSize)
Returns a har input stream which fakes end of file. |
void |
setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
not implemented. |
void |
setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permisssion)
Not implemented. |
boolean |
setReplication(org.apache.hadoop.fs.Path src,
short replication)
Not implemented. |
void |
setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
|
org.apache.hadoop.fs.Path |
startLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
not implemented. |
Methods inherited from class org.apache.hadoop.fs.FilterFileSystem |
---|
append, checkPath, copyFromLocalFile, copyFromLocalFile, create, deleteOnExit, getConf, getDefaultBlockSize, getDefaultReplication, getInitialWorkingDirectory, getStatus, getUsed, listLocatedStatus, primitiveCreate, primitiveMkdir, rename, setTimes, setVerifyChecksum |
Methods inherited from class org.apache.hadoop.fs.FileSystem |
---|
append, append, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, delete, exists, get, get, get, getAllStatistics, getBlockSize, getCanonicalServiceName, getContentSummary, getDefaultPort, getDefaultUri, getDelegationToken, getFileBlockLocations, getLength, getLocal, getName, getNamed, getReplication, getServerDefaults, getStatistics, getStatistics, getStatus, globStatus, globStatus, isDirectory, isFile, listFiles, listLocatedStatus, listStatus, listStatus, listStatus, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveMkdir, printStatistics, processDeleteOnExit, rename, setDefaultUri, setDefaultUri |
Methods inherited from class org.apache.hadoop.conf.Configured |
---|
setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VERSION
Constructor Detail |
---|
public HarFileSystem()
public HarFileSystem(org.apache.hadoop.fs.FileSystem fs)
fs
- Method Detail |
---|
public void initialize(URI name, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public int getHarVersion() throws IOException
IOException
public org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public URI getUri()
getUri
in class org.apache.hadoop.fs.FilterFileSystem
public org.apache.hadoop.fs.Path makeQualified(org.apache.hadoop.fs.Path path)
makeQualified
in class org.apache.hadoop.fs.FilterFileSystem
public org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.FileStatus file, long start, long len) throws IOException
getFileBlockLocations
in class org.apache.hadoop.fs.FilterFileSystem
file
- the input filestatus to get block locationsstart
- the start in the filelen
- the length in the file
IOException
public static int getHarHash(org.apache.hadoop.fs.Path p)
p
- the path in the harfilesystem
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException
getFileStatus
in class org.apache.hadoop.fs.FilterFileSystem
f
- the path in har filesystem
IOException
public org.apache.hadoop.fs.FileChecksum getFileChecksum(org.apache.hadoop.fs.Path f)
getFileChecksum
in class org.apache.hadoop.fs.FilterFileSystem
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f, int bufferSize) throws IOException
open
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f, int bufferSize) throws IOException
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission, EnumSet<org.apache.hadoop.fs.CreateFlag> flag, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean setReplication(org.apache.hadoop.fs.Path src, short replication) throws IOException
setReplication
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean delete(org.apache.hadoop.fs.Path f, boolean recursive) throws IOException
delete
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f) throws IOException
listStatus
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.Path getHomeDirectory()
getHomeDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public void setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
setWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public boolean mkdirs(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
mkdirs
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyFromLocalFile(boolean delSrc, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
copyFromLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyToLocalFile(boolean delSrc, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
copyToLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.Path startLocalOutput(org.apache.hadoop.fs.Path fsOutputFile, org.apache.hadoop.fs.Path tmpLocalFile) throws IOException
startLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void completeLocalOutput(org.apache.hadoop.fs.Path fsOutputFile, org.apache.hadoop.fs.Path tmpLocalFile) throws IOException
completeLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void setOwner(org.apache.hadoop.fs.Path p, String username, String groupname) throws IOException
setOwner
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void setPermission(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.permission.FsPermission permisssion) throws IOException
setPermission
in class org.apache.hadoop.fs.FilterFileSystem
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |