public class HadoopFileSystem extends FileSystem
| Constructor and Description |
|---|
HadoopFileSystem(FileSystemProvider provider,
String host,
int uriPort) |
public HadoopFileSystem(FileSystemProvider provider, String host, int uriPort) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic Iterable<FileStore> getFileStores()
getFileStores in class FileSystempublic Path getPath(String first, String... more)
getPath in class FileSystempublic PathMatcher getPathMatcher(String syntaxAndPattern)
getPathMatcher in class FileSystempublic Iterable<Path> getRootDirectories()
getRootDirectories in class FileSystempublic String getSeparator()
getSeparator in class FileSystempublic UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService in class FileSystempublic boolean isOpen()
isOpen in class FileSystempublic boolean isReadOnly()
isReadOnly in class FileSystempublic WatchService newWatchService() throws IOException
newWatchService in class FileSystemIOExceptionpublic FileSystemProvider provider()
provider in class FileSystempublic Set<String> supportedFileAttributeViews()
supportedFileAttributeViews in class FileSystempublic String getHost()
public int getPort()
public org.apache.hadoop.fs.FileSystem getHDFS()
public void createDirectory(byte[] directory,
FileAttribute<?>... attrs)
throws IOException
IOExceptionpublic Iterator<Path> iteratorOf(HadoopPath path, DirectoryStream.Filter<? super Path> filter) throws IOException, URISyntaxException
IOExceptionURISyntaxExceptionpublic void deleteFile(org.apache.hadoop.fs.Path hadoopPath,
boolean failIfNotExists)
throws IOException
IOExceptionpublic OutputStream newOutputStream(org.apache.hadoop.fs.Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
IOExceptionpublic boolean exists(org.apache.hadoop.fs.Path path)
throws IOException
IOExceptionpublic FileStore getFileStore(HadoopPath path)
public boolean sameCluster(HadoopFileSystem hdfs)
public void setTimes(byte[] bs,
FileTime mtime,
FileTime atime,
FileTime ctime)
throws IOException
IOExceptionpublic IAttributeReader getView(HadoopPath path, String type)
public IAttributeWriter getAttributeWriter(HadoopPath path, String type)
public Map<String,Object> readAttributes(HadoopPath hadoopPath, String attributes, LinkOption[] options) throws IOException
IOExceptionpublic void setAttribute(HadoopPath hadoopPath, String attribute, Object value, LinkOption[] options) throws IOException
IOExceptionCopyright © 2018. All rights reserved.