Class StreamIntegration
java.lang.Object
org.apache.hadoop.fs.s3a.impl.streams.StreamIntegration
Stream integration, including factory construction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEnum/config name of the analytics input stream: "analytics".static final StringEnum/config name of a classic S3AInputStream: "classic".static final StringReads in a classname : "custom".static final StringSpecial string for configuration only; is mapped to the default stream type: "default".static final InputStreamTypeWhat is the default type?static final Stringstatic final Stringstatic final StringEnum/config name of of the Pinterest S3APrefetchingInputStream: "prefetch". -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamTypedetermineInputStreamType(org.apache.hadoop.conf.Configuration conf) Determine the input stream type for the supplied configuration.static ObjectInputStreamFactoryfactoryFromConfig(org.apache.hadoop.conf.Configuration conf) Create the input stream factory the configuration asks for.static VectoredIOContextpopulateVectoredIOContext(org.apache.hadoop.conf.Configuration conf) Populates the configurations related to vectored IO operations.
-
Field Details
-
CLASSIC
Enum/config name of a classic S3AInputStream: "classic".- See Also:
-
PREFETCH
Enum/config name of of the Pinterest S3APrefetchingInputStream: "prefetch".- See Also:
-
ANALYTICS
Enum/config name of the analytics input stream: "analytics".- See Also:
-
CUSTOM
Reads in a classname : "custom".- See Also:
-
DEFAULT
Special string for configuration only; is mapped to the default stream type: "default".- See Also:
-
DEFAULT_STREAM_TYPE
What is the default type? -
E_EMPTY_CUSTOM_CLASSNAME
- See Also:
-
E_INVALID_STREAM_TYPE
- See Also:
-
-
Method Details
-
factoryFromConfig
Create the input stream factory the configuration asks for.This does not initialize the factory.
See
determineInputStreamType(Configuration)for the resolution algorithm.- Parameters:
conf- configuration- Returns:
- a stream factory.
- Throws:
RuntimeException- any binding/loading/instantiation problem
-
determineInputStreamType
Determine the input stream type for the supplied configuration.This does not perform any instantiation.
If the option
"fs.s3a.prefetch.enabled"is set, the prefetch stream is selected, after printing a warning the first time this happens.If the input stream type is declared as "default", then whatever the current default stream type is returned, as defined by
DEFAULT_STREAM_TYPE.- Parameters:
conf- configuration- Returns:
- a stream factory.
-
populateVectoredIOContext
public static VectoredIOContext populateVectoredIOContext(org.apache.hadoop.conf.Configuration conf) Populates the configurations related to vectored IO operations. The context is still mutable at this point.- Parameters:
conf- configuration object.- Returns:
- VectoredIOContext.
-