Last Updated: Jun 21, 2016

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:

  1. <dependency>
  2. <groupId>com.aliyun.odps</groupId>
  3. <artifactId>MaxCompute-sdk-graph</artifactId>
  4. <version>0.20.7</version>
  5. </dependency>
Main SDK Description
GraphJob GraphJob is inherited from JobConf, used to define, submit and manage an MaxCompute Graph job.
Vertex 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 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 GraphLoader is used to load a graph. It provides GraphLoader through setGraphLoaderClass API of GraphJob.
VertexResolver 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 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 WorkerComputer is allowed to execute user defined logic while the worker starts and quits. WorkerComputer is provided through setWorkerComputerClass of GraphJob.
Aggregator SetAggregatorClass (Class …) of Aggregator, to define one or more Aggregators.
Combiner setCombinerClass of combiner, to set Combiner
Counters The counter can be gotten through WorkerContext and starts to count in job running logic. The framework will summarize the result automatically.
WorkerContext The context object, it encapsulates the functions provided by framework, such as modifying graph topology, sending messages, writing results, reading resources, etc.


  • To download Graph SDK, please click on Here.
Thank you! We've received your feedback.