public class HadoopIgfsWrapper extends Object implements HadoopIgfs
| Constructor and Description |
|---|
HadoopIgfsWrapper(String authority,
String logDir,
Configuration conf,
org.apache.commons.logging.Log log,
String user)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<IgfsBlockLocation> |
affinity(IgfsPath path,
long start,
long len)
Command to get affinity for given path, offset and length.
|
HadoopIgfsStreamDelegate |
append(IgfsPath path,
boolean create,
Map<String,String> props)
Open file for output appending data to the end of a file.
|
void |
close(boolean force)
Close connection.
|
IgfsPathSummary |
contentSummary(IgfsPath path)
Gets path summary.
|
HadoopIgfsStreamDelegate |
create(IgfsPath path,
boolean overwrite,
boolean colocate,
int replication,
long blockSize,
Map<String,String> props)
Command to create file and open it for output.
|
Boolean |
delete(IgfsPath path,
boolean recursive)
Command to delete given path.
|
IgfsStatus |
fsStatus()
Performs status request.
|
IgfsHandshakeResponse |
handshake(String logDir)
Perform handshake.
|
IgfsFile |
info(IgfsPath path)
Command to retrieve file info for some IGFS path.
|
Collection<IgfsFile> |
listFiles(IgfsPath path)
Command to get list of files in directory.
|
Collection<IgfsPath> |
listPaths(IgfsPath path)
Command to get directory listing.
|
Boolean |
mkdirs(IgfsPath path,
Map<String,String> props)
Command to create directories.
|
IgfsModeResolver |
modeResolver() |
HadoopIgfsStreamDelegate |
open(IgfsPath path)
Command to open file for reading.
|
HadoopIgfsStreamDelegate |
open(IgfsPath path,
int seqReadsBeforePrefetch)
Command to open file for reading.
|
Boolean |
rename(IgfsPath src,
IgfsPath dest)
Command to rename given path.
|
Boolean |
setTimes(IgfsPath path,
long accessTime,
long modificationTime)
Sets last access time and last modification time for a file.
|
IgfsFile |
update(IgfsPath path,
Map<String,String> props)
Command to update file properties.
|
public HadoopIgfsWrapper(String authority, String logDir, Configuration conf, org.apache.commons.logging.Log log, String user) throws IOException
authority - Authority (connection string).logDir - Log directory for server.conf - Configuration.log - Current logger.user - User name.IOException - On error.public IgfsHandshakeResponse handshake(String logDir) throws IOException
handshake in interface HadoopIgfslogDir - Log directory.IOExceptionpublic void close(boolean force)
close in interface HadoopIgfsforce - Force flag.public IgfsFile info(IgfsPath path) throws IOException
info in interface HadoopIgfspath - Path to get file info for.IOExceptionpublic IgfsFile update(IgfsPath path, Map<String,String> props) throws IOException
update in interface HadoopIgfspath - IGFS path to update properties.props - Properties to update.IOExceptionpublic Boolean setTimes(IgfsPath path, long accessTime, long modificationTime) throws IOException
setTimes in interface HadoopIgfspath - Path to update times.accessTime - Last access time to set.modificationTime - Last modification time to set.IOExceptionpublic Boolean rename(IgfsPath src, IgfsPath dest) throws IOException
rename in interface HadoopIgfssrc - Source path.dest - Destination path.IOExceptionpublic Boolean delete(IgfsPath path, boolean recursive) throws IOException
delete in interface HadoopIgfspath - Path to delete.recursive - True if deletion is recursive.IOExceptionpublic Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len) throws IOException
affinity in interface HadoopIgfspath - Path to get affinity for.start - Start position (offset).len - Data length.IOExceptionpublic IgfsPathSummary contentSummary(IgfsPath path) throws IOException
contentSummary in interface HadoopIgfspath - Path to get summary for.IOExceptionpublic Boolean mkdirs(IgfsPath path, Map<String,String> props) throws IOException
mkdirs in interface HadoopIgfspath - Path to create.IOExceptionpublic Collection<IgfsFile> listFiles(IgfsPath path) throws IOException
listFiles in interface HadoopIgfspath - Path to list.IOExceptionpublic Collection<IgfsPath> listPaths(IgfsPath path) throws IOException
listPaths in interface HadoopIgfspath - Path to list.IOExceptionpublic IgfsStatus fsStatus() throws IOException
fsStatus in interface HadoopIgfsIOExceptionpublic HadoopIgfsStreamDelegate open(IgfsPath path) throws IOException
open in interface HadoopIgfspath - File path to open.IOExceptionpublic HadoopIgfsStreamDelegate open(IgfsPath path, int seqReadsBeforePrefetch) throws IOException
open in interface HadoopIgfspath - File path to open.IOExceptionpublic HadoopIgfsStreamDelegate create(IgfsPath path, boolean overwrite, boolean colocate, int replication, long blockSize, @Nullable Map<String,String> props) throws IOException
create in interface HadoopIgfspath - Path to file.overwrite - If true then old file contents will be lost.colocate - If true and called on data node, file will be written on that node.replication - Replication factor.props - File properties for creation.IOExceptionpublic HadoopIgfsStreamDelegate append(IgfsPath path, boolean create, @Nullable Map<String,String> props) throws IOException
append in interface HadoopIgfspath - Path to file.create - If true, file will be created if does not exist.props - File properties.IOExceptionpublic IgfsModeResolver modeResolver() throws IOException
IOException - On error.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.1-p166 Release Date : September 3 2019