Class AnalyticsStreamFactory
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.fs.s3a.impl.streams.AbstractObjectInputStreamFactory
org.apache.hadoop.fs.s3a.impl.streams.AnalyticsStreamFactory
- All Implemented Interfaces:
Closeable,AutoCloseable,ObjectInputStreamFactory,org.apache.hadoop.fs.StreamCapabilities,org.apache.hadoop.service.Service
A factory for
AnalyticsStream. This class is instantiated during initialization of
S3AStore, if fs.s3a.input.stream.type is set to Analytics.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.fs.s3a.impl.streams.ObjectInputStreamFactory
ObjectInputStreamFactory.StreamFactoryCallbacksNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATENested classes/interfaces inherited from interface org.apache.hadoop.fs.StreamCapabilities
org.apache.hadoop.fs.StreamCapabilities.StreamCapability -
Field Summary
Fields inherited from interface org.apache.hadoop.fs.StreamCapabilities
ABORTABLE_STREAM, DROPBEHIND, HFLUSH, HSYNC, IOSTATISTICS, IOSTATISTICS_CONTEXT, PREADBYTEBUFFER, READAHEAD, READBYTEBUFFER, UNBUFFER, VECTOREDIO, VECTOREDIO_BUFFERS_SLICED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(FactoryBindingParameters factoryBindingParameters) Bind to the callbacks.Calculate Return StreamFactoryRequirements.readObject(ObjectReadParameters parameters) Create a new input stream.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidGet the input stream type.Methods inherited from class org.apache.hadoop.fs.s3a.impl.streams.AbstractObjectInputStreamFactory
callbacks, hasCapabilityMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
AnalyticsStreamFactory
public AnalyticsStreamFactory()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
bind
Description copied from class:AbstractObjectInputStreamFactoryBind to the callbacks.The base class checks service state then stores the callback interface.
- Specified by:
bindin interfaceObjectInputStreamFactory- Overrides:
bindin classAbstractObjectInputStreamFactory- Parameters:
factoryBindingParameters- parameters for the factory binding- Throws:
IOException- if IO problems.
-
readObject
Description copied from interface:ObjectInputStreamFactoryCreate a new input stream. There is no requirement to actually contact the store; this is generally done lazily.- Parameters:
parameters- parameters.- Returns:
- the input stream
- Throws:
IOException- problem creating the stream.
-
streamType
Description copied from interface:ObjectInputStreamFactoryGet the input stream type.- Returns:
- the specific stream type this factory produces.
-
factoryRequirements
Calculate Return StreamFactoryRequirements.- Returns:
- a positive thread count.
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-