Package com.alibaba.graphscope.app
Interface ParallelAppBase<OID_T,VID_T,VDATA_T,EDATA_T,C extends ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T>>
-
- Type Parameters:
OID_T
- original id typeVID_T
- vertex id typeVDATA_T
- vertex data typeEDATA_T
- edge data typeC
- context type
- All Superinterfaces:
AppBase<OID_T,VID_T,VDATA_T,EDATA_T,C>
- All Known Implementing Classes:
BFS
,GraphXParallelAdaptor
,PageRank
,SSSP
,StringApp
,Traverse
,WCC
public interface ParallelAppBase<OID_T,VID_T,VDATA_T,EDATA_T,C extends ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T>> extends AppBase<OID_T,VID_T,VDATA_T,EDATA_T,C>
The base interface for all parallel PIE apps which work along withImmutableEdgecutFragment
andParallelMessageManager
To define your sequential graph algorithms, you should implement this interface and provide the corresponding implementation for
PEval(IFragment, ParallelContextBase, ParallelMessageManager)
andIncEval(IFragment, ParallelContextBase, ParallelMessageManager)
User-defined app shall work along with user-defined context, which should be an implementation of
ParallelContextBase
.For example, you can implement your app like this.
{ class MyContext implements ParallelContextBase<Long, Long, Long, Double>{ public void Init(ImmutableEdgecutFragment<Long, Long, Long, Double> frag, ParallelMessageManager messageManager, StdVector<FFIByteString> args) { } public void Output(ImmutableEdgecutFragment<Long, Long, Long, Double> frag) { } } class MyApp implements ParallelAppBase<Long,Long,Long,Double, MyContext>{ public void PEval(ImmutableEdgecutFragment<Long, Long, Long, Double> graph, ParallelContextBase<Long,Long,Long,Double> context, ParallelMessageManager messageManager) { } public void IncEval(ImmutableEdgecutFragment<Long, Long, Long, Double> graph, ParallelContextBase<Long,Long,Long,Double> context, ParallelMessageManager messageManager) { } } }
For more examples, please refer to module com.alibaba.graphscope.graphscope-demo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
IncEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, ParallelMessageManager messageManager)
Incremental Evaluation to implement.void
PEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, ParallelMessageManager messageManager)
Partial Evaluation to implement.
-
-
-
Method Detail
-
PEval
void PEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, ParallelMessageManager messageManager)
Partial Evaluation to implement.- Parameters:
graph
- fragment. The graph fragment providing accesses to graph data.context
- context. User defined context which manages data during the whole computations.messageManager
- The message manger which manages messages between fragments.- See Also:
IFragment
,ParallelContextBase
,ParallelMessageManager
-
IncEval
void IncEval(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> graph, ParallelContextBase<OID_T,VID_T,VDATA_T,EDATA_T> context, ParallelMessageManager messageManager)
Incremental Evaluation to implement.- Parameters:
graph
- fragment. The graph fragment providing accesses to graph data.context
- context. User defined context which manages data during the whole computations.messageManager
- The message manger which manages messages between fragments.- See Also:
IFragment
,ParallelContextBase
,ParallelMessageManager
-
-