public class NIOChunkMessage<E> extends Object implements IChunkMessage<E>, Serializable
IChunkMessage
where the payload is made available to the receiving
service using an NIO transfer against the sender's ResourceService
.
This is suitable for moving large blocks of data during query evaluation.Constructor and Description |
---|
NIOChunkMessage(IQueryClient queryController,
UUID queryId,
int sinkId,
int partitionId,
DirectBufferPoolAllocator.IAllocationContext allocationContext,
E[] source,
InetSocketAddress addr) |
Modifier and Type | Method and Description |
---|---|
int |
getBOpId()
Return the operator identifier.
|
int |
getBytesAvailable()
The #of bytes of data which are available for that operator.
|
IChunkAccessor<E> |
getChunkAccessor()
Return an interface which may be used to access the chunk's data.
|
int |
getPartitionId()
Return the index partition identifier.
|
IQueryClient |
getQueryController()
The proxy for the query controller.
|
UUID |
getQueryControllerId()
The UUID of the query controller (the
IQueryClient to which the
query was submitted). |
UUID |
getQueryId()
Return the query identifier.
|
InetSocketAddress |
getServiceAddr()
The Internet address and port of a
ResourceService from which the
receiver may demand the data. |
int |
getSolutionCount()
The #of elements in this chunk.
|
boolean |
isLastInvocation()
Return true iff the
IChunkMessage is for the last evaluation pass
of an operator. |
boolean |
isMaterialized()
Return
true if the chunk is materialized on the receiver. |
void |
materialize(FederatedRunningQuery runningQuery)
Materialize the chunk on the receiver.
|
protected void |
materialize(ManagedResourceService resourceService,
DirectBufferPoolAllocator.IAllocationContext allocationContext)
Core implementation.
|
void |
release()
Discard the materialized data.
|
String |
toString() |
public NIOChunkMessage(IQueryClient queryController, UUID queryId, int sinkId, int partitionId, DirectBufferPoolAllocator.IAllocationContext allocationContext, E[] source, InetSocketAddress addr)
queryController
- queryId
- sinkId
- partitionId
- allocations
- The ordered list of DirectBufferPoolAllocator.IAllocation
s comprising the chunk.addr
- The Internet address and port where the receiver can fetch the
payload using the sender's ResourceService
.public IQueryClient getQueryController()
IChunkMessage
getQueryController
in interface IChunkMessage<E>
public UUID getQueryControllerId()
IChunkMessage
IQueryClient
to which the
query was submitted).getQueryControllerId
in interface IChunkMessage<E>
https://sourceforge.net/apps/trac/bigdata/ticket/475
public UUID getQueryId()
IOpMessage
getQueryId
in interface IOpMessage
public int getBOpId()
IOpMessage
getBOpId
in interface IOpMessage
public int getPartitionId()
IOpMessage
getPartitionId
in interface IOpMessage
public boolean isLastInvocation()
IChunkMessage
IChunkMessage
is for the last evaluation pass
of an operator. The last evaluation pass for an operator must be
requested using an annotation. When it is requested, the operator will be
invoked one more time for each node or shard on which it was run
(depending on the BOpEvaluationContext
). When so invoked, the
IChunkMessage
will be associated with an empty source and this
flag will be set.isLastInvocation
in interface IChunkMessage<E>
PipelineOp.Annotations#LAST_PASS
public int getSolutionCount()
getSolutionCount
in interface IChunkMessage<E>
public int getBytesAvailable()
public InetSocketAddress getServiceAddr()
ResourceService
from which the
receiver may demand the data.public boolean isMaterialized()
IChunkMessage
true
if the chunk is materialized on the receiver.isMaterialized
in interface IChunkMessage<E>
public void materialize(FederatedRunningQuery runningQuery)
IChunkMessage
materialize
in interface IChunkMessage<E>
runningQuery
- The running query.public void release()
release
in interface IChunkMessage<E>
protected void materialize(ManagedResourceService resourceService, DirectBufferPoolAllocator.IAllocationContext allocationContext)
ResourceService
and assembling it into a set of
DirectBufferPoolAllocator.IAllocation
s in the specified DirectBufferPoolAllocator.IAllocationContext
.resourceService
- allocationContext
- public IChunkAccessor<E> getChunkAccessor()
IChunkMessage
getChunkAccessor
in interface IChunkMessage<E>
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.