public class IgniteHadoopFileSystem extends FileSystem
IGFS Hadoop 1.x file system driver over file system API. To use
IGFS as Hadoop file system, you should configure this class
in Hadoop's core-site.xml as follows:
<property>
<name>fs.default.name</name>
<value>igfs:///</value>
</property>
<property>
<name>fs.igfs.impl</name>
<value>org.apache.ignite.hadoop.fs.v1.IgniteHadoopFileSystem</value>
</property>
You should also add Ignite JAR and all libraries to Hadoop classpath. To
do this, add following lines to conf/hadoop-env.sh script in Hadoop
distribution:
export IGNITE_HOME=/path/to/Ignite/distribution export HADOOP_CLASSPATH=$IGNITE_HOME/ignite*.jar for f in $IGNITE_HOME/libs/*.jar; do export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f; done
job-submitter or job-scheduler processes, while data nodes are usually
started together with Hadoop task-tracker processes.
For sample client and data node configuration refer to config/hadoop/default-config-client.xml
and config/hadoop/default-config.xml configuration files in Ignite installation.
FileSystem.Statistics| Modifier and Type | Field and Description |
|---|---|
static FileStatus[] |
EMPTY_FILE_STATUS
Empty array of file statuses.
|
static String |
IGFS_MANAGEMENT
Internal property to indicate management connection.
|
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
IgniteHadoopFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
append(Path f,
int bufSize,
Progressable progress) |
protected void |
checkPath(Path path) |
void |
close() |
void |
colocateFileWrites(boolean colocateFileWrites)
Public setter that can be used by direct users of FS or Visor.
|
FSDataOutputStream |
create(Path f,
FsPermission perm,
boolean overwrite,
int bufSize,
short replication,
long blockSize,
Progressable progress) |
boolean |
delete(Path f) |
boolean |
delete(Path f,
boolean recursive) |
protected void |
finalize() |
ContentSummary |
getContentSummary(Path f) |
long |
getDefaultBlockSize() |
short |
getDefaultReplication() |
BlockLocation[] |
getFileBlockLocations(FileStatus status,
long start,
long len) |
FileStatus |
getFileStatus(Path f) |
static String |
getFsHadoopUser()
Gets non-null user name as per the Hadoop file system viewpoint.
|
Path |
getHomeDirectory() |
URI |
getUri() |
Path |
getWorkingDirectory() |
boolean |
hasSecondaryFileSystem() |
void |
initialize(URI name,
Configuration cfg) |
FileStatus[] |
listStatus(Path f) |
boolean |
mkdirs(Path f,
FsPermission perm) |
IgfsMode |
mode(IgfsPath path)
Resolve path mode.
|
IgfsMode |
mode(Path path)
Resolve path mode.
|
FSDataInputStream |
open(Path f,
int bufSize) |
boolean |
rename(Path src,
Path dst) |
void |
setOwner(Path p,
String username,
String grpName) |
void |
setPermission(Path p,
FsPermission perm) |
void |
setTimes(Path p,
long mtime,
long atime) |
void |
setWorkingDirectory(Path newPath) |
String |
toString() |
String |
user()
Returns the user name this File System is created on behalf of.
|
access, addDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, clearStatistics, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createSnapshot, createSnapshot, createSymlink, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getScheme, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setReplication, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncategetConf, setConfpublic static final String IGFS_MANAGEMENT
public static final FileStatus[] EMPTY_FILE_STATUS
public URI getUri()
getUri in class FileSystempublic static String getFsHadoopUser() throws IOException
IOExceptionpublic void colocateFileWrites(boolean colocateFileWrites)
colocateFileWrites - Whether all ongoing file writes should be colocated.public void initialize(URI name, Configuration cfg) throws IOException
initialize in class FileSystemIOExceptionprotected void checkPath(Path path)
checkPath in class FileSystempublic short getDefaultReplication()
getDefaultReplication in class FileSystemprotected void finalize()
throws Throwable
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic void setTimes(Path p, long mtime, long atime) throws IOException
setTimes in class FileSystemIOExceptionpublic void setPermission(Path p, FsPermission perm) throws IOException
setPermission in class FileSystemIOExceptionpublic void setOwner(Path p, String username, String grpName) throws IOException
setOwner in class FileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufSize) throws IOException
open in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, FsPermission perm, boolean overwrite, int bufSize, short replication, long blockSize, Progressable progress) throws IOException
create in class FileSystemIOExceptionpublic FSDataOutputStream append(Path f, int bufSize, Progressable progress) throws IOException
append in class FileSystemIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic boolean delete(Path f) throws IOException
delete in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic FileStatus[] listStatus(Path f) throws IOException
listStatus in class FileSystemIOExceptionpublic Path getHomeDirectory()
getHomeDirectory in class FileSystempublic void setWorkingDirectory(Path newPath)
setWorkingDirectory in class FileSystempublic Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic boolean mkdirs(Path f, FsPermission perm) throws IOException
mkdirs in class FileSystemIOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic ContentSummary getContentSummary(Path f) throws IOException
getContentSummary in class FileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(FileStatus status, long start, long len) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic long getDefaultBlockSize()
getDefaultBlockSize in class FileSystempublic IgfsMode mode(Path path)
path - HDFS path.public IgfsMode mode(IgfsPath path)
path - IGFS path.public boolean hasSecondaryFileSystem()
true If secondary file system is initialized.public String user()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016