implement aggregator module (#46)
authorJermy Li <javaloveme@gmail.com>
Fri, 21 May 2021 07:50:09 +0000 (15:50 +0800)
committerGitHub <noreply@github.com>
Fri, 21 May 2021 07:50:09 +0000 (15:50 +0800)
commita087d27275056473cfb4332f01609108ee4f43aa
treed2c1eaf8469704289f6e33af36629ae24cc4dd5f
parentb1408eb75ca14ab56b97f65d96a6902b69e26fa2
implement aggregator module (#46)

* implement aggregator module
* add DefaultAggregator.newValue()
* integrate aggregator into master-service and worker-service
* ensure worker init() executed after master
* add rpc interface registeredAggregators()
* also add two-tier structure to store current-step and previous-step aggregators
* add repair() for Aggregator
* let master context use config of outer class
* support register aggregator with default value
* add Manager.inited()
* remove worker_id option and use server_port instead
* use rpc-url from master-info
23 files changed:
computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator.java
computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Master.java
computer-api/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregator4Worker.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/aggregator/Aggregators.java [new file with mode: 0644]
computer-core/src/main/java/com/baidu/hugegraph/computer/core/aggregator/DefaultAggregator.java [new file with mode: 0644]
computer-core/src/main/java/com/baidu/hugegraph/computer/core/aggregator/MasterAggrManager.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/aggregator/RegisterAggregators.java [new file with mode: 0644]
computer-core/src/main/java/com/baidu/hugegraph/computer/core/aggregator/WorkerAggrManager.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/bsp/Bsp4Master.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/bsp/Bsp4Worker.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/common/ContainerInfo.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/config/ComputerOptions.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/manager/Manager.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/manager/Managers.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/master/MasterService.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/rpc/AggregateRpcService.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/rpc/WorkerRpcManager.java
computer-core/src/main/java/com/baidu/hugegraph/computer/core/worker/WorkerService.java
computer-test/src/main/java/com/baidu/hugegraph/computer/core/worker/MockComputation.java
computer-test/src/main/java/com/baidu/hugegraph/computer/core/worker/MockComputation2.java [new file with mode: 0644]
computer-test/src/main/java/com/baidu/hugegraph/computer/core/worker/MockMasterComputation.java
computer-test/src/main/java/com/baidu/hugegraph/computer/core/worker/MockMasterComputation2.java [new file with mode: 0644]
computer-test/src/main/java/com/baidu/hugegraph/computer/core/worker/WorkerServiceTest.java