com.bigdata.bop.fed
Class ThickChunkMessage<E>

java.lang.Object
  extended by com.bigdata.bop.fed.ThickChunkMessage<E>
All Implemented Interfaces:
IChunkMessage<E>, IOpMessage, Externalizable, Serializable

public class ThickChunkMessage<E>
extends Object
implements IChunkMessage<E>, Externalizable

A thick version of this interface in which the chunk is sent inline with the RMI message.

Note: The encoding is IV specific and supports the IVCache associations. However, it CAN NOT be used with non-IV data. This is fine in the deployed system but it makes the class properly dependent on the RDF layer.

Version:
$Id: ThickChunkMessage.java 6038 2012-02-17 17:43:26Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
ThickChunkMessage()
          De-serialization constructor.
ThickChunkMessage(IQueryClient queryController, UUID queryId, int bopId, int partitionId, IBindingSet[] source)
           
 
Method Summary
 int getBOpId()
          Return the operator identifier.
 int getBytesAvailable()
           
 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.
 int getSolutionCount()
          Return the #of solutions which are available from this message.
 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.
 void readExternal(ObjectInput in)
           
 void release()
          Release all resources associated with this chunk.
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThickChunkMessage

public ThickChunkMessage()
De-serialization constructor.


ThickChunkMessage

public ThickChunkMessage(IQueryClient queryController,
                         UUID queryId,
                         int bopId,
                         int partitionId,
                         IBindingSet[] source)
Method Detail

getQueryController

public IQueryClient getQueryController()
Description copied from interface: IChunkMessage
The proxy for the query controller.

Specified by:
getQueryController in interface IChunkMessage<E>
See Also:
Optimize serialization for query messages on cluster, The query controller should be discoverable

getQueryControllerId

public UUID getQueryControllerId()
Description copied from interface: IChunkMessage
The UUID of the query controller (the IQueryClient to which the query was submitted).

Specified by:
getQueryControllerId in interface IChunkMessage<E>
See Also:
https://sourceforge.net/apps/trac/bigdata/ticket/475

getQueryId

public UUID getQueryId()
Description copied from interface: IOpMessage
Return the query identifier.

Specified by:
getQueryId in interface IOpMessage

getBOpId

public int getBOpId()
Description copied from interface: IOpMessage
Return the operator identifier.

Specified by:
getBOpId in interface IOpMessage

getPartitionId

public int getPartitionId()
Description copied from interface: IOpMessage
Return the index partition identifier.

Specified by:
getPartitionId in interface IOpMessage

isLastInvocation

public boolean isLastInvocation()
Description copied from interface: IChunkMessage
Return true iff the 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.

Specified by:
isLastInvocation in interface IChunkMessage<E>
See Also:
PipelineOp.Annotations#LAST_PASS

isMaterialized

public boolean isMaterialized()
Description copied from interface: IChunkMessage
Return true if the chunk is materialized on the receiver.

Specified by:
isMaterialized in interface IChunkMessage<E>

getSolutionCount

public int getSolutionCount()
Description copied from interface: IChunkMessage
Return the #of solutions which are available from this message.

Specified by:
getSolutionCount in interface IChunkMessage<E>

getBytesAvailable

public int getBytesAvailable()

toString

public String toString()
Overrides:
toString in class Object

materialize

public void materialize(FederatedRunningQuery runningQuery)
Description copied from interface: IChunkMessage
Materialize the chunk on the receiver.

Specified by:
materialize in interface IChunkMessage<E>
Parameters:
runningQuery - The running query.

release

public void release()
Description copied from interface: IChunkMessage
Release all resources associated with this chunk. If the source has been opened, then ensure that it is closed. If the data has been materialized, then discard the materialized data.

Specified by:
release in interface IChunkMessage<E>

getChunkAccessor

public IChunkAccessor<E> getChunkAccessor()
Description copied from interface: IChunkMessage
Return an interface which may be used to access the chunk's data.

Specified by:
getChunkAccessor in interface IChunkMessage<E>

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.