public class LakeFSFileSystem
extends org.apache.hadoop.fs.FileSystem
LakeFSFileSystem that can be registered to Spark and support limited write and read actions.
Configure Spark to use lakeFS filesystem by property: spark.hadoop.fs.lakefs.impl=io.lakefs.LakeFSFileSystem.
Configure the application or the filesystem application by properties: fs.lakefs.endpoint=http://localhost:8000/api/v1 fs.lakefs.access.key=AKIAIOSFODNN7EXAMPLE fs.lakefs.secret.key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
| Modifier and Type | Class and Description |
|---|---|
static interface |
LakeFSFileSystem.ClientFactory |
| Modifier and Type | Field and Description |
|---|---|
static String |
LAKEFS_DELETE_BULK_SIZE |
static org.slf4j.Logger |
LOG |
static org.slf4j.Logger |
OPERATIONS_LOG |
| Constructor and Description |
|---|
LakeFSFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path path,
int i,
org.apache.hadoop.util.Progressable progressable) |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
Called on a file write Spark/Hadoop action.
|
org.apache.hadoop.fs.FSDataOutputStream |
createNonRecursive(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress) |
boolean |
delete(org.apache.hadoop.fs.Path path,
boolean recursive) |
boolean |
exists(org.apache.hadoop.fs.Path path) |
long |
getDefaultBlockSize() |
long |
getDefaultBlockSize(org.apache.hadoop.fs.Path path) |
LakeFSFileStatus |
getFileStatus(org.apache.hadoop.fs.Path path)
Return a file status object that represents the path.
|
String |
getScheme()
Return the protocol scheme for the FileSystem.
|
URI |
getUri() |
org.apache.hadoop.fs.Path |
getWorkingDirectory() |
void |
initialize(URI name,
org.apache.hadoop.conf.Configuration conf) |
org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> |
listFiles(org.apache.hadoop.fs.Path f,
boolean recursive) |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path path) |
boolean |
mkdirs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission fsPermission)
Make the given path and all non-existent parents into directories.
|
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path path,
int bufSize) |
ObjectLocation |
pathToObjectLocation(org.apache.hadoop.fs.Path path)
Returns Location with repository, ref and path used by lakeFS based on filesystem path.
|
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
Rename, behaving similarly to the POSIX "mv" command, but non-atomically.
|
void |
setWorkingDirectory(org.apache.hadoop.fs.Path path) |
protected <R> R |
withFileSystemAndTranslatedPhysicalPath(String physicalAddress,
io.lakefs.LakeFSFileSystem.BiFunctionWithIOException<org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,R> f) |
access, addDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, 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, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, 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, setOwner, setPermission, setReplication, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncatepublic static final org.slf4j.Logger LOG
public static final org.slf4j.Logger OPERATIONS_LOG
public static final String LAKEFS_DELETE_BULK_SIZE
public URI getUri()
getUri in class org.apache.hadoop.fs.FileSystempublic void initialize(URI name, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize in class org.apache.hadoop.fs.FileSystemIOExceptionprotected <R> R withFileSystemAndTranslatedPhysicalPath(String physicalAddress, io.lakefs.LakeFSFileSystem.BiFunctionWithIOException<org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,R> f) throws URISyntaxException, IOException
URISyntaxExceptionIOExceptionpublic long getDefaultBlockSize(org.apache.hadoop.fs.Path path)
getDefaultBlockSize in class org.apache.hadoop.fs.FileSystempublic long getDefaultBlockSize()
getDefaultBlockSize in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path path,
int bufSize)
throws IOException
open in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listFiles(org.apache.hadoop.fs.Path f,
boolean recursive)
throws FileNotFoundException,
IOException
listFiles in class org.apache.hadoop.fs.FileSystemFileNotFoundExceptionIOExceptionpublic org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
create in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path path,
int i,
org.apache.hadoop.util.Progressable progressable)
throws IOException
append in class org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
rename in class org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean delete(org.apache.hadoop.fs.Path path,
boolean recursive)
throws IOException
delete in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path path)
throws FileNotFoundException,
IOException
listStatus in class org.apache.hadoop.fs.FileSystemFileNotFoundExceptionIOExceptionpublic void setWorkingDirectory(org.apache.hadoop.fs.Path path)
setWorkingDirectory in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory in class org.apache.hadoop.fs.FileSystempublic boolean mkdirs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission fsPermission)
throws IOException
mkdirs in class org.apache.hadoop.fs.FileSystempath - path to createfsPermission - to apply (passing to the underlying filesystem)IOExceptionpublic LakeFSFileStatus getFileStatus(org.apache.hadoop.fs.Path path) throws IOException
getFileStatus in class org.apache.hadoop.fs.FileSystempath - to a file or directoryFileNotFoundException - when the path does not exist;
IOException API call or underlying filesystem exceptionsIOExceptionpublic String getScheme()
getScheme in class org.apache.hadoop.fs.FileSystempublic boolean exists(org.apache.hadoop.fs.Path path)
throws IOException
exists in class org.apache.hadoop.fs.FileSystemIOException@Nonnull public ObjectLocation pathToObjectLocation(org.apache.hadoop.fs.Path path)
path - to extract information from.public org.apache.hadoop.fs.FSDataOutputStream createNonRecursive(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
createNonRecursive in class org.apache.hadoop.fs.FileSystemIOExceptionCopyright © 2023. All rights reserved.