class OneForOneStreamManager extends StreamManager
StreamManager which allows registration of an Iterator<ManagedBuffer>, which are individually fetched as chunks by the client. Each registered buffer is one chunk.
- Alphabetic
- By Inheritance
- OneForOneStreamManager
- StreamManager
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new OneForOneStreamManager()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkAuthorization(client: TransportClient, streamId: Long): Unit
Verify that the client is authorized to read from the given stream.
Verify that the client is authorized to read from the given stream.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- Exceptions thrown
SecurityExceptionIf client is not authorized.
- def chunkBeingSent(streamId: Long): Unit
Called when start sending a chunk.
Called when start sending a chunk.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- def chunkSent(streamId: Long): Unit
Called when a chunk is successfully sent.
Called when a chunk is successfully sent.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- def chunksBeingTransferred(): Long
Return the number of chunks being transferred and not finished yet in this StreamManager.
Return the number of chunks being transferred and not finished yet in this StreamManager.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def connectionTerminated(channel: Channel): Unit
Indicates that the given channel has been terminated.
Indicates that the given channel has been terminated. After this occurs, we are guaranteed not to read from the associated streams again, so any state can be cleaned up.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getChunk(streamId: Long, chunkIndex: Int): ManagedBuffer
Called in response to a fetchChunk() request.
Called in response to a fetchChunk() request. The returned buffer will be passed as-is to the client. A single stream will be associated with a single TCP connection, so this method will not be called in parallel for a particular stream.
Chunks may be requested in any order, and requests may be repeated, but it is not required that implementations support this behavior.
The returned ManagedBuffer will be release()'d after being written to the network.
- streamId
id of a stream that has been previously registered with the StreamManager.
- chunkIndex
0-indexed chunk of the stream that's requested
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numStreamStates(): Int
- Annotations
- @VisibleForTesting()
- def openStream(streamChunkId: String): ManagedBuffer
Called in response to a stream() request.
Called in response to a stream() request. The returned data is streamed to the client through a single TCP connection.
Note the
streamIdargument is not related to the similarly named argument in theint)method.- returns
A managed buffer for the stream, or null if the stream was not found.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- def registerStream(appId: String, buffers: Iterator[ManagedBuffer], channel: Channel): Long
- def registerStream(appId: String, buffers: Iterator[ManagedBuffer], channel: Channel, isBufferMaterializedOnNext: Boolean): Long
Registers a stream of ManagedBuffers which are served as individual chunks one at a time to callers.
Registers a stream of ManagedBuffers which are served as individual chunks one at a time to callers. Each ManagedBuffer will be release()'d after it is transferred on the wire. If a client connection is closed before the iterator is fully drained, then the remaining materialized buffers will all be release()'d, but some buffers like ShuffleManagedBufferIterator, ShuffleChunkManagedBufferIterator, ManagedBufferIterator should not release, because they have not been materialized before requesting the iterator by the next method.
If an app ID is provided, only callers who've authenticated with the given app ID will be allowed to fetch from this stream.
This method also associates the stream with a single client connection, which is guaranteed to be the only reader of the stream. Once the connection is closed, the stream will never be used again, enabling cleanup by
connectionTerminated. - def streamBeingSent(streamId: String): Unit
Called when start sending a stream.
Called when start sending a stream.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- def streamSent(streamId: String): Unit
Called when a stream is successfully sent.
Called when a stream is successfully sent.
- Definition Classes
- OneForOneStreamManager → StreamManager
- Annotations
- @Override()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()