Package org.apache.hadoop.fs
Interface StreamCapabilities
- All Known Implementing Classes:
BindingPathOutputCommitter,FSDataInputStream,FSDataOutputStream,HdfsDataInputStream,HdfsDataOutputStream,ManifestCommitter
@Public
@Evolving
public interface StreamCapabilities
Interface to query streams for supported capabilities.
Capability strings must be in lower case.
Constant strings are chosen over enums in order to allow other file systems
to define their own capabilities.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringStream abort() capability implemented byAbortable.abort().static final StringStream setDropBehind capability implemented byCanSetDropBehind.setDropBehind(Boolean).static final StringDeprecated.static final StringStream hsync capability implemented bySyncable.hsync().static final StringIOStatisticsSource API.static final StringStreams that support IOStatistics context and capture thread-level IOStatistics.static final StringStream read(long, ByteBuffer) capability implemented byByteBufferPositionedReadable.read(long, java.nio.ByteBuffer).static final StringStream setReadahead capability implemented byCanSetReadahead.setReadahead(Long).static final StringStream read(ByteBuffer) capability implemented byByteBufferReadable.read(java.nio.ByteBuffer).static final StringStream unbuffer capability implemented byCanUnbuffer.unbuffer().static final StringSupport for vectored IO api.static final StringProbe for vector IO implementation details: "fs.capability.vectoredio.sliced". -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasCapability(String capability) Query the stream for a specific capability.
-
Field Details
-
HFLUSH
Deprecated.Stream hflush capability implemented bySyncable.hflush(). Use theHSYNCprobe to check for the support of Syncable; it's that presence ofhsync()which matters.- See Also:
-
HSYNC
Stream hsync capability implemented bySyncable.hsync().- See Also:
-
READAHEAD
Stream setReadahead capability implemented byCanSetReadahead.setReadahead(Long).- See Also:
-
DROPBEHIND
Stream setDropBehind capability implemented byCanSetDropBehind.setDropBehind(Boolean).- See Also:
-
UNBUFFER
Stream unbuffer capability implemented byCanUnbuffer.unbuffer().- See Also:
-
READBYTEBUFFER
Stream read(ByteBuffer) capability implemented byByteBufferReadable.read(java.nio.ByteBuffer).- See Also:
-
PREADBYTEBUFFER
Stream read(long, ByteBuffer) capability implemented byByteBufferPositionedReadable.read(long, java.nio.ByteBuffer).- See Also:
-
IOSTATISTICS
IOStatisticsSource API.- See Also:
-
VECTOREDIO
Support for vectored IO api. SeePositionedReadable#readVectored(List, IntFunction).- See Also:
-
VECTOREDIO_BUFFERS_SLICED
Probe for vector IO implementation details: "fs.capability.vectoredio.sliced". When performing vectored IO operations, are the buffers returned by readVectored() potentially sliced subsets of buffers allocated by the allocate() function passed in the read requests? If true, this means that the returned buffers may be sliced subsets of the allocated buffers.- See Also:
-
ABORTABLE_STREAM
Stream abort() capability implemented byAbortable.abort(). This matches the Path CapabilityCommonPathCapabilities.ABORTABLE_STREAM.- See Also:
-
IOSTATISTICS_CONTEXT
Streams that support IOStatistics context and capture thread-level IOStatistics.- See Also:
-
-
Method Details
-
hasCapability
Query the stream for a specific capability.- Parameters:
capability- string to query the stream support for.- Returns:
- True if the stream supports capability.
-