Package com.alibaba.graphscope.context
Class GiraphComputationAdaptorContext<OID_T,VID_T,VDATA_T,EDATA_T>
- java.lang.Object
-
- com.alibaba.graphscope.context.VertexDataContext<IFragment<OID_T,VID_T,VDATA_T,EDATA_T>,VDATA_T>
-
- com.alibaba.graphscope.context.GiraphComputationAdaptorContext<OID_T,VID_T,VDATA_T,EDATA_T>
-
- Type Parameters:
OID_T
-VID_T
-VDATA_T
-EDATA_T
-
- All Implemented Interfaces:
ContextBase
,DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T>
public class GiraphComputationAdaptorContext<OID_T,VID_T,VDATA_T,EDATA_T> extends VertexDataContext<IFragment<OID_T,VID_T,VDATA_T,EDATA_T>,VDATA_T> implements DefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T>
Generic adaptor context class. The type parameter OID,VID_VDATA_T,EDATA_T is irrelevant to User writables. They are type parameters for grape fragment. We need them to support multiple set of actual type parameters in one adaptor.
-
-
Field Summary
Fields Modifier and Type Field Description VertexImpl
vertex
-
Constructor Summary
Constructors Constructor Description GiraphComputationAdaptorContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateVertex(long lid)
boolean
allHalted()
AggregatorManager
getAggregatorManager()
GiraphMessageManager
getGiraphMessageManager()
MasterCompute
getMasterCompute()
AbstractComputation
getUserComputation()
WorkerContext
getWorkerContext()
void
haltVertex(long lid)
boolean
hasMasterCompute()
void
Init(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, DefaultMessageManager messageManager, com.alibaba.fastjson.JSONObject jsonObject)
CAUTION: THIS METHOD SHALL BE CALLED in JNI after initCommunicator..boolean
isHalted(long lid)
void
Output(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag)
For giraph applications, we need to run postApplication method after all computation.void
setClassLoader(URLClassLoader classLoader)
void
updateIncomingMessageClass(ImmutableClassesGiraphConfiguration conf)
void
writeBackVertexData()
-
Methods inherited from class com.alibaba.graphscope.context.VertexDataContext
createFFIContext, data, getDataClass
-
-
-
-
Field Detail
-
vertex
public VertexImpl vertex
-
-
Method Detail
-
getUserComputation
public AbstractComputation getUserComputation()
-
getGiraphMessageManager
public GiraphMessageManager getGiraphMessageManager()
-
getWorkerContext
public WorkerContext getWorkerContext()
-
hasMasterCompute
public boolean hasMasterCompute()
-
getMasterCompute
public MasterCompute getMasterCompute()
-
getAggregatorManager
public AggregatorManager getAggregatorManager()
-
setClassLoader
public void setClassLoader(URLClassLoader classLoader)
-
writeBackVertexData
public void writeBackVertexData()
-
Init
public void Init(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, DefaultMessageManager messageManager, com.alibaba.fastjson.JSONObject jsonObject)
CAUTION: THIS METHOD SHALL BE CALLED in JNI after initCommunicator..With communicatorAddress passed, we init a FFICommunicator obj with that address.
- Specified by:
Init
in interfaceDefaultContextBase<OID_T,VID_T,VDATA_T,EDATA_T>
- Parameters:
frag
- The graph fragment providing accesses to graph data.messageManager
- The message manger which manages messages between fragments.jsonObject
- String args from cmdline.- See Also:
IFragment
,DefaultMessageManager
,JSONObject
-
Output
public void Output(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag)
For giraph applications, we need to run postApplication method after all computation.
-
updateIncomingMessageClass
public void updateIncomingMessageClass(ImmutableClassesGiraphConfiguration conf)
-
haltVertex
public void haltVertex(long lid)
-
isHalted
public boolean isHalted(long lid)
-
allHalted
public boolean allHalted()
-
activateVertex
public void activateVertex(long lid)
-
-