The user who uses Maven can search “odps-sdk-graph” from Maven Warehouse to get different versions of Java SDK. The related configuration is shown as follows:
GraphJob is inherited from JobConf, used to define, submit and manage an MaxCompute Graph job.
Vertex refers to the vertex of a graph, including the following properties: id, value, halted and edges. It provides Vertex through setVertexClass API of GraphJob.
Edge refers to the edge of a graph, including the following properties: destVertexId, value. Graph data structure uses the adjacency table and the outgoing edges of a vertex are saved in edges of this vertex.
GraphLoader is used to load a graph. It provides GraphLoader through setGraphLoaderClass API of GraphJob.
VertexResolver is used to define the conflict processing logic while the graph topology changes. The conflict processing logic while the graph topology changes in graph loading and iteration computing courses is provided through setLoadingVertexResolverClass and setComputingVertexResolverClass of GraphJob.
Partitioner is used to devide the graph and make the computing run in sclices. Partitioner is provided through setPartitionerClass of GraphJob and the default is HashPartitioner. That is to get hash values of vertex ID and then obtain modulo of Worker number.
WorkerComputer is allowed to execute user defined logic while the worker starts and quits. WorkerComputer is provided through setWorkerComputerClass of GraphJob.
SetAggregatorClass (Class …) of Aggregator, to define one or more Aggregators.
setCombinerClass of combiner, to set Combiner
The counter can be gotten through WorkerContext and starts to count in job running logic. The framework will summarize the result automatically.
The context object, it encapsulates the functions provided by framework, such as modifying graph topology, sending messages, writing results, reading resources, etc.