|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.fs.NutchFileSystem
org.apache.nutch.fs.NDFSFileSystem
Implement the NutchFileSystem interface for the NDFS system.
Field Summary |
Fields inherited from class org.apache.nutch.fs.NutchFileSystem |
LOG |
Constructor Summary | |
NDFSFileSystem(InetSocketAddress namenode)
Create the ShareSet automatically, and then go on to the regular constructor. |
Method Summary | |
void |
close()
Shut down the FS. |
void |
completeLocalInput(File localFile)
We're done with the local stuff, so delete it |
void |
completeLocalOutput(File nfsOutputFile,
File tmpLocalFile)
Move completed local data to NDFS destination |
void |
copyFromLocalFile(File src,
File dst)
keep the src when finished. |
void |
copyToLocalFile(File src,
File dst)
Takes a hierarchy of files from the NFS system and writes to the given local target. |
NFSOutputStream |
create(File f)
Create the file at f. |
NFSOutputStream |
create(File f,
boolean overwrite)
|
boolean |
delete(File f)
Get rid of File f, whether a true file or dir. |
boolean |
exists(File f)
Check if exists |
NDFSClient |
getClient()
|
long |
getLength(File f)
|
String |
getName()
Returns a name for this filesystem, suitable to pass to NutchFileSystem.getNamed(String) . |
boolean |
isDirectory(File f)
|
File[] |
listFiles(File f)
|
void |
lock(File f,
boolean shared)
Obtain a filesystem lock at File f. |
void |
mkdirs(File f)
Make the given file and all non-existent parents into directories. |
void |
moveFromLocalFile(File src,
File dst)
Remove the src when finished. |
NFSInputStream |
open(File f)
Open the file at f |
void |
release(File f)
Release a held lock |
boolean |
rename(File src,
File dst)
Rename files/dirs |
File |
startLocalInput(File nfsInputFile,
File tmpLocalFile)
Fetch remote NDFS file, place at tmpLocalFile |
File |
startLocalOutput(File nfsOutputFile,
File tmpLocalFile)
Output will go to the tmp working area. |
String |
toString()
|
Methods inherited from class org.apache.nutch.fs.NutchFileSystem |
createNewFile, get, getNamed, isFile, listFiles, parseArgs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NDFSFileSystem(InetSocketAddress namenode) throws IOException
Method Detail |
public String getName()
NutchFileSystem
NutchFileSystem.getNamed(String)
.
getName
in class NutchFileSystem
public NFSInputStream open(File f) throws IOException
open
in class NutchFileSystem
IOException
public NFSOutputStream create(File f) throws IOException
create
in class NutchFileSystem
IOException
public NFSOutputStream create(File f, boolean overwrite) throws IOException
create
in class NutchFileSystem
IOException
public boolean rename(File src, File dst) throws IOException
rename
in class NutchFileSystem
IOException
public boolean delete(File f) throws IOException
delete
in class NutchFileSystem
IOException
public boolean exists(File f) throws IOException
NutchFileSystem
exists
in class NutchFileSystem
IOException
public boolean isDirectory(File f) throws IOException
isDirectory
in class NutchFileSystem
IOException
public long getLength(File f) throws IOException
getLength
in class NutchFileSystem
IOException
public File[] listFiles(File f) throws IOException
listFiles
in class NutchFileSystem
IOException
public void mkdirs(File f) throws IOException
NutchFileSystem
mkdirs
in class NutchFileSystem
IOException
public void lock(File f, boolean shared) throws IOException
lock
in class NutchFileSystem
IOException
public void release(File f) throws IOException
release
in class NutchFileSystem
IOException
public void moveFromLocalFile(File src, File dst) throws IOException
moveFromLocalFile
in class NutchFileSystem
IOException
public void copyFromLocalFile(File src, File dst) throws IOException
copyFromLocalFile
in class NutchFileSystem
IOException
public void copyToLocalFile(File src, File dst) throws IOException
copyToLocalFile
in class NutchFileSystem
IOException
public File startLocalOutput(File nfsOutputFile, File tmpLocalFile) throws IOException
startLocalOutput
in class NutchFileSystem
IOException
public void completeLocalOutput(File nfsOutputFile, File tmpLocalFile) throws IOException
completeLocalOutput
in class NutchFileSystem
IOException
public File startLocalInput(File nfsInputFile, File tmpLocalFile) throws IOException
startLocalInput
in class NutchFileSystem
IOException
public void completeLocalInput(File localFile) throws IOException
completeLocalInput
in class NutchFileSystem
IOException
public void close() throws IOException
close
in class NutchFileSystem
IOException
public String toString()
public NDFSClient getClient()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |