You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by gu...@apache.org on 2022/10/24 11:55:32 UTC

[incubator-hugegraph-computer] branch rename-pkg created (now 349a6a80)

This is an automated email from the ASF dual-hosted git repository.

guoshoujing pushed a change to branch rename-pkg
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git


      at 349a6a80 rename package

This branch includes the following new commits:

     new 5936be72 rename package
     new c9b74556 rename package
     new 349a6a80 rename package

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-hugegraph-computer] 03/03: rename package

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

guoshoujing pushed a commit to branch rename-pkg
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git

commit 349a6a8096fd1db164ce0e6e817c9a98afe91cc7
Author: 枫川 <gu...@alibaba-inc.com>
AuthorDate: Mon Oct 24 19:16:52 2022 +0800

    rename package
---
 .../org/apache/hugegraph/computer/core/graph/value/ListValue.java     | 3 ++-
 .../apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java    | 2 +-
 computer-k8s-operator/src/main/resources/log4j2.xml                   | 2 +-
 computer-test/conf/log4j2-test.xml                                    | 2 +-
 .../org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java   | 4 ++--
 .../java/org/apache/hugegraph/computer/driver/DriverTestSuite.java    | 2 +-
 .../apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java | 4 ++--
 7 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java
index ed2f1d64..9fe716ad 100644
--- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java
+++ b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java
@@ -37,7 +37,8 @@ import org.apache.hugegraph.computer.core.io.RandomAccessInput;
 import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
 import com.baidu.hugegraph.util.E;
 
-public class ListValue<T extends Value.Tvalue<?>> implements Value.Tvalue<List<Object>> {
+public class ListValue<T extends Value.Tvalue<?>>
+                         implements Value.Tvalue<List<Object>> {
 
     private final GraphFactory graphFactory;
     private ValueType elemType;
diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java
index 8f766e9a..95b3ebd9 100644
--- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java
+++ b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java
@@ -83,7 +83,7 @@ public class OperatorEntrypoint {
     static {
         OptionSpace.register(
               "computer-k8s-operator",
-              "com.baidu.hugegraph.computer.k8s.operator.config.OperatorOptions"
+              "org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions"
         );
     }
 
diff --git a/computer-k8s-operator/src/main/resources/log4j2.xml b/computer-k8s-operator/src/main/resources/log4j2.xml
index e4d760c4..faa6fe4d 100644
--- a/computer-k8s-operator/src/main/resources/log4j2.xml
+++ b/computer-k8s-operator/src/main/resources/log4j2.xml
@@ -25,7 +25,7 @@
             <appender-ref ref="console"/>
             <appender-ref ref="file"/>
         </root>
-        <Logger name="com.baidu.hugegraph" level="${env:LOG_LEVEL:-INFO}" additivity="false">
+        <Logger name="org.apache.hugegraph" level="${env:LOG_LEVEL:-INFO}" additivity="false">
             <appender-ref ref="console"/>
             <appender-ref ref="file"/>
         </Logger>
diff --git a/computer-test/conf/log4j2-test.xml b/computer-test/conf/log4j2-test.xml
index d100684b..91ca6abc 100644
--- a/computer-test/conf/log4j2-test.xml
+++ b/computer-test/conf/log4j2-test.xml
@@ -18,7 +18,7 @@
             <appender-ref ref="console"/>
             <appender-ref ref="file"/>
         </root>
-        <logger name="com.baidu.hugegraph" level="INFO" additivity="false">
+        <logger name="org.apache.hugegraph" level="INFO" additivity="false">
             <appender-ref ref="console"/>
             <appender-ref ref="file"/>
         </logger>
diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java
index af4a1de8..fad521ec 100644
--- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java
+++ b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java
@@ -54,9 +54,9 @@ public class AlgorithmTestSuite {
     public static void setup() throws ClassNotFoundException {
         // Don't forget to register options
         OptionSpace.register("computer",
-                             "com.baidu.hugegraph.computer.core.config." +
+                             "org.apache.hugegraph.computer.core.config." +
                              "ComputerOptions");
         OptionSpace.register("computer-rpc",
-                             "com.baidu.hugegraph.config.RpcOptions");
+                             "org.apache.hugegraph.config.RpcOptions");
     }
 }
diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java
index 4c798f7a..fd020770 100644
--- a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java
+++ b/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java
@@ -35,7 +35,7 @@ public class DriverTestSuite {
     @BeforeClass
     public static void setup() {
         OptionSpace.register("computer-driver",
-                             "com.baidu.hugegraph.computer.driver.config" +
+                             "org.apache.hugegraph.computer.driver.config" +
                              ".ComputerOptions");
     }
 }
diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java
index dcaa9135..bc9b2984 100644
--- a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java
+++ b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java
@@ -43,10 +43,10 @@ public class IntegrateTestSuite {
 
         // Don't forget to register options
         OptionSpace.register("computer",
-                             "com.baidu.hugegraph.computer.core.config." +
+                             "org.apache.hugegraph.computer.core.config." +
                              "ComputerOptions");
         OptionSpace.register("computer-rpc",
-                             "com.baidu.hugegraph.config.RpcOptions");
+                             "org.apache.hugegraph.config.RpcOptions");
 
         Whitebox.setInternalState(ComputerOptions.BSP_ETCD_ENDPOINTS,
                                   "defaultValue", "http://localhost:2579");


[incubator-hugegraph-computer] 02/03: rename package

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

guoshoujing pushed a commit to branch rename-pkg
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git

commit c9b74556f255c79256d51cf92bb83e0d7f48221d
Author: 枫川 <gu...@alibaba-inc.com>
AuthorDate: Mon Oct 24 19:11:10 2022 +0800

    rename package
---
 computer-k8s-operator/README.md                                |  4 ++--
 computer-k8s-operator/crd-generate/Makefile                    |  4 ++--
 computer-k8s-operator/crd-generate/api/v1/groupversion_info.go | 10 +++++-----
 .../crd-generate/config/crd/kustomization.yaml                 |  4 ++--
 computer-k8s-operator/crd-generate/config/rbac/role.yaml       |  6 +++---
 computer-k8s-operator/crd-generate/go.mod                      |  2 +-
 computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml  |  4 ++--
 .../manifest/hugegraph-computer-crd.v1beta1.yaml               |  4 ++--
 .../manifest/hugegraph-computer-operator.yaml                  |  6 +++---
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/computer-k8s-operator/README.md b/computer-k8s-operator/README.md
index 90751e48..8cc22aaa 100644
--- a/computer-k8s-operator/README.md
+++ b/computer-k8s-operator/README.md
@@ -16,7 +16,7 @@ kubectl apply -f https://raw.githubusercontent.com/hugegraph/hugegraph-computer/
 kubectl get crd
 
 NAME                                        CREATED AT
-hugegraphcomputerjobs.hugegraph.baidu.com   2021-09-16T08:01:08Z
+hugegraphcomputerjobs.hugegraph.apache.org   2021-09-16T08:01:08Z
 ```
 
 ## Install hugegraph-computer-operator&etcd-server
@@ -39,7 +39,7 @@ hugegraph-computer-operator-etcd-28lm67jxk5                       1/1     Runnin
 
 ```yaml
 cat <<EOF | kubectl apply --filename -
-apiVersion: hugegraph.baidu.com/v1
+apiVersion: hugegraph.apache.org/v1
 kind: HugeGraphComputerJob
 metadata:
   namespace: hugegraph-computer-system
diff --git a/computer-k8s-operator/crd-generate/Makefile b/computer-k8s-operator/crd-generate/Makefile
index 6f59715a..ed81fbc4 100644
--- a/computer-k8s-operator/crd-generate/Makefile
+++ b/computer-k8s-operator/crd-generate/Makefile
@@ -39,8 +39,8 @@ gen-all: gen-code manifests gen-jsonschema ## Generate code containing DeepCopy,
 manifests: controller-gen kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
 	$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
 	#$(KUSTOMIZE) build config/crd > ../manifest/hugegraph-computer-crd.yaml
-	cp config/crd/bases/hugegraph.baidu.com_hugegraphcomputerjobs.yaml ../manifest/hugegraph-computer-crd.v1.yaml
-	cp config/crd/bases/hugegraph.baidu.com_hugegraphcomputerjobs.v1beta1.yaml ../manifest/hugegraph-computer-crd.v1beta1.yaml
+	cp config/crd/bases/hugegraph.apache.org_hugegraphcomputerjobs.yaml ../manifest/hugegraph-computer-crd.v1.yaml
+	cp config/crd/bases/hugegraph.apache.org_hugegraphcomputerjobs.v1beta1.yaml ../manifest/hugegraph-computer-crd.v1beta1.yaml
 	$(KUSTOMIZE) build config/default > ../manifest/hugegraph-computer-operator.yaml
 	rm -rf config/crd/bases
 
diff --git a/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go b/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go
index 0914e8d3..00466a34 100644
--- a/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go
+++ b/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go
@@ -19,7 +19,7 @@ under the License.
 
 // Package v1 contains API Schema definitions for the computer v1 API group
 //+kubebuilder:object:generate=true
-//+groupName=hugegraph.baidu.com
+//+groupName=hugegraph.apache.org
 package v1
 
 import (
@@ -29,9 +29,9 @@ import (
 
 // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get
 // +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;create;update
-// +kubebuilder:rbac:groups=hugegraph.baidu.com,resources=hugegraphcomputerjobs,verbs=get;list;watch;create;update;patch;delete
-// +kubebuilder:rbac:groups=hugegraph.baidu.com,resources=hugegraphcomputerjobs/status,verbs=get;update;patch
-// +kubebuilder:rbac:groups=hugegraph.baidu.com,resources=hugegraphcomputerjobs/finalizers,verbs=update
+// +kubebuilder:rbac:groups=hugegraph.apache.org,resources=hugegraphcomputerjobs,verbs=get;list;watch;create;update;patch;delete
+// +kubebuilder:rbac:groups=hugegraph.apache.org,resources=hugegraphcomputerjobs/status,verbs=get;update;patch
+// +kubebuilder:rbac:groups=hugegraph.apache.org,resources=hugegraphcomputerjobs/finalizers,verbs=update
 // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
 // +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get
 // +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete
@@ -52,7 +52,7 @@ import (
 var (
     // GroupVersion is group version used to register these objects
     GroupVersion = schema.GroupVersion{
-        Group: "hugegraph.baidu.com", Version: "v1",
+        Group: "hugegraph.apache.org", Version: "v1",
     }
 
     // SchemeBuilder is used to add go types to the GroupVersionKind scheme
diff --git a/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml b/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml
index 8927fa42..c5c8d3d8 100644
--- a/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml
+++ b/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml
@@ -2,8 +2,8 @@
 # since it depends on service name and namespace that are out of this kustomize package.
 # It should be run by config/default
 resources:
-- bases/hugegraph.baidu.com_hugegraphcomputerjobs.yaml
-- bases/hugegraph.baidu.com_hugegraphcomputerjobs.v1beta1.yaml
+- bases/hugegraph.apache.org_hugegraphcomputerjobs.yaml
+- bases/hugegraph.apache.org_hugegraphcomputerjobs.v1beta1.yaml
 #+kubebuilder:scaffold:crdkustomizeresource
 
 patchesStrategicMerge:
diff --git a/computer-k8s-operator/crd-generate/config/rbac/role.yaml b/computer-k8s-operator/crd-generate/config/rbac/role.yaml
index 9e0a78ca..f2c39b55 100644
--- a/computer-k8s-operator/crd-generate/config/rbac/role.yaml
+++ b/computer-k8s-operator/crd-generate/config/rbac/role.yaml
@@ -163,7 +163,7 @@ rules:
   verbs:
   - get
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs
   verbs:
@@ -175,13 +175,13 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs/finalizers
   verbs:
   - update
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs/status
   verbs:
diff --git a/computer-k8s-operator/crd-generate/go.mod b/computer-k8s-operator/crd-generate/go.mod
index e11d00ac..011bc6fc 100644
--- a/computer-k8s-operator/crd-generate/go.mod
+++ b/computer-k8s-operator/crd-generate/go.mod
@@ -1,4 +1,4 @@
-module hugegraph.baidu.com/operator
+module hugegraph.apache.org/operator
 
 go 1.16
 
diff --git a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml b/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml
index c40236e4..33a072d8 100644
--- a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml
+++ b/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml
@@ -6,9 +6,9 @@ metadata:
   annotations:
     controller-gen.kubebuilder.io/version: v0.5.0
   creationTimestamp: null
-  name: hugegraphcomputerjobs.hugegraph.baidu.com
+  name: hugegraphcomputerjobs.hugegraph.apache.org
 spec:
-  group: hugegraph.baidu.com
+  group: hugegraph.apache.org
   names:
     kind: HugeGraphComputerJob
     listKind: HugeGraphComputerJobList
diff --git a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml b/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml
index 42f18007..8999550c 100644
--- a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml
+++ b/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml
@@ -6,7 +6,7 @@ metadata:
   annotations:
     controller-gen.kubebuilder.io/version: v0.5.0
   creationTimestamp: null
-  name: hugegraphcomputerjobs.hugegraph.baidu.com
+  name: hugegraphcomputerjobs.hugegraph.apache.org
 spec:
   additionalPrinterColumns:
   - JSONPath: .spec.jobId
@@ -24,7 +24,7 @@ spec:
   - JSONPath: .status.jobState.lastSuperstepStat
     name: SuperstepStat
     type: string
-  group: hugegraph.baidu.com
+  group: hugegraph.apache.org
   names:
     kind: HugeGraphComputerJob
     listKind: HugeGraphComputerJobList
diff --git a/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml b/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml
index a41ca218..e4b98607 100644
--- a/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml
+++ b/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml
@@ -222,7 +222,7 @@ rules:
   verbs:
   - get
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs
   verbs:
@@ -234,13 +234,13 @@ rules:
   - update
   - watch
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs/finalizers
   verbs:
   - update
 - apiGroups:
-  - hugegraph.baidu.com
+  - hugegraph.apache.org
   resources:
   - hugegraphcomputerjobs/status
   verbs:


[incubator-hugegraph-computer] 01/03: rename package

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

guoshoujing pushed a commit to branch rename-pkg
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git

commit 5936be7270a2412b07f7240f6f911b62f9ea998c
Author: 枫川 <gu...@alibaba-inc.com>
AuthorDate: Mon Oct 24 17:48:21 2022 +0800

    rename package
---
 .../betweenness/BetweennessCentrality.java         | 193 -----
 .../betweenness/BetweennessCentralityParams.java   |  50 --
 .../centrality/betweenness/BetweennessMessage.java |  90 --
 .../centrality/betweenness/BetweennessValue.java   |  73 --
 .../centrality/closeness/ClosenessCentrality.java  | 169 ----
 .../closeness/ClosenessCentralityParams.java       |  49 --
 .../centrality/closeness/ClosenessMessage.java     |  89 --
 .../centrality/closeness/ClosenessValue.java       |  44 -
 .../centrality/degree/DegreeCentrality.java        | 131 ---
 .../centrality/degree/DegreeCentralityParams.java  |  48 --
 .../algorithm/centrality/pagerank/PageRank.java    | 155 ----
 .../centrality/pagerank/PageRank4Master.java       | 104 ---
 .../centrality/pagerank/PageRankParams.java        |  47 --
 .../computer/algorithm/community/kcore/Kcore.java  | 123 ---
 .../algorithm/community/kcore/KcoreParams.java     |  45 -
 .../algorithm/community/kcore/KcoreValue.java      | 103 ---
 .../computer/algorithm/community/lpa/Lpa.java      | 102 ---
 .../algorithm/community/lpa/LpaParams.java         |  42 -
 .../community/trianglecount/TriangleCount.java     | 120 ---
 .../trianglecount/TriangleCountParams.java         |  45 -
 .../trianglecount/TriangleCountValue.java          |  86 --
 .../computer/algorithm/community/wcc/Wcc.java      |  73 --
 .../algorithm/community/wcc/WccParams.java         |  45 -
 .../algorithm/path/rings/RingsDetection.java       | 116 ---
 .../algorithm/path/rings/RingsDetectionOutput.java |  50 --
 .../algorithm/path/rings/RingsDetectionParams.java |  42 -
 .../path/rings/filter/FilterDescribe.java          |  85 --
 .../path/rings/filter/RingsDetectionMessage.java   |  78 --
 .../rings/filter/RingsDetectionWithFilter.java     | 123 ---
 .../filter/RingsDetectionWithFilterParams.java     |  45 -
 .../algorithm/path/rings/filter/SpreadFilter.java  | 158 ----
 .../betweenness/BetweennessCentrality.java         | 193 +++++
 .../betweenness/BetweennessCentralityParams.java   |  50 ++
 .../centrality/betweenness/BetweennessMessage.java |  90 ++
 .../centrality/betweenness/BetweennessValue.java   |  73 ++
 .../centrality/closeness/ClosenessCentrality.java  | 169 ++++
 .../closeness/ClosenessCentralityParams.java       |  49 ++
 .../centrality/closeness/ClosenessMessage.java     |  89 ++
 .../centrality/closeness/ClosenessValue.java       |  44 +
 .../centrality/degree/DegreeCentrality.java        | 131 +++
 .../centrality/degree/DegreeCentralityParams.java  |  48 ++
 .../algorithm/centrality/pagerank/PageRank.java    | 155 ++++
 .../centrality/pagerank/PageRank4Master.java       | 104 +++
 .../centrality/pagerank/PageRankParams.java        |  47 ++
 .../computer/algorithm/community/kcore/Kcore.java  | 123 +++
 .../algorithm/community/kcore/KcoreParams.java     |  45 +
 .../algorithm/community/kcore/KcoreValue.java      | 103 +++
 .../computer/algorithm/community/lpa/Lpa.java      | 102 +++
 .../algorithm/community/lpa/LpaParams.java         |  42 +
 .../community/trianglecount/TriangleCount.java     | 120 +++
 .../trianglecount/TriangleCountParams.java         |  45 +
 .../trianglecount/TriangleCountValue.java          |  86 ++
 .../computer/algorithm/community/wcc/Wcc.java      |  73 ++
 .../algorithm/community/wcc/WccParams.java         |  45 +
 .../algorithm/path/rings/RingsDetection.java       | 116 +++
 .../algorithm/path/rings/RingsDetectionOutput.java |  50 ++
 .../algorithm/path/rings/RingsDetectionParams.java |  42 +
 .../path/rings/filter/FilterDescribe.java          |  85 ++
 .../path/rings/filter/RingsDetectionMessage.java   |  78 ++
 .../rings/filter/RingsDetectionWithFilter.java     | 123 +++
 .../filter/RingsDetectionWithFilterParams.java     |  45 +
 .../algorithm/path/rings/filter/SpreadFilter.java  | 158 ++++
 .../computer/algorithm/AlgorithmParams.java        |  52 --
 .../computer/core/aggregator/Aggregator.java       |  93 ---
 .../core/aggregator/Aggregator4Master.java         |  80 --
 .../core/aggregator/Aggregator4Worker.java         |  67 --
 .../computer/core/allocator/Allocator.java         |  34 -
 .../computer/core/allocator/Recyclable.java        |  23 -
 .../computer/core/allocator/RecyclerReference.java |  45 -
 .../hugegraph/computer/core/combiner/Combiner.java |  55 --
 .../core/combiner/DoubleValueSumCombiner.java      |  35 -
 .../core/combiner/FloatValueSumCombiner.java       |  35 -
 .../core/combiner/IntValueSumCombiner.java         |  35 -
 .../core/combiner/LongValueSumCombiner.java        |  35 -
 .../core/combiner/MergeNewPropertiesCombiner.java  |  55 --
 .../core/combiner/MergeOldPropertiesCombiner.java  |  55 --
 .../computer/core/combiner/OverwriteCombiner.java  |  35 -
 .../core/combiner/OverwritePropertiesCombiner.java |  41 -
 .../computer/core/combiner/PropertiesCombiner.java |  29 -
 .../computer/core/combiner/ValueMaxCombiner.java   |  39 -
 .../computer/core/combiner/ValueMinCombiner.java   |  39 -
 .../computer/core/common/ComputerContext.java      |  65 --
 .../hugegraph/computer/core/common/Constants.java  |  77 --
 .../hugegraph/computer/core/common/SerialEnum.java |  54 --
 .../core/common/exception/ComputerException.java   |  56 --
 .../hugegraph/computer/core/config/Config.java     |  52 --
 .../baidu/hugegraph/computer/core/config/Null.java |  32 -
 .../computer/core/graph/GraphFactory.java          |  78 --
 .../hugegraph/computer/core/graph/edge/Edge.java   |  46 --
 .../hugegraph/computer/core/graph/edge/Edges.java  |  27 -
 .../baidu/hugegraph/computer/core/graph/id/Id.java |  31 -
 .../hugegraph/computer/core/graph/id/IdType.java   |  44 -
 .../computer/core/graph/properties/Properties.java |  43 -
 .../computer/core/graph/value/BooleanValue.java    | 111 ---
 .../computer/core/graph/value/DoubleValue.java     | 134 ---
 .../computer/core/graph/value/FloatValue.java      | 134 ---
 .../computer/core/graph/value/IdList.java          |  57 --
 .../computer/core/graph/value/IdListList.java      |  47 --
 .../computer/core/graph/value/IntValue.java        | 134 ---
 .../computer/core/graph/value/ListValue.java       | 242 ------
 .../computer/core/graph/value/LongValue.java       | 134 ---
 .../computer/core/graph/value/NullValue.java       | 103 ---
 .../computer/core/graph/value/StringValue.java     | 104 ---
 .../hugegraph/computer/core/graph/value/Value.java | 108 ---
 .../computer/core/graph/value/ValueType.java       |  72 --
 .../computer/core/graph/vertex/Vertex.java         |  62 --
 .../hugegraph/computer/core/input/InputFilter.java |  34 -
 .../hugegraph/computer/core/io/BytesInput.java     |  23 -
 .../hugegraph/computer/core/io/BytesOutput.java    |  35 -
 .../computer/core/io/GraphComputeInput.java        |  39 -
 .../computer/core/io/GraphComputeOutput.java       |  39 -
 .../hugegraph/computer/core/io/GraphInput.java     |  23 -
 .../hugegraph/computer/core/io/GraphOutput.java    |  24 -
 .../computer/core/io/GraphWritebackOutput.java     |  38 -
 .../computer/core/io/RandomAccessInput.java        |  80 --
 .../computer/core/io/RandomAccessOutput.java       |  69 --
 .../baidu/hugegraph/computer/core/io/Readable.java |  27 -
 .../baidu/hugegraph/computer/core/io/Writable.java |  27 -
 .../core/master/DefaultMasterComputation.java      |  45 -
 .../computer/core/master/MasterComputation.java    |  55 --
 .../core/master/MasterComputationContext.java      |  62 --
 .../computer/core/master/MasterContext.java        |  28 -
 .../computer/core/output/ComputerOutput.java       |  59 --
 .../hugegraph/computer/core/util/BytesUtil.java    |  78 --
 .../hugegraph/computer/core/util/CoderUtil.java    | 159 ----
 .../computer/core/worker/Computation.java          | 103 ---
 .../computer/core/worker/ComputationContext.java   | 136 ----
 .../computer/core/worker/FilterComputation.java    | 113 ---
 .../computer/core/worker/ReduceComputation.java    |  99 ---
 .../computer/core/worker/WorkerContext.java        |  38 -
 .../computer/algorithm/AlgorithmParams.java        |  52 ++
 .../computer/core/aggregator/Aggregator.java       |  93 +++
 .../core/aggregator/Aggregator4Master.java         |  80 ++
 .../core/aggregator/Aggregator4Worker.java         |  67 ++
 .../computer/core/allocator/Allocator.java         |  34 +
 .../computer/core/allocator/Recyclable.java        |  23 +
 .../computer/core/allocator/RecyclerReference.java |  45 +
 .../hugegraph/computer/core/combiner/Combiner.java |  55 ++
 .../core/combiner/DoubleValueSumCombiner.java      |  35 +
 .../core/combiner/FloatValueSumCombiner.java       |  35 +
 .../core/combiner/IntValueSumCombiner.java         |  35 +
 .../core/combiner/LongValueSumCombiner.java        |  35 +
 .../core/combiner/MergeNewPropertiesCombiner.java  |  55 ++
 .../core/combiner/MergeOldPropertiesCombiner.java  |  55 ++
 .../computer/core/combiner/OverwriteCombiner.java  |  35 +
 .../core/combiner/OverwritePropertiesCombiner.java |  41 +
 .../computer/core/combiner/PropertiesCombiner.java |  29 +
 .../computer/core/combiner/ValueMaxCombiner.java   |  39 +
 .../computer/core/combiner/ValueMinCombiner.java   |  39 +
 .../computer/core/common/ComputerContext.java      |  65 ++
 .../hugegraph/computer/core/common/Constants.java  |  77 ++
 .../hugegraph/computer/core/common/SerialEnum.java |  54 ++
 .../core/common/exception/ComputerException.java   |  56 ++
 .../hugegraph/computer/core/config/Config.java     |  52 ++
 .../hugegraph/computer/core/config/Null.java       |  32 +
 .../computer/core/graph/GraphFactory.java          |  78 ++
 .../hugegraph/computer/core/graph/edge/Edge.java   |  46 ++
 .../hugegraph/computer/core/graph/edge/Edges.java  |  27 +
 .../hugegraph/computer/core/graph/id/Id.java       |  31 +
 .../hugegraph/computer/core/graph/id/IdType.java   |  44 +
 .../computer/core/graph/properties/Properties.java |  43 +
 .../computer/core/graph/value/BooleanValue.java    | 110 +++
 .../computer/core/graph/value/DoubleValue.java     | 133 +++
 .../computer/core/graph/value/FloatValue.java      | 133 +++
 .../computer/core/graph/value/IdList.java          |  57 ++
 .../computer/core/graph/value/IdListList.java      |  47 ++
 .../computer/core/graph/value/IntValue.java        | 133 +++
 .../computer/core/graph/value/ListValue.java       | 241 ++++++
 .../computer/core/graph/value/LongValue.java       | 133 +++
 .../computer/core/graph/value/NullValue.java       | 102 +++
 .../computer/core/graph/value/StringValue.java     | 104 +++
 .../hugegraph/computer/core/graph/value/Value.java | 108 +++
 .../computer/core/graph/value/ValueType.java       |  72 ++
 .../computer/core/graph/vertex/Vertex.java         |  62 ++
 .../hugegraph/computer/core/input/InputFilter.java |  34 +
 .../hugegraph/computer/core/io/BytesInput.java     |  23 +
 .../hugegraph/computer/core/io/BytesOutput.java    |  35 +
 .../computer/core/io/GraphComputeInput.java        |  39 +
 .../computer/core/io/GraphComputeOutput.java       |  39 +
 .../hugegraph/computer/core/io/GraphInput.java     |  23 +
 .../hugegraph/computer/core/io/GraphOutput.java    |  24 +
 .../computer/core/io/GraphWritebackOutput.java     |  38 +
 .../computer/core/io/RandomAccessInput.java        |  80 ++
 .../computer/core/io/RandomAccessOutput.java       |  69 ++
 .../hugegraph/computer/core/io/Readable.java       |  27 +
 .../hugegraph/computer/core/io/Writable.java       |  27 +
 .../core/master/DefaultMasterComputation.java      |  45 +
 .../computer/core/master/MasterComputation.java    |  55 ++
 .../core/master/MasterComputationContext.java      |  62 ++
 .../computer/core/master/MasterContext.java        |  28 +
 .../computer/core/output/ComputerOutput.java       |  59 ++
 .../hugegraph/computer/core/util/BytesUtil.java    |  78 ++
 .../hugegraph/computer/core/util/CoderUtil.java    | 159 ++++
 .../computer/core/worker/Computation.java          | 103 +++
 .../computer/core/worker/ComputationContext.java   | 136 ++++
 .../computer/core/worker/FilterComputation.java    | 113 +++
 .../computer/core/worker/ReduceComputation.java    |  99 +++
 .../computer/core/worker/WorkerContext.java        |  38 +
 .../computer/core/aggregator/Aggregators.java      |  80 --
 .../core/aggregator/DefaultAggregator.java         | 171 ----
 .../core/aggregator/MasterAggrManager.java         | 157 ----
 .../core/aggregator/RegisterAggregators.java       |  75 --
 .../core/aggregator/WorkerAggrManager.java         | 157 ----
 .../computer/core/allocator/DefaultAllocator.java  |  83 --
 .../computer/core/allocator/RecycleHandler.java    |  37 -
 .../hugegraph/computer/core/bsp/Bsp4Master.java    | 223 -----
 .../hugegraph/computer/core/bsp/Bsp4Worker.java    | 259 ------
 .../baidu/hugegraph/computer/core/bsp/BspBase.java | 136 ----
 .../hugegraph/computer/core/bsp/BspClient.java     |  78 --
 .../hugegraph/computer/core/bsp/BspEvent.java      |  56 --
 .../hugegraph/computer/core/bsp/EtcdBspClient.java |  83 --
 .../hugegraph/computer/core/bsp/EtcdClient.java    | 484 -----------
 .../core/combiner/AbstractPointerCombiner.java     |  73 --
 .../computer/core/combiner/EdgeValueCombiner.java  |  34 -
 .../core/combiner/MessageValueCombiner.java        |  36 -
 .../computer/core/combiner/PointerCombiner.java    |   8 -
 .../core/combiner/VertexValueCombiner.java         |  67 --
 .../computer/core/common/ContainerInfo.java        | 137 ----
 .../core/common/exception/IllegalArgException.java |  45 -
 .../core/common/exception/ReadException.java       |  41 -
 .../core/common/exception/TransportException.java  |  71 --
 .../core/common/exception/WriteException.java      |  41 -
 .../computer/core/compute/ComputeManager.java      | 207 -----
 .../computer/core/compute/FileGraphPartition.java  | 446 ----------
 .../computer/core/compute/input/EdgesInput.java    | 291 -------
 .../computer/core/compute/input/MessageInput.java  | 127 ---
 .../core/compute/input/ReusablePointer.java        | 106 ---
 .../computer/core/compute/input/VertexInput.java   |  89 --
 .../computer/core/config/ComputerOptions.java      | 904 ---------------------
 .../computer/core/config/DefaultConfig.java        | 206 -----
 .../computer/core/config/EdgeFrequency.java        |  44 -
 .../hugegraph/computer/core/config/HotConfig.java  |  51 --
 .../computer/core/graph/BuiltinGraphFactory.java   | 201 -----
 .../computer/core/graph/SuperstepStat.java         | 172 ----
 .../computer/core/graph/edge/DefaultEdge.java      | 120 ---
 .../computer/core/graph/edge/DefaultEdges.java     |  72 --
 .../hugegraph/computer/core/graph/id/BytesId.java  | 214 -----
 .../computer/core/graph/id/IdFactory.java          |  49 --
 .../core/graph/partition/HashPartitioner.java      |  53 --
 .../core/graph/partition/PartitionStat.java        | 153 ----
 .../computer/core/graph/partition/Partitioner.java |  41 -
 .../core/graph/properties/DefaultProperties.java   | 131 ---
 .../hugegraph/computer/core/graph/value/IdSet.java | 108 ---
 .../computer/core/graph/value/MapValue.java        | 168 ----
 .../computer/core/graph/vertex/DefaultVertex.java  | 168 ----
 .../hugegraph/computer/core/input/EdgeFetcher.java |  31 -
 .../computer/core/input/ElementFetcher.java        |  31 -
 .../computer/core/input/GraphFetcher.java          |  33 -
 .../computer/core/input/HugeConverter.java         | 102 ---
 .../hugegraph/computer/core/input/IdUtil.java      |  67 --
 .../computer/core/input/InputSourceFactory.java    |  57 --
 .../hugegraph/computer/core/input/InputSplit.java  |  69 --
 .../computer/core/input/InputSplitFetcher.java     |  42 -
 .../computer/core/input/MasterInputHandler.java    |  67 --
 .../computer/core/input/MasterInputManager.java    |  65 --
 .../computer/core/input/VertexFetcher.java         |  31 -
 .../computer/core/input/WorkerInputManager.java    |  97 ---
 .../core/input/filter/DefaultInputFilter.java      |  39 -
 .../filter/ExtractAllPropertyInputFilter.java      |  37 -
 .../computer/core/input/hg/HugeEdgeFetcher.java    |  48 --
 .../computer/core/input/hg/HugeElementFetcher.java |  90 --
 .../computer/core/input/hg/HugeGraphFetcher.java   |  72 --
 .../core/input/hg/HugeInputSplitFetcher.java       |  82 --
 .../computer/core/input/hg/HugeVertexFetcher.java  |  49 --
 .../core/input/loader/FileEdgeFetcher.java         |  73 --
 .../core/input/loader/FileElementFetcher.java      | 142 ----
 .../computer/core/input/loader/FileInputSplit.java |  86 --
 .../core/input/loader/FileVertxFetcher.java        |  58 --
 .../input/loader/LoaderFileInputSplitFetcher.java  | 210 -----
 .../core/input/loader/LoaderGraphFetcher.java      |  66 --
 .../core/io/AbstractBufferedFileInput.java         | 163 ----
 .../core/io/AbstractBufferedFileOutput.java        | 105 ---
 .../computer/core/io/BufferedFileInput.java        | 111 ---
 .../computer/core/io/BufferedFileOutput.java       | 101 ---
 .../computer/core/io/BufferedStreamInput.java      | 182 -----
 .../computer/core/io/BufferedStreamOutput.java     | 193 -----
 .../computer/core/io/CsvStructGraphOutput.java     | 140 ----
 .../hugegraph/computer/core/io/IOFactory.java      |  90 --
 .../computer/core/io/JsonStructGraphOutput.java    | 170 ----
 .../computer/core/io/OptimizedBytesInput.java      | 237 ------
 .../computer/core/io/OptimizedBytesOutput.java     | 215 -----
 .../hugegraph/computer/core/io/OutputFormat.java   |  29 -
 .../computer/core/io/StreamGraphInput.java         | 165 ----
 .../computer/core/io/StreamGraphOutput.java        | 144 ----
 .../computer/core/io/StructGraphOutput.java        | 118 ---
 .../computer/core/io/StructRandomAccessOutput.java | 169 ----
 .../computer/core/io/UnsafeBytesInput.java         | 286 -------
 .../computer/core/io/UnsafeBytesOutput.java        | 269 ------
 .../hugegraph/computer/core/manager/Manager.java   |  78 --
 .../hugegraph/computer/core/manager/Managers.java  |  88 --
 .../computer/core/master/MasterService.java        | 491 -----------
 .../computer/core/network/ClientFactory.java       |  46 --
 .../computer/core/network/ClientHandler.java       |  29 -
 .../computer/core/network/ConnectionId.java        | 112 ---
 .../computer/core/network/DataClientManager.java   | 130 ---
 .../computer/core/network/DataServerManager.java   |  68 --
 .../hugegraph/computer/core/network/IOMode.java    |  30 -
 .../computer/core/network/MessageHandler.java      |  49 --
 .../computer/core/network/TransportClient.java     |  97 ---
 .../computer/core/network/TransportConf.java       | 217 -----
 .../computer/core/network/TransportHandler.java    |  44 -
 .../computer/core/network/TransportProvider.java   |  27 -
 .../computer/core/network/TransportServer.java     |  61 --
 .../computer/core/network/TransportState.java      |  30 -
 .../computer/core/network/TransportUtil.java       | 167 ----
 .../core/network/buffer/FileRegionBuffer.java      | 133 ---
 .../computer/core/network/buffer/NettyBuffer.java  |  77 --
 .../core/network/buffer/NetworkBuffer.java         |  75 --
 .../computer/core/network/buffer/NioBuffer.java    |  76 --
 .../core/network/connection/ConnectionManager.java |  89 --
 .../connection/TransportConnectionManager.java     | 153 ----
 .../core/network/message/AbstractMessage.java      | 198 -----
 .../computer/core/network/message/AckMessage.java  |  46 --
 .../computer/core/network/message/DataMessage.java |  71 --
 .../computer/core/network/message/FailMessage.java |  88 --
 .../core/network/message/FinishMessage.java        |  44 -
 .../computer/core/network/message/Message.java     |  67 --
 .../computer/core/network/message/MessageType.java |  74 --
 .../computer/core/network/message/PingMessage.java |  40 -
 .../computer/core/network/message/PongMessage.java |  40 -
 .../core/network/message/RequestMessage.java       |  27 -
 .../core/network/message/ResponseMessage.java      |  27 -
 .../core/network/message/StartMessage.java         |  46 --
 .../core/network/netty/AbstractNettyHandler.java   | 129 ---
 .../core/network/netty/BufAllocatorFactory.java    |  31 -
 .../netty/ChannelFutureListenerOnWrite.java        |  81 --
 .../core/network/netty/HeartbeatHandler.java       |  92 ---
 .../core/network/netty/NettyClientFactory.java     | 231 ------
 .../core/network/netty/NettyClientHandler.java     | 118 ---
 .../core/network/netty/NettyEventLoopUtil.java     | 111 ---
 .../computer/core/network/netty/NettyProtocol.java | 205 -----
 .../core/network/netty/NettyServerHandler.java     | 235 ------
 .../core/network/netty/NettyTransportClient.java   | 198 -----
 .../core/network/netty/NettyTransportProvider.java |  44 -
 .../core/network/netty/NettyTransportServer.java   | 229 ------
 .../core/network/netty/ServerIdleHandler.java      |  61 --
 .../core/network/netty/codec/FrameDecoder.java     |  76 --
 .../core/network/netty/codec/MessageDecoder.java   |  99 ---
 .../core/network/netty/codec/MessageEncoder.java   |  92 ---
 .../network/netty/codec/PreciseFrameDecoder.java   |  98 ---
 .../core/network/session/ClientSession.java        | 282 -------
 .../core/network/session/ServerSession.java        | 143 ----
 .../core/network/session/TransportSession.java     |  79 --
 .../core/output/AbstractComputerOutput.java        |  55 --
 .../computer/core/output/LimitedLogOutput.java     |  59 --
 .../hugegraph/computer/core/output/LogOutput.java  |  45 -
 .../computer/core/output/hdfs/HdfsOutput.java      | 178 ----
 .../core/output/hdfs/HdfsOutputMerger.java         |  91 ---
 .../core/output/hg/HugeGraphDoubleOutput.java      |  32 -
 .../core/output/hg/HugeGraphFloatOutput.java       |  32 -
 .../computer/core/output/hg/HugeGraphIdOutput.java |  39 -
 .../core/output/hg/HugeGraphIntOutput.java         |  32 -
 .../core/output/hg/HugeGraphLongOutput.java        |  32 -
 .../computer/core/output/hg/HugeGraphOutput.java   | 107 ---
 .../core/output/hg/HugeGraphStringOutput.java      |  32 -
 .../output/hg/exceptions/WriteBackException.java   |  41 -
 .../core/output/hg/metrics/LoadMetrics.java        |  49 --
 .../core/output/hg/metrics/LoadReport.java         |  42 -
 .../core/output/hg/metrics/LoadSummary.java        |  73 --
 .../computer/core/output/hg/metrics/Printer.java   |  59 --
 .../core/output/hg/task/BatchInsertTask.java       | 104 ---
 .../computer/core/output/hg/task/InsertTask.java   |  80 --
 .../core/output/hg/task/SingleInsertTask.java      |  62 --
 .../computer/core/output/hg/task/TaskManager.java  | 190 -----
 .../computer/core/receiver/MessageRecvBuffers.java | 122 ---
 .../computer/core/receiver/MessageRecvManager.java | 254 ------
 .../core/receiver/MessageRecvPartition.java        | 227 ------
 .../core/receiver/MessageRecvPartitions.java       | 116 ---
 .../computer/core/receiver/MessageStat.java        |  51 --
 .../receiver/edge/EdgeMessageRecvPartition.java    |  63 --
 .../receiver/edge/EdgeMessageRecvPartitions.java   |  41 -
 .../message/ComputeMessageRecvPartition.java       |  68 --
 .../message/ComputeMessageRecvPartitions.java      |  41 -
 .../vertex/VertexMessageRecvPartition.java         |  57 --
 .../vertex/VertexMessageRecvPartitions.java        |  42 -
 .../computer/core/rpc/AggregateRpcService.java     |  39 -
 .../computer/core/rpc/InputSplitRpcService.java    |  29 -
 .../computer/core/rpc/MasterRpcManager.java        |  75 --
 .../computer/core/rpc/WorkerRpcManager.java        |  72 --
 .../computer/core/sender/MessageQueue.java         |  60 --
 .../computer/core/sender/MessageSendBuffers.java   |  77 --
 .../computer/core/sender/MessageSendManager.java   | 297 -------
 .../computer/core/sender/MessageSendPartition.java |  78 --
 .../computer/core/sender/MessageSender.java        |  42 -
 .../hugegraph/computer/core/sender/MultiQueue.java |  87 --
 .../computer/core/sender/QueuedMessage.java        |  49 --
 .../computer/core/sender/QueuedMessageSender.java  | 306 -------
 .../computer/core/sender/WriteBuffer.java          |  97 ---
 .../computer/core/sender/WriteBuffers.java         | 135 ---
 .../computer/core/sort/BufferFileSorter.java       | 107 ---
 .../computer/core/sort/DefaultSorter.java          |  85 --
 .../computer/core/sort/HgkvFileSorter.java         | 110 ---
 .../baidu/hugegraph/computer/core/sort/Sorter.java | 113 ---
 .../core/sort/flusher/CombinableSorterFlusher.java |  69 --
 .../sort/flusher/CombineKvInnerSortFlusher.java    |  44 -
 .../sort/flusher/CombineKvOuterSortFlusher.java    |  49 --
 .../sort/flusher/CombineSubKvInnerSortFlusher.java | 164 ----
 .../sort/flusher/CombineSubKvOuterSortFlusher.java | 136 ----
 .../core/sort/flusher/InnerSortFlusher.java        |  52 --
 .../core/sort/flusher/KvInnerSortFlusher.java      |  52 --
 .../core/sort/flusher/KvOuterSortFlusher.java      |  42 -
 .../core/sort/flusher/OuterSortFlusher.java        |  56 --
 .../core/sort/flusher/PeekableIterator.java        |  65 --
 .../core/sort/flusher/PeekableIteratorAdaptor.java |  77 --
 .../computer/core/sort/merge/FileMerger.java       |  42 -
 .../computer/core/sort/merge/FileMergerImpl.java   | 122 ---
 .../computer/core/sort/sorter/InputSorter.java     |  32 -
 .../computer/core/sort/sorter/InputsSorter.java    |  33 -
 .../core/sort/sorter/InputsSorterImpl.java         |  70 --
 .../computer/core/sort/sorter/JavaInputSorter.java |  50 --
 .../computer/core/sort/sorter/SubKvSorter.java     | 132 ---
 .../core/sort/sorting/AbstractInputsSorting.java   |  49 --
 .../core/sort/sorting/HeapInputsSorting.java       | 132 ---
 .../computer/core/sort/sorting/InputsSorting.java  |   6 -
 .../core/sort/sorting/LoserTreeInputsSorting.java  | 148 ----
 .../core/sort/sorting/RecvSortManager.java         |  59 --
 .../core/sort/sorting/SendSortManager.java         |  43 -
 .../computer/core/sort/sorting/SortManager.java    | 232 ------
 .../computer/core/sort/sorting/SortingFactory.java |  59 --
 .../computer/core/sort/sorting/SortingMode.java    |  29 -
 .../computer/core/store/EntryIterator.java         |  33 -
 .../computer/core/store/FileGenerator.java         |  68 --
 .../hugegraph/computer/core/store/FileManager.java | 115 ---
 .../computer/core/store/KvEntryFileReader.java     |   6 -
 .../computer/core/store/KvEntryFileWriter.java     |  39 -
 .../computer/core/store/StoreManager.java          |  23 -
 .../core/store/SuperstepFileGenerator.java         |  52 --
 .../computer/core/store/buffer/KvEntriesInput.java |  70 --
 .../store/buffer/KvEntriesWithFirstSubKvInput.java |  53 --
 .../core/store/buffer/SubKvEntriesInput.java       |  75 --
 .../computer/core/store/entry/AbstractKvEntry.java |  46 --
 .../computer/core/store/entry/CachedPointer.java   |  81 --
 .../computer/core/store/entry/DefaultKvEntry.java  |  39 -
 .../computer/core/store/entry/EntriesUtil.java     | 170 ----
 .../computer/core/store/entry/EntryInput.java      |  46 --
 .../computer/core/store/entry/EntryInputImpl.java  |  56 --
 .../computer/core/store/entry/EntryOutput.java     |  46 --
 .../computer/core/store/entry/EntryOutputImpl.java |  67 --
 .../computer/core/store/entry/InlinePointer.java   |  80 --
 .../computer/core/store/entry/KvEntry.java         |  29 -
 .../computer/core/store/entry/KvEntryReader.java   |  31 -
 .../core/store/entry/KvEntryReaderImpl.java        |  61 --
 .../core/store/entry/KvEntryWithFirstSubKv.java    |  42 -
 .../computer/core/store/entry/KvEntryWriter.java   |  31 -
 .../core/store/entry/KvEntryWriterImpl.java        | 123 ---
 .../computer/core/store/entry/Pointer.java         |  34 -
 .../hugegraph/computer/core/store/entry/Range.java |  27 -
 .../file/bufferfile/BufferFileEntryBuilder.java    |  58 --
 .../file/bufferfile/BufferFileEntryReader.java     |  89 --
 .../file/bufferfile/BufferFileSubEntryReader.java  |  83 --
 .../core/store/file/hgkvfile/AbstractHgkvFile.java |  82 --
 .../computer/core/store/file/hgkvfile/HgkvDir.java |  35 -
 .../core/store/file/hgkvfile/HgkvDirImpl.java      | 165 ----
 .../core/store/file/hgkvfile/HgkvFile.java         |  68 --
 .../core/store/file/hgkvfile/HgkvFileImpl.java     | 146 ----
 .../store/file/hgkvfile/builder/BlockBuilder.java  |  37 -
 .../hgkvfile/builder/DataBlockBuilderImpl.java     |  65 --
 .../file/hgkvfile/builder/HgkvDirBuilderImpl.java  | 110 ---
 .../file/hgkvfile/builder/HgkvFileBuilder.java     |  58 --
 .../file/hgkvfile/builder/HgkvFileBuilderImpl.java | 174 ----
 .../file/hgkvfile/builder/IndexBlockBuilder.java   |  31 -
 .../hgkvfile/builder/IndexBlockBuilderImpl.java    |  52 --
 .../hgkvfile/reader/HgkvDir4SubKvReaderImpl.java   |  71 --
 .../file/hgkvfile/reader/HgkvDirReaderImpl.java    | 138 ----
 .../file/hgkvfile/reader/HgkvFileReaderImpl.java   | 110 ---
 .../store/file/select/DefaultSelectedFiles.java    |  45 -
 .../store/file/select/DisperseEvenlySelector.java  | 200 -----
 .../core/store/file/select/InputFilesSelector.java |  23 -
 .../core/store/file/select/SelectedFiles.java      |  29 -
 .../core/store/file/seqfile/BitsFileReader.java    |  35 -
 .../store/file/seqfile/BitsFileReaderImpl.java     |  65 --
 .../core/store/file/seqfile/BitsFileWriter.java    |  44 -
 .../store/file/seqfile/BitsFileWriterImpl.java     |  75 --
 .../core/store/file/seqfile/ValueFile.java         |  80 --
 .../core/store/file/seqfile/ValueFileInput.java    | 205 -----
 .../core/store/file/seqfile/ValueFileOutput.java   | 194 -----
 .../computer/core/util/ComputerContextUtil.java    |  92 ---
 .../hugegraph/computer/core/util/Consumers.java    | 217 -----
 .../hugegraph/computer/core/util/FileUtil.java     |  38 -
 .../hugegraph/computer/core/util/JsonUtil.java     |  64 --
 .../computer/core/util/SerializeUtil.java          |  86 --
 .../hugegraph/computer/core/util/ShutdownHook.java |  44 -
 .../computer/core/util/StringEncoding.java         | 171 ----
 .../computer/core/worker/WorkerService.java        | 455 -----------
 .../hugegraph/computer/core/worker/WorkerStat.java | 111 ---
 .../computer/core/worker/load/LoadService.java     | 233 ------
 .../computer/core/aggregator/Aggregators.java      |  80 ++
 .../core/aggregator/DefaultAggregator.java         | 171 ++++
 .../core/aggregator/MasterAggrManager.java         | 157 ++++
 .../core/aggregator/RegisterAggregators.java       |  75 ++
 .../core/aggregator/WorkerAggrManager.java         | 157 ++++
 .../computer/core/allocator/DefaultAllocator.java  |  83 ++
 .../computer/core/allocator/RecycleHandler.java    |  37 +
 .../hugegraph/computer/core/bsp/Bsp4Master.java    | 223 +++++
 .../hugegraph/computer/core/bsp/Bsp4Worker.java    | 259 ++++++
 .../hugegraph/computer/core/bsp/BspBase.java       | 136 ++++
 .../hugegraph/computer/core/bsp/BspClient.java     |  78 ++
 .../hugegraph/computer/core/bsp/BspEvent.java      |  56 ++
 .../hugegraph/computer/core/bsp/EtcdBspClient.java |  83 ++
 .../hugegraph/computer/core/bsp/EtcdClient.java    | 484 +++++++++++
 .../core/combiner/AbstractPointerCombiner.java     |  73 ++
 .../computer/core/combiner/EdgeValueCombiner.java  |  34 +
 .../core/combiner/MessageValueCombiner.java        |  36 +
 .../computer/core/combiner/PointerCombiner.java    |   8 +
 .../core/combiner/VertexValueCombiner.java         |  67 ++
 .../computer/core/common/ContainerInfo.java        | 137 ++++
 .../core/common/exception/IllegalArgException.java |  45 +
 .../core/common/exception/ReadException.java       |  41 +
 .../core/common/exception/TransportException.java  |  71 ++
 .../core/common/exception/WriteException.java      |  41 +
 .../computer/core/compute/ComputeManager.java      | 207 +++++
 .../computer/core/compute/FileGraphPartition.java  | 446 ++++++++++
 .../computer/core/compute/input/EdgesInput.java    | 291 +++++++
 .../computer/core/compute/input/MessageInput.java  | 127 +++
 .../core/compute/input/ReusablePointer.java        | 106 +++
 .../computer/core/compute/input/VertexInput.java   |  89 ++
 .../computer/core/config/ComputerOptions.java      | 904 +++++++++++++++++++++
 .../computer/core/config/DefaultConfig.java        | 206 +++++
 .../computer/core/config/EdgeFrequency.java        |  44 +
 .../hugegraph/computer/core/config/HotConfig.java  |  51 ++
 .../computer/core/graph/BuiltinGraphFactory.java   | 201 +++++
 .../computer/core/graph/SuperstepStat.java         | 172 ++++
 .../computer/core/graph/edge/DefaultEdge.java      | 120 +++
 .../computer/core/graph/edge/DefaultEdges.java     |  72 ++
 .../hugegraph/computer/core/graph/id/BytesId.java  | 214 +++++
 .../computer/core/graph/id/IdFactory.java          |  49 ++
 .../core/graph/partition/HashPartitioner.java      |  53 ++
 .../core/graph/partition/PartitionStat.java        | 153 ++++
 .../computer/core/graph/partition/Partitioner.java |  41 +
 .../core/graph/properties/DefaultProperties.java   | 131 +++
 .../hugegraph/computer/core/graph/value/IdSet.java | 108 +++
 .../computer/core/graph/value/MapValue.java        | 168 ++++
 .../computer/core/graph/vertex/DefaultVertex.java  | 168 ++++
 .../hugegraph/computer/core/input/EdgeFetcher.java |  31 +
 .../computer/core/input/ElementFetcher.java        |  31 +
 .../computer/core/input/GraphFetcher.java          |  33 +
 .../computer/core/input/HugeConverter.java         | 102 +++
 .../hugegraph/computer/core/input/IdUtil.java      |  67 ++
 .../computer/core/input/InputSourceFactory.java    |  57 ++
 .../hugegraph/computer/core/input/InputSplit.java  |  69 ++
 .../computer/core/input/InputSplitFetcher.java     |  42 +
 .../computer/core/input/MasterInputHandler.java    |  67 ++
 .../computer/core/input/MasterInputManager.java    |  65 ++
 .../computer/core/input/VertexFetcher.java         |  31 +
 .../computer/core/input/WorkerInputManager.java    |  97 +++
 .../core/input/filter/DefaultInputFilter.java      |  39 +
 .../filter/ExtractAllPropertyInputFilter.java      |  37 +
 .../computer/core/input/hg/HugeEdgeFetcher.java    |  48 ++
 .../computer/core/input/hg/HugeElementFetcher.java |  90 ++
 .../computer/core/input/hg/HugeGraphFetcher.java   |  72 ++
 .../core/input/hg/HugeInputSplitFetcher.java       |  82 ++
 .../computer/core/input/hg/HugeVertexFetcher.java  |  49 ++
 .../core/input/loader/FileEdgeFetcher.java         |  73 ++
 .../core/input/loader/FileElementFetcher.java      | 142 ++++
 .../computer/core/input/loader/FileInputSplit.java |  86 ++
 .../core/input/loader/FileVertxFetcher.java        |  58 ++
 .../input/loader/LoaderFileInputSplitFetcher.java  | 210 +++++
 .../core/input/loader/LoaderGraphFetcher.java      |  66 ++
 .../core/io/AbstractBufferedFileInput.java         | 163 ++++
 .../core/io/AbstractBufferedFileOutput.java        | 105 +++
 .../computer/core/io/BufferedFileInput.java        | 111 +++
 .../computer/core/io/BufferedFileOutput.java       | 101 +++
 .../computer/core/io/BufferedStreamInput.java      | 182 +++++
 .../computer/core/io/BufferedStreamOutput.java     | 193 +++++
 .../computer/core/io/CsvStructGraphOutput.java     | 140 ++++
 .../hugegraph/computer/core/io/IOFactory.java      |  90 ++
 .../computer/core/io/JsonStructGraphOutput.java    | 170 ++++
 .../computer/core/io/OptimizedBytesInput.java      | 237 ++++++
 .../computer/core/io/OptimizedBytesOutput.java     | 215 +++++
 .../hugegraph/computer/core/io/OutputFormat.java   |  29 +
 .../computer/core/io/StreamGraphInput.java         | 165 ++++
 .../computer/core/io/StreamGraphOutput.java        | 144 ++++
 .../computer/core/io/StructGraphOutput.java        | 118 +++
 .../computer/core/io/StructRandomAccessOutput.java | 169 ++++
 .../computer/core/io/UnsafeBytesInput.java         | 286 +++++++
 .../computer/core/io/UnsafeBytesOutput.java        | 269 ++++++
 .../hugegraph/computer/core/manager/Manager.java   |  78 ++
 .../hugegraph/computer/core/manager/Managers.java  |  88 ++
 .../computer/core/master/MasterService.java        | 491 +++++++++++
 .../computer/core/network/ClientFactory.java       |  46 ++
 .../computer/core/network/ClientHandler.java       |  29 +
 .../computer/core/network/ConnectionId.java        | 112 +++
 .../computer/core/network/DataClientManager.java   | 130 +++
 .../computer/core/network/DataServerManager.java   |  68 ++
 .../hugegraph/computer/core/network/IOMode.java    |  30 +
 .../computer/core/network/MessageHandler.java      |  49 ++
 .../computer/core/network/TransportClient.java     |  97 +++
 .../computer/core/network/TransportConf.java       | 217 +++++
 .../computer/core/network/TransportHandler.java    |  44 +
 .../computer/core/network/TransportProvider.java   |  27 +
 .../computer/core/network/TransportServer.java     |  61 ++
 .../computer/core/network/TransportState.java      |  30 +
 .../computer/core/network/TransportUtil.java       | 168 ++++
 .../core/network/buffer/FileRegionBuffer.java      | 133 +++
 .../computer/core/network/buffer/NettyBuffer.java  |  77 ++
 .../core/network/buffer/NetworkBuffer.java         |  75 ++
 .../computer/core/network/buffer/NioBuffer.java    |  76 ++
 .../core/network/connection/ConnectionManager.java |  89 ++
 .../connection/TransportConnectionManager.java     | 153 ++++
 .../core/network/message/AbstractMessage.java      | 198 +++++
 .../computer/core/network/message/AckMessage.java  |  46 ++
 .../computer/core/network/message/DataMessage.java |  71 ++
 .../computer/core/network/message/FailMessage.java |  88 ++
 .../core/network/message/FinishMessage.java        |  44 +
 .../computer/core/network/message/Message.java     |  67 ++
 .../computer/core/network/message/MessageType.java |  74 ++
 .../computer/core/network/message/PingMessage.java |  40 +
 .../computer/core/network/message/PongMessage.java |  40 +
 .../core/network/message/RequestMessage.java       |  27 +
 .../core/network/message/ResponseMessage.java      |  27 +
 .../core/network/message/StartMessage.java         |  46 ++
 .../core/network/netty/AbstractNettyHandler.java   | 129 +++
 .../core/network/netty/BufAllocatorFactory.java    |  31 +
 .../netty/ChannelFutureListenerOnWrite.java        |  81 ++
 .../core/network/netty/HeartbeatHandler.java       |  92 +++
 .../core/network/netty/NettyClientFactory.java     | 231 ++++++
 .../core/network/netty/NettyClientHandler.java     | 118 +++
 .../core/network/netty/NettyEventLoopUtil.java     | 111 +++
 .../computer/core/network/netty/NettyProtocol.java | 205 +++++
 .../core/network/netty/NettyServerHandler.java     | 236 ++++++
 .../core/network/netty/NettyTransportClient.java   | 198 +++++
 .../core/network/netty/NettyTransportProvider.java |  44 +
 .../core/network/netty/NettyTransportServer.java   | 229 ++++++
 .../core/network/netty/ServerIdleHandler.java      |  61 ++
 .../core/network/netty/codec/FrameDecoder.java     |  76 ++
 .../core/network/netty/codec/MessageDecoder.java   |  99 +++
 .../core/network/netty/codec/MessageEncoder.java   |  92 +++
 .../network/netty/codec/PreciseFrameDecoder.java   |  99 +++
 .../core/network/session/ClientSession.java        | 282 +++++++
 .../core/network/session/ServerSession.java        | 143 ++++
 .../core/network/session/TransportSession.java     |  79 ++
 .../core/output/AbstractComputerOutput.java        |  55 ++
 .../computer/core/output/LimitedLogOutput.java     |  59 ++
 .../hugegraph/computer/core/output/LogOutput.java  |  45 +
 .../computer/core/output/hdfs/HdfsOutput.java      | 178 ++++
 .../core/output/hdfs/HdfsOutputMerger.java         |  91 +++
 .../core/output/hg/HugeGraphDoubleOutput.java      |  32 +
 .../core/output/hg/HugeGraphFloatOutput.java       |  32 +
 .../computer/core/output/hg/HugeGraphIdOutput.java |  39 +
 .../core/output/hg/HugeGraphIntOutput.java         |  32 +
 .../core/output/hg/HugeGraphLongOutput.java        |  32 +
 .../computer/core/output/hg/HugeGraphOutput.java   | 107 +++
 .../core/output/hg/HugeGraphStringOutput.java      |  32 +
 .../output/hg/exceptions/WriteBackException.java   |  41 +
 .../core/output/hg/metrics/LoadMetrics.java        |  49 ++
 .../core/output/hg/metrics/LoadReport.java         |  42 +
 .../core/output/hg/metrics/LoadSummary.java        |  73 ++
 .../computer/core/output/hg/metrics/Printer.java   |  59 ++
 .../core/output/hg/task/BatchInsertTask.java       | 104 +++
 .../computer/core/output/hg/task/InsertTask.java   |  80 ++
 .../core/output/hg/task/SingleInsertTask.java      |  62 ++
 .../computer/core/output/hg/task/TaskManager.java  | 190 +++++
 .../computer/core/receiver/MessageRecvBuffers.java | 122 +++
 .../computer/core/receiver/MessageRecvManager.java | 254 ++++++
 .../core/receiver/MessageRecvPartition.java        | 228 ++++++
 .../core/receiver/MessageRecvPartitions.java       | 116 +++
 .../computer/core/receiver/MessageStat.java        |  51 ++
 .../receiver/edge/EdgeMessageRecvPartition.java    |  63 ++
 .../receiver/edge/EdgeMessageRecvPartitions.java   |  41 +
 .../message/ComputeMessageRecvPartition.java       |  68 ++
 .../message/ComputeMessageRecvPartitions.java      |  41 +
 .../vertex/VertexMessageRecvPartition.java         |  57 ++
 .../vertex/VertexMessageRecvPartitions.java        |  42 +
 .../computer/core/rpc/AggregateRpcService.java     |  39 +
 .../computer/core/rpc/InputSplitRpcService.java    |  29 +
 .../computer/core/rpc/MasterRpcManager.java        |  75 ++
 .../computer/core/rpc/WorkerRpcManager.java        |  72 ++
 .../computer/core/sender/MessageQueue.java         |  60 ++
 .../computer/core/sender/MessageSendBuffers.java   |  77 ++
 .../computer/core/sender/MessageSendManager.java   | 297 +++++++
 .../computer/core/sender/MessageSendPartition.java |  78 ++
 .../computer/core/sender/MessageSender.java        |  42 +
 .../hugegraph/computer/core/sender/MultiQueue.java |  87 ++
 .../computer/core/sender/QueuedMessage.java        |  49 ++
 .../computer/core/sender/QueuedMessageSender.java  | 306 +++++++
 .../computer/core/sender/WriteBuffer.java          |  97 +++
 .../computer/core/sender/WriteBuffers.java         | 135 +++
 .../computer/core/sort/BufferFileSorter.java       | 107 +++
 .../computer/core/sort/DefaultSorter.java          |  85 ++
 .../computer/core/sort/HgkvFileSorter.java         | 110 +++
 .../hugegraph/computer/core/sort/Sorter.java       | 113 +++
 .../core/sort/flusher/CombinableSorterFlusher.java |  69 ++
 .../sort/flusher/CombineKvInnerSortFlusher.java    |  44 +
 .../sort/flusher/CombineKvOuterSortFlusher.java    |  49 ++
 .../sort/flusher/CombineSubKvInnerSortFlusher.java | 164 ++++
 .../sort/flusher/CombineSubKvOuterSortFlusher.java | 136 ++++
 .../core/sort/flusher/InnerSortFlusher.java        |  52 ++
 .../core/sort/flusher/KvInnerSortFlusher.java      |  52 ++
 .../core/sort/flusher/KvOuterSortFlusher.java      |  42 +
 .../core/sort/flusher/OuterSortFlusher.java        |  56 ++
 .../core/sort/flusher/PeekableIterator.java        |  65 ++
 .../core/sort/flusher/PeekableIteratorAdaptor.java |  77 ++
 .../computer/core/sort/merge/FileMerger.java       |  42 +
 .../computer/core/sort/merge/FileMergerImpl.java   | 122 +++
 .../computer/core/sort/sorter/InputSorter.java     |  32 +
 .../computer/core/sort/sorter/InputsSorter.java    |  33 +
 .../core/sort/sorter/InputsSorterImpl.java         |  70 ++
 .../computer/core/sort/sorter/JavaInputSorter.java |  50 ++
 .../computer/core/sort/sorter/SubKvSorter.java     | 132 +++
 .../core/sort/sorting/AbstractInputsSorting.java   |  49 ++
 .../core/sort/sorting/HeapInputsSorting.java       | 132 +++
 .../computer/core/sort/sorting/InputsSorting.java  |   6 +
 .../core/sort/sorting/LoserTreeInputsSorting.java  | 148 ++++
 .../core/sort/sorting/RecvSortManager.java         |  59 ++
 .../core/sort/sorting/SendSortManager.java         |  43 +
 .../computer/core/sort/sorting/SortManager.java    | 232 ++++++
 .../computer/core/sort/sorting/SortingFactory.java |  59 ++
 .../computer/core/sort/sorting/SortingMode.java    |  29 +
 .../computer/core/store/EntryIterator.java         |  33 +
 .../computer/core/store/FileGenerator.java         |  68 ++
 .../hugegraph/computer/core/store/FileManager.java | 115 +++
 .../computer/core/store/KvEntryFileReader.java     |   6 +
 .../computer/core/store/KvEntryFileWriter.java     |  39 +
 .../computer/core/store/StoreManager.java          |  23 +
 .../core/store/SuperstepFileGenerator.java         |  52 ++
 .../computer/core/store/buffer/KvEntriesInput.java |  70 ++
 .../store/buffer/KvEntriesWithFirstSubKvInput.java |  53 ++
 .../core/store/buffer/SubKvEntriesInput.java       |  75 ++
 .../computer/core/store/entry/AbstractKvEntry.java |  46 ++
 .../computer/core/store/entry/CachedPointer.java   |  81 ++
 .../computer/core/store/entry/DefaultKvEntry.java  |  39 +
 .../computer/core/store/entry/EntriesUtil.java     | 170 ++++
 .../computer/core/store/entry/EntryInput.java      |  46 ++
 .../computer/core/store/entry/EntryInputImpl.java  |  56 ++
 .../computer/core/store/entry/EntryOutput.java     |  46 ++
 .../computer/core/store/entry/EntryOutputImpl.java |  67 ++
 .../computer/core/store/entry/InlinePointer.java   |  80 ++
 .../computer/core/store/entry/KvEntry.java         |  29 +
 .../computer/core/store/entry/KvEntryReader.java   |  31 +
 .../core/store/entry/KvEntryReaderImpl.java        |  61 ++
 .../core/store/entry/KvEntryWithFirstSubKv.java    |  42 +
 .../computer/core/store/entry/KvEntryWriter.java   |  31 +
 .../core/store/entry/KvEntryWriterImpl.java        | 123 +++
 .../computer/core/store/entry/Pointer.java         |  34 +
 .../hugegraph/computer/core/store/entry/Range.java |  27 +
 .../file/bufferfile/BufferFileEntryBuilder.java    |  58 ++
 .../file/bufferfile/BufferFileEntryReader.java     |  89 ++
 .../file/bufferfile/BufferFileSubEntryReader.java  |  83 ++
 .../core/store/file/hgkvfile/AbstractHgkvFile.java |  82 ++
 .../computer/core/store/file/hgkvfile/HgkvDir.java |  35 +
 .../core/store/file/hgkvfile/HgkvDirImpl.java      | 165 ++++
 .../core/store/file/hgkvfile/HgkvFile.java         |  68 ++
 .../core/store/file/hgkvfile/HgkvFileImpl.java     | 146 ++++
 .../store/file/hgkvfile/builder/BlockBuilder.java  |  37 +
 .../hgkvfile/builder/DataBlockBuilderImpl.java     |  65 ++
 .../file/hgkvfile/builder/HgkvDirBuilderImpl.java  | 110 +++
 .../file/hgkvfile/builder/HgkvFileBuilder.java     |  58 ++
 .../file/hgkvfile/builder/HgkvFileBuilderImpl.java | 174 ++++
 .../file/hgkvfile/builder/IndexBlockBuilder.java   |  31 +
 .../hgkvfile/builder/IndexBlockBuilderImpl.java    |  52 ++
 .../hgkvfile/reader/HgkvDir4SubKvReaderImpl.java   |  71 ++
 .../file/hgkvfile/reader/HgkvDirReaderImpl.java    | 138 ++++
 .../file/hgkvfile/reader/HgkvFileReaderImpl.java   | 110 +++
 .../store/file/select/DefaultSelectedFiles.java    |  45 +
 .../store/file/select/DisperseEvenlySelector.java  | 200 +++++
 .../core/store/file/select/InputFilesSelector.java |  23 +
 .../core/store/file/select/SelectedFiles.java      |  29 +
 .../core/store/file/seqfile/BitsFileReader.java    |  35 +
 .../store/file/seqfile/BitsFileReaderImpl.java     |  65 ++
 .../core/store/file/seqfile/BitsFileWriter.java    |  44 +
 .../store/file/seqfile/BitsFileWriterImpl.java     |  75 ++
 .../core/store/file/seqfile/ValueFile.java         |  80 ++
 .../core/store/file/seqfile/ValueFileInput.java    | 205 +++++
 .../core/store/file/seqfile/ValueFileOutput.java   | 194 +++++
 .../computer/core/util/ComputerContextUtil.java    |  92 +++
 .../hugegraph/computer/core/util/Consumers.java    | 217 +++++
 .../hugegraph/computer/core/util/FileUtil.java     |  38 +
 .../hugegraph/computer/core/util/JsonUtil.java     |  64 ++
 .../computer/core/util/SerializeUtil.java          |  86 ++
 .../hugegraph/computer/core/util/ShutdownHook.java |  44 +
 .../computer/core/util/StringEncoding.java         | 171 ++++
 .../computer/core/worker/WorkerService.java        | 455 +++++++++++
 .../hugegraph/computer/core/worker/WorkerStat.java | 111 +++
 .../computer/core/worker/load/LoadService.java     | 233 ++++++
 .../hugegraph/computer/dist/HugeGraphComputer.java | 144 ----
 .../hugegraph/computer/dist/HugeGraphComputer.java | 144 ++++
 .../hugegraph/computer/driver/ComputerDriver.java  | 106 ---
 .../computer/driver/ComputerDriverException.java   |  57 --
 .../hugegraph/computer/driver/DefaultJobState.java |  92 ---
 .../hugegraph/computer/driver/JobObserver.java     |  28 -
 .../baidu/hugegraph/computer/driver/JobState.java  |  45 -
 .../baidu/hugegraph/computer/driver/JobStatus.java |  41 -
 .../hugegraph/computer/driver/SuperstepStat.java   | 122 ---
 .../computer/driver/config/ComputerOptions.java    | 721 ----------------
 .../computer/driver/config/DriverConfigOption.java |  75 --
 .../hugegraph/computer/driver/util/JsonUtil.java   |  60 --
 .../hugegraph/computer/driver/ComputerDriver.java  | 106 +++
 .../computer/driver/ComputerDriverException.java   |  57 ++
 .../hugegraph/computer/driver/DefaultJobState.java |  92 +++
 .../hugegraph/computer/driver/JobObserver.java     |  28 +
 .../apache/hugegraph/computer/driver/JobState.java |  45 +
 .../hugegraph/computer/driver/JobStatus.java       |  41 +
 .../hugegraph/computer/driver/SuperstepStat.java   | 122 +++
 .../computer/driver/config/ComputerOptions.java    | 721 ++++++++++++++++
 .../computer/driver/config/DriverConfigOption.java |  75 ++
 .../hugegraph/computer/driver/util/JsonUtil.java   |  60 ++
 computer-k8s-operator/README.md                    |   2 +-
 computer-k8s-operator/crd-generate/cmd/generate.go |   6 +-
 computer-k8s-operator/pom.xml                      |   2 +-
 .../computer/k8s/operator/OperatorEntrypoint.java  | 251 ------
 .../k8s/operator/common/AbstractController.java    | 440 ----------
 .../computer/k8s/operator/common/MatchWithMsg.java |  41 -
 .../k8s/operator/common/OperatorRequest.java       | 114 ---
 .../k8s/operator/common/OperatorResult.java        |  60 --
 .../computer/k8s/operator/common/WorkQueue.java    | 120 ---
 .../k8s/operator/config/OperatorOptions.java       | 147 ----
 .../operator/controller/ComputerJobComponent.java  |  86 --
 .../operator/controller/ComputerJobController.java | 564 -------------
 .../operator/controller/ComputerJobDeployer.java   | 651 ---------------
 .../computer/k8s/operator/OperatorEntrypoint.java  | 251 ++++++
 .../k8s/operator/common/AbstractController.java    | 440 ++++++++++
 .../computer/k8s/operator/common/MatchWithMsg.java |  41 +
 .../k8s/operator/common/OperatorRequest.java       | 114 +++
 .../k8s/operator/common/OperatorResult.java        |  60 ++
 .../computer/k8s/operator/common/WorkQueue.java    | 120 +++
 .../k8s/operator/config/OperatorOptions.java       | 147 ++++
 .../operator/controller/ComputerJobComponent.java  |  86 ++
 .../operator/controller/ComputerJobController.java | 564 +++++++++++++
 .../operator/controller/ComputerJobDeployer.java   | 651 +++++++++++++++
 .../baidu/hugegraph/computer/k8s/Constants.java    |  67 --
 .../computer/k8s/config/KubeDriverOptions.java     | 160 ----
 .../computer/k8s/config/KubeSpecOptions.java       | 214 -----
 .../k8s/crd/model/HugeGraphComputerJob.java        |  62 --
 .../k8s/crd/model/HugeGraphComputerJobList.java    |  28 -
 .../computer/k8s/driver/KubernetesDriver.java      | 589 --------------
 .../hugegraph/computer/k8s/util/KubeUtil.java      | 281 -------
 .../apache/hugegraph/computer/k8s/Constants.java   |  67 ++
 .../computer/k8s/config/KubeDriverOptions.java     | 160 ++++
 .../computer/k8s/config/KubeSpecOptions.java       | 214 +++++
 .../k8s/crd/model/HugeGraphComputerJob.java        |  62 ++
 .../k8s/crd/model/HugeGraphComputerJobList.java    |  28 +
 .../computer/k8s/driver/KubernetesDriver.java      | 589 ++++++++++++++
 .../hugegraph/computer/k8s/util/KubeUtil.java      | 281 +++++++
 .../computer/algorithm/AlgorithmTestBase.java      | 156 ----
 .../computer/algorithm/AlgorithmTestSuite.java     |  62 --
 .../betweenness/BetweennessCentralityTest.java     | 147 ----
 .../closeness/ClosenessCentralityTest.java         | 167 ----
 .../centrality/degree/DegreeCentralityTest.java    | 103 ---
 .../centrality/pagerank/PageRankTest.java          |  32 -
 .../algorithm/community/kcore/KcoreTest.java       |  32 -
 .../computer/algorithm/community/lpa/LpaTest.java  |  32 -
 .../community/trianglecount/TriangleCountTest.java | 135 ---
 .../computer/algorithm/community/wcc/WccTest.java  |  38 -
 .../algorithm/path/rings/RingsDetectionTest.java   | 136 ----
 .../path/rings/RingsDetectionWithFilterTest.java   | 136 ----
 .../core/allocator/AllocatorTestSuite.java         |  31 -
 .../core/allocator/DefaultAllocatorTest.java       | 168 ----
 .../computer/core/allocator/RecyclersTest.java     | 180 ----
 .../hugegraph/computer/core/bsp/BspEventTest.java  |  45 -
 .../hugegraph/computer/core/bsp/BspTestSuite.java  |  31 -
 .../hugegraph/computer/core/bsp/EtcdBspTest.java   | 190 -----
 .../computer/core/bsp/EtcdClientTest.java          | 268 ------
 .../computer/core/combiner/CombinerTestSuite.java  |  39 -
 .../core/combiner/DoubleValueSumCombinerTest.java  |  66 --
 .../core/combiner/FloatValueSumCombinerTest.java   |  66 --
 .../core/combiner/IntValueSumCombinerTest.java     |  66 --
 .../core/combiner/LongValueSumCombinerTest.java    |  66 --
 .../combiner/MergeNewPropertiesCombinerTest.java   |  85 --
 .../combiner/MergeOldPropertiesCombinerTest.java   |  85 --
 .../core/combiner/OverwriteCombinerTest.java       |  67 --
 .../core/combiner/PointerCombinerTest.java         | 176 ----
 .../core/combiner/ValueMaxCombinerTest.java        |  66 --
 .../core/combiner/ValueMinCombinerTest.java        |  59 --
 .../computer/core/common/CommonTestSuite.java      |  31 -
 .../computer/core/common/ContainerInfoTest.java    |  73 --
 .../computer/core/common/ExceptionTest.java        |  77 --
 .../core/common/FakeMasterComputation.java         |  48 --
 .../computer/core/compute/ComputeManagerTest.java  | 235 ------
 .../computer/core/compute/ComputeTestSuite.java    |  37 -
 .../computer/core/compute/MockComputation.java     |  85 --
 .../computer/core/compute/MockMessageSender.java   |  41 -
 .../core/compute/input/EdgesInputTest.java         | 285 -------
 .../core/compute/input/MessageInputTest.java       | 177 ----
 .../core/compute/input/ResuablePointerTest.java    |  55 --
 .../computer/core/config/ConfigTestSuite.java      |  30 -
 .../computer/core/config/DefaultConfigTest.java    | 190 -----
 .../core/graph/BuiltinGraphFactoryTest.java        | 105 ---
 .../computer/core/graph/DefaultEdgeTest.java       |  91 ---
 .../computer/core/graph/DefaultPropertiesTest.java |  97 ---
 .../computer/core/graph/GraphTestSuite.java        |  71 --
 .../computer/core/graph/SuperstepStatTest.java     | 165 ----
 .../computer/core/graph/id/BytesIdTest.java        | 180 ----
 .../computer/core/graph/id/IdFactoryTest.java      |  57 --
 .../computer/core/graph/id/IdTypeTest.java         |  52 --
 .../core/graph/partition/HashPartitionerTest.java  | 211 -----
 .../core/graph/partition/PartitionStatTest.java    | 151 ----
 .../core/graph/value/BooleanValueTest.java         | 192 -----
 .../computer/core/graph/value/DoubleValueTest.java | 253 ------
 .../computer/core/graph/value/FloatValueTest.java  | 227 ------
 .../computer/core/graph/value/IdListListTest.java  | 103 ---
 .../computer/core/graph/value/IdValueListTest.java |  87 --
 .../computer/core/graph/value/IdValueTest.java     | 219 -----
 .../computer/core/graph/value/IntValueTest.java    | 259 ------
 .../computer/core/graph/value/ListValueTest.java   | 432 ----------
 .../computer/core/graph/value/LongValueTest.java   | 225 -----
 .../computer/core/graph/value/NullValueTest.java   | 152 ----
 .../computer/core/graph/value/StringValueTest.java | 161 ----
 .../computer/core/graph/value/ValueTypeTest.java   |  64 --
 .../computer/core/input/FileInputSplitTest.java    |  68 --
 .../computer/core/input/HugeConverterTest.java     | 131 ---
 .../computer/core/input/InputSplitDataTest.java    | 100 ---
 .../computer/core/input/InputSplitTest.java        |  54 --
 .../computer/core/input/InputTestSuite.java        |  33 -
 .../core/input/MockMasterInputManager.java         |  60 --
 .../computer/core/input/MockRpcClient.java         |  41 -
 .../core/input/MockWorkerInputManager.java         | 116 ---
 .../computer/core/io/BufferedFileTest.java         | 754 -----------------
 .../computer/core/io/BufferedStreamTest.java       | 410 ----------
 .../computer/core/io/CsvStructGraphOutputTest.java | 166 ----
 .../hugegraph/computer/core/io/IOTestSuite.java    |  38 -
 .../core/io/JsonStructGraphOutputTest.java         | 177 ----
 .../computer/core/io/MockRankComputation.java      |  52 --
 .../computer/core/io/OptimizedUnsafeBytesTest.java | 192 -----
 .../core/io/StreamGraphOutputInputTest.java        | 271 ------
 .../core/io/StructRandomAccessOutputTest.java      | 248 ------
 .../computer/core/io/UnsafeBytesTest.java          | 613 --------------
 .../computer/core/network/ConnectionIdTest.java    |  78 --
 .../core/network/DataServerManagerTest.java        |  84 --
 .../computer/core/network/MockClientHandler.java   |  53 --
 .../computer/core/network/MockMessageHandler.java  |  89 --
 .../computer/core/network/MockUnDecodeMessage.java |  49 --
 .../computer/core/network/NetworkTestSuite.java    |  49 --
 .../computer/core/network/TransportUtilTest.java   | 129 ---
 .../core/network/buffer/NetworkBufferTest.java     | 157 ----
 .../network/connection/ConnectionManagerTest.java  | 147 ----
 .../core/network/netty/AbstractNetworkTest.java    | 145 ----
 .../core/network/netty/HeartbeatHandlerTest.java   | 136 ----
 .../core/network/netty/NettyClientFactoryTest.java | 136 ----
 .../netty/NettyEncodeDecodeHandlerTest.java        | 171 ----
 .../network/netty/NettyTransportClientTest.java    | 380 ---------
 .../network/netty/NettyTransportServerTest.java    | 245 ------
 .../core/network/session/TransportSessionTest.java | 344 --------
 .../core/receiver/MessageRecvBuffersTest.java      | 187 -----
 .../core/receiver/MessageRecvManagerTest.java      | 165 ----
 .../computer/core/receiver/ReceiverTestSuite.java  |  38 -
 .../computer/core/receiver/ReceiverUtil.java       |  82 --
 .../edge/EdgeMessageRecvPartitionTest.java         | 280 -------
 .../message/ComputeMessageRecvPartitionTest.java   | 191 -----
 .../vertex/VertexMessageRecvPartitionTest.java     | 279 -------
 .../computer/core/sender/MessageQueueTest.java     |  66 --
 .../core/sender/MessageSendBuffersTest.java        |  66 --
 .../core/sender/MessageSendManagerTest.java        |  30 -
 .../computer/core/sender/MockTransportClient.java  |  94 ---
 .../computer/core/sender/MultiQueueTest.java       | 249 ------
 .../core/sender/QueuedMessageSenderTest.java       |  71 --
 .../computer/core/sender/QueuedMessageTest.java    |  39 -
 .../computer/core/sender/SenderTestSuite.java      |  37 -
 .../computer/core/sender/WriteBufferTest.java      | 194 -----
 .../computer/core/sender/WriteBuffersTest.java     | 262 ------
 .../computer/core/sort/SorterTestUtil.java         | 178 ----
 .../core/sort/combiner/MockIntSumCombiner.java     |  31 -
 .../core/sort/sorter/EmptyFlusherTest.java         |  50 --
 .../computer/core/sort/sorter/FlusherTest.java     | 157 ----
 .../core/sort/sorter/SortLargeDataTest.java        | 333 --------
 .../computer/core/sort/sorter/SorterTest.java      | 491 -----------
 .../computer/core/sort/sorter/SorterTestSuite.java |  33 -
 .../core/sort/sorting/InputsSortingTest.java       |  75 --
 .../core/sort/sorting/SortingTestSuite.java        |  31 -
 .../computer/core/sort/sorting/TestData.java       | 142 ----
 .../hugegraph/computer/core/store/BitFileTest.java |  95 ---
 .../computer/core/store/EntriesUtilTest.java       | 116 ---
 .../computer/core/store/EntryOutputTest.java       | 185 -----
 .../computer/core/store/FileManagerTest.java       | 110 ---
 .../hugegraph/computer/core/store/HgkvDirTest.java | 146 ----
 .../computer/core/store/HgkvFileTest.java          | 157 ----
 .../hugegraph/computer/core/store/PointerTest.java |  94 ---
 .../computer/core/store/StoreTestSuite.java        |  37 -
 .../computer/core/store/StoreTestUtil.java         | 187 -----
 .../computer/core/store/ValueFileTest.java         | 492 -----------
 .../core/util/ComputerContextUtilTest.java         |  74 --
 .../hugegraph/computer/core/util/JsonUtilTest.java |  54 --
 .../computer/core/util/SerializeUtilTest.java      |  56 --
 .../computer/core/util/UtilTestSuite.java          |  32 -
 .../computer/core/worker/MockComputation.java      | 407 ----------
 .../computer/core/worker/MockComputation2.java     |  57 --
 .../core/worker/MockComputationParams.java         |  47 --
 .../core/worker/MockMasterComputation.java         | 391 ---------
 .../core/worker/MockMasterComputation2.java        |  96 ---
 .../computer/core/worker/MockWorkerService.java    |  33 -
 .../computer/core/worker/WorkerServiceTest.java    | 275 -------
 .../computer/core/worker/WorkerStatTest.java       | 118 ---
 .../computer/core/worker/WorkerTestSuite.java      |  31 -
 .../computer/dist/ComputerDistTestSuite.java       |  11 -
 .../computer/dist/HugeGraphComputerTest.java       |  99 ---
 .../computer/driver/ComputerOptionsTest.java       |  89 --
 .../hugegraph/computer/driver/DriverTest.java      |  88 --
 .../hugegraph/computer/driver/DriverTestSuite.java |  41 -
 .../hugegraph/computer/k8s/AbstractK8sTest.java    | 216 -----
 .../baidu/hugegraph/computer/k8s/K8sTestSuite.java |  32 -
 .../computer/k8s/KubernetesDriverTest.java         | 321 --------
 .../baidu/hugegraph/computer/k8s/MiniKubeTest.java | 446 ----------
 .../baidu/hugegraph/computer/k8s/OperatorTest.java |  59 --
 .../suite/integrate/IntegrateTestSuite.java        |  54 --
 .../computer/suite/integrate/MockComputation.java  |  51 --
 .../suite/integrate/SenderIntegrateTest.java       | 409 ----------
 .../computer/suite/unit/UnitTestBase.java          | 232 ------
 .../computer/suite/unit/UnitTestSuite.java         | 137 ----
 .../computer/algorithm/AlgorithmTestBase.java      | 156 ++++
 .../computer/algorithm/AlgorithmTestSuite.java     |  62 ++
 .../betweenness/BetweennessCentralityTest.java     | 147 ++++
 .../closeness/ClosenessCentralityTest.java         | 167 ++++
 .../centrality/degree/DegreeCentralityTest.java    | 103 +++
 .../centrality/pagerank/PageRankTest.java          |  32 +
 .../algorithm/community/kcore/KcoreTest.java       |  32 +
 .../computer/algorithm/community/lpa/LpaTest.java  |  32 +
 .../community/trianglecount/TriangleCountTest.java | 135 +++
 .../computer/algorithm/community/wcc/WccTest.java  |  38 +
 .../algorithm/path/rings/RingsDetectionTest.java   | 136 ++++
 .../path/rings/RingsDetectionWithFilterTest.java   | 135 +++
 .../core/allocator/AllocatorTestSuite.java         |  31 +
 .../core/allocator/DefaultAllocatorTest.java       | 168 ++++
 .../computer/core/allocator/RecyclersTest.java     | 180 ++++
 .../hugegraph/computer/core/bsp/BspEventTest.java  |  45 +
 .../hugegraph/computer/core/bsp/BspTestSuite.java  |  31 +
 .../hugegraph/computer/core/bsp/EtcdBspTest.java   | 190 +++++
 .../computer/core/bsp/EtcdClientTest.java          | 268 ++++++
 .../computer/core/combiner/CombinerTestSuite.java  |  39 +
 .../core/combiner/DoubleValueSumCombinerTest.java  |  66 ++
 .../core/combiner/FloatValueSumCombinerTest.java   |  66 ++
 .../core/combiner/IntValueSumCombinerTest.java     |  66 ++
 .../core/combiner/LongValueSumCombinerTest.java    |  66 ++
 .../combiner/MergeNewPropertiesCombinerTest.java   |  85 ++
 .../combiner/MergeOldPropertiesCombinerTest.java   |  85 ++
 .../core/combiner/OverwriteCombinerTest.java       |  67 ++
 .../core/combiner/PointerCombinerTest.java         | 176 ++++
 .../core/combiner/ValueMaxCombinerTest.java        |  66 ++
 .../core/combiner/ValueMinCombinerTest.java        |  59 ++
 .../computer/core/common/CommonTestSuite.java      |  31 +
 .../computer/core/common/ContainerInfoTest.java    |  73 ++
 .../computer/core/common/ExceptionTest.java        |  77 ++
 .../core/common/FakeMasterComputation.java         |  48 ++
 .../computer/core/compute/ComputeManagerTest.java  | 235 ++++++
 .../computer/core/compute/ComputeTestSuite.java    |  37 +
 .../computer/core/compute/MockComputation.java     |  85 ++
 .../computer/core/compute/MockMessageSender.java   |  41 +
 .../core/compute/input/EdgesInputTest.java         | 285 +++++++
 .../core/compute/input/MessageInputTest.java       | 177 ++++
 .../core/compute/input/ResuablePointerTest.java    |  55 ++
 .../computer/core/config/ConfigTestSuite.java      |  30 +
 .../computer/core/config/DefaultConfigTest.java    | 190 +++++
 .../core/graph/BuiltinGraphFactoryTest.java        | 105 +++
 .../computer/core/graph/DefaultEdgeTest.java       |  91 +++
 .../computer/core/graph/DefaultPropertiesTest.java |  97 +++
 .../computer/core/graph/GraphTestSuite.java        |  71 ++
 .../computer/core/graph/SuperstepStatTest.java     | 165 ++++
 .../computer/core/graph/id/BytesIdTest.java        | 180 ++++
 .../computer/core/graph/id/IdFactoryTest.java      |  57 ++
 .../computer/core/graph/id/IdTypeTest.java         |  52 ++
 .../core/graph/partition/HashPartitionerTest.java  | 211 +++++
 .../core/graph/partition/PartitionStatTest.java    | 151 ++++
 .../core/graph/value/BooleanValueTest.java         | 192 +++++
 .../computer/core/graph/value/DoubleValueTest.java | 253 ++++++
 .../computer/core/graph/value/FloatValueTest.java  | 227 ++++++
 .../computer/core/graph/value/IdListListTest.java  | 103 +++
 .../computer/core/graph/value/IdValueListTest.java |  87 ++
 .../computer/core/graph/value/IdValueTest.java     | 219 +++++
 .../computer/core/graph/value/IntValueTest.java    | 259 ++++++
 .../computer/core/graph/value/ListValueTest.java   | 432 ++++++++++
 .../computer/core/graph/value/LongValueTest.java   | 225 +++++
 .../computer/core/graph/value/NullValueTest.java   | 152 ++++
 .../computer/core/graph/value/StringValueTest.java | 161 ++++
 .../computer/core/graph/value/ValueTypeTest.java   |  64 ++
 .../computer/core/input/FileInputSplitTest.java    |  68 ++
 .../computer/core/input/HugeConverterTest.java     | 131 +++
 .../computer/core/input/InputSplitDataTest.java    | 100 +++
 .../computer/core/input/InputSplitTest.java        |  54 ++
 .../computer/core/input/InputTestSuite.java        |  33 +
 .../core/input/MockMasterInputManager.java         |  60 ++
 .../computer/core/input/MockRpcClient.java         |  41 +
 .../core/input/MockWorkerInputManager.java         | 116 +++
 .../computer/core/io/BufferedFileTest.java         | 754 +++++++++++++++++
 .../computer/core/io/BufferedStreamTest.java       | 410 ++++++++++
 .../computer/core/io/CsvStructGraphOutputTest.java | 166 ++++
 .../hugegraph/computer/core/io/IOTestSuite.java    |  38 +
 .../core/io/JsonStructGraphOutputTest.java         | 177 ++++
 .../computer/core/io/MockRankComputation.java      |  52 ++
 .../computer/core/io/OptimizedUnsafeBytesTest.java | 192 +++++
 .../core/io/StreamGraphOutputInputTest.java        | 271 ++++++
 .../core/io/StructRandomAccessOutputTest.java      | 248 ++++++
 .../computer/core/io/UnsafeBytesTest.java          | 613 ++++++++++++++
 .../computer/core/network/ConnectionIdTest.java    |  78 ++
 .../core/network/DataServerManagerTest.java        |  84 ++
 .../computer/core/network/MockClientHandler.java   |  53 ++
 .../computer/core/network/MockMessageHandler.java  |  89 ++
 .../computer/core/network/MockUnDecodeMessage.java |  49 ++
 .../computer/core/network/NetworkTestSuite.java    |  49 ++
 .../computer/core/network/TransportUtilTest.java   | 129 +++
 .../core/network/buffer/NetworkBufferTest.java     | 157 ++++
 .../network/connection/ConnectionManagerTest.java  | 147 ++++
 .../core/network/netty/AbstractNetworkTest.java    | 145 ++++
 .../core/network/netty/HeartbeatHandlerTest.java   | 135 +++
 .../core/network/netty/NettyClientFactoryTest.java | 136 ++++
 .../netty/NettyEncodeDecodeHandlerTest.java        | 171 ++++
 .../network/netty/NettyTransportClientTest.java    | 380 +++++++++
 .../network/netty/NettyTransportServerTest.java    | 245 ++++++
 .../core/network/session/TransportSessionTest.java | 344 ++++++++
 .../core/receiver/MessageRecvBuffersTest.java      | 187 +++++
 .../core/receiver/MessageRecvManagerTest.java      | 165 ++++
 .../computer/core/receiver/ReceiverTestSuite.java  |  38 +
 .../computer/core/receiver/ReceiverUtil.java       |  82 ++
 .../edge/EdgeMessageRecvPartitionTest.java         | 280 +++++++
 .../message/ComputeMessageRecvPartitionTest.java   | 191 +++++
 .../vertex/VertexMessageRecvPartitionTest.java     | 279 +++++++
 .../computer/core/sender/MessageQueueTest.java     |  66 ++
 .../core/sender/MessageSendBuffersTest.java        |  66 ++
 .../core/sender/MessageSendManagerTest.java        |  30 +
 .../computer/core/sender/MockTransportClient.java  |  94 +++
 .../computer/core/sender/MultiQueueTest.java       | 249 ++++++
 .../core/sender/QueuedMessageSenderTest.java       |  71 ++
 .../computer/core/sender/QueuedMessageTest.java    |  39 +
 .../computer/core/sender/SenderTestSuite.java      |  37 +
 .../computer/core/sender/WriteBufferTest.java      | 194 +++++
 .../computer/core/sender/WriteBuffersTest.java     | 262 ++++++
 .../computer/core/sort/SorterTestUtil.java         | 178 ++++
 .../core/sort/combiner/MockIntSumCombiner.java     |  31 +
 .../core/sort/sorter/EmptyFlusherTest.java         |  50 ++
 .../computer/core/sort/sorter/FlusherTest.java     | 157 ++++
 .../core/sort/sorter/SortLargeDataTest.java        | 333 ++++++++
 .../computer/core/sort/sorter/SorterTest.java      | 491 +++++++++++
 .../computer/core/sort/sorter/SorterTestSuite.java |  33 +
 .../core/sort/sorting/InputsSortingTest.java       |  75 ++
 .../core/sort/sorting/SortingTestSuite.java        |  31 +
 .../computer/core/sort/sorting/TestData.java       | 142 ++++
 .../hugegraph/computer/core/store/BitFileTest.java |  95 +++
 .../computer/core/store/EntriesUtilTest.java       | 116 +++
 .../computer/core/store/EntryOutputTest.java       | 185 +++++
 .../computer/core/store/FileManagerTest.java       | 110 +++
 .../hugegraph/computer/core/store/HgkvDirTest.java | 146 ++++
 .../computer/core/store/HgkvFileTest.java          | 157 ++++
 .../hugegraph/computer/core/store/PointerTest.java |  94 +++
 .../computer/core/store/StoreTestSuite.java        |  37 +
 .../computer/core/store/StoreTestUtil.java         | 187 +++++
 .../computer/core/store/ValueFileTest.java         | 492 +++++++++++
 .../core/util/ComputerContextUtilTest.java         |  74 ++
 .../hugegraph/computer/core/util/JsonUtilTest.java |  54 ++
 .../computer/core/util/SerializeUtilTest.java      |  56 ++
 .../computer/core/util/UtilTestSuite.java          |  32 +
 .../computer/core/worker/MockComputation.java      | 407 ++++++++++
 .../computer/core/worker/MockComputation2.java     |  57 ++
 .../core/worker/MockComputationParams.java         |  47 ++
 .../core/worker/MockMasterComputation.java         | 391 +++++++++
 .../core/worker/MockMasterComputation2.java        |  96 +++
 .../computer/core/worker/MockWorkerService.java    |  33 +
 .../computer/core/worker/WorkerServiceTest.java    | 275 +++++++
 .../computer/core/worker/WorkerStatTest.java       | 118 +++
 .../computer/core/worker/WorkerTestSuite.java      |  31 +
 .../computer/dist/ComputerDistTestSuite.java       |  11 +
 .../computer/dist/HugeGraphComputerTest.java       |  99 +++
 .../computer/driver/ComputerOptionsTest.java       |  89 ++
 .../hugegraph/computer/driver/DriverTest.java      |  88 ++
 .../hugegraph/computer/driver/DriverTestSuite.java |  41 +
 .../hugegraph/computer/k8s/AbstractK8sTest.java    | 216 +++++
 .../hugegraph/computer/k8s/K8sTestSuite.java       |  32 +
 .../computer/k8s/KubernetesDriverTest.java         | 321 ++++++++
 .../hugegraph/computer/k8s/MiniKubeTest.java       | 446 ++++++++++
 .../hugegraph/computer/k8s/OperatorTest.java       |  58 ++
 .../suite/integrate/IntegrateTestSuite.java        |  54 ++
 .../computer/suite/integrate/MockComputation.java  |  51 ++
 .../suite/integrate/SenderIntegrateTest.java       | 409 ++++++++++
 .../computer/suite/unit/UnitTestBase.java          | 232 ++++++
 .../computer/suite/unit/UnitTestSuite.java         | 137 ++++
 .../src/main/resources/computer-master.properties  |   8 +-
 .../src/main/resources/computer-worker1.properties |   8 +-
 1163 files changed, 64840 insertions(+), 64846 deletions(-)

diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java
deleted file mode 100644
index e7d849b8..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.betweenness;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.slf4j.Logger;
-
-import com.baidu.hugegraph.computer.core.common.exception.ComputerException;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.IdSet;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-import com.baidu.hugegraph.util.Log;
-
-public class BetweennessCentrality implements Computation<BetweennessMessage> {
-
-    private static final Logger LOG = Log.logger(BetweennessCentrality.class);
-
-    public static final String OPTION_SAMPLE_RATE =
-                               "betweenness_centrality.sample_rate";
-
-    private double sampleRate;
-    /*
-     * Record the number of shortest paths for intermediate vertex, suppose
-     * there are two shortest paths from A(source vertex) to E(current vertex),
-     * [A -> B -> C -> E] and [A -> B -> D -> E]
-     *
-     * The saved data is as follows
-     * A: B:2
-     *    C:1
-     *    D:1
-     *    totalCount:2
-     */
-    private Map<Id, SeqCount> seqTable;
-
-    @Override
-    public String name() {
-        return "betweenness_centrality";
-    }
-
-    @Override
-    public String category() {
-        return "centrality";
-    }
-
-    @Override
-    public void init(Config config) {
-        this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D);
-        if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) {
-            throw new ComputerException("The param %s must be in (0.0, 1.0], " +
-                                        "actual got '%s'",
-                                        OPTION_SAMPLE_RATE, this.sampleRate);
-        }
-        this.seqTable = new HashMap<>();
-    }
-
-    @Override
-    public void close(Config config) {
-        // pass
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        // First superstep is special, we just send vertex id to its neighbors
-        BetweennessValue initialValue = new BetweennessValue(0.0D);
-        initialValue.arrivedVertices().add(vertex.id());
-        vertex.value(initialValue);
-        if (vertex.numEdges() == 0) {
-            return;
-        }
-
-        IdList sequence = new IdList();
-        sequence.add(vertex.id());
-        context.sendMessageToAllEdges(vertex, new BetweennessMessage(sequence));
-        LOG.info("Finished compute-0 step");
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<BetweennessMessage> messages) {
-        BetweennessValue value = vertex.value();
-        // The betweenness value to be updated
-        DoubleValue betweenness = value.betweenness();
-        // Collect the vertices sent here this time
-        IdSet arrivingVertices = new IdSet();
-        while (messages.hasNext()) {
-            BetweennessMessage message = messages.next();
-            // The value contributed to the intermediate node on the path
-            DoubleValue vote = message.vote();
-            betweenness.value(betweenness.value() + vote.value());
-
-            this.forward(context, vertex, message.sequence(), arrivingVertices);
-        }
-        value.arrivedVertices().addAll(arrivingVertices);
-
-        boolean active = !this.seqTable.isEmpty();
-        if (active) {
-            this.sendMessage(context);
-            this.seqTable.clear();
-        } else {
-            vertex.inactivate();
-        }
-    }
-
-    private void forward(ComputationContext context, Vertex vertex,
-                         IdList sequence, IdSet arrivingVertices) {
-        if (sequence.size() == 0) {
-            return;
-        }
-
-        BetweennessValue value = vertex.value();
-        IdSet arrivedVertices = value.arrivedVertices();
-        Id source = sequence.get(0);
-        // The source vertex is arriving at first time
-        if (!arrivedVertices.contains(source)) {
-            arrivingVertices.add(source);
-
-            SeqCount seqCount = this.seqTable.computeIfAbsent(
-                    source, k -> new SeqCount());
-            seqCount.totalCount++;
-            // Accumulate the number of shortest paths for intermediate vertices
-            for (int i = 1; i < sequence.size(); i++) {
-                Id id = sequence.get(i);
-                Map<Id, Integer> idCounts = seqCount.idCount;
-                idCounts.put(id, idCounts.getOrDefault(id, 0) + 1);
-            }
-
-            Id selfId = vertex.id();
-            sequence.add(selfId);
-            BetweennessMessage newMessage = new BetweennessMessage(sequence);
-            for (Edge edge : vertex.edges()) {
-                Id targetId = edge.targetId();
-                if (this.sample(selfId, targetId, edge) &&
-                    !sequence.contains(targetId)) {
-                    context.sendMessage(targetId, newMessage);
-                }
-            }
-        }
-    }
-
-    private void sendMessage(ComputationContext context) {
-        for (SeqCount seqCount : this.seqTable.values()) {
-            for (Map.Entry<Id, Integer> entry : seqCount.idCount.entrySet()) {
-                double vote = (double) entry.getValue() / seqCount.totalCount;
-                BetweennessMessage voteMessage = new BetweennessMessage(
-                                                 new DoubleValue(vote));
-
-                context.sendMessage(entry.getKey(), voteMessage);
-            }
-        }
-    }
-
-    private boolean sample(Id sourceId, Id targetId, Edge edge) {
-        // Now just use the simplest way
-        return Math.random() <= this.sampleRate;
-    }
-
-    private static class SeqCount {
-
-        private final Map<Id, Integer> idCount;
-        private int totalCount;
-
-        public SeqCount() {
-            this.idCount = new HashMap<>();
-            this.totalCount = 0;
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java
deleted file mode 100644
index f768b1b8..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.betweenness;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.algorithm.centrality.closeness.ClosenessCentrality;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
-import com.baidu.hugegraph.computer.core.master.DefaultMasterComputation;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
-
-public class BetweennessCentralityParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
-                         DefaultMasterComputation.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         BetweennessCentrality.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         BetweennessValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         BetweennessMessage.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphDoubleOutput.class.getName());
-        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
-                         ExtractAllPropertyInputFilter.class.getName());
-        this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE,
-                         "0.5D");
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java
deleted file mode 100644
index daa1d12d..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.betweenness;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class BetweennessMessage implements CustomizeValue<BetweennessMessage> {
-
-    private final IdList sequence;
-    private final DoubleValue vote;
-
-    public BetweennessMessage() {
-        this.sequence = new IdList();
-        this.vote = new DoubleValue(0.0D);
-    }
-
-    public BetweennessMessage(IdList sequence) {
-        this.sequence = sequence;
-        this.vote = new DoubleValue();
-    }
-
-    public BetweennessMessage(DoubleValue betweenness) {
-        this.sequence = new IdList();
-        this.vote = betweenness;
-    }
-
-    public IdList sequence() {
-        return this.sequence;
-    }
-
-    public DoubleValue vote() {
-        return this.vote;
-    }
-
-    @Override
-    public BetweennessMessage value() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.sequence.read(in);
-        this.vote.read(in);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.sequence.write(out);
-        this.vote.write(out);
-    }
-
-    @Override
-    public int compareTo(Value value) {
-        E.checkArgument(value instanceof BetweennessMessage,
-                        "The BetweennessMessage can't compare with class '%s'",
-                        value.getClass());
-        BetweennessMessage other = (BetweennessMessage) value;
-        E.checkArgument(this.sequence.size() != 0, "Sequence can't be empty");
-        E.checkArgument(other.sequence.size() != 0, "Sequence can't be empty");
-        Id selfSourceId = this.sequence.get(0);
-        Id otherSourceId = other.sequence.get(0);
-        return selfSourceId.compareTo(otherSourceId);
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java
deleted file mode 100644
index 210cb7c2..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.betweenness;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.IdSet;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class BetweennessValue implements CustomizeValue<Double> {
-
-    private final DoubleValue betweenness;
-    private final IdSet arrivedVertices;
-
-    public BetweennessValue() {
-        this(0.0D);
-    }
-
-    public BetweennessValue(double betweenness) {
-        this.betweenness = new DoubleValue(betweenness);
-        this.arrivedVertices = new IdSet();
-    }
-
-    public DoubleValue betweenness() {
-        return this.betweenness;
-    }
-
-    public IdSet arrivedVertices() {
-        return this.arrivedVertices;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.betweenness.read(in);
-        this.arrivedVertices.read(in);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.betweenness.write(out);
-        this.arrivedVertices.write(out);
-    }
-
-    @Override
-    public Double value() {
-        return this.betweenness.value();
-    }
-
-    @Override
-    public String string() {
-        return this.value().toString();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java
deleted file mode 100644
index bdfa493c..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.closeness;
-
-import java.util.Iterator;
-
-import org.slf4j.Logger;
-
-import com.baidu.hugegraph.computer.core.common.exception.ComputerException;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-import com.baidu.hugegraph.util.Log;
-import com.baidu.hugegraph.util.NumericUtil;
-
-public class ClosenessCentrality implements Computation<ClosenessMessage> {
-
-    private static final Logger LOG = Log.logger(ClosenessCentrality.class);
-
-    public static final String OPTION_WEIGHT_PROPERTY =
-                               "closeness_centrality.weight_property";
-    public static final String OPTION_SAMPLE_RATE =
-                               "closeness_centrality.sample_rate";
-
-    private String weightProp;
-    private double sampleRate;
-
-    @Override
-    public String name() {
-        return "closeness_centrality";
-    }
-
-    @Override
-    public String category() {
-        return "centrality";
-    }
-
-    @Override
-    public void init(Config config) {
-        this.weightProp = config.getString(OPTION_WEIGHT_PROPERTY, "");
-        this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D);
-        if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) {
-            throw new ComputerException("The param %s must be in (0.0, 1.0], " +
-                                        "actual got '%s'",
-                                        OPTION_SAMPLE_RATE, this.sampleRate);
-        }
-    }
-
-    @Override
-    public void close(Config config) {
-        // pass
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        // Set empty map as initial value
-        vertex.value(new ClosenessValue());
-
-        // Send messages to adjacent edges
-        for (Edge edge : vertex.edges()) {
-            Id senderId = vertex.id();
-            // Get property value
-            double value = this.weightValue(edge.property(this.weightProp));
-            DoubleValue distance = new DoubleValue(value);
-            ClosenessMessage message = new ClosenessMessage(senderId, senderId,
-                                                            distance);
-            context.sendMessage(edge.targetId(), message);
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<ClosenessMessage> messages) {
-        Id selfId = vertex.id();
-        // Save the distance from other vertices to self
-        ClosenessValue localValue = vertex.value();
-        boolean active = false;
-        while (messages.hasNext()) {
-            active = true;
-            ClosenessMessage message = messages.next();
-            Id senderId = message.senderId();
-            // In theory, it won't happen, defensive programming
-            if (selfId.equals(senderId)) {
-                continue;
-            }
-            Id startId = message.startId();
-            if (selfId.equals(startId)) {
-                continue;
-            }
-
-            DoubleValue oldValue = localValue.get(startId);
-            DoubleValue newValue = message.distance();
-            // If the id already exists and the new value >= old value, skip it
-            if (oldValue != null && newValue.compareTo(oldValue) >= 0) {
-                continue;
-            }
-            // Update local saved values (take smaller value)
-            localValue.put(startId, newValue);
-            // Send this smaller value to neighbors
-            this.sendMessage(context, vertex, senderId, startId, newValue);
-        }
-        if (!active) {
-            vertex.inactivate();
-        }
-    }
-
-    private void sendMessage(ComputationContext context, Vertex vertex,
-                             Id senderId, Id startId, DoubleValue newValue) {
-        Id selfId = vertex.id();
-        double baseNewValue = this.weightValue(newValue);
-        for (Edge edge : vertex.edges()) {
-            Id targetId = edge.targetId();
-            if (senderId.equals(targetId) || startId.equals(targetId)) {
-                continue;
-            }
-            if (!sample(selfId, targetId, edge)) {
-                continue;
-            }
-            // Update distance information
-            double updatedValue = baseNewValue + this.weightValue(edge.property(
-                                                 this.weightProp));
-            DoubleValue newDistance = new DoubleValue(updatedValue);
-            ClosenessMessage message = new ClosenessMessage(selfId, startId,
-                                                            newDistance);
-            context.sendMessage(targetId, message);
-        }
-    }
-
-    private boolean sample(Id sourceId, Id targetId, Edge edge) {
-        // Now just use the simplest way
-        return Math.random() <= this.sampleRate;
-    }
-
-    private double weightValue(Value rawValue) {
-        if (rawValue == null) {
-            return 1.0D;
-        }
-        if (rawValue.isNumber()) {
-            return NumericUtil.convertToNumber(rawValue).doubleValue();
-        } else {
-            throw new ComputerException("The weight property can only be " +
-                                        "either Long or Int or Double or " +
-                                        "Float, but got %s",
-                                        rawValue.valueType());
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java
deleted file mode 100644
index 869ac4b7..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.closeness;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
-import com.baidu.hugegraph.computer.core.master.DefaultMasterComputation;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
-
-public class ClosenessCentralityParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
-                         DefaultMasterComputation.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         ClosenessCentrality.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         ClosenessValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         ClosenessMessage.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphDoubleOutput.class.getName());
-        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
-                         ExtractAllPropertyInputFilter.class.getName());
-        this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE,
-                         "0.5D");
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java
deleted file mode 100644
index 103a2b09..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.closeness;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.common.ComputerContext;
-import com.baidu.hugegraph.computer.core.graph.GraphFactory;
-import com.baidu.hugegraph.computer.core.graph.id.BytesId;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.graph.value.ValueType;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class ClosenessMessage implements CustomizeValue<ClosenessMessage> {
-
-    private final GraphFactory graphFactory;
-
-    private Id senderId;
-    private Id startId;
-    private DoubleValue distance;
-
-    public ClosenessMessage() {
-        this(new BytesId(), new BytesId(), new DoubleValue(0.0D));
-    }
-
-    public ClosenessMessage(Id senderId, Id startId, DoubleValue distance) {
-        this.graphFactory = ComputerContext.instance().graphFactory();
-        this.senderId = senderId;
-        this.startId = startId;
-        this.distance = distance;
-    }
-
-    public Id senderId() {
-        return this.senderId;
-    }
-
-    public Id startId() {
-        return this.startId;
-    }
-
-    public DoubleValue distance() {
-        return this.distance;
-    }
-
-    @Override
-    public ClosenessMessage value() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.senderId = this.graphFactory.createId();
-        this.senderId.read(in);
-
-        this.startId = this.graphFactory.createId();
-        this.startId.read(in);
-
-        this.distance = (DoubleValue) this.graphFactory.createValue(
-                                      ValueType.DOUBLE);
-        this.distance.read(in);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.senderId.write(out);
-        this.startId.write(out);
-        this.distance.write(out);
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java
deleted file mode 100644
index ace25316..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.closeness;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.MapValue;
-
-public class ClosenessValue extends MapValue<DoubleValue> {
-
-    @Override
-    public Double value() {
-        // Cumulative distance
-        double centrality = 0;
-        for (Map.Entry<Id, DoubleValue> entry : this.entrySet()) {
-            centrality += 1.0D / entry.getValue().value();
-        }
-        return centrality;
-    }
-
-    @Override
-    public String string() {
-        return this.value().toString();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java
deleted file mode 100644
index a52aa980..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.degree;
-
-import java.util.Iterator;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.baidu.hugegraph.computer.core.common.exception.ComputerException;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.NullValue;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-import com.baidu.hugegraph.computer.core.worker.WorkerContext;
-import com.baidu.hugegraph.util.NumericUtil;
-
-public class DegreeCentrality implements Computation<NullValue> {
-
-    public static final String OPTION_WEIGHT_PROPERTY =
-                               "degree_centrality.weight_property";
-
-    private boolean calculateByWeightProperty;
-    private String weightProperty;
-
-    @Override
-    public String name() {
-        return "degree_centrality";
-    }
-
-    @Override
-    public String category() {
-        return "centrality";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        if (!this.calculateByWeightProperty) {
-            vertex.value(new DoubleValue(vertex.numEdges()));
-        } else {
-            /*
-             *  TODO: Here we use doubleValue type now, we will use BigDecimal
-             *  and output "BigDecimalValue" to resolve double type overflow
-             *  int the future;
-             */
-            double totalWeight = 0.0;
-            Iterator<Edge> edges = vertex.edges().iterator();
-            while (edges.hasNext()) {
-                Edge edge = edges.next();
-                double weight = weightValue(edge.property(this.weightProperty));
-                totalWeight += weight;
-                if (Double.isInfinite(totalWeight)) {
-                    throw new ComputerException("Calculate weight overflow," +
-                                                "current is %s, edge '%s' " +
-                                                "is %s",
-                                                totalWeight, edge, weight);
-                }
-            }
-            vertex.value(new DoubleValue(totalWeight));
-        }
-        vertex.inactivate();
-    }
-
-    private static double weightValue(Value value) {
-        if (value == null) {
-            return 1.0;
-        }
-
-        switch (value.valueType()) {
-            case LONG:
-            case INT:
-            case DOUBLE:
-            case FLOAT:
-                return NumericUtil.convertToNumber(value).doubleValue();
-            default:
-                throw new ComputerException("The weight property can only be " +
-                                            "either Long or Int or Double or " +
-                                            "Float, but got %s",
-                                            value.valueType());
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<NullValue> messages) {
-        // pass
-    }
-
-    @Override
-    public void init(Config config) {
-        this.weightProperty = config.getString(
-                              OPTION_WEIGHT_PROPERTY, "");
-        this.calculateByWeightProperty = StringUtils.isNotEmpty(
-                                         this.weightProperty);
-    }
-
-    @Override
-    public void close(Config config) {
-        // pass
-    }
-
-    @Override
-    public void beforeSuperstep(WorkerContext context) {
-        // pass
-    }
-
-    @Override
-    public void afterSuperstep(WorkerContext context) {
-        // pass
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java
deleted file mode 100644
index 0935f846..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.degree;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.master.DefaultMasterComputation;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
-
-public class DegreeCentralityParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
-                         DefaultMasterComputation.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         DegreeCentrality.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         DoubleValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         DoubleValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
-                         DoubleValueSumCombiner.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphDoubleOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java
deleted file mode 100644
index b37ba4d0..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.pagerank;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.aggregator.Aggregator;
-import com.baidu.hugegraph.computer.core.combiner.Combiner;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.LongValue;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-import com.baidu.hugegraph.computer.core.worker.WorkerContext;
-
-public class PageRank implements Computation<DoubleValue> {
-
-    public static final String OPTION_ALPHA = "page_rank.alpha";
-
-    public static final double ALPHA_DEFAULT_VALUE = 0.15;
-
-    private double alpha;
-    private double danglingRank;
-    private double initialRankInSuperstep;
-    private double cumulativeRank;
-
-    private Aggregator<DoubleValue> l1DiffAggr;
-    private Aggregator<DoubleValue> cumulativeRankAggr;
-    private Aggregator<LongValue> danglingVertexNumAggr;
-    private Aggregator<DoubleValue> danglingCumulativeAggr;
-
-    // Initial value in superstep 0.
-    private DoubleValue initialValue;
-    private DoubleValue contribValue;
-
-    @Override
-    public String name() {
-        return "page_rank";
-    }
-
-    @Override
-    public String category() {
-        return "centrality";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        vertex.value(this.initialValue);
-        this.cumulativeRankAggr.aggregateValue(this.initialValue.value());
-        int edgeCount = vertex.numEdges();
-        if (edgeCount == 0) {
-            this.danglingVertexNumAggr.aggregateValue(1L);
-            this.danglingCumulativeAggr.aggregateValue(
-                                        this.initialValue.value());
-        } else {
-            this.contribValue.value(this.initialValue.value() / edgeCount);
-            context.sendMessageToAllEdges(vertex, this.contribValue);
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<DoubleValue> messages) {
-        DoubleValue message = Combiner.combineAll(context.combiner(), messages);
-        double rankFromNeighbors = 0.0;
-        if (message != null) {
-            rankFromNeighbors = message.value();
-        }
-        double rank = (this.danglingRank + rankFromNeighbors) *
-                      (1.0 - this.alpha) + this.initialRankInSuperstep;
-        rank /= this.cumulativeRank;
-        DoubleValue oldRank = vertex.value();
-        vertex.value(new DoubleValue(rank));
-        this.l1DiffAggr.aggregateValue(Math.abs(oldRank.value() - rank));
-        this.cumulativeRankAggr.aggregateValue(rank);
-        int edgeCount = vertex.numEdges();
-        if (edgeCount == 0) {
-            this.danglingVertexNumAggr.aggregateValue(1L);
-            this.danglingCumulativeAggr.aggregateValue(rank);
-        } else {
-            this.contribValue.value(rank / edgeCount);
-            context.sendMessageToAllEdges(vertex, this.contribValue);
-        }
-    }
-
-    @Override
-    public void init(Config config) {
-        this.alpha = config.getDouble(OPTION_ALPHA, ALPHA_DEFAULT_VALUE);
-        this.contribValue = new DoubleValue();
-    }
-
-    @Override
-    public void close(Config config) {
-        // pass
-    }
-
-    @Override
-    public void beforeSuperstep(WorkerContext context) {
-        // Get aggregator values for computation
-        DoubleValue danglingTotalRank = context.aggregatedValue(
-                    PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY);
-        DoubleValue cumulativeRank = context.aggregatedValue(
-                    PageRank4Master.AGGR_COMULATIVE_PROBABILITY);
-        long totalVertex = context.totalVertexCount();
-
-        this.danglingRank = danglingTotalRank.value() / totalVertex;
-        this.initialRankInSuperstep = this.alpha / totalVertex;
-        this.cumulativeRank = cumulativeRank.value();
-        this.initialValue = new DoubleValue(1.0 / totalVertex);
-
-        // Create aggregators
-        this.l1DiffAggr = context.createAggregator(
-                          PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY);
-        this.cumulativeRankAggr = context.createAggregator(
-                                  PageRank4Master.AGGR_COMULATIVE_PROBABILITY);
-        this.danglingVertexNumAggr = context.createAggregator(
-             PageRank4Master.AGGR_DANGLING_VERTICES_NUM);
-        this.danglingCumulativeAggr = context.createAggregator(
-             PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY);
-    }
-
-    @Override
-    public void afterSuperstep(WorkerContext context) {
-        context.aggregateValue(
-                PageRank4Master.AGGR_COMULATIVE_PROBABILITY,
-                this.cumulativeRankAggr.aggregatedValue());
-        context.aggregateValue(
-                PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY,
-                this.l1DiffAggr.aggregatedValue());
-        context.aggregateValue(
-                PageRank4Master.AGGR_DANGLING_VERTICES_NUM,
-                this.danglingVertexNumAggr.aggregatedValue());
-        context.aggregateValue(
-                PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY,
-                this.danglingCumulativeAggr.aggregatedValue());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java
deleted file mode 100644
index 28d074dc..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.pagerank;
-
-import org.slf4j.Logger;
-
-import com.baidu.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
-import com.baidu.hugegraph.computer.core.combiner.LongValueSumCombiner;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.graph.value.LongValue;
-import com.baidu.hugegraph.computer.core.graph.value.ValueType;
-import com.baidu.hugegraph.computer.core.master.MasterComputation;
-import com.baidu.hugegraph.computer.core.master.MasterComputationContext;
-import com.baidu.hugegraph.computer.core.master.MasterContext;
-import com.baidu.hugegraph.util.Log;
-
-public class PageRank4Master implements MasterComputation {
-
-    private static final Logger LOG = Log.logger(PageRank4Master.class);
-
-    public static final String CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY =
-                               "pagerank.l1DiffThreshold";
-    public static final double CONF_L1_DIFF_THRESHOLD_DEFAULT = 0.00001D;
-
-    public static final String AGGR_L1_NORM_DIFFERENCE_KEY =
-                               "pagerank.aggr_l1_norm_difference";
-    public static final String AGGR_DANGLING_VERTICES_NUM =
-                               "pagerank.dangling_vertices_num";
-    public static final String AGGR_COMULATIVE_DANGLING_PROBABILITY =
-                               "pagerank.comulative_dangling_probability";
-    public static final String AGGR_COMULATIVE_PROBABILITY =
-                               "pagerank.comulative_probability";
-
-    private double l1DiffThreshold;
-
-    @Override
-    public void init(MasterContext context) {
-        this.l1DiffThreshold = context.config().getDouble(
-                               CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY,
-                               CONF_L1_DIFF_THRESHOLD_DEFAULT);
-        context.registerAggregator(AGGR_DANGLING_VERTICES_NUM,
-                                   ValueType.LONG,
-                                   LongValueSumCombiner.class);
-        context.registerAggregator(AGGR_COMULATIVE_DANGLING_PROBABILITY,
-                                   ValueType.DOUBLE,
-                                   DoubleValueSumCombiner.class);
-        context.registerAggregator(AGGR_COMULATIVE_PROBABILITY,
-                                   ValueType.DOUBLE,
-                                   DoubleValueSumCombiner.class);
-        context.registerAggregator(AGGR_L1_NORM_DIFFERENCE_KEY,
-                                   ValueType.DOUBLE,
-                                   DoubleValueSumCombiner.class);
-    }
-
-    @Override
-    public void close(MasterContext context) {
-        // pass
-    }
-
-    @Override
-    public boolean compute(MasterComputationContext context) {
-        LongValue danglingVerticesNum = context.aggregatedValue(
-                                        AGGR_DANGLING_VERTICES_NUM);
-        DoubleValue danglingProbability = context.aggregatedValue(
-                                          AGGR_COMULATIVE_DANGLING_PROBABILITY);
-        DoubleValue cumulativeProbability = context.aggregatedValue(
-                                            AGGR_COMULATIVE_PROBABILITY);
-        DoubleValue l1NormDifference = context.aggregatedValue(
-                                       AGGR_L1_NORM_DIFFERENCE_KEY);
-
-        StringBuilder sb = new StringBuilder();
-        sb.append("[Superstep ").append(context.superstep()).append("]")
-          .append(", dangling vertices num = ").append(danglingVerticesNum)
-          .append(", cumulative dangling probability = ")
-          .append(danglingProbability.value())
-          .append(", cumulative probability = ").append(cumulativeProbability)
-          .append(", l1 norm difference = ").append(l1NormDifference.value());
-
-        LOG.info("PageRank running status: {}", sb);
-        double l1Diff = l1NormDifference.value();
-        if (context.superstep() > 1 && l1Diff <= this.l1DiffThreshold) {
-            return false;
-        } else {
-            return true;
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java
deleted file mode 100644
index 18c668ab..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.centrality.pagerank;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
-
-public class PageRankParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
-                         PageRank4Master.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         PageRank.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         DoubleValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         DoubleValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
-                         DoubleValueSumCombiner.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphDoubleOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/Kcore.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/Kcore.java
deleted file mode 100644
index f11ad534..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/Kcore.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.kcore;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.combiner.Combiner;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-import com.google.common.collect.Iterators;
-
-public class Kcore implements Computation<Id> {
-
-    public static final String OPTION_K = "kcore.k";
-    public static final int K_DEFAULT_VALUE = 3;
-
-    private final KcoreValue initValue = new KcoreValue();
-
-    private int k = 0;
-
-    @Override
-    public String name() {
-        return "kcore";
-    }
-
-    @Override
-    public String category() {
-        return "community";
-    }
-
-    @Override
-    public void init(Config config) {
-        this.k = config.getInt(OPTION_K, K_DEFAULT_VALUE);
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        KcoreValue value = this.initValue;
-        value.core((Id) vertex.id().copy());
-        vertex.value(value);
-
-        if (vertex.numEdges() < this.k) {
-            value.degree(0);
-            /*
-             * TODO: send int type message at phase 1, it's different from id
-             * type of phase 2 (wcc message), need support switch message type.
-             */
-            context.sendMessageToAllEdges(vertex, vertex.id());
-            vertex.inactivate();
-        } else {
-            value.degree(vertex.numEdges());
-            assert vertex.active();
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<Id> messages) {
-        KcoreValue value = vertex.value();
-        if (!value.active()) {
-            // Ignore messages of deleted vertex
-            vertex.inactivate();
-            return;
-        }
-
-        int superstep = context.superstep();
-        if (superstep <= 2) {
-            int deleted = Iterators.size(messages);
-            assert value.active();
-            if (value.decreaseDegree(deleted) < this.k) {
-                // From active to inactive, delete self vertex
-                value.degree(0);
-                if (superstep == 1) {
-                    context.sendMessageToAllEdges(vertex, vertex.id());
-                }
-                vertex.inactivate();
-            } else {
-                // From active to active, do wcc from superstep 2
-                if (superstep == 2) {
-                    // Start wcc
-                    context.sendMessageToAllEdgesIf(vertex, vertex.id(),
-                                                    (source, target) -> {
-                        return source.compareTo(target) < 0;
-                    });
-                    vertex.inactivate();
-                } else {
-                    // Keep active at superstep 1 to continue superstep 2
-                    assert superstep == 1;
-                    assert vertex.active();
-                }
-            }
-        } else {
-            // Do wcc
-            assert superstep > 2;
-            Id message = Combiner.combineAll(context.combiner(), messages);
-            if (value.core().compareTo(message) > 0) {
-                value.core(message);
-                context.sendMessageToAllEdges(vertex, message);
-            }
-            vertex.inactivate();
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreParams.java
deleted file mode 100644
index 766736d1..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreParams.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.kcore;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.combiner.ValueMinCombiner;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.id.BytesId;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
-
-public class KcoreParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         Kcore.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         KcoreValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         BytesId.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
-                         ValueMinCombiner.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphIdOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreValue.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreValue.java
deleted file mode 100644
index b6c721ff..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/kcore/KcoreValue.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.kcore;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.baidu.hugegraph.computer.core.graph.id.BytesId;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class KcoreValue implements CustomizeValue<Object> {
-
-    private int degree;
-    private Id core;
-
-    public KcoreValue() {
-        this.degree = 0;
-        this.core = new BytesId();
-    }
-
-    public void degree(int degree) {
-        assert degree >= 0;
-        this.degree = degree;
-    }
-
-    public int degree() {
-        return this.degree;
-    }
-
-    public int decreaseDegree(int decrease) {
-        assert decrease <= this.degree;
-        this.degree -= decrease;
-        return this.degree;
-    }
-
-    public boolean active() {
-        return this.degree > 0;
-    }
-
-    public void core(Id core) {
-        this.core = core;
-    }
-
-    public Id core() {
-        E.checkNotNull(this.core, "core");
-        return this.core;
-    }
-
-    @Override
-    public KcoreValue copy() {
-        KcoreValue kcoreValue = new KcoreValue();
-        kcoreValue.core = (Id) this.core.copy();
-        kcoreValue.degree = this.degree;
-        return kcoreValue;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.core.read(in);
-        this.degree = in.readInt();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.core.write(out);
-        out.writeInt(this.degree);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this)
-                   .append("core", this.core)
-                   .append("degree", this.degree)
-                   .toString();
-    }
-
-    @Override
-    public Object value() {
-        return this.core.value();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/Lpa.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/Lpa.java
deleted file mode 100644
index bdc8abb2..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/Lpa.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.lpa;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import org.apache.commons.lang3.mutable.MutableInt;
-
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-
-public class Lpa implements Computation<Id> {
-
-    private final Random random = new Random();
-
-    @Override
-    public String name() {
-        return "lpa";
-    }
-
-    @Override
-    public String category() {
-        return "community";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        Id value = vertex.id();
-        vertex.value(value);
-        vertex.inactivate();
-        context.sendMessageToAllEdges(vertex, value);
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<Id> messages) {
-        Id label = this.voteLabel(messages);
-        Id value = vertex.value();
-        if (!value.equals(label)) {
-            vertex.value(label);
-            context.sendMessageToAllEdges(vertex, label);
-        }
-        vertex.inactivate();
-    }
-
-    private Id voteLabel(Iterator<Id> messages) {
-        // Calculate label frequency
-        Map<Id, MutableInt> labels = new HashMap<>();
-        assert messages.hasNext();
-        while (messages.hasNext()) {
-            Id label = messages.next();
-            MutableInt labelCount = labels.get(label);
-            if (labelCount != null) {
-                labelCount.increment();
-            } else {
-                labels.put(label, new MutableInt(1));
-            }
-        }
-
-        // Calculate the labels with maximum frequency
-        List<Id> maxLabels = new ArrayList<>();
-        int maxFreq = 1;
-        for (Map.Entry<Id, MutableInt> e : labels.entrySet()) {
-            int value = e.getValue().intValue();
-            if (value > maxFreq) {
-                maxFreq = value;
-                maxLabels.clear();
-            }
-            if (value == maxFreq) {
-                maxLabels.add(e.getKey());
-            }
-        }
-
-        // Random choice
-        int selected = this.random.nextInt(maxLabels.size());
-        return maxLabels.get(selected);
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/LpaParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/LpaParams.java
deleted file mode 100644
index 12b3710f..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/lpa/LpaParams.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.lpa;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.id.BytesId;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
-
-public class LpaParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         Lpa.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         BytesId.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         BytesId.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphIdOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java
deleted file mode 100644
index 7d3d0222..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.trianglecount;
-
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.edge.Edges;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-
-public class TriangleCount implements Computation<IdList> {
-
-    @Override
-    public String name() {
-        return "triangle_count";
-    }
-
-    @Override
-    public String category() {
-        return "community";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        IdList selfId = new IdList();
-        selfId.add(vertex.id());
-
-        context.sendMessageToAllEdgesIf(vertex, selfId, (ids, targetId) -> {
-            return !ids.get(0).equals(targetId);
-        });
-        vertex.value(new TriangleCountValue());
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<IdList> messages) {
-        Integer count = this.triangleCount(context, vertex, messages);
-        if (count != null) {
-            ((TriangleCountValue) vertex.value()).count(count);
-            vertex.inactivate();
-        }
-    }
-
-    private Integer triangleCount(ComputationContext context, Vertex vertex,
-                                  Iterator<IdList> messages) {
-        IdList neighbors = ((TriangleCountValue) vertex.value()).idList();
-
-        if (context.superstep() == 1) {
-            // Collect outgoing neighbors
-            Set<Id> outNeighbors = getOutNeighbors(vertex);
-            neighbors.addAll(outNeighbors);
-
-            // Collect incoming neighbors
-            while (messages.hasNext()) {
-                IdList idList = messages.next();
-                assert idList.size() == 1;
-                Id inId = idList.get(0);
-                if (!outNeighbors.contains(inId)) {
-                    neighbors.add(inId);
-                }
-            }
-
-            // Send all neighbors to neighbors
-            for (Id targetId : neighbors.values()) {
-                context.sendMessage(targetId, neighbors);
-            }
-        } else if (context.superstep() == 2) {
-            int count = 0;
-
-            Set<Id> allNeighbors = new HashSet<>(neighbors.values());
-            while (messages.hasNext()) {
-                IdList twoDegreeNeighbors = messages.next();
-                for (Id twoDegreeNeighbor : twoDegreeNeighbors.values()) {
-                    if (allNeighbors.contains(twoDegreeNeighbor)) {
-                        count++;
-                    }
-                }
-            }
-
-            return count >> 1;
-        }
-        return null;
-    }
-
-    private static Set<Id> getOutNeighbors(Vertex vertex) {
-        Set<Id> outNeighbors = new HashSet<>();
-        Edges edges = vertex.edges();
-        for (Edge edge : edges) {
-            Id targetId = edge.targetId();
-            if (!vertex.id().equals(targetId)) {
-                outNeighbors.add(targetId);
-            }
-        }
-        return outNeighbors;
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java
deleted file mode 100644
index 8cdf5f3e..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.trianglecount;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.config.EdgeFrequency;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphIntOutput;
-
-public class TriangleCountParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         TriangleCount.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         IdList.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         TriangleCountValue.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphIntOutput.class.getName());
-        this.setIfAbsent(params, ComputerOptions.INPUT_EDGE_FREQ.name(),
-                         EdgeFrequency.SINGLE.name());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java
deleted file mode 100644
index b687b276..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.trianglecount;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.IntValue;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class TriangleCountValue implements CustomizeValue<Integer> {
-
-    private IdList idList;
-    private IntValue count;
-
-    public TriangleCountValue() {
-        this.idList = new IdList();
-        this.count = new IntValue();
-    }
-
-    public IdList idList() {
-        return this.idList;
-    }
-
-    public long count() {
-        return this.count.longValue();
-    }
-
-    public void count(int count) {
-        this.count.value(count);
-    }
-
-    @Override
-    public TriangleCountValue copy() {
-        TriangleCountValue triangleCountValue = new TriangleCountValue();
-        triangleCountValue.idList = this.idList.copy();
-        triangleCountValue.count = this.count.copy();
-        return triangleCountValue;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.idList.read(in);
-        this.count.read(in);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.idList.write(out);
-        this.count.write(out);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this)
-                   .append("idList", this.idList)
-                   .append("count", this.count)
-                   .toString();
-    }
-
-    @Override
-    public Integer value() {
-        return this.count.value();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/Wcc.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/Wcc.java
deleted file mode 100644
index 071af0e7..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/Wcc.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.wcc;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.combiner.Combiner;
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-
-/**
- * Wcc stands for Weak Connected Component.
- */
-public class Wcc implements Computation<Id> {
-
-    @Override
-    public String name() {
-        return "wcc";
-    }
-
-    @Override
-    public String category() {
-        return "community";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        Id min = vertex.id();
-        for (Edge edge : vertex.edges()) {
-            if (edge.targetId().compareTo(min) < 0) {
-                min = edge.targetId();
-            }
-        }
-        Id value = min;
-        vertex.value(value);
-        vertex.inactivate();
-        context.sendMessageToAllEdgesIf(vertex, value, (result, target) -> {
-            return result.compareTo(target) < 0;
-        });
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<Id> messages) {
-        Id message = Combiner.combineAll(context.combiner(), messages);
-        Id value = vertex.value();
-        if (value.compareTo(message) > 0) {
-            vertex.value(message);
-            context.sendMessageToAllEdges(vertex, message);
-        }
-        vertex.inactivate();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/WccParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/WccParams.java
deleted file mode 100644
index bc1ca168..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/community/wcc/WccParams.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.community.wcc;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.combiner.ValueMinCombiner;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.id.BytesId;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
-
-public class WccParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         Wcc.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         BytesId.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         BytesId.class.getName());
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
-                         ValueMinCombiner.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         HugeGraphIdOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetection.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetection.java
deleted file mode 100644
index 4527065a..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetection.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.IdListList;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-
-public class RingsDetection implements Computation<IdList> {
-
-    @Override
-    public String name() {
-        return "rings";
-    }
-
-    @Override
-    public String category() {
-        return "path";
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        vertex.value(new IdListList());
-        if (vertex.edges().size() == 0) {
-            return;
-        }
-
-        // Init path
-        Id id = vertex.id();
-        IdList path = new IdList();
-        path.add(id);
-
-        for (Edge edge : vertex.edges()) {
-            /*
-             * Only send path to vertex whose id is larger than
-             * or equals current vertex id
-             */
-            if (id.compareTo(edge.targetId()) <= 0) {
-                context.sendMessage(edge.targetId(), path);
-            }
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<IdList> messages) {
-        Id id = vertex.id();
-        boolean halt = true;
-        while (messages.hasNext()) {
-            halt = false;
-            IdList sequence = messages.next();
-            if (id.equals(sequence.get(0))) {
-                // Use the smallest vertex record ring
-                boolean isMin = true;
-                for (int i = 1; i < sequence.size(); i++) {
-                    Id pathVertexValue = sequence.get(i);
-                    if (id.compareTo(pathVertexValue) > 0) {
-                        isMin = false;
-                        break;
-                    }
-                }
-                if (isMin) {
-                    sequence.add(id);
-                    IdListList sequences = vertex.value();
-                    sequences.add(sequence);
-                }
-            } else {
-                boolean contains = false;
-                // Drop sequence if path contains this vertex
-                for (int i = 0; i < sequence.size(); i++) {
-                    Id pathVertexValue = sequence.get(i);
-                    if (pathVertexValue.equals(vertex.id())) {
-                        contains = true;
-                        break;
-                    }
-                }
-                // Field ringId is smallest vertex id in path
-                Id ringId = sequence.get(0);
-                if (!contains) {
-                    sequence.add(vertex.id());
-                    for (Edge edge : vertex.edges()) {
-                        if (ringId.compareTo(edge.targetId()) <= 0) {
-                            context.sendMessage(edge.targetId(), sequence);
-                        }
-                    }
-                }
-            }
-        }
-        if (halt) {
-            vertex.inactivate();
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java
deleted file mode 100644
index d74ec6f2..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.baidu.hugegraph.computer.core.graph.value.IdListList;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.output.hg.HugeGraphOutput;
-
-public class RingsDetectionOutput extends HugeGraphOutput<List<String>> {
-
-    @Override
-    protected void prepareSchema() {
-        this.client().schema().propertyKey(this.name())
-                     .asText()
-                     .writeType(this.writeType())
-                     .valueList()
-                     .ifNotExist()
-                     .create();
-    }
-
-    @Override
-    protected List<String> value(Vertex vertex) {
-        IdListList value = vertex.value();
-        List<String> propValues = new ArrayList<>();
-        for (int i = 0; i < value.size(); i++) {
-            propValues.add(value.get(i).toString());
-        }
-        return propValues;
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java
deleted file mode 100644
index 55ded11e..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.IdListList;
-
-public class RingsDetectionParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         RingsDetection.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         IdList.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         IdListList.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         RingsDetectionOutput.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java
deleted file mode 100644
index caaa965a..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings.filter;
-
-import java.util.List;
-
-import org.apache.commons.collections.CollectionUtils;
-
-import com.baidu.hugegraph.util.JsonUtil;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.collect.ImmutableList;
-
-public class FilterDescribe {
-
-    private final List<DescribeItem> vertexFilter;
-    private final List<DescribeItem> edgeFilter;
-
-    @JsonCreator
-    private FilterDescribe(@JsonProperty("vertex_filter")
-                           List<DescribeItem> vertexFilter,
-                           @JsonProperty("edge_filter")
-                           List<DescribeItem> edgeFilter) {
-        this.vertexFilter = CollectionUtils.isEmpty(vertexFilter) ?
-                            ImmutableList.of() :
-                            ImmutableList.copyOf(vertexFilter);
-        this.edgeFilter = CollectionUtils.isEmpty(edgeFilter) ?
-                          ImmutableList.of() :
-                          ImmutableList.copyOf(edgeFilter);
-    }
-
-    public static FilterDescribe of(String describe) {
-        return JsonUtil.fromJson(describe, FilterDescribe.class);
-    }
-
-    public List<DescribeItem> vertexFilter() {
-        return this.vertexFilter;
-    }
-
-    public List<DescribeItem> edgeFilter() {
-        return this.edgeFilter;
-    }
-
-    public static class DescribeItem {
-
-        private final String label;
-        private final String propertyFilter;
-
-        @JsonCreator
-        private DescribeItem(@JsonProperty(value = "label",
-                                           required = true)
-                             String label,
-                             @JsonProperty(value = "property_filter",
-                                           required = true)
-                             String propertyFilter) {
-            this.label = label;
-            this.propertyFilter = propertyFilter;
-        }
-
-        public String label() {
-            return this.label;
-        }
-
-        public String propertyFilter() {
-            return this.propertyFilter;
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java
deleted file mode 100644
index 31649a47..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings.filter;
-
-import java.io.IOException;
-import java.util.List;
-
-import com.baidu.hugegraph.computer.core.common.ComputerContext;
-import com.baidu.hugegraph.computer.core.graph.GraphFactory;
-import com.baidu.hugegraph.computer.core.graph.properties.DefaultProperties;
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.Value.CustomizeValue;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class RingsDetectionMessage implements CustomizeValue<List<Object>> {
-
-    private final IdList path;
-    private Properties walkEdgeProps;
-
-    public RingsDetectionMessage() {
-        GraphFactory graphFactory = ComputerContext.instance().graphFactory();
-        this.path = new IdList();
-        this.walkEdgeProps = new DefaultProperties(graphFactory);
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.path.read(in);
-        this.walkEdgeProps.read(in);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.path.write(out);
-        this.walkEdgeProps.write(out);
-    }
-
-    public IdList path() {
-        return this.path;
-    }
-
-    public void addPath(Vertex vertex) {
-        this.path.add(vertex.id());
-    }
-
-    public Properties walkEdgeProp() {
-        return this.walkEdgeProps;
-    }
-
-    public void walkEdgeProp(Properties properties) {
-        this.walkEdgeProps = properties;
-    }
-
-    @Override
-    public List<Object> value() {
-        return this.path.value();
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java
deleted file mode 100644
index 8e349357..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings.filter;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.value.IdList;
-import com.baidu.hugegraph.computer.core.graph.value.IdListList;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.baidu.hugegraph.computer.core.worker.Computation;
-import com.baidu.hugegraph.computer.core.worker.ComputationContext;
-
-public class RingsDetectionWithFilter
-       implements Computation<RingsDetectionMessage> {
-
-    public static final String OPTION_FILTER = "rings.property_filter";
-
-    private SpreadFilter filter;
-
-    @Override
-    public String name() {
-        return "rings_with_filter";
-    }
-
-    @Override
-    public String category() {
-        return "path";
-    }
-
-    @Override
-    public void init(Config config) {
-        this.filter = new SpreadFilter(config.getString(OPTION_FILTER, "{}"));
-    }
-
-    @Override
-    public void compute0(ComputationContext context, Vertex vertex) {
-        vertex.value(new IdListList());
-        if (vertex.edges().size() == 0 || !this.filter.filter(vertex)) {
-            return;
-        }
-
-        RingsDetectionMessage message = new RingsDetectionMessage();
-        message.addPath(vertex);
-        for (Edge edge : vertex.edges()) {
-            if (this.filter.filter(edge)) {
-                message.walkEdgeProp(edge.properties());
-                context.sendMessage(edge.targetId(), message);
-            }
-        }
-    }
-
-    @Override
-    public void compute(ComputationContext context, Vertex vertex,
-                        Iterator<RingsDetectionMessage> messages) {
-        boolean halt = true;
-        if (this.filter.filter(vertex)) {
-            Id vertexId = vertex.id();
-            while (messages.hasNext()) {
-                halt = false;
-                RingsDetectionMessage message = messages.next();
-                IdList path = message.path();
-                if (vertexId.equals(path.get(0))) {
-                    // Use the smallest vertex record ring
-                    boolean isMin = true;
-                    for (int i = 0; i < path.size(); i++) {
-                        Id pathVertexValue = path.get(i);
-                        if (vertexId.compareTo(pathVertexValue) > 0) {
-                            isMin = false;
-                            break;
-                        }
-                    }
-                    if (isMin) {
-                        path.add(vertexId);
-                        IdListList value = vertex.value();
-                        value.add(path.copy());
-                    }
-                } else {
-                    boolean contains = false;
-                    // Drop sequence if path contains this vertex
-                    for (int i = 0; i < path.size(); i++) {
-                        Id pathVertexValue = path.get(i);
-                        if (pathVertexValue.equals(vertex.id())) {
-                            contains = true;
-                            break;
-                        }
-                    }
-                    if (!contains) {
-                        path.add(vertex.id());
-                        for (Edge edge : vertex.edges()) {
-                            if (this.filter.filter(edge, message)) {
-                                message.walkEdgeProp(edge.properties());
-                                context.sendMessage(edge.targetId(), message);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        if (halt) {
-            vertex.inactivate();
-        }
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java
deleted file mode 100644
index f52cb525..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings.filter;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.algorithm.AlgorithmParams;
-import com.baidu.hugegraph.computer.algorithm.path.rings.RingsDetectionOutput;
-import com.baidu.hugegraph.computer.core.config.ComputerOptions;
-import com.baidu.hugegraph.computer.core.graph.value.IdListList;
-import com.baidu.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
-
-public class RingsDetectionWithFilterParams implements AlgorithmParams {
-
-    @Override
-    public void setAlgorithmParameters(Map<String, String> params) {
-        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
-                         RingsDetectionWithFilter.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
-                         IdListList.class.getName());
-        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
-                         RingsDetectionMessage.class.getName());
-        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
-                         RingsDetectionOutput.class.getName());
-        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
-                         ExtractAllPropertyInputFilter.class.getName());
-    }
-}
diff --git a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java b/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java
deleted file mode 100644
index fa197b58..00000000
--- a/computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm.path.rings.filter;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Predicate;
-
-import org.mvel2.MVEL;
-
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-public class SpreadFilter {
-
-    private static final String ALL = "*";
-    private static final String MESSAGE = "$message";
-    private static final String ELEMENT = "$element";
-    private static final List<Serializable> PASS = ImmutableList.of();
-
-    private final Map<String, Serializable> vertexFilter;
-    private final Map<String, Serializable> edgeSpreadFilter;
-    private final Map<String, Serializable> edgeFilter;
-
-    public SpreadFilter(String describe) {
-        FilterDescribe des = FilterDescribe.of(describe);
-
-        this.vertexFilter = new HashMap<>();
-        this.edgeSpreadFilter = new HashMap<>();
-        this.edgeFilter = new HashMap<>();
-
-        this.init(this.vertexFilter, des.vertexFilter(), expression -> true);
-        this.init(this.edgeSpreadFilter, des.edgeFilter(), expression -> true);
-        // TODO: Use a better scheme to parse expressions with only $element
-        this.init(this.edgeFilter, des.edgeFilter(), expression -> {
-            return !expression.contains(MESSAGE);
-        });
-    }
-
-    private void init(Map<String, Serializable> filter,
-                      List<FilterDescribe.DescribeItem> describes,
-                      Predicate<? super String> predicate) {
-        for (FilterDescribe.DescribeItem describe : describes) {
-            String labelName = describe.label();
-            String propertyFilter = describe.propertyFilter();
-            if (predicate.test(propertyFilter) || ALL.equals(labelName)) {
-                Serializable expression = MVEL.compileExpression(
-                                               describe.propertyFilter());
-                filter.put(labelName, expression);
-            }
-        }
-    }
-
-    public boolean filter(Vertex vertex) {
-        String label = vertex.label();
-        List<Serializable> expressions = expressions(this.vertexFilter, label);
-
-        if (expressions == PASS) {
-            return true;
-        }
-
-        Map<String, Map<String, Value>> params =
-                    ImmutableMap.of(ELEMENT, vertex.properties().get());
-        return filter(params, expressions);
-    }
-
-    public boolean filter(Edge edge) {
-        String label = edge.label();
-        List<Serializable> expressions = expressions(this.edgeFilter, label);
-
-        if (expressions == PASS) {
-            return true;
-        }
-
-        Map<String, Map<String, Value>> params =
-                    ImmutableMap.of(ELEMENT, edge.properties().get());
-        return filter(params, expressions);
-    }
-
-    public boolean filter(Edge edge, RingsDetectionMessage message) {
-        String label = edge.label();
-        List<Serializable> expressions = expressions(this.edgeSpreadFilter,
-                                                     label);
-
-        if (expressions == PASS) {
-            return true;
-        }
-
-        Map<String, Map<String, Value>> params =
-                    ImmutableMap.of(ELEMENT, edge.properties().get(),
-                                    MESSAGE, message.walkEdgeProp().get());
-        return filter(params, expressions);
-    }
-
-    private static boolean filter(Map<String, Map<String, Value>> params,
-                                  List<Serializable> expressions) {
-        Map<String, Object> map = convertParamsValueToObject(params);
-        return expressions.stream()
-                          .allMatch(expression -> {
-                              return (Boolean) MVEL.executeExpression(
-                                                    expression, map);
-                          });
-    }
-
-    private static List<Serializable> expressions(
-                                      Map<String, Serializable> filter,
-                                      String label) {
-        if (filter.size() == 0) {
-            return PASS;
-        }
-        List<Serializable> expressions = new ArrayList<>();
-        if (filter.containsKey(ALL)) {
-            expressions.add(filter.get(ALL));
-        }
-        if (filter.containsKey(label)) {
-            expressions.add(filter.get(label));
-        }
-
-        return expressions;
-    }
-
-    private static Map<String, Object> convertParamsValueToObject(
-                   Map<String, Map<String, Value>> params) {
-        Map<String, Object> result = new HashMap<>();
-        for (Map.Entry<String, Map<String, Value>> entry : params.entrySet()) {
-            Map<String, Object> subKv = new HashMap<>();
-            Map<String, Value> param = entry.getValue();
-            for (Map.Entry<String, Value> paramItem : param.entrySet()) {
-                subKv.put(paramItem.getKey(), paramItem.getValue().value());
-            }
-            result.put(entry.getKey(), subKv);
-        }
-        return result;
-    }
-}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java
new file mode 100644
index 00000000..fc0281f4
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.betweenness;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.slf4j.Logger;
+
+import org.apache.hugegraph.computer.core.common.exception.ComputerException;
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.IdSet;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+import com.baidu.hugegraph.util.Log;
+
+public class BetweennessCentrality implements Computation<BetweennessMessage> {
+
+    private static final Logger LOG = Log.logger(BetweennessCentrality.class);
+
+    public static final String OPTION_SAMPLE_RATE =
+                               "betweenness_centrality.sample_rate";
+
+    private double sampleRate;
+    /*
+     * Record the number of shortest paths for intermediate vertex, suppose
+     * there are two shortest paths from A(source vertex) to E(current vertex),
+     * [A -> B -> C -> E] and [A -> B -> D -> E]
+     *
+     * The saved data is as follows
+     * A: B:2
+     *    C:1
+     *    D:1
+     *    totalCount:2
+     */
+    private Map<Id, SeqCount> seqTable;
+
+    @Override
+    public String name() {
+        return "betweenness_centrality";
+    }
+
+    @Override
+    public String category() {
+        return "centrality";
+    }
+
+    @Override
+    public void init(Config config) {
+        this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D);
+        if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) {
+            throw new ComputerException("The param %s must be in (0.0, 1.0], " +
+                                        "actual got '%s'",
+                                        OPTION_SAMPLE_RATE, this.sampleRate);
+        }
+        this.seqTable = new HashMap<>();
+    }
+
+    @Override
+    public void close(Config config) {
+        // pass
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        // First superstep is special, we just send vertex id to its neighbors
+        BetweennessValue initialValue = new BetweennessValue(0.0D);
+        initialValue.arrivedVertices().add(vertex.id());
+        vertex.value(initialValue);
+        if (vertex.numEdges() == 0) {
+            return;
+        }
+
+        IdList sequence = new IdList();
+        sequence.add(vertex.id());
+        context.sendMessageToAllEdges(vertex, new BetweennessMessage(sequence));
+        LOG.info("Finished compute-0 step");
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<BetweennessMessage> messages) {
+        BetweennessValue value = vertex.value();
+        // The betweenness value to be updated
+        DoubleValue betweenness = value.betweenness();
+        // Collect the vertices sent here this time
+        IdSet arrivingVertices = new IdSet();
+        while (messages.hasNext()) {
+            BetweennessMessage message = messages.next();
+            // The value contributed to the intermediate node on the path
+            DoubleValue vote = message.vote();
+            betweenness.value(betweenness.value() + vote.value());
+
+            this.forward(context, vertex, message.sequence(), arrivingVertices);
+        }
+        value.arrivedVertices().addAll(arrivingVertices);
+
+        boolean active = !this.seqTable.isEmpty();
+        if (active) {
+            this.sendMessage(context);
+            this.seqTable.clear();
+        } else {
+            vertex.inactivate();
+        }
+    }
+
+    private void forward(ComputationContext context, Vertex vertex,
+                         IdList sequence, IdSet arrivingVertices) {
+        if (sequence.size() == 0) {
+            return;
+        }
+
+        BetweennessValue value = vertex.value();
+        IdSet arrivedVertices = value.arrivedVertices();
+        Id source = sequence.get(0);
+        // The source vertex is arriving at first time
+        if (!arrivedVertices.contains(source)) {
+            arrivingVertices.add(source);
+
+            SeqCount seqCount = this.seqTable.computeIfAbsent(
+                    source, k -> new SeqCount());
+            seqCount.totalCount++;
+            // Accumulate the number of shortest paths for intermediate vertices
+            for (int i = 1; i < sequence.size(); i++) {
+                Id id = sequence.get(i);
+                Map<Id, Integer> idCounts = seqCount.idCount;
+                idCounts.put(id, idCounts.getOrDefault(id, 0) + 1);
+            }
+
+            Id selfId = vertex.id();
+            sequence.add(selfId);
+            BetweennessMessage newMessage = new BetweennessMessage(sequence);
+            for (Edge edge : vertex.edges()) {
+                Id targetId = edge.targetId();
+                if (this.sample(selfId, targetId, edge) &&
+                    !sequence.contains(targetId)) {
+                    context.sendMessage(targetId, newMessage);
+                }
+            }
+        }
+    }
+
+    private void sendMessage(ComputationContext context) {
+        for (SeqCount seqCount : this.seqTable.values()) {
+            for (Map.Entry<Id, Integer> entry : seqCount.idCount.entrySet()) {
+                double vote = (double) entry.getValue() / seqCount.totalCount;
+                BetweennessMessage voteMessage = new BetweennessMessage(
+                                                 new DoubleValue(vote));
+
+                context.sendMessage(entry.getKey(), voteMessage);
+            }
+        }
+    }
+
+    private boolean sample(Id sourceId, Id targetId, Edge edge) {
+        // Now just use the simplest way
+        return Math.random() <= this.sampleRate;
+    }
+
+    private static class SeqCount {
+
+        private final Map<Id, Integer> idCount;
+        private int totalCount;
+
+        public SeqCount() {
+            this.idCount = new HashMap<>();
+            this.totalCount = 0;
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java
new file mode 100644
index 00000000..719d7219
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.betweenness;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.algorithm.centrality.closeness.ClosenessCentrality;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
+import org.apache.hugegraph.computer.core.master.DefaultMasterComputation;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
+
+public class BetweennessCentralityParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
+                         DefaultMasterComputation.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         BetweennessCentrality.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         BetweennessValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         BetweennessMessage.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphDoubleOutput.class.getName());
+        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
+                         ExtractAllPropertyInputFilter.class.getName());
+        this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE,
+                         "0.5D");
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java
new file mode 100644
index 00000000..6aa5aeff
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.betweenness;
+
+import java.io.IOException;
+
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.Value;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+import com.baidu.hugegraph.util.E;
+
+public class BetweennessMessage implements CustomizeValue<BetweennessMessage> {
+
+    private final IdList sequence;
+    private final DoubleValue vote;
+
+    public BetweennessMessage() {
+        this.sequence = new IdList();
+        this.vote = new DoubleValue(0.0D);
+    }
+
+    public BetweennessMessage(IdList sequence) {
+        this.sequence = sequence;
+        this.vote = new DoubleValue();
+    }
+
+    public BetweennessMessage(DoubleValue betweenness) {
+        this.sequence = new IdList();
+        this.vote = betweenness;
+    }
+
+    public IdList sequence() {
+        return this.sequence;
+    }
+
+    public DoubleValue vote() {
+        return this.vote;
+    }
+
+    @Override
+    public BetweennessMessage value() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.sequence.read(in);
+        this.vote.read(in);
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.sequence.write(out);
+        this.vote.write(out);
+    }
+
+    @Override
+    public int compareTo(Value value) {
+        E.checkArgument(value instanceof BetweennessMessage,
+                        "The BetweennessMessage can't compare with class '%s'",
+                        value.getClass());
+        BetweennessMessage other = (BetweennessMessage) value;
+        E.checkArgument(this.sequence.size() != 0, "Sequence can't be empty");
+        E.checkArgument(other.sequence.size() != 0, "Sequence can't be empty");
+        Id selfSourceId = this.sequence.get(0);
+        Id otherSourceId = other.sequence.get(0);
+        return selfSourceId.compareTo(otherSourceId);
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java
new file mode 100644
index 00000000..2ebf9525
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.betweenness;
+
+import java.io.IOException;
+
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.IdSet;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+
+public class BetweennessValue implements CustomizeValue<Double> {
+
+    private final DoubleValue betweenness;
+    private final IdSet arrivedVertices;
+
+    public BetweennessValue() {
+        this(0.0D);
+    }
+
+    public BetweennessValue(double betweenness) {
+        this.betweenness = new DoubleValue(betweenness);
+        this.arrivedVertices = new IdSet();
+    }
+
+    public DoubleValue betweenness() {
+        return this.betweenness;
+    }
+
+    public IdSet arrivedVertices() {
+        return this.arrivedVertices;
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.betweenness.read(in);
+        this.arrivedVertices.read(in);
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.betweenness.write(out);
+        this.arrivedVertices.write(out);
+    }
+
+    @Override
+    public Double value() {
+        return this.betweenness.value();
+    }
+
+    @Override
+    public String string() {
+        return this.value().toString();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java
new file mode 100644
index 00000000..e2f71ee6
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.closeness;
+
+import java.util.Iterator;
+
+import org.slf4j.Logger;
+
+import org.apache.hugegraph.computer.core.common.exception.ComputerException;
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.Value;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+import com.baidu.hugegraph.util.Log;
+import com.baidu.hugegraph.util.NumericUtil;
+
+public class ClosenessCentrality implements Computation<ClosenessMessage> {
+
+    private static final Logger LOG = Log.logger(ClosenessCentrality.class);
+
+    public static final String OPTION_WEIGHT_PROPERTY =
+                               "closeness_centrality.weight_property";
+    public static final String OPTION_SAMPLE_RATE =
+                               "closeness_centrality.sample_rate";
+
+    private String weightProp;
+    private double sampleRate;
+
+    @Override
+    public String name() {
+        return "closeness_centrality";
+    }
+
+    @Override
+    public String category() {
+        return "centrality";
+    }
+
+    @Override
+    public void init(Config config) {
+        this.weightProp = config.getString(OPTION_WEIGHT_PROPERTY, "");
+        this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D);
+        if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) {
+            throw new ComputerException("The param %s must be in (0.0, 1.0], " +
+                                        "actual got '%s'",
+                                        OPTION_SAMPLE_RATE, this.sampleRate);
+        }
+    }
+
+    @Override
+    public void close(Config config) {
+        // pass
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        // Set empty map as initial value
+        vertex.value(new ClosenessValue());
+
+        // Send messages to adjacent edges
+        for (Edge edge : vertex.edges()) {
+            Id senderId = vertex.id();
+            // Get property value
+            double value = this.weightValue(edge.property(this.weightProp));
+            DoubleValue distance = new DoubleValue(value);
+            ClosenessMessage message = new ClosenessMessage(senderId, senderId,
+                                                            distance);
+            context.sendMessage(edge.targetId(), message);
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<ClosenessMessage> messages) {
+        Id selfId = vertex.id();
+        // Save the distance from other vertices to self
+        ClosenessValue localValue = vertex.value();
+        boolean active = false;
+        while (messages.hasNext()) {
+            active = true;
+            ClosenessMessage message = messages.next();
+            Id senderId = message.senderId();
+            // In theory, it won't happen, defensive programming
+            if (selfId.equals(senderId)) {
+                continue;
+            }
+            Id startId = message.startId();
+            if (selfId.equals(startId)) {
+                continue;
+            }
+
+            DoubleValue oldValue = localValue.get(startId);
+            DoubleValue newValue = message.distance();
+            // If the id already exists and the new value >= old value, skip it
+            if (oldValue != null && newValue.compareTo(oldValue) >= 0) {
+                continue;
+            }
+            // Update local saved values (take smaller value)
+            localValue.put(startId, newValue);
+            // Send this smaller value to neighbors
+            this.sendMessage(context, vertex, senderId, startId, newValue);
+        }
+        if (!active) {
+            vertex.inactivate();
+        }
+    }
+
+    private void sendMessage(ComputationContext context, Vertex vertex,
+                             Id senderId, Id startId, DoubleValue newValue) {
+        Id selfId = vertex.id();
+        double baseNewValue = this.weightValue(newValue);
+        for (Edge edge : vertex.edges()) {
+            Id targetId = edge.targetId();
+            if (senderId.equals(targetId) || startId.equals(targetId)) {
+                continue;
+            }
+            if (!sample(selfId, targetId, edge)) {
+                continue;
+            }
+            // Update distance information
+            double updatedValue = baseNewValue + this.weightValue(edge.property(
+                                                 this.weightProp));
+            DoubleValue newDistance = new DoubleValue(updatedValue);
+            ClosenessMessage message = new ClosenessMessage(selfId, startId,
+                                                            newDistance);
+            context.sendMessage(targetId, message);
+        }
+    }
+
+    private boolean sample(Id sourceId, Id targetId, Edge edge) {
+        // Now just use the simplest way
+        return Math.random() <= this.sampleRate;
+    }
+
+    private double weightValue(Value rawValue) {
+        if (rawValue == null) {
+            return 1.0D;
+        }
+        if (rawValue.isNumber()) {
+            return NumericUtil.convertToNumber(rawValue).doubleValue();
+        } else {
+            throw new ComputerException("The weight property can only be " +
+                                        "either Long or Int or Double or " +
+                                        "Float, but got %s",
+                                        rawValue.valueType());
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java
new file mode 100644
index 00000000..0afc2932
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.closeness;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
+import org.apache.hugegraph.computer.core.master.DefaultMasterComputation;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
+
+public class ClosenessCentralityParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
+                         DefaultMasterComputation.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         ClosenessCentrality.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         ClosenessValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         ClosenessMessage.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphDoubleOutput.class.getName());
+        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
+                         ExtractAllPropertyInputFilter.class.getName());
+        this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE,
+                         "0.5D");
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java
new file mode 100644
index 00000000..d7114bf7
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.closeness;
+
+import java.io.IOException;
+
+import org.apache.hugegraph.computer.core.common.ComputerContext;
+import org.apache.hugegraph.computer.core.graph.GraphFactory;
+import org.apache.hugegraph.computer.core.graph.id.BytesId;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.graph.value.ValueType;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+
+public class ClosenessMessage implements CustomizeValue<ClosenessMessage> {
+
+    private final GraphFactory graphFactory;
+
+    private Id senderId;
+    private Id startId;
+    private DoubleValue distance;
+
+    public ClosenessMessage() {
+        this(new BytesId(), new BytesId(), new DoubleValue(0.0D));
+    }
+
+    public ClosenessMessage(Id senderId, Id startId, DoubleValue distance) {
+        this.graphFactory = ComputerContext.instance().graphFactory();
+        this.senderId = senderId;
+        this.startId = startId;
+        this.distance = distance;
+    }
+
+    public Id senderId() {
+        return this.senderId;
+    }
+
+    public Id startId() {
+        return this.startId;
+    }
+
+    public DoubleValue distance() {
+        return this.distance;
+    }
+
+    @Override
+    public ClosenessMessage value() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.senderId = this.graphFactory.createId();
+        this.senderId.read(in);
+
+        this.startId = this.graphFactory.createId();
+        this.startId.read(in);
+
+        this.distance = (DoubleValue) this.graphFactory.createValue(
+                                      ValueType.DOUBLE);
+        this.distance.read(in);
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.senderId.write(out);
+        this.startId.write(out);
+        this.distance.write(out);
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java
new file mode 100644
index 00000000..4e167407
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.closeness;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.MapValue;
+
+public class ClosenessValue extends MapValue<DoubleValue> {
+
+    @Override
+    public Double value() {
+        // Cumulative distance
+        double centrality = 0;
+        for (Map.Entry<Id, DoubleValue> entry : this.entrySet()) {
+            centrality += 1.0D / entry.getValue().value();
+        }
+        return centrality;
+    }
+
+    @Override
+    public String string() {
+        return this.value().toString();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java
new file mode 100644
index 00000000..6142019d
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.degree;
+
+import java.util.Iterator;
+
+import org.apache.commons.lang.StringUtils;
+
+import org.apache.hugegraph.computer.core.common.exception.ComputerException;
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.NullValue;
+import org.apache.hugegraph.computer.core.graph.value.Value;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+import org.apache.hugegraph.computer.core.worker.WorkerContext;
+import com.baidu.hugegraph.util.NumericUtil;
+
+public class DegreeCentrality implements Computation<NullValue> {
+
+    public static final String OPTION_WEIGHT_PROPERTY =
+                               "degree_centrality.weight_property";
+
+    private boolean calculateByWeightProperty;
+    private String weightProperty;
+
+    @Override
+    public String name() {
+        return "degree_centrality";
+    }
+
+    @Override
+    public String category() {
+        return "centrality";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        if (!this.calculateByWeightProperty) {
+            vertex.value(new DoubleValue(vertex.numEdges()));
+        } else {
+            /*
+             *  TODO: Here we use doubleValue type now, we will use BigDecimal
+             *  and output "BigDecimalValue" to resolve double type overflow
+             *  int the future;
+             */
+            double totalWeight = 0.0;
+            Iterator<Edge> edges = vertex.edges().iterator();
+            while (edges.hasNext()) {
+                Edge edge = edges.next();
+                double weight = weightValue(edge.property(this.weightProperty));
+                totalWeight += weight;
+                if (Double.isInfinite(totalWeight)) {
+                    throw new ComputerException("Calculate weight overflow," +
+                                                "current is %s, edge '%s' " +
+                                                "is %s",
+                                                totalWeight, edge, weight);
+                }
+            }
+            vertex.value(new DoubleValue(totalWeight));
+        }
+        vertex.inactivate();
+    }
+
+    private static double weightValue(Value value) {
+        if (value == null) {
+            return 1.0;
+        }
+
+        switch (value.valueType()) {
+            case LONG:
+            case INT:
+            case DOUBLE:
+            case FLOAT:
+                return NumericUtil.convertToNumber(value).doubleValue();
+            default:
+                throw new ComputerException("The weight property can only be " +
+                                            "either Long or Int or Double or " +
+                                            "Float, but got %s",
+                                            value.valueType());
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<NullValue> messages) {
+        // pass
+    }
+
+    @Override
+    public void init(Config config) {
+        this.weightProperty = config.getString(
+                              OPTION_WEIGHT_PROPERTY, "");
+        this.calculateByWeightProperty = StringUtils.isNotEmpty(
+                                         this.weightProperty);
+    }
+
+    @Override
+    public void close(Config config) {
+        // pass
+    }
+
+    @Override
+    public void beforeSuperstep(WorkerContext context) {
+        // pass
+    }
+
+    @Override
+    public void afterSuperstep(WorkerContext context) {
+        // pass
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java
new file mode 100644
index 00000000..897c9cde
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.degree;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.master.DefaultMasterComputation;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
+
+public class DegreeCentralityParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
+                         DefaultMasterComputation.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         DegreeCentrality.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         DoubleValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         DoubleValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
+                         DoubleValueSumCombiner.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphDoubleOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java
new file mode 100644
index 00000000..27891b3e
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.pagerank;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.computer.core.aggregator.Aggregator;
+import org.apache.hugegraph.computer.core.combiner.Combiner;
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.LongValue;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+import org.apache.hugegraph.computer.core.worker.WorkerContext;
+
+public class PageRank implements Computation<DoubleValue> {
+
+    public static final String OPTION_ALPHA = "page_rank.alpha";
+
+    public static final double ALPHA_DEFAULT_VALUE = 0.15;
+
+    private double alpha;
+    private double danglingRank;
+    private double initialRankInSuperstep;
+    private double cumulativeRank;
+
+    private Aggregator<DoubleValue> l1DiffAggr;
+    private Aggregator<DoubleValue> cumulativeRankAggr;
+    private Aggregator<LongValue> danglingVertexNumAggr;
+    private Aggregator<DoubleValue> danglingCumulativeAggr;
+
+    // Initial value in superstep 0.
+    private DoubleValue initialValue;
+    private DoubleValue contribValue;
+
+    @Override
+    public String name() {
+        return "page_rank";
+    }
+
+    @Override
+    public String category() {
+        return "centrality";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        vertex.value(this.initialValue);
+        this.cumulativeRankAggr.aggregateValue(this.initialValue.value());
+        int edgeCount = vertex.numEdges();
+        if (edgeCount == 0) {
+            this.danglingVertexNumAggr.aggregateValue(1L);
+            this.danglingCumulativeAggr.aggregateValue(
+                                        this.initialValue.value());
+        } else {
+            this.contribValue.value(this.initialValue.value() / edgeCount);
+            context.sendMessageToAllEdges(vertex, this.contribValue);
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<DoubleValue> messages) {
+        DoubleValue message = Combiner.combineAll(context.combiner(), messages);
+        double rankFromNeighbors = 0.0;
+        if (message != null) {
+            rankFromNeighbors = message.value();
+        }
+        double rank = (this.danglingRank + rankFromNeighbors) *
+                      (1.0 - this.alpha) + this.initialRankInSuperstep;
+        rank /= this.cumulativeRank;
+        DoubleValue oldRank = vertex.value();
+        vertex.value(new DoubleValue(rank));
+        this.l1DiffAggr.aggregateValue(Math.abs(oldRank.value() - rank));
+        this.cumulativeRankAggr.aggregateValue(rank);
+        int edgeCount = vertex.numEdges();
+        if (edgeCount == 0) {
+            this.danglingVertexNumAggr.aggregateValue(1L);
+            this.danglingCumulativeAggr.aggregateValue(rank);
+        } else {
+            this.contribValue.value(rank / edgeCount);
+            context.sendMessageToAllEdges(vertex, this.contribValue);
+        }
+    }
+
+    @Override
+    public void init(Config config) {
+        this.alpha = config.getDouble(OPTION_ALPHA, ALPHA_DEFAULT_VALUE);
+        this.contribValue = new DoubleValue();
+    }
+
+    @Override
+    public void close(Config config) {
+        // pass
+    }
+
+    @Override
+    public void beforeSuperstep(WorkerContext context) {
+        // Get aggregator values for computation
+        DoubleValue danglingTotalRank = context.aggregatedValue(
+                    PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY);
+        DoubleValue cumulativeRank = context.aggregatedValue(
+                    PageRank4Master.AGGR_COMULATIVE_PROBABILITY);
+        long totalVertex = context.totalVertexCount();
+
+        this.danglingRank = danglingTotalRank.value() / totalVertex;
+        this.initialRankInSuperstep = this.alpha / totalVertex;
+        this.cumulativeRank = cumulativeRank.value();
+        this.initialValue = new DoubleValue(1.0 / totalVertex);
+
+        // Create aggregators
+        this.l1DiffAggr = context.createAggregator(
+                          PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY);
+        this.cumulativeRankAggr = context.createAggregator(
+                                  PageRank4Master.AGGR_COMULATIVE_PROBABILITY);
+        this.danglingVertexNumAggr = context.createAggregator(
+             PageRank4Master.AGGR_DANGLING_VERTICES_NUM);
+        this.danglingCumulativeAggr = context.createAggregator(
+             PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY);
+    }
+
+    @Override
+    public void afterSuperstep(WorkerContext context) {
+        context.aggregateValue(
+                PageRank4Master.AGGR_COMULATIVE_PROBABILITY,
+                this.cumulativeRankAggr.aggregatedValue());
+        context.aggregateValue(
+                PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY,
+                this.l1DiffAggr.aggregatedValue());
+        context.aggregateValue(
+                PageRank4Master.AGGR_DANGLING_VERTICES_NUM,
+                this.danglingVertexNumAggr.aggregatedValue());
+        context.aggregateValue(
+                PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY,
+                this.danglingCumulativeAggr.aggregatedValue());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java
new file mode 100644
index 00000000..ae7171ec
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.pagerank;
+
+import org.slf4j.Logger;
+
+import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
+import org.apache.hugegraph.computer.core.combiner.LongValueSumCombiner;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.graph.value.LongValue;
+import org.apache.hugegraph.computer.core.graph.value.ValueType;
+import org.apache.hugegraph.computer.core.master.MasterComputation;
+import org.apache.hugegraph.computer.core.master.MasterComputationContext;
+import org.apache.hugegraph.computer.core.master.MasterContext;
+import com.baidu.hugegraph.util.Log;
+
+public class PageRank4Master implements MasterComputation {
+
+    private static final Logger LOG = Log.logger(PageRank4Master.class);
+
+    public static final String CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY =
+                               "pagerank.l1DiffThreshold";
+    public static final double CONF_L1_DIFF_THRESHOLD_DEFAULT = 0.00001D;
+
+    public static final String AGGR_L1_NORM_DIFFERENCE_KEY =
+                               "pagerank.aggr_l1_norm_difference";
+    public static final String AGGR_DANGLING_VERTICES_NUM =
+                               "pagerank.dangling_vertices_num";
+    public static final String AGGR_COMULATIVE_DANGLING_PROBABILITY =
+                               "pagerank.comulative_dangling_probability";
+    public static final String AGGR_COMULATIVE_PROBABILITY =
+                               "pagerank.comulative_probability";
+
+    private double l1DiffThreshold;
+
+    @Override
+    public void init(MasterContext context) {
+        this.l1DiffThreshold = context.config().getDouble(
+                               CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY,
+                               CONF_L1_DIFF_THRESHOLD_DEFAULT);
+        context.registerAggregator(AGGR_DANGLING_VERTICES_NUM,
+                                   ValueType.LONG,
+                                   LongValueSumCombiner.class);
+        context.registerAggregator(AGGR_COMULATIVE_DANGLING_PROBABILITY,
+                                   ValueType.DOUBLE,
+                                   DoubleValueSumCombiner.class);
+        context.registerAggregator(AGGR_COMULATIVE_PROBABILITY,
+                                   ValueType.DOUBLE,
+                                   DoubleValueSumCombiner.class);
+        context.registerAggregator(AGGR_L1_NORM_DIFFERENCE_KEY,
+                                   ValueType.DOUBLE,
+                                   DoubleValueSumCombiner.class);
+    }
+
+    @Override
+    public void close(MasterContext context) {
+        // pass
+    }
+
+    @Override
+    public boolean compute(MasterComputationContext context) {
+        LongValue danglingVerticesNum = context.aggregatedValue(
+                                        AGGR_DANGLING_VERTICES_NUM);
+        DoubleValue danglingProbability = context.aggregatedValue(
+                                          AGGR_COMULATIVE_DANGLING_PROBABILITY);
+        DoubleValue cumulativeProbability = context.aggregatedValue(
+                                            AGGR_COMULATIVE_PROBABILITY);
+        DoubleValue l1NormDifference = context.aggregatedValue(
+                                       AGGR_L1_NORM_DIFFERENCE_KEY);
+
+        StringBuilder sb = new StringBuilder();
+        sb.append("[Superstep ").append(context.superstep()).append("]")
+          .append(", dangling vertices num = ").append(danglingVerticesNum)
+          .append(", cumulative dangling probability = ")
+          .append(danglingProbability.value())
+          .append(", cumulative probability = ").append(cumulativeProbability)
+          .append(", l1 norm difference = ").append(l1NormDifference.value());
+
+        LOG.info("PageRank running status: {}", sb);
+        double l1Diff = l1NormDifference.value();
+        if (context.superstep() > 1 && l1Diff <= this.l1DiffThreshold) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java
new file mode 100644
index 00000000..a489253d
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.centrality.pagerank;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.value.DoubleValue;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput;
+
+public class PageRankParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS,
+                         PageRank4Master.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         PageRank.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         DoubleValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         DoubleValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
+                         DoubleValueSumCombiner.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphDoubleOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java
new file mode 100644
index 00000000..8b3cb19b
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.kcore;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.computer.core.combiner.Combiner;
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+import com.google.common.collect.Iterators;
+
+public class Kcore implements Computation<Id> {
+
+    public static final String OPTION_K = "kcore.k";
+    public static final int K_DEFAULT_VALUE = 3;
+
+    private final KcoreValue initValue = new KcoreValue();
+
+    private int k = 0;
+
+    @Override
+    public String name() {
+        return "kcore";
+    }
+
+    @Override
+    public String category() {
+        return "community";
+    }
+
+    @Override
+    public void init(Config config) {
+        this.k = config.getInt(OPTION_K, K_DEFAULT_VALUE);
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        KcoreValue value = this.initValue;
+        value.core((Id) vertex.id().copy());
+        vertex.value(value);
+
+        if (vertex.numEdges() < this.k) {
+            value.degree(0);
+            /*
+             * TODO: send int type message at phase 1, it's different from id
+             * type of phase 2 (wcc message), need support switch message type.
+             */
+            context.sendMessageToAllEdges(vertex, vertex.id());
+            vertex.inactivate();
+        } else {
+            value.degree(vertex.numEdges());
+            assert vertex.active();
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<Id> messages) {
+        KcoreValue value = vertex.value();
+        if (!value.active()) {
+            // Ignore messages of deleted vertex
+            vertex.inactivate();
+            return;
+        }
+
+        int superstep = context.superstep();
+        if (superstep <= 2) {
+            int deleted = Iterators.size(messages);
+            assert value.active();
+            if (value.decreaseDegree(deleted) < this.k) {
+                // From active to inactive, delete self vertex
+                value.degree(0);
+                if (superstep == 1) {
+                    context.sendMessageToAllEdges(vertex, vertex.id());
+                }
+                vertex.inactivate();
+            } else {
+                // From active to active, do wcc from superstep 2
+                if (superstep == 2) {
+                    // Start wcc
+                    context.sendMessageToAllEdgesIf(vertex, vertex.id(),
+                                                    (source, target) -> {
+                        return source.compareTo(target) < 0;
+                    });
+                    vertex.inactivate();
+                } else {
+                    // Keep active at superstep 1 to continue superstep 2
+                    assert superstep == 1;
+                    assert vertex.active();
+                }
+            }
+        } else {
+            // Do wcc
+            assert superstep > 2;
+            Id message = Combiner.combineAll(context.combiner(), messages);
+            if (value.core().compareTo(message) > 0) {
+                value.core(message);
+                context.sendMessageToAllEdges(vertex, message);
+            }
+            vertex.inactivate();
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java
new file mode 100644
index 00000000..bdf42ab3
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.kcore;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.combiner.ValueMinCombiner;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.id.BytesId;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
+
+public class KcoreParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         Kcore.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         KcoreValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         BytesId.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
+                         ValueMinCombiner.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphIdOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java
new file mode 100644
index 00000000..33106214
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.kcore;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import org.apache.hugegraph.computer.core.graph.id.BytesId;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+import com.baidu.hugegraph.util.E;
+
+public class KcoreValue implements CustomizeValue<Object> {
+
+    private int degree;
+    private Id core;
+
+    public KcoreValue() {
+        this.degree = 0;
+        this.core = new BytesId();
+    }
+
+    public void degree(int degree) {
+        assert degree >= 0;
+        this.degree = degree;
+    }
+
+    public int degree() {
+        return this.degree;
+    }
+
+    public int decreaseDegree(int decrease) {
+        assert decrease <= this.degree;
+        this.degree -= decrease;
+        return this.degree;
+    }
+
+    public boolean active() {
+        return this.degree > 0;
+    }
+
+    public void core(Id core) {
+        this.core = core;
+    }
+
+    public Id core() {
+        E.checkNotNull(this.core, "core");
+        return this.core;
+    }
+
+    @Override
+    public KcoreValue copy() {
+        KcoreValue kcoreValue = new KcoreValue();
+        kcoreValue.core = (Id) this.core.copy();
+        kcoreValue.degree = this.degree;
+        return kcoreValue;
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.core.read(in);
+        this.degree = in.readInt();
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.core.write(out);
+        out.writeInt(this.degree);
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this)
+                   .append("core", this.core)
+                   .append("degree", this.degree)
+                   .toString();
+    }
+
+    @Override
+    public Object value() {
+        return this.core.value();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java
new file mode 100644
index 00000000..fde0f56e
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.lpa;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import org.apache.commons.lang3.mutable.MutableInt;
+
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+
+public class Lpa implements Computation<Id> {
+
+    private final Random random = new Random();
+
+    @Override
+    public String name() {
+        return "lpa";
+    }
+
+    @Override
+    public String category() {
+        return "community";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        Id value = vertex.id();
+        vertex.value(value);
+        vertex.inactivate();
+        context.sendMessageToAllEdges(vertex, value);
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<Id> messages) {
+        Id label = this.voteLabel(messages);
+        Id value = vertex.value();
+        if (!value.equals(label)) {
+            vertex.value(label);
+            context.sendMessageToAllEdges(vertex, label);
+        }
+        vertex.inactivate();
+    }
+
+    private Id voteLabel(Iterator<Id> messages) {
+        // Calculate label frequency
+        Map<Id, MutableInt> labels = new HashMap<>();
+        assert messages.hasNext();
+        while (messages.hasNext()) {
+            Id label = messages.next();
+            MutableInt labelCount = labels.get(label);
+            if (labelCount != null) {
+                labelCount.increment();
+            } else {
+                labels.put(label, new MutableInt(1));
+            }
+        }
+
+        // Calculate the labels with maximum frequency
+        List<Id> maxLabels = new ArrayList<>();
+        int maxFreq = 1;
+        for (Map.Entry<Id, MutableInt> e : labels.entrySet()) {
+            int value = e.getValue().intValue();
+            if (value > maxFreq) {
+                maxFreq = value;
+                maxLabels.clear();
+            }
+            if (value == maxFreq) {
+                maxLabels.add(e.getKey());
+            }
+        }
+
+        // Random choice
+        int selected = this.random.nextInt(maxLabels.size());
+        return maxLabels.get(selected);
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java
new file mode 100644
index 00000000..d2eca348
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.lpa;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.id.BytesId;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
+
+public class LpaParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         Lpa.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         BytesId.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         BytesId.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphIdOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java
new file mode 100644
index 00000000..4f4d5fee
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.trianglecount;
+
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.edge.Edges;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+
+public class TriangleCount implements Computation<IdList> {
+
+    @Override
+    public String name() {
+        return "triangle_count";
+    }
+
+    @Override
+    public String category() {
+        return "community";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        IdList selfId = new IdList();
+        selfId.add(vertex.id());
+
+        context.sendMessageToAllEdgesIf(vertex, selfId, (ids, targetId) -> {
+            return !ids.get(0).equals(targetId);
+        });
+        vertex.value(new TriangleCountValue());
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<IdList> messages) {
+        Integer count = this.triangleCount(context, vertex, messages);
+        if (count != null) {
+            ((TriangleCountValue) vertex.value()).count(count);
+            vertex.inactivate();
+        }
+    }
+
+    private Integer triangleCount(ComputationContext context, Vertex vertex,
+                                  Iterator<IdList> messages) {
+        IdList neighbors = ((TriangleCountValue) vertex.value()).idList();
+
+        if (context.superstep() == 1) {
+            // Collect outgoing neighbors
+            Set<Id> outNeighbors = getOutNeighbors(vertex);
+            neighbors.addAll(outNeighbors);
+
+            // Collect incoming neighbors
+            while (messages.hasNext()) {
+                IdList idList = messages.next();
+                assert idList.size() == 1;
+                Id inId = idList.get(0);
+                if (!outNeighbors.contains(inId)) {
+                    neighbors.add(inId);
+                }
+            }
+
+            // Send all neighbors to neighbors
+            for (Id targetId : neighbors.values()) {
+                context.sendMessage(targetId, neighbors);
+            }
+        } else if (context.superstep() == 2) {
+            int count = 0;
+
+            Set<Id> allNeighbors = new HashSet<>(neighbors.values());
+            while (messages.hasNext()) {
+                IdList twoDegreeNeighbors = messages.next();
+                for (Id twoDegreeNeighbor : twoDegreeNeighbors.values()) {
+                    if (allNeighbors.contains(twoDegreeNeighbor)) {
+                        count++;
+                    }
+                }
+            }
+
+            return count >> 1;
+        }
+        return null;
+    }
+
+    private static Set<Id> getOutNeighbors(Vertex vertex) {
+        Set<Id> outNeighbors = new HashSet<>();
+        Edges edges = vertex.edges();
+        for (Edge edge : edges) {
+            Id targetId = edge.targetId();
+            if (!vertex.id().equals(targetId)) {
+                outNeighbors.add(targetId);
+            }
+        }
+        return outNeighbors;
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java
new file mode 100644
index 00000000..69f56ea1
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.trianglecount;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.config.EdgeFrequency;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphIntOutput;
+
+public class TriangleCountParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         TriangleCount.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         IdList.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         TriangleCountValue.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphIntOutput.class.getName());
+        this.setIfAbsent(params, ComputerOptions.INPUT_EDGE_FREQ.name(),
+                         EdgeFrequency.SINGLE.name());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java
new file mode 100644
index 00000000..ee80e96a
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.trianglecount;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.IntValue;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+
+public class TriangleCountValue implements CustomizeValue<Integer> {
+
+    private IdList idList;
+    private IntValue count;
+
+    public TriangleCountValue() {
+        this.idList = new IdList();
+        this.count = new IntValue();
+    }
+
+    public IdList idList() {
+        return this.idList;
+    }
+
+    public long count() {
+        return this.count.longValue();
+    }
+
+    public void count(int count) {
+        this.count.value(count);
+    }
+
+    @Override
+    public TriangleCountValue copy() {
+        TriangleCountValue triangleCountValue = new TriangleCountValue();
+        triangleCountValue.idList = this.idList.copy();
+        triangleCountValue.count = this.count.copy();
+        return triangleCountValue;
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.idList.read(in);
+        this.count.read(in);
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.idList.write(out);
+        this.count.write(out);
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this)
+                   .append("idList", this.idList)
+                   .append("count", this.count)
+                   .toString();
+    }
+
+    @Override
+    public Integer value() {
+        return this.count.value();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java
new file mode 100644
index 00000000..778b4b7c
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.wcc;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.computer.core.combiner.Combiner;
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+
+/**
+ * Wcc stands for Weak Connected Component.
+ */
+public class Wcc implements Computation<Id> {
+
+    @Override
+    public String name() {
+        return "wcc";
+    }
+
+    @Override
+    public String category() {
+        return "community";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        Id min = vertex.id();
+        for (Edge edge : vertex.edges()) {
+            if (edge.targetId().compareTo(min) < 0) {
+                min = edge.targetId();
+            }
+        }
+        Id value = min;
+        vertex.value(value);
+        vertex.inactivate();
+        context.sendMessageToAllEdgesIf(vertex, value, (result, target) -> {
+            return result.compareTo(target) < 0;
+        });
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<Id> messages) {
+        Id message = Combiner.combineAll(context.combiner(), messages);
+        Id value = vertex.value();
+        if (value.compareTo(message) > 0) {
+            vertex.value(message);
+            context.sendMessageToAllEdges(vertex, message);
+        }
+        vertex.inactivate();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java
new file mode 100644
index 00000000..b48d4179
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.community.wcc;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.combiner.ValueMinCombiner;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.id.BytesId;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphIdOutput;
+
+public class WccParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         Wcc.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         BytesId.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         BytesId.class.getName());
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS,
+                         ValueMinCombiner.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         HugeGraphIdOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java
new file mode 100644
index 00000000..33bb755e
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.IdListList;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+
+public class RingsDetection implements Computation<IdList> {
+
+    @Override
+    public String name() {
+        return "rings";
+    }
+
+    @Override
+    public String category() {
+        return "path";
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        vertex.value(new IdListList());
+        if (vertex.edges().size() == 0) {
+            return;
+        }
+
+        // Init path
+        Id id = vertex.id();
+        IdList path = new IdList();
+        path.add(id);
+
+        for (Edge edge : vertex.edges()) {
+            /*
+             * Only send path to vertex whose id is larger than
+             * or equals current vertex id
+             */
+            if (id.compareTo(edge.targetId()) <= 0) {
+                context.sendMessage(edge.targetId(), path);
+            }
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<IdList> messages) {
+        Id id = vertex.id();
+        boolean halt = true;
+        while (messages.hasNext()) {
+            halt = false;
+            IdList sequence = messages.next();
+            if (id.equals(sequence.get(0))) {
+                // Use the smallest vertex record ring
+                boolean isMin = true;
+                for (int i = 1; i < sequence.size(); i++) {
+                    Id pathVertexValue = sequence.get(i);
+                    if (id.compareTo(pathVertexValue) > 0) {
+                        isMin = false;
+                        break;
+                    }
+                }
+                if (isMin) {
+                    sequence.add(id);
+                    IdListList sequences = vertex.value();
+                    sequences.add(sequence);
+                }
+            } else {
+                boolean contains = false;
+                // Drop sequence if path contains this vertex
+                for (int i = 0; i < sequence.size(); i++) {
+                    Id pathVertexValue = sequence.get(i);
+                    if (pathVertexValue.equals(vertex.id())) {
+                        contains = true;
+                        break;
+                    }
+                }
+                // Field ringId is smallest vertex id in path
+                Id ringId = sequence.get(0);
+                if (!contains) {
+                    sequence.add(vertex.id());
+                    for (Edge edge : vertex.edges()) {
+                        if (ringId.compareTo(edge.targetId()) <= 0) {
+                            context.sendMessage(edge.targetId(), sequence);
+                        }
+                    }
+                }
+            }
+        }
+        if (halt) {
+            vertex.inactivate();
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java
new file mode 100644
index 00000000..a35f2f50
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.hugegraph.computer.core.graph.value.IdListList;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.output.hg.HugeGraphOutput;
+
+public class RingsDetectionOutput extends HugeGraphOutput<List<String>> {
+
+    @Override
+    protected void prepareSchema() {
+        this.client().schema().propertyKey(this.name())
+                     .asText()
+                     .writeType(this.writeType())
+                     .valueList()
+                     .ifNotExist()
+                     .create();
+    }
+
+    @Override
+    protected List<String> value(Vertex vertex) {
+        IdListList value = vertex.value();
+        List<String> propValues = new ArrayList<>();
+        for (int i = 0; i < value.size(); i++) {
+            propValues.add(value.get(i).toString());
+        }
+        return propValues;
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java
new file mode 100644
index 00000000..4a8928e3
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.IdListList;
+
+public class RingsDetectionParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         RingsDetection.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         IdList.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         IdListList.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         RingsDetectionOutput.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java
new file mode 100644
index 00000000..9efd377a
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings.filter;
+
+import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
+
+import com.baidu.hugegraph.util.JsonUtil;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.collect.ImmutableList;
+
+public class FilterDescribe {
+
+    private final List<DescribeItem> vertexFilter;
+    private final List<DescribeItem> edgeFilter;
+
+    @JsonCreator
+    private FilterDescribe(@JsonProperty("vertex_filter")
+                           List<DescribeItem> vertexFilter,
+                           @JsonProperty("edge_filter")
+                           List<DescribeItem> edgeFilter) {
+        this.vertexFilter = CollectionUtils.isEmpty(vertexFilter) ?
+                            ImmutableList.of() :
+                            ImmutableList.copyOf(vertexFilter);
+        this.edgeFilter = CollectionUtils.isEmpty(edgeFilter) ?
+                          ImmutableList.of() :
+                          ImmutableList.copyOf(edgeFilter);
+    }
+
+    public static FilterDescribe of(String describe) {
+        return JsonUtil.fromJson(describe, FilterDescribe.class);
+    }
+
+    public List<DescribeItem> vertexFilter() {
+        return this.vertexFilter;
+    }
+
+    public List<DescribeItem> edgeFilter() {
+        return this.edgeFilter;
+    }
+
+    public static class DescribeItem {
+
+        private final String label;
+        private final String propertyFilter;
+
+        @JsonCreator
+        private DescribeItem(@JsonProperty(value = "label",
+                                           required = true)
+                             String label,
+                             @JsonProperty(value = "property_filter",
+                                           required = true)
+                             String propertyFilter) {
+            this.label = label;
+            this.propertyFilter = propertyFilter;
+        }
+
+        public String label() {
+            return this.label;
+        }
+
+        public String propertyFilter() {
+            return this.propertyFilter;
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java
new file mode 100644
index 00000000..cd1c6165
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings.filter;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hugegraph.computer.core.common.ComputerContext;
+import org.apache.hugegraph.computer.core.graph.GraphFactory;
+import org.apache.hugegraph.computer.core.graph.properties.DefaultProperties;
+import org.apache.hugegraph.computer.core.graph.properties.Properties;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.io.RandomAccessInput;
+import org.apache.hugegraph.computer.core.io.RandomAccessOutput;
+
+public class RingsDetectionMessage implements CustomizeValue<List<Object>> {
+
+    private final IdList path;
+    private Properties walkEdgeProps;
+
+    public RingsDetectionMessage() {
+        GraphFactory graphFactory = ComputerContext.instance().graphFactory();
+        this.path = new IdList();
+        this.walkEdgeProps = new DefaultProperties(graphFactory);
+    }
+
+    @Override
+    public void read(RandomAccessInput in) throws IOException {
+        this.path.read(in);
+        this.walkEdgeProps.read(in);
+    }
+
+    @Override
+    public void write(RandomAccessOutput out) throws IOException {
+        this.path.write(out);
+        this.walkEdgeProps.write(out);
+    }
+
+    public IdList path() {
+        return this.path;
+    }
+
+    public void addPath(Vertex vertex) {
+        this.path.add(vertex.id());
+    }
+
+    public Properties walkEdgeProp() {
+        return this.walkEdgeProps;
+    }
+
+    public void walkEdgeProp(Properties properties) {
+        this.walkEdgeProps = properties;
+    }
+
+    @Override
+    public List<Object> value() {
+        return this.path.value();
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java
new file mode 100644
index 00000000..f9c6d6bc
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings.filter;
+
+import java.util.Iterator;
+
+import org.apache.hugegraph.computer.core.config.Config;
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.id.Id;
+import org.apache.hugegraph.computer.core.graph.value.IdList;
+import org.apache.hugegraph.computer.core.graph.value.IdListList;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import org.apache.hugegraph.computer.core.worker.Computation;
+import org.apache.hugegraph.computer.core.worker.ComputationContext;
+
+public class RingsDetectionWithFilter
+       implements Computation<RingsDetectionMessage> {
+
+    public static final String OPTION_FILTER = "rings.property_filter";
+
+    private SpreadFilter filter;
+
+    @Override
+    public String name() {
+        return "rings_with_filter";
+    }
+
+    @Override
+    public String category() {
+        return "path";
+    }
+
+    @Override
+    public void init(Config config) {
+        this.filter = new SpreadFilter(config.getString(OPTION_FILTER, "{}"));
+    }
+
+    @Override
+    public void compute0(ComputationContext context, Vertex vertex) {
+        vertex.value(new IdListList());
+        if (vertex.edges().size() == 0 || !this.filter.filter(vertex)) {
+            return;
+        }
+
+        RingsDetectionMessage message = new RingsDetectionMessage();
+        message.addPath(vertex);
+        for (Edge edge : vertex.edges()) {
+            if (this.filter.filter(edge)) {
+                message.walkEdgeProp(edge.properties());
+                context.sendMessage(edge.targetId(), message);
+            }
+        }
+    }
+
+    @Override
+    public void compute(ComputationContext context, Vertex vertex,
+                        Iterator<RingsDetectionMessage> messages) {
+        boolean halt = true;
+        if (this.filter.filter(vertex)) {
+            Id vertexId = vertex.id();
+            while (messages.hasNext()) {
+                halt = false;
+                RingsDetectionMessage message = messages.next();
+                IdList path = message.path();
+                if (vertexId.equals(path.get(0))) {
+                    // Use the smallest vertex record ring
+                    boolean isMin = true;
+                    for (int i = 0; i < path.size(); i++) {
+                        Id pathVertexValue = path.get(i);
+                        if (vertexId.compareTo(pathVertexValue) > 0) {
+                            isMin = false;
+                            break;
+                        }
+                    }
+                    if (isMin) {
+                        path.add(vertexId);
+                        IdListList value = vertex.value();
+                        value.add(path.copy());
+                    }
+                } else {
+                    boolean contains = false;
+                    // Drop sequence if path contains this vertex
+                    for (int i = 0; i < path.size(); i++) {
+                        Id pathVertexValue = path.get(i);
+                        if (pathVertexValue.equals(vertex.id())) {
+                            contains = true;
+                            break;
+                        }
+                    }
+                    if (!contains) {
+                        path.add(vertex.id());
+                        for (Edge edge : vertex.edges()) {
+                            if (this.filter.filter(edge, message)) {
+                                message.walkEdgeProp(edge.properties());
+                                context.sendMessage(edge.targetId(), message);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (halt) {
+            vertex.inactivate();
+        }
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java
new file mode 100644
index 00000000..4370e1da
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings.filter;
+
+import java.util.Map;
+
+import org.apache.hugegraph.computer.algorithm.AlgorithmParams;
+import org.apache.hugegraph.computer.algorithm.path.rings.RingsDetectionOutput;
+import org.apache.hugegraph.computer.core.config.ComputerOptions;
+import org.apache.hugegraph.computer.core.graph.value.IdListList;
+import org.apache.hugegraph.computer.core.input.filter.ExtractAllPropertyInputFilter;
+
+public class RingsDetectionWithFilterParams implements AlgorithmParams {
+
+    @Override
+    public void setAlgorithmParameters(Map<String, String> params) {
+        this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS,
+                         RingsDetectionWithFilter.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS,
+                         IdListList.class.getName());
+        this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS,
+                         RingsDetectionMessage.class.getName());
+        this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS,
+                         RingsDetectionOutput.class.getName());
+        this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS,
+                         ExtractAllPropertyInputFilter.class.getName());
+    }
+}
diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java
new file mode 100644
index 00000000..bdaf0217
--- /dev/null
+++ b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2017 HugeGraph Authors
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hugegraph.computer.algorithm.path.rings.filter;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
+
+import org.mvel2.MVEL;
+
+import org.apache.hugegraph.computer.core.graph.edge.Edge;
+import org.apache.hugegraph.computer.core.graph.value.Value;
+import org.apache.hugegraph.computer.core.graph.vertex.Vertex;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+public class SpreadFilter {
+
+    private static final String ALL = "*";
+    private static final String MESSAGE = "$message";
+    private static final String ELEMENT = "$element";
+    private static final List<Serializable> PASS = ImmutableList.of();
+
+    private final Map<String, Serializable> vertexFilter;
+    private final Map<String, Serializable> edgeSpreadFilter;
+    private final Map<String, Serializable> edgeFilter;
+
+    public SpreadFilter(String describe) {
+        FilterDescribe des = FilterDescribe.of(describe);
+
+        this.vertexFilter = new HashMap<>();
+        this.edgeSpreadFilter = new HashMap<>();
+        this.edgeFilter = new HashMap<>();
+
+        this.init(this.vertexFilter, des.vertexFilter(), expression -> true);
+        this.init(this.edgeSpreadFilter, des.edgeFilter(), expression -> true);
+        // TODO: Use a better scheme to parse expressions with only $element
+        this.init(this.edgeFilter, des.edgeFilter(), expression -> {
+            return !expression.contains(MESSAGE);
+        });
+    }
+
+    private void init(Map<String, Serializable> filter,
+                      List<FilterDescribe.DescribeItem> describes,
+                      Predicate<? super String> predicate) {
+        for (FilterDescribe.DescribeItem describe : describes) {
+            String labelName = describe.label();
+            String propertyFilter = describe.propertyFilter();
+            if (predicate.test(propertyFilter) || ALL.equals(labelName)) {
+                Serializable expression = MVEL.compileExpression(
+                                               describe.propertyFilter());
+                filter.put(labelName, expression);
+            }
+        }
+    }
+
+    public boolean filter(Vertex vertex) {
+        String label = vertex.label();
+        List<Serializable> expressions = expressions(this.vertexFilter, label);
+
+        if (expressions == PASS) {
+            return true;
+        }
+
+        Map<String, Map<String, Value>> params =
+                    ImmutableMap.of(ELEMENT, vertex.properties().get());
+        return filter(params, expressions);
+    }
+
+    public boolean filter(Edge edge) {
+        String label = edge.label();
+        List<Serializable> expressions = expressions(this.edgeFilter, label);
+
+        if (expressions == PASS) {
+            return true;
+        }
+
+        Map<String, Map<String, Value>> params =
+                    ImmutableMap.of(ELEMENT, edge.properties().get());
+        return filter(params, expressions);
+    }
+
+    public boolean filter(Edge edge, RingsDetectionMessage message) {
+        String label = edge.label();
+        List<Serializable> expressions = expressions(this.edgeSpreadFilter,
+                                                     label);
+
+        if (expressions == PASS) {
+            return true;
+        }
+
+        Map<String, Map<String, Value>> params =
+                    ImmutableMap.of(ELEMENT, edge.properties().get(),
+                                    MESSAGE, message.walkEdgeProp().get());
+        return filter(params, expressions);
+    }
+
+    private static boolean filter(Map<String, Map<String, Value>> params,
+                                  List<Serializable> expressions) {
+        Map<String, Object> map = convertParamsValueToObject(params);
+        return expressions.stream()
+                          .allMatch(expression -> {
+                              return (Boolean) MVEL.executeExpression(
+                                                    expression, map);
+                          });
+    }
+
+    private static List<Serializable> expressions(
+                                      Map<String, Serializable> filter,
+                                      String label) {
+        if (filter.size() == 0) {
+            return PASS;
+        }
+        List<Serializable> expressions = new ArrayList<>();
+        if (filter.containsKey(ALL)) {
+            expressions.add(filter.get(ALL));
+        }
+        if (filter.containsKey(label)) {
+            expressions.add(filter.get(label));
+        }
+
+        return expressions;
+    }
+
+    private static Map<String, Object> convertParamsValueToObject(
+                   Map<String, Map<String, Value>> params) {
+        Map<String, Object> result = new HashMap<>();
+        for (Map.Entry<String, Map<String, Value>> entry : params.entrySet()) {
+            Map<String, Object> subKv = new HashMap<>();
+            Map<String, Value> param = entry.getValue();
+            for (Map.Entry<String, Value> paramItem : param.entrySet()) {
+                subKv.put(paramItem.getKey(), paramItem.getValue().value());
+            }
+            result.put(entry.getKey(), subKv);
+        }
+        return result;
+    }
+}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/algorithm/AlgorithmParams.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/algorithm/AlgorithmParams.java
deleted file mode 100644
index 3302f939..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/algorithm/AlgorithmParams.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.algorithm;
-
-import java.util.Map;
-
-import org.slf4j.Logger;
-
-import com.baidu.hugegraph.config.ConfigOption;
-import com.baidu.hugegraph.util.Log;
-
-public interface AlgorithmParams {
-
-    Logger LOG = Log.logger(AlgorithmParams.class);
-
-    /**
-     * set algorithm's specific configuration
-     * @param params
-     */
-    void setAlgorithmParameters(Map<String, String> params);
-
-    default void setIfAbsent(Map<String, String> params, String key,
-                             String value) {
-        if (!params.keySet().contains(key)) {
-            LOG.debug("Put parameters key={}, value={}", key, value);
-            params.put(key, value);
-        }
-    }
-
-    default void setIfAbsent(Map<String, String> params,
-                             ConfigOption<?> keyOption,
-                             String value) {
-        this.setIfAbsent(params, keyOption.name(), value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator.java
deleted file mode 100644
index ee19cb57..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.aggregator;
-
-import com.baidu.hugegraph.computer.core.common.ComputerContext;
-import com.baidu.hugegraph.computer.core.common.exception.ComputerException;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-
-public interface Aggregator<V extends Value> {
-
-    /**
-     * Used by worker to aggregate a new value when compute a vertex.
-     * The combination method needs to be commutative and associative.
-     * Can be called in worker computation compute() or afterSuperstep().
-     * @param value The value to be aggregated
-     */
-    void aggregateValue(V value);
-
-    /**
-     * Used by worker to aggregate an int value. For performance reasons, it
-     * can aggregate without create an IntValue object.
-     */
-    default void aggregateValue(int value) {
-        throw new ComputerException("Not implemented: aggregateValue(int)");
-    }
-
-    /**
-     * Used by worker to aggregate a long value. For performance reasons, it
-     * can aggregate without create a LongValue object.
-     */
-    default void aggregateValue(long value) {
-        throw new ComputerException("Not implemented: aggregateValue(long)");
-    }
-
-    /**
-     * Used by worker to aggregate a float value. For performance reasons, it
-     * can aggregate without create a FloatValue object.
-     */
-    default void aggregateValue(float value) {
-        throw new ComputerException("Not implemented: aggregateValue(float)");
-    }
-
-    /**
-     * Used by worker to aggregate a double value. For performance reasons,
-     * it can aggregate without create a DoubleValue object.
-     */
-    default void aggregateValue(double value) {
-        throw new ComputerException("Not implemented: aggregateValue(double)");
-    }
-
-    /**
-     * Used by worker or master to get the aggregated value. The worker
-     * get an aggregated value of previous superstep in current superstep.
-     * The master can get an aggregated value of current superstep when
-     * master-computation compute().
-     */
-    V aggregatedValue();
-
-    /**
-     * Used by worker or master to set current aggregated value directly. The
-     * worker set aggregated value and then send to master for further
-     * aggregation. The master set aggregated value and then used by workers in
-     * the next superstep.
-     */
-    void aggregatedValue(V value);
-
-    /**
-     * Return cloned object of this instance.
-     */
-    Aggregator<V> copy();
-
-    /**
-     * Repair the object because some fields may not be deserialized.
-     */
-    void repair(ComputerContext context);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Master.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Master.java
deleted file mode 100644
index 9a15cd1a..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Master.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.aggregator;
-
-import com.baidu.hugegraph.computer.core.combiner.Combiner;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.value.ValueType;
-
-/**
- * Aggregator4Master used by algorithm's master-computation. The master must
- * register all aggregators before all supersteps start. Then the workers can
- * aggregate aggregators in superstep, send the aggregators to master when
- * superstep finish. The master aggregates the aggregators sent by workers.
- * The workers can get the aggregated values master aggregated at next
- * superstep. These values are identical among all workers.
- */
-public interface Aggregator4Master {
-
-    /**
-     * Register the aggregator with specified name. The name must be unique.
-     * Used by algorithm's master-computation init() to register aggregators.
-     */
-    <V extends Value, C extends Aggregator<V>>
-    void registerAggregator(String name, Class<C> aggregator);
-
-    /**
-     * Register aggregator with specified value type and a combiner which can
-     * combine values with specified value type. The name must be unique.
-     * Used by algorithm's master-computation init() to register aggregators.
-     */
-    <V extends Value, C extends Combiner<V>>
-    void registerAggregator(String name, ValueType type, Class<C> combiner);
-
-    /**
-     * Register aggregator with specified default value(include type) and
-     * a combiner which can combine values with specified value type.
-     * The name must be unique.
-     * Used by algorithm's master-computation init() to register aggregators.
-     */
-    <V extends Value, C extends Combiner<V>>
-    void registerAggregator(String name, V defaultValue, Class<C> combiner);
-
-    /**
-     * Set the aggregated value by master-computation, generally users may not
-     * need to explicitly set a aggregated value.
-     * If the value is set, it will be received by workers at next superstep.
-     * Throws ComputerException if master-computation does not register
-     * aggregator with specified name.
-     */
-    <V extends Value> void aggregatedValue(String name, V value);
-
-    /**
-     * Get the aggregated value. Each worker aggregate the aggregator value
-     * locally, then submit to master, then master aggregate the aggregators
-     * value from all workers. master-computation can get the aggregated value
-     * in master compute(), and worker-computation can get the aggregated value
-     * in the next superstep.
-     * Used by algorithm's master-computation compute()
-     * Throws ComputerException if master-computation does not register
-     * aggregator with the specified name.
-     */
-    <V extends Value> V aggregatedValue(String name);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Worker.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Worker.java
deleted file mode 100644
index d1053312..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Worker.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.aggregator;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-
-/**
- * Aggregator4Worker used by algorithm's computation. The computation can
- * only use the aggregator with specified name the master registered.
- * See {@link Aggregator4Master} for detailed information about aggregation
- * process.
- */
-public interface Aggregator4Worker {
-
-    /**
-     * Create aggregator by name in worker-computation, the aggregator is
-     * registered by master-computation.
-     * Used by algorithm's worker-computation beforeSuperstep(), can be called
-     * in each superstep.
-     * Throws ComputerException if master-computation does not register
-     * aggregator with the specified name.
-     */
-    <V extends Value> Aggregator<V> createAggregator(String name);
-
-    /**
-     * Set aggregate value in worker. The value of aggregator will be
-     * aggregated locally in worker first, and it would be sent to master when
-     * the current superstep finish.
-     * Used by algorithm's worker-computation afterSuperstep(), can be called
-     * in each superstep.
-     * Throws ComputerException if master-computation does not register
-     * aggregator with the specified name.
-     * @param value The value to be aggregated
-     */
-    <V extends Value> void aggregateValue(String name, V value);
-
-    /**
-     * Get the aggregated value in worker-computation, the value is aggregated
-     * by master at previous superstep, it won't be changed in a superstep.
-     * Each worker aggregate an aggregator value locally, then submit to master,
-     * then master aggregate the aggregator values from all workers.
-     * master-computation can get the aggregated value in master compute(), and
-     * worker-computation can get the aggregated value in the next superstep.
-     * Used by algorithm's worker-computation compute(), can be called in
-     * each superstep.
-     * Throws ComputerException if master-computation does not register
-     * aggregator with the specified name.
-     */
-    <V extends Value> V aggregatedValue(String name);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Allocator.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Allocator.java
deleted file mode 100644
index 3bd94453..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Allocator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.allocator;
-
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-
-public interface Allocator {
-
-    RecyclerReference<Vertex> newVertex();
-
-    void freeVertex(RecyclerReference<Vertex> reference);
-
-    RecyclerReference<Edge> newEdge();
-
-    void freeEdge(RecyclerReference<Edge> reference);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Recyclable.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Recyclable.java
deleted file mode 100644
index ddae4232..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/Recyclable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.allocator;
-
-public interface Recyclable {
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/RecyclerReference.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/RecyclerReference.java
deleted file mode 100644
index 30b89126..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/allocator/RecyclerReference.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.allocator;
-
-import java.lang.ref.SoftReference;
-
-public class RecyclerReference<T extends Recyclable> extends SoftReference<T>
-       implements AutoCloseable {
-
-    private final Handle<RecyclerReference<T>> handle;
-
-    // TODO: create interface here and make parameter a interface.
-    public RecyclerReference(T referent,
-                             Handle<RecyclerReference<T>> handle) {
-        super(referent);
-        this.handle = handle;
-    }
-
-    @Override
-    public void close() {
-        this.handle.recycle(this);
-    }
-
-    // Copy from io.netty.util.Recycler.Handle
-    public interface Handle<O> {
-        void recycle(O object);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/Combiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/Combiner.java
deleted file mode 100644
index 0cd27151..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/Combiner.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import java.util.Iterator;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-
-public interface Combiner<T> {
-
-    /**
-     * @return The name of the combiner.
-     * @return class name by default.
-     */
-    default String name() {
-        return this.getClass().getName();
-    }
-
-    /**
-     * Combine v1 and v2 to result. The combined value may
-     * take use v1 or v2. The value of v1 and v2 may be updated. Should not
-     * use v1 and v2 after combine them.
-     */
-    void combine(T v1, T v2, T result);
-
-    @SuppressWarnings("unchecked")
-    static <T extends Value> T combineAll(Combiner<T> combiner,
-                                          Iterator<T> values) {
-        if (!values.hasNext()) {
-            return null;
-        }
-        T result = (T) values.next().copy();
-        while (values.hasNext()) {
-            combiner.combine(result, values.next(), result);
-        }
-        return result;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java
deleted file mode 100644
index bffe5c97..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.DoubleValue;
-import com.baidu.hugegraph.util.E;
-
-public class DoubleValueSumCombiner implements Combiner<DoubleValue> {
-
-    @Override
-    public void combine(DoubleValue v1, DoubleValue v2, DoubleValue result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        result.value(v1.doubleValue() + v2.doubleValue());
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/FloatValueSumCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/FloatValueSumCombiner.java
deleted file mode 100644
index 042f9590..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/FloatValueSumCombiner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.FloatValue;
-import com.baidu.hugegraph.util.E;
-
-public class FloatValueSumCombiner implements Combiner<FloatValue> {
-
-    @Override
-    public void combine(FloatValue v1, FloatValue v2, FloatValue result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        result.value(v1.floatValue() + v2.floatValue());
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/IntValueSumCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/IntValueSumCombiner.java
deleted file mode 100644
index 52acbccf..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/IntValueSumCombiner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.IntValue;
-import com.baidu.hugegraph.util.E;
-
-public class IntValueSumCombiner implements Combiner<IntValue> {
-
-    @Override
-    public void combine(IntValue v1, IntValue v2, IntValue result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        result.value(v1.intValue() + v2.intValue());
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/LongValueSumCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/LongValueSumCombiner.java
deleted file mode 100644
index 1d96e1f4..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/LongValueSumCombiner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.LongValue;
-import com.baidu.hugegraph.util.E;
-
-public class LongValueSumCombiner implements Combiner<LongValue> {
-
-    @Override
-    public void combine(LongValue v1, LongValue v2, LongValue result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        result.value(v1.longValue() + v2.longValue());
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java
deleted file mode 100644
index 31c3780d..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.util.E;
-
-public class MergeNewPropertiesCombiner implements PropertiesCombiner {
-
-    /**
-     * Merge properties v2 and v1 into result. If a property exists in both v1
-     * and v2, remain the value in v1.
-     */
-    @Override
-    public void combine(Properties v1, Properties v2, Properties result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        E.checkArgument(v1 != result && v2 != result,
-                        "The combine parameter result " +
-                        "can't same with v1 or v2");
-
-        result.clear();
-
-        Map<String, Value> v1Map = v1.get();
-        for (Map.Entry<String, Value> entry : v1Map.entrySet()) {
-            result.put(entry.getKey(), entry.getValue());
-        }
-        Map<String, Value> v2Map = v2.get();
-        for (Map.Entry<String, Value> entry : v2Map.entrySet()) {
-             result.putIfAbsent(entry.getKey(), entry.getValue());
-        }
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java
deleted file mode 100644
index cf1cdb3e..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.util.E;
-
-public class MergeOldPropertiesCombiner implements PropertiesCombiner {
-
-    /**
-     * Merge properties v1 and v2 into result. If a property exists in both v1
-     * and v2, remain the value in v2.
-     */
-    @Override
-    public void combine(Properties v1, Properties v2, Properties result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        E.checkArgument(v1 != result && v2 != result,
-                        "The combine parameter result " +
-                        "can't same with v1 or v2");
-
-        result.clear();
-
-        Map<String, Value> v2Map = v2.get();
-        for (Map.Entry<String, Value> entry : v2Map.entrySet()) {
-            result.put(entry.getKey(), entry.getValue());
-        }
-        Map<String, Value> v1Map = v1.get();
-        for (Map.Entry<String, Value> entry : v1Map.entrySet()) {
-            result.putIfAbsent(entry.getKey(), entry.getValue());
-        }
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwriteCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwriteCombiner.java
deleted file mode 100644
index 9c7164cb..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwriteCombiner.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.util.E;
-
-public class OverwriteCombiner<T extends Value> implements Combiner<T> {
-
-    @Override
-    public void combine(T v1, T v2, T result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        result.assign(v2);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java
deleted file mode 100644
index 9be66b3a..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.util.E;
-
-public class OverwritePropertiesCombiner implements PropertiesCombiner {
-
-    @Override
-    public void combine(Properties v1, Properties v2, Properties result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-
-        E.checkArgument(v1 != result && v2 != result,
-                        "The combine parameter result " +
-                        "can't same with v1 or v2");
-
-        result.clear();
-        result.putAll(v2.get());
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/PropertiesCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/PropertiesCombiner.java
deleted file mode 100644
index fee77167..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/PropertiesCombiner.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-
-/**
- * When vertex properties with the same vertex id are loaded, this class
- * specifies how to combine their properties.
- */
-public interface PropertiesCombiner extends Combiner<Properties> {
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMaxCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMaxCombiner.java
deleted file mode 100644
index a9d01dd3..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMaxCombiner.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.util.E;
-
-public class ValueMaxCombiner<T extends Value> implements Combiner<T> {
-
-    @Override
-    public void combine(T v1, T v2, T result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        if (v1.compareTo(v2) >= 0) {
-            result.assign(v1);
-        } else {
-            result.assign(v2);
-        }
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMinCombiner.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMinCombiner.java
deleted file mode 100644
index 7f3a3635..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/combiner/ValueMinCombiner.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.combiner;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.util.E;
-
-public class ValueMinCombiner<T extends Value> implements Combiner<T> {
-
-    @Override
-    public void combine(T v1, T v2, T result) {
-        E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null");
-        E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null");
-        E.checkArgumentNotNull(result,
-                               "The combine parameter result can't be null");
-        if (v1.compareTo(v2) <= 0) {
-            result.assign(v1);
-        } else {
-            result.assign(v2);
-        }
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/ComputerContext.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/ComputerContext.java
deleted file mode 100644
index 3c5208c1..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/ComputerContext.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.common;
-
-import com.baidu.hugegraph.computer.core.allocator.Allocator;
-import com.baidu.hugegraph.computer.core.config.Config;
-import com.baidu.hugegraph.computer.core.graph.GraphFactory;
-import com.baidu.hugegraph.util.E;
-
-public final class ComputerContext {
-
-    private static volatile ComputerContext INSTANCE;
-
-    private final Config config;
-    private final GraphFactory graphFactory;
-    private final Allocator allocator;
-
-    private ComputerContext(Config config,
-                            GraphFactory graphFactory,
-                            Allocator allocator) {
-        this.config = config;
-        this.graphFactory = graphFactory;
-        this.allocator = allocator;
-    }
-
-    public static synchronized void initContext(Config config,
-                                                GraphFactory graphFactory,
-                                                Allocator allocator) {
-        INSTANCE = new ComputerContext(config, graphFactory, allocator);
-    }
-
-    public static ComputerContext instance() {
-        E.checkNotNull(INSTANCE, "ComputerContext INSTANCE");
-        return INSTANCE;
-    }
-
-    public Config config() {
-        return this.config;
-    }
-
-    public GraphFactory graphFactory() {
-        return this.graphFactory;
-    }
-
-    public Allocator allocator() {
-        return this.allocator;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/Constants.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/Constants.java
deleted file mode 100644
index 95e1688d..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/Constants.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.common;
-
-import com.baidu.hugegraph.util.Bytes;
-
-public final class Constants {
-
-    public static final byte[] EMPTY_BYTES = new byte[0];
-
-    public static final int BOOLEAN_LEN = 1;
-    public static final int BYTE_LEN = Byte.BYTES;
-    public static final int SHORT_LEN = Short.BYTES;
-    public static final int INT_LEN = Integer.BYTES;
-    public static final int LONG_LEN = Long.BYTES;
-    public static final int CHAR_LEN = Character.BYTES;
-    public static final int FLOAT_LEN = Float.BYTES;
-    public static final int DOUBLE_LEN = Double.BYTES;
-
-    public static final int UINT8_MAX = 0xff;
-    public static final int UINT16_MAX = 0xffff;
-    public static final long UINT32_MAX = 0xffffffffL;
-
-    /*
-     * The small buffer size for buffered input & output,
-     * mainly used in input & output of memory
-     */
-    public static final int SMALL_BUF_SIZE = 32;
-
-    /*
-     * The big buffer size for buffered input & output,
-     * mainly used in input & output of file and stream
-     */
-    public static final int BIG_BUF_SIZE = (int) Bytes.KB * 8;
-
-    /*
-     * The capacity of message queue
-     */
-    public static final int QUEUE_CAPACITY = 128;
-
-    /*
-     * The timeout in second for asynchronous tasks
-     */
-    public static final int FUTURE_TIMEOUT = 300;
-
-    /*
-     * The timeout in millisecond for threadpool shutdown
-     */
-    public static final long SHUTDOWN_TIMEOUT = 5000L;
-
-    // The mode to read a file
-    public static final String FILE_MODE_READ = "r";
-
-    // The mode to write a file
-    public static final String FILE_MODE_WRITE = "rw";
-
-    public static final String EMPTY_STR = "";
-
-    public static final int INPUT_SUPERSTEP = -1;
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/SerialEnum.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/SerialEnum.java
deleted file mode 100644
index 01d06d5e..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/SerialEnum.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.common;
-
-import com.baidu.hugegraph.computer.core.common.exception.ComputerException;
-import com.baidu.hugegraph.util.CollectionUtil;
-import com.google.common.collect.HashBasedTable;
-import com.google.common.collect.Table;
-
-public interface SerialEnum {
-
-    byte code();
-
-    Table<Class<?>, Byte, SerialEnum> TABLE = HashBasedTable.create();
-
-    static void register(Class<? extends SerialEnum> clazz) {
-        Object enums;
-        try {
-            enums = clazz.getMethod("values").invoke(null);
-        } catch (Exception e) {
-            throw new ComputerException("Call method values() error", e);
-        }
-        for (SerialEnum e : CollectionUtil.<SerialEnum>toList(enums)) {
-            TABLE.put(clazz, e.code(), e);
-        }
-    }
-
-    static <T extends SerialEnum> T fromCode(Class<T> clazz, byte code) {
-        @SuppressWarnings("unchecked")
-        T value = (T) TABLE.get(clazz, code);
-        if (value == null) {
-            throw new ComputerException("Can't construct %s from code %s",
-                                        clazz.getSimpleName(), code);
-        }
-        return value;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/exception/ComputerException.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/exception/ComputerException.java
deleted file mode 100644
index 2f001018..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/common/exception/ComputerException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.common.exception;
-
-/**
- * The base class for all exception types
- */
-public class ComputerException extends RuntimeException {
-
-    private static final long serialVersionUID = 3621207523020113277L;
-
-    public ComputerException(String message) {
-        super(message);
-    }
-
-    public ComputerException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public ComputerException(String message, Object... args) {
-        super(String.format(message, args));
-    }
-
-    public ComputerException(String message, Throwable cause, Object... args) {
-        super(String.format(message, args), cause);
-    }
-
-    public Throwable rootCause() {
-        return rootCause(this);
-    }
-
-    public static Throwable rootCause(Throwable e) {
-        Throwable cause = e;
-        while (cause.getCause() != null) {
-            cause = cause.getCause();
-        }
-        return cause;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Config.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Config.java
deleted file mode 100644
index 9b5b5ff9..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Config.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.config;
-
-import com.baidu.hugegraph.config.ConfigOption;
-import com.baidu.hugegraph.config.HugeConfig;
-import com.baidu.hugegraph.config.TypedOption;
-
-public interface Config {
-
-    HugeConfig hugeConfig();
-
-    <R> R get(TypedOption<?, R> option);
-
-    boolean getBoolean(String key, boolean defaultValue);
-
-    int getInt(String key, int defaultValue);
-
-    long getLong(String key, long defaultValue);
-
-    double getDouble(String key, double defaultValue);
-
-    String getString(String key, String defaultValue);
-
-    <T> T createObject(ConfigOption<Class<?>> clazzOption);
-
-    <T> T createObject(ConfigOption<Class<?>> clazzOption,
-                       boolean requiredNotNull);
-
-    Boolean outputVertexAdjacentEdges();
-
-    Boolean outputVertexProperties();
-
-    Boolean outputEdgeProperties();
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Null.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Null.java
deleted file mode 100644
index c9b49323..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/config/Null.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.config;
-
-import com.baidu.hugegraph.config.ConfigOption;
-
-/**
- * Null is used in ConfigOption<Class> to indicate a null class option.
- * The config does not allow the default value null, so this is used as the
- * default class value when class option can be null.
- * {@link Config#createObject(ConfigOption)} will return null, if the value
- * is ${@code Null.class}".
- */
-public class Null {
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/GraphFactory.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/GraphFactory.java
deleted file mode 100644
index 3f2e06ec..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/GraphFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import com.baidu.hugegraph.computer.core.graph.edge.Edge;
-import com.baidu.hugegraph.computer.core.graph.edge.Edges;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.graph.value.ValueType;
-import com.baidu.hugegraph.computer.core.graph.vertex.Vertex;
-
-public interface GraphFactory {
-
-    Id createId();
-
-    Id createId(long id);
-
-    Id createId(String id);
-
-    Id createId(UUID id);
-
-    Vertex createVertex();
-
-    <V extends Value> Vertex createVertex(Id id, V value);
-
-    <V extends Value> Vertex createVertex(String label, Id id, V value);
-
-    Edges createEdges();
-
-    Edges createEdges(int capacity);
-
-    Edge createEdge();
-
-    Edge createEdge(Id targetId);
-
-    Edge createEdge(String label, Id targetId);
-
-    Edge createEdge(String label, String name, Id targetId);
-
-    Properties createProperties();
-
-    <V> List<V> createList();
-
-    <V> List<V> createList(int capacity);
-
-    <V> Set<V> createSet();
-
-    <V> Set<V> createSet(int size);
-
-    <K, V> Map<K, V> createMap();
-
-    Value createValue(byte code);
-
-    Value createValue(ValueType type);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edge.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edge.java
deleted file mode 100644
index e35d5019..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edge.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.edge;
-
-import com.baidu.hugegraph.computer.core.allocator.Recyclable;
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.graph.properties.Properties;
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-
-public interface Edge extends Recyclable {
-
-    String label();
-
-    void label(String label);
-
-    String name();
-
-    void name(String name);
-
-    Id targetId();
-
-    void targetId(Id targetId);
-
-    Properties properties();
-
-    void properties(Properties properties);
-
-    <T extends Value> T property(String key);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edges.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edges.java
deleted file mode 100644
index 76a16008..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/edge/Edges.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.edge;
-
-public interface Edges extends Iterable<Edge> {
-
-    int size();
-
-    void add(Edge edge);
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/Id.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/Id.java
deleted file mode 100644
index b9d1e8f7..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/Id.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.id;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-
-public interface Id extends Tvalue<Object> {
-
-    IdType idType();
-
-    int length();
-
-    Object asObject();
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/IdType.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/IdType.java
deleted file mode 100644
index 71c6cb80..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/id/IdType.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.id;
-
-import com.baidu.hugegraph.computer.core.common.SerialEnum;
-
-public enum IdType implements SerialEnum {
-
-    LONG(1),
-    UTF8(2),
-    UUID(3);
-
-    static {
-        SerialEnum.register(IdType.class);
-    }
-
-    private final byte code;
-
-    IdType(int code) {
-        assert code >= -128 && code <= 127;
-        this.code = (byte) code;
-    }
-
-    public byte code() {
-        return this.code;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/properties/Properties.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/properties/Properties.java
deleted file mode 100644
index 6521bda2..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/properties/Properties.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.properties;
-
-import java.util.Map;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value;
-import com.baidu.hugegraph.computer.core.io.Readable;
-import com.baidu.hugegraph.computer.core.io.Writable;
-
-public interface Properties extends Readable, Writable {
-
-    Map<String, Value> get();
-
-    <T extends Value> T get(String key);
-
-    void put(String key, Value value);
-
-    void putIfAbsent(String key, Value value);
-
-    void putAll(Map<String, Value> kvs);
-
-    int size();
-
-    void clear();
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/BooleanValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/BooleanValue.java
deleted file mode 100644
index cb62ab32..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/BooleanValue.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class BooleanValue implements Tvalue<Boolean> {
-
-    private boolean value;
-
-    public BooleanValue() {
-        this(false);
-    }
-
-    public BooleanValue(boolean value) {
-        this.value = value;
-    }
-
-    public boolean boolValue() {
-        return this.value;
-    }
-
-    @Override
-    public Boolean value() {
-        return this.value;
-    }
-
-    /*
-     * This method is reserved for performance, otherwise it will create a new
-     * IntValue object when change it's value.
-     */
-    public void value(boolean value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.BOOLEAN;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((BooleanValue) other).value;
-    }
-
-    @Override
-    public BooleanValue copy() {
-        return new BooleanValue(this.value);
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readBoolean();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeBoolean(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return Boolean.compare(this.value, ((BooleanValue) obj).value);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof BooleanValue)) {
-            return false;
-        }
-        return ((BooleanValue) obj).value == this.value;
-    }
-
-    @Override
-    public int hashCode() {
-        return Boolean.hashCode(this.value);
-    }
-
-    @Override
-    public String toString() {
-        return String.valueOf(this.value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/DoubleValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/DoubleValue.java
deleted file mode 100644
index 587958bf..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/DoubleValue.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class DoubleValue extends Number implements Tvalue<Double> {
-
-    private static final long serialVersionUID = -524902178200973565L;
-
-    private double value;
-
-    public DoubleValue() {
-        this(0.0D);
-    }
-
-    public DoubleValue(double value) {
-        this.value = value;
-    }
-
-    @Override
-    public int intValue() {
-        return (int) this.value;
-    }
-
-    @Override
-    public long longValue() {
-        return (long) this.value;
-    }
-
-    @Override
-    public float floatValue() {
-        return (float) this.value;
-    }
-
-    @Override
-    public double doubleValue() {
-        return this.value;
-    }
-
-    @Override
-    public Double value() {
-        return this.value;
-    }
-
-    /*
-     * This method is reserved for performance, otherwise it will create a new
-     * DoubleValue object when change it's value.
-     */
-    public void value(double value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.DOUBLE;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((DoubleValue) other).value;
-    }
-
-    @Override
-    public DoubleValue copy() {
-        return new DoubleValue(this.value);
-    }
-
-    @Override
-    public boolean isNumber() {
-        return true;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readDouble();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeDouble(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return Double.compare(this.value, ((DoubleValue) obj).value);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof DoubleValue)) {
-            return false;
-        }
-        return ((DoubleValue) obj).value == this.value;
-    }
-
-    @Override
-    public int hashCode() {
-        return Double.hashCode(this.value);
-    }
-
-    @Override
-    public String toString() {
-        return String.valueOf(this.value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/FloatValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/FloatValue.java
deleted file mode 100644
index 952166ec..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/FloatValue.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class FloatValue extends Number implements Tvalue<Float> {
-
-    private static final long serialVersionUID = 6098857579782490901L;
-
-    private float value;
-
-    public FloatValue() {
-        this(0.0F);
-    }
-
-    public FloatValue(float value) {
-        this.value = value;
-    }
-
-    @Override
-    public int intValue() {
-        return (int) this.value;
-    }
-
-    @Override
-    public long longValue() {
-        return (long) this.value;
-    }
-
-    @Override
-    public float floatValue() {
-        return this.value;
-    }
-
-    @Override
-    public double doubleValue() {
-        return this.value;
-    }
-
-    @Override
-    public Float value() {
-        return this.value;
-    }
-
-    /*
-     * This method is reserved for performance, otherwise it will create a new
-     * DoubleValue object when change it's value.
-     */
-    public void value(float value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.FLOAT;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((FloatValue) other).value;
-    }
-
-    @Override
-    public FloatValue copy() {
-        return new FloatValue(this.value);
-    }
-
-    @Override
-    public boolean isNumber() {
-        return true;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readFloat();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeFloat(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return Float.compare(this.value, ((FloatValue) obj).value);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof FloatValue)) {
-            return false;
-        }
-        return ((FloatValue) obj).value == this.value;
-    }
-
-    @Override
-    public int hashCode() {
-        return Float.hashCode(this.value);
-    }
-
-    @Override
-    public String toString() {
-        return String.valueOf(this.value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdList.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdList.java
deleted file mode 100644
index fe33b874..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdList.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.id.Id;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class IdList extends ListValue<Id> {
-
-    public IdList() {
-        super(ValueType.ID);
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.ID_LIST;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.read(in, false);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.write(out, false);
-    }
-
-    @Override
-    public IdList copy() {
-        IdList values = new IdList();
-        for (Id value : this.values()) {
-            values.add((Id) value.copy());
-        }
-        return values;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdListList.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdListList.java
deleted file mode 100644
index 2932b267..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IdListList.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-
-public class IdListList extends ListValue<IdList> {
-
-    public IdListList() {
-        super(ValueType.ID_LIST);
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.ID_LIST_LIST;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.read(in, false);
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.write(out, false);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IntValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IntValue.java
deleted file mode 100644
index 38a2ed64..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IntValue.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class IntValue extends Number implements Tvalue<Integer> {
-
-    private static final long serialVersionUID = -2014388310992178979L;
-
-    private int value;
-
-    public IntValue() {
-        this(0);
-    }
-
-    public IntValue(int value) {
-        this.value = value;
-    }
-
-    @Override
-    public int intValue() {
-        return this.value;
-    }
-
-    @Override
-    public long longValue() {
-        return this.value;
-    }
-
-    @Override
-    public float floatValue() {
-        return this.value;
-    }
-
-    @Override
-    public double doubleValue() {
-        return this.value;
-    }
-
-    @Override
-    public Integer value() {
-        return this.value;
-    }
-
-    /*
-     * This method is reserved for performance, otherwise it will create a new
-     * IntValue object when change it's value.
-     */
-    public void value(int value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.INT;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((IntValue) other).value;
-    }
-
-    @Override
-    public IntValue copy() {
-        return new IntValue(this.value);
-    }
-
-    @Override
-    public boolean isNumber() {
-        return true;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readInt();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeInt(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return Integer.compare(this.value, ((IntValue) obj).value);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof IntValue)) {
-            return false;
-        }
-        return ((IntValue) obj).value == this.value;
-    }
-
-    @Override
-    public int hashCode() {
-        return Integer.hashCode(this.value);
-    }
-
-    @Override
-    public String toString() {
-        return String.valueOf(this.value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/ListValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/ListValue.java
deleted file mode 100644
index af40732d..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/ListValue.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.ListUtils;
-
-import com.baidu.hugegraph.computer.core.common.ComputerContext;
-import com.baidu.hugegraph.computer.core.common.SerialEnum;
-import com.baidu.hugegraph.computer.core.graph.GraphFactory;
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class ListValue<T extends Tvalue<?>> implements Tvalue<List<Object>> {
-
-    private final GraphFactory graphFactory;
-    private ValueType elemType;
-    private List<T> values;
-
-    public ListValue() {
-        this(ValueType.UNKNOWN);
-    }
-
-    public ListValue(ValueType elemType) {
-        this(elemType, new ArrayList<>());
-    }
-
-    public ListValue(ValueType elemType, List<T> values) {
-        this.elemType = elemType;
-        this.values = values;
-        // TODO: try to reduce call ComputerContext.instance() directly.
-        this.graphFactory = ComputerContext.instance().graphFactory();
-    }
-
-    public void checkAndSetType(T value) {
-        E.checkArgument(value != null,
-                        "Can't add null to %s", this.valueType().string());
-        if (this.elemType != ValueType.UNKNOWN) {
-            E.checkArgument(this.elemType == value.valueType(),
-                            "Invalid value '%s' with type %s, " +
-                            "expect element with type %s",
-                            value, value.valueType().string(),
-                            this.elemType.string());
-        } else {
-            this.elemType = value.valueType();
-        }
-    }
-
-    public void add(T value) {
-        this.checkAndSetType(value);
-        this.values.add(value);
-    }
-
-    public void addAll(Collection<T> values) {
-        if (CollectionUtils.isEmpty(values)) {
-            return;
-        }
-
-        Iterator<T> iterator = values.iterator();
-        T firstValue = iterator.next();
-        this.checkAndSetType(firstValue);
-        this.values.addAll(values);
-    }
-
-    public T get(int index) {
-        return this.values.get(index);
-    }
-
-    public T getLast() {
-        int index = this.values.size() - 1;
-        if (index < 0) {
-            throw new NoSuchElementException("The list is empty");
-        }
-        return this.values.get(index);
-    }
-
-    public boolean contains(T obj) {
-        return this.values.contains(obj);
-    }
-
-    public List<T> values() {
-        return Collections.unmodifiableList(this.values);
-    }
-
-    public int size() {
-        return this.values.size();
-    }
-
-    @Override
-    public List<Object> value() {
-        List<Object> list = new ArrayList<>(this.values.size());
-        for (T value : this.values) {
-            list.add(value.value());
-        }
-        return list;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.LIST_VALUE;
-    }
-
-    public ValueType elemType() {
-        return this.elemType;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public void assign(Value other) {
-        this.checkAssign(other);
-        ValueType elemType = ((ListValue<T>) other).elemType();
-        E.checkArgument(elemType == this.elemType(),
-                        "Can't assign %s<%s> to %s<%s>",
-                        other.valueType().string(), elemType.string(),
-                        this.valueType().string(), this.elemType().string());
-        this.values = ((ListValue<T>) other).values();
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public ListValue<T> copy() {
-        List<T> values = this.graphFactory.createList();
-        for (T value : this.values) {
-            values.add((T) value.copy());
-        }
-        return new ListValue<>(this.elemType, values);
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.read(in, true);
-    }
-
-    protected void read(RandomAccessInput in, boolean readElemType)
-                        throws IOException {
-        int size = in.readInt();
-        if (readElemType) {
-            this.elemType = SerialEnum.fromCode(ValueType.class, in.readByte());
-        }
-        if (size > this.values.size() || size < this.values.size() / 2) {
-            this.values = this.graphFactory.createList(size);
-        } else {
-            this.values.clear();
-        }
-
-        for (int i = 0; i < size; i++) {
-            @SuppressWarnings("unchecked")
-            T value = (T) this.graphFactory.createValue(this.elemType);
-            value.read(in);
-            this.values.add(value);
-        }
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        this.write(out, true);
-    }
-
-    protected void write(RandomAccessOutput out, boolean writeElemType)
-                         throws IOException {
-        out.writeInt(this.values.size());
-        if (writeElemType) {
-            out.writeByte(this.elemType.code());
-        }
-        for (T value : this.values) {
-            value.write(out);
-        }
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        @SuppressWarnings("unchecked")
-        ListValue<T> other = (ListValue<T>) obj;
-        int cmp = this.size() - other.size();
-        if (cmp != 0) {
-            return cmp;
-        }
-        for (int i = 0; i < this.size(); i++) {
-            Tvalue<?> self = this.values.get(i);
-            cmp = self.compareTo(other.values.get(i));
-            if (cmp != 0) {
-                return cmp;
-            }
-        }
-        return 0;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof ListValue)) {
-            return false;
-        }
-        @SuppressWarnings("unchecked")
-        ListValue<T> other = (ListValue<T>) obj;
-        if (this.elemType != other.elemType) {
-            return false;
-        }
-        return ListUtils.isEqualList(this.values, other.values);
-    }
-
-    @Override
-    public int hashCode() {
-        return ListUtils.hashCodeForList(this.values);
-    }
-
-    @Override
-    public String toString() {
-        return this.values.toString();
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/LongValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/LongValue.java
deleted file mode 100644
index 800eb6ea..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/LongValue.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class LongValue extends Number implements Tvalue<Long> {
-
-    private static final long serialVersionUID = 8332327679205404212L;
-
-    private long value;
-
-    public LongValue() {
-        this(0L);
-    }
-
-    public LongValue(long value) {
-        this.value = value;
-    }
-
-    @Override
-    public int intValue() {
-        return (int) this.value;
-    }
-
-    @Override
-    public long longValue() {
-        return this.value;
-    }
-
-    @Override
-    public float floatValue() {
-        return this.value;
-    }
-
-    @Override
-    public double doubleValue() {
-        return this.value;
-    }
-
-    @Override
-    public Long value() {
-        return this.value;
-    }
-
-    /*
-     * This method is reserved for performance, otherwise it will create a new
-     * LongValue object when change it's value.
-     */
-    public void value(long value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.LONG;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((LongValue) other).value;
-    }
-
-    @Override
-    public LongValue copy() {
-        return new LongValue(this.value);
-    }
-
-    @Override
-    public boolean isNumber() {
-        return true;
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readLong();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeLong(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return Long.compare(this.value, ((LongValue) obj).value);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof LongValue)) {
-            return false;
-        }
-        return ((LongValue) obj).value == this.value;
-    }
-
-    @Override
-    public int hashCode() {
-        return Long.hashCode(this.value);
-    }
-
-    @Override
-    public String toString() {
-        return String.valueOf(this.value);
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/NullValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/NullValue.java
deleted file mode 100644
index cdb9a61f..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/NullValue.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class NullValue implements Tvalue<Void> {
-
-    private static final NullValue INSTANCE = new NullValue();
-
-    private NullValue() {
-    }
-
-    /*
-     * Returns the single instance of this class.
-     */
-    public static NullValue get() {
-        return INSTANCE;
-    }
-
-    @Override
-    public Void value() {
-        return null;
-    }
-
-    @Override
-    public String string() {
-        return "";
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.NULL;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-    }
-
-    @Override
-    public NullValue copy() {
-        return this;
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        // pass
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        // pass
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        assert obj instanceof NullValue;
-        return 0;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return obj == INSTANCE || obj instanceof NullValue;
-    }
-
-    @Override
-    public int hashCode() {
-        return 0;
-    }
-
-    @Override
-    public String toString() {
-        return "<null>";
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/StringValue.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/StringValue.java
deleted file mode 100644
index 84e9076f..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/StringValue.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import java.io.IOException;
-
-import com.baidu.hugegraph.computer.core.common.Constants;
-import com.baidu.hugegraph.computer.core.graph.value.Value.Tvalue;
-import com.baidu.hugegraph.computer.core.io.RandomAccessInput;
-import com.baidu.hugegraph.computer.core.io.RandomAccessOutput;
-import com.baidu.hugegraph.util.E;
-
-public class StringValue implements Tvalue<String> {
-
-    private String value;
-
-    public StringValue() {
-        this.value = Constants.EMPTY_STR;
-    }
-
-    public StringValue(String value) {
-        this.value = value;
-    }
-
-    @Override
-    public ValueType valueType() {
-        return ValueType.STRING;
-    }
-
-    @Override
-    public void assign(Value other) {
-        this.checkAssign(other);
-        this.value = ((StringValue) other).value;
-    }
-
-    @Override
-    public StringValue copy() {
-        return new StringValue(this.value);
-    }
-
-    @Override
-    public void read(RandomAccessInput in) throws IOException {
-        this.value = in.readUTF();
-    }
-
-    @Override
-    public void write(RandomAccessOutput out) throws IOException {
-        out.writeUTF(this.value);
-    }
-
-    @Override
-    public int compareTo(Value obj) {
-        E.checkArgumentNotNull(obj, "The compare argument can't be null");
-        int typeDiff = this.valueType().compareTo(obj.valueType());
-        if (typeDiff != 0) {
-            return typeDiff;
-        }
-        return this.value.compareTo(((StringValue) obj).value);
-    }
-
-    @Override
-    public String value() {
-        return this.value;
-    }
-
-    public void value(String value) {
-        this.value = value;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof StringValue)) {
-            return false;
-        }
-        return ((StringValue) obj).value.equals(this.value);
-    }
-
-    @Override
-    public int hashCode() {
-        return this.value.hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return this.value;
-    }
-}
diff --git a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/Value.java b/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/Value.java
deleted file mode 100644
index 848b8b57..00000000
--- a/computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/Value.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2017 HugeGraph Authors
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-package com.baidu.hugegraph.computer.core.graph.value;
-
-import com.baidu.hugegraph.computer.core.io.Readable;
-import com.baidu.hugegraph.computer.core.io.Writable;
-import com.baidu.hugegraph.util.E;
-
-public interface Value extends Writable, Readable, Comparable<Value> {
-
-    /**
-     * @return the value type of this instance
-     */
-    ValueType valueType();
-
-    /**
-     * Assign a new value to this object
-     */
-    void assign(Value value);
-
-    /**
-     * @return copy a value instance of this object
-     */
-    Value copy();
-
-    /**
-     * @return value of this object
-     */
-    Object value();
-
-    /**
-     * Check whether a value can be assigned to this object
-     */
-    default void checkAssign(Value other) {
-        if (other == null) {
-            E.checkArgument(false, "Can't assign null to %s",
-                            this.getClass().getSimpleName());
-        } else if (!this.getClass().isAssignableFrom(other.getClass())) {
-            E.checkArgument(false, "Can't assign '%s'(%s) to %s",
-                            other, other.getClass().getSimpleName(),
-                            this.getClass().getSimpleName());
-        }
-    }
-
-    default boolean isNumber() {
-        return false;
-    }
-
-    /**
-     * @return result string value of this object
-     */
-    default String string() {
-        return String.valueOf(this.value());
-    }
-
... 127863 lines suppressed ...