| 
||||||||||
| 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.dfs.HftpFileSystem
public class HftpFileSystem
An implementation of a protocol for accessing filesystems over HTTP. The following implementation provides a limited, read-only interface to a filesystem over HTTP.
ListPathsServlet, 
FileDataServlet| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem | 
|---|
FileSystem.Statistics | 
| Field Summary | |
|---|---|
protected static SimpleDateFormat | 
df
 | 
protected  InetSocketAddress | 
nnAddr
 | 
protected  UserGroupInformation | 
ugi
 | 
| Fields inherited from class org.apache.hadoop.fs.FileSystem | 
|---|
LOG, statistics | 
| Constructor Summary | |
|---|---|
HftpFileSystem()
 | 
|
| Method Summary | |
|---|---|
 FSDataOutputStream | 
append(Path f,
       int bufferSize,
       Progressable progress)
This optional operation is not yet supported.  | 
 FSDataOutputStream | 
create(Path f,
       FsPermission permission,
       boolean overwrite,
       int bufferSize,
       short replication,
       long blockSize,
       Progressable progress)
Opens an FSDataOutputStream at the indicated Path with write-progress reporting.  | 
 boolean | 
delete(Path f)
Deprecated.  | 
 boolean | 
delete(Path f,
       boolean recursive)
Delete a file.  | 
 FileStatus | 
getFileStatus(Path f)
Return a file status object that represents the path.  | 
 URI | 
getUri()
Returns a URI whose scheme and authority identify this FileSystem.  | 
 Path | 
getWorkingDirectory()
Get the current working directory for the given file system  | 
 void | 
initialize(URI name,
           Configuration conf)
Called after a new FileSystem instance is constructed.  | 
 FileStatus[] | 
listStatus(Path f)
List the statuses of the files/directories in the given path if the path is a directory.  | 
 boolean | 
mkdirs(Path f,
       FsPermission permission)
Make the given file and all non-existent parents into directories.  | 
 FSDataInputStream | 
open(Path f,
     int buffersize)
Opens an FSDataInputStream at the indicated Path.  | 
protected  HttpURLConnection | 
openConnection(String path,
               String query)
Open an HTTP connection to the namenode to read file data and metadata.  | 
 boolean | 
rename(Path src,
       Path dst)
Renames Path src to Path dst.  | 
 void | 
setWorkingDirectory(Path f)
Set the current working directory for the given file system.  | 
| Methods inherited from class org.apache.hadoop.conf.Configured | 
|---|
getConf, setConf | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected InetSocketAddress nnAddr
protected UserGroupInformation ugi
protected static final SimpleDateFormat df
| Constructor Detail | 
|---|
public HftpFileSystem()
| Method Detail | 
|---|
public void initialize(URI name,
                       Configuration conf)
                throws IOException
FileSystem
initialize in class FileSystemname - a uri whose authority section names the host, port, etc.
   for this FileSystemconf - the configuration
IOExceptionpublic URI getUri()
FileSystem
getUri in class FileSystem
protected HttpURLConnection openConnection(String path,
                                           String query)
                                    throws IOException
path - The path component of the URLquery - The query component of the URL
IOException
public FSDataInputStream open(Path f,
                              int buffersize)
                       throws IOException
FileSystem
open in class FileSystemf - the file name to openbuffersize - the size of the buffer to be used.
IOException
public FileStatus[] listStatus(Path f)
                        throws IOException
FileSystem
listStatus in class FileSystemf - given path
IOException
public FileStatus getFileStatus(Path f)
                         throws IOException
FileSystem
getFileStatus in class FileSystemf - The path we want information from
FileNotFoundException - when the path does not exist;
         IOException see specific implementation
IOExceptionpublic Path getWorkingDirectory()
FileSystem
getWorkingDirectory in class FileSystempublic void setWorkingDirectory(Path f)
FileSystem
setWorkingDirectory in class FileSystem
public FSDataOutputStream append(Path f,
                                 int bufferSize,
                                 Progressable progress)
                          throws IOException
append in class FileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used.progress - for reporting progress if it is not null.
IOException
public FSDataOutputStream create(Path f,
                                 FsPermission permission,
                                 boolean overwrite,
                                 int bufferSize,
                                 short replication,
                                 long blockSize,
                                 Progressable progress)
                          throws IOException
FileSystem
create in class FileSystemf - the file name to openoverwrite - if a file with this name already exists, then if true,
   the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.
IOExceptionFileSystem.setPermission(Path, FsPermission)
public boolean rename(Path src,
                      Path dst)
               throws IOException
FileSystem
rename in class FileSystemIOException
@Deprecated
public boolean delete(Path f)
               throws IOException
delete in class FileSystemIOException
public boolean delete(Path f,
                      boolean recursive)
               throws IOException
FileSystem
delete in class FileSystemf - the path to delete.recursive - if path is a directory and set to 
 true, the directory is deleted else throws an exception. In
 case of a file the recursive can be set to either true or false.
IOException
public boolean mkdirs(Path f,
                      FsPermission permission)
               throws IOException
FileSystem
mkdirs in class FileSystemIOException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||