public final class DynamicWrappedIO
extends java.lang.Object
org.apache.hadoop.io.wrappedio.WrappedIO,
dynamically loaded.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
PARQUET_READ_POLICIES |
Read policy for parquet files: "parquet, columnar, vector, random".
|
| Constructor | Description |
|---|---|
DynamicWrappedIO() |
|
DynamicWrappedIO(java.lang.String classname) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
bulkDelete_available() |
Are the bulk delete methods available?
|
java.util.List<java.util.Map.Entry<Path,java.lang.String>> |
bulkDelete_delete(FileSystem fs,
Path base,
java.util.Collection<Path> paths) |
Delete a list of files/objects.
|
int |
bulkDelete_pageSize(FileSystem fileSystem,
Path path) |
Get the maximum number of objects/files to delete in a single request.
|
boolean |
byteBufferPositionedReadable_available() |
Are the ByteBufferPositionedReadable methods loaded?
This does not check that a specific stream implements the API;
use
byteBufferPositionedReadable_readFullyAvailable(InputStream). |
void |
byteBufferPositionedReadable_readFully(java.io.InputStream in,
long position,
java.nio.ByteBuffer buf) |
Delegate to
ByteBufferPositionedReadable#read(long, ByteBuffer). |
boolean |
byteBufferPositionedReadable_readFullyAvailable(java.io.InputStream in) |
Probe to see if the input stream is an instance of ByteBufferPositionedReadable.
|
FSDataInputStream |
fileSystem_openFile(FileSystem fs,
Path path,
java.lang.String policy,
FileStatus status,
java.lang.Long length,
java.util.Map<java.lang.String,java.lang.String> options) |
OpenFile assistant, easy reflection-based access to
FileSystem#openFile(Path) and blocks
awaiting the operation completion. |
boolean |
fileSystem_openFile_available() |
Is the
fileSystem_openFile(FileSystem, Path, String, FileStatus, Long, Map)
method available. |
static DynamicWrappedIO |
instance() |
Get the singleton instance.
|
static boolean |
isAvailable() |
Is the wrapped IO class loaded?
|
boolean |
loaded() |
Is the wrapped IO class loaded?
|
static FSDataInputStream |
openFile(FileSystem fs,
FileStatus status,
java.lang.String readPolicies) |
Open a file.
|
boolean |
pathCapabilities_hasPathCapability(java.lang.Object fs,
Path path,
java.lang.String capability) |
Does a path have a given capability?
Calls
PathCapabilities#hasPathCapability(Path, String),
mapping IOExceptions to false. |
boolean |
streamCapabilities_hasCapability(java.lang.Object object,
java.lang.String capability) |
Does an object implement
StreamCapabilities and, if so,
what is the result of the probe for the capability?
Calls StreamCapabilities#hasCapability(String), |
public static final java.lang.String PARQUET_READ_POLICIES
public DynamicWrappedIO()
public DynamicWrappedIO(java.lang.String classname)
public boolean loaded()
public boolean bulkDelete_available()
public int bulkDelete_pageSize(FileSystem fileSystem, Path path) throws java.io.IOException
fileSystem - filesystempath - path to delete under.java.lang.UnsupportedOperationException - bulk delete under that path is not supported.java.lang.IllegalArgumentException - path not valid.java.io.IOException - problems resolving pathsjava.lang.RuntimeException - invocation failure.public java.util.List<java.util.Map.Entry<Path,java.lang.String>> bulkDelete_delete(FileSystem fs, Path base, java.util.Collection<Path> paths) throws java.io.IOException
base.fs - filesystembase - path to delete under.paths - list of paths which must be absolute and under the base path.java.lang.UnsupportedOperationException - bulk delete under that path is not supported.java.lang.IllegalArgumentException - if a path argument is invalid.java.io.IOException - IO problems including networking, authentication and more.public boolean fileSystem_openFile_available()
fileSystem_openFile(FileSystem, Path, String, FileStatus, Long, Map)
method available.public FSDataInputStream fileSystem_openFile(FileSystem fs, Path path, java.lang.String policy, @Nullable FileStatus status, @Nullable java.lang.Long length, @Nullable java.util.Map<java.lang.String,java.lang.String> options) throws java.io.IOException
FileSystem#openFile(Path) and blocks
awaiting the operation completion.fs - filesystempath - pathpolicy - read policystatus - optional file statuslength - optional file lengthoptions - nullable map of other optionsjava.io.IOException - if the operation was attempted and failed.public boolean pathCapabilities_hasPathCapability(java.lang.Object fs,
Path path,
java.lang.String capability)
PathCapabilities#hasPathCapability(Path, String),
mapping IOExceptions to false.fs - filesystempath - path to query the capability of.capability - non-null, non-empty string to query the path for support.java.lang.IllegalArgumentException - invalid argumentspublic boolean streamCapabilities_hasCapability(java.lang.Object object,
java.lang.String capability)
StreamCapabilities and, if so,
what is the result of the probe for the capability?
Calls StreamCapabilities#hasCapability(String),object - object to probecapability - capability stringpublic boolean byteBufferPositionedReadable_available()
byteBufferPositionedReadable_readFullyAvailable(InputStream).public boolean byteBufferPositionedReadable_readFullyAvailable(java.io.InputStream in)
throws java.io.IOException
in - input streamjava.io.IOException - if the operation was attempted and failed.public void byteBufferPositionedReadable_readFully(java.io.InputStream in,
long position,
java.nio.ByteBuffer buf)
throws java.io.IOException
ByteBufferPositionedReadable#read(long, ByteBuffer).in - input streamposition - position within filebuf - the ByteBuffer to receive the results of the read operation.java.lang.UnsupportedOperationException - if the input doesn't implement
the interface or, if when invoked, it is raised.
Note: that is the default behaviour of FSDataInputStream#readFully(long, ByteBuffer).java.io.IOException - if the operation was attempted and failed.public static DynamicWrappedIO instance()
public static boolean isAvailable()
public static FSDataInputStream openFile(FileSystem fs, FileStatus status, java.lang.String readPolicies) throws java.io.IOException
If the WrappedIO class is found, use it.
If not, falls back to the classic fs.open(Path) call.
fs - filesystemstatus - file statusreadPolicies - read policy to usejava.io.IOException - any IO failure.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.