Class StreamFactoryRequirements
java.lang.Object
org.apache.hadoop.fs.s3a.impl.streams.StreamFactoryRequirements
Requirements for requirements for streams from this factory,
including threading and vector IO, and of
the Filesystem instance itself via
StreamFactoryRequirements.Requirements.
The FS is expected to adapt its internal configuration based on
the requirements passed back by the stream factory after its
creation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRequirements a factory may have. -
Constructor Summary
ConstructorsConstructorDescriptionStreamFactoryRequirements(int sharedThreads, int streamThreads, VectoredIOContext vectoredIOContext, StreamFactoryRequirements.Requirements... requirements) Create the thread options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this factory have this requirement?booleanShould the future pool be created?intNumber of shared threads to included in the bounded pool.intThe maximum number of threads which can be used should by a single input stream.toString()The VectorIO requirements of streams.
-
Constructor Details
-
StreamFactoryRequirements
public StreamFactoryRequirements(int sharedThreads, int streamThreads, VectoredIOContext vectoredIOContext, StreamFactoryRequirements.Requirements... requirements) Create the thread options.- Parameters:
sharedThreads- Number of shared threads to included in the bounded pool.streamThreads- How many threads per stream, ignoring vector IO requirements.vectoredIOContext- vector IO settings -made immutable if not already done.requirements- requirement flags of the factory and stream.
-
-
Method Details
-
streamThreads
public int streamThreads()The maximum number of threads which can be used should by a single input stream.- Returns:
- thread pool requirements.
-
requiresFuturePool
public boolean requiresFuturePool()Should the future pool be created?- Returns:
- true if the future pool is required.
-
vectoredIOContext
The VectorIO requirements of streams.- Returns:
- vector IO context.
-
requires
Does this factory have this requirement?- Parameters:
r- requirement to probe for.- Returns:
- true if this is a requirement.
-
toString