Skip to content

Commit

Permalink
Migrate project to computer directory (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc authored Aug 22, 2024
1 parent e241d16 commit 20cb885
Show file tree
Hide file tree
Showing 936 changed files with 65 additions and 51 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
- /^release-.*$/
pull_request:
defaults:
run:
working-directory: computer

jobs:
computer-ci:
Expand All @@ -32,6 +35,7 @@ jobs:

- name: License check(RAT)
run: |
pwd
mvn apache-rat:check -ntp
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt
grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
mv -vf ../.github/configs/settings.xml $HOME/.m2/settings.xml
- name: Compile
run: mvn clean compile -e -Dmaven.javadoc.skip=true -ntp
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
# schedule:
# - cron: '45 7 * * 1'

defaults:
run:
working-directory: computer

jobs:
analyze:
env:
Expand Down Expand Up @@ -40,7 +44,7 @@ jobs:
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
mv -vf ../.github/configs/settings.xml $HOME/.m2/settings.xml
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- /^release-.*$/
pull_request:

defaults:
run:
working-directory: computer

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -53,7 +57,7 @@ jobs:
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
mv -vf ../.github/configs/settings.xml $HOME/.m2/settings.xml
- name: Compile install
run: mvn install -DskipTests=true -ntp
- name: Generate & check current 3rd-party dependencies
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dist.sh
/nbbuild/
/nbdist/
/.nb-gradle/
dist/
build/

### VS Code ###
Expand All @@ -58,7 +57,7 @@ build/
*.pyc

# maven ignore
output/

apache-hugegraph-*-incubating-*/
*.war
*.zip
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@
[![codecov](https://codecov.io/gh/apache/incubator-hugegraph-computer/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/incubator-hugegraph-computer)
[![Docker Pulls](https://img.shields.io/docker/pulls/hugegraph/hugegraph-computer)](https://hub.docker.com/repository/docker/hugegraph/hugegraph-computer)

The hugegraph-computer is a distributed graph processing system for hugegraph. It is an implementation of [Pregel](https://kowshik.github.io/JPregel/pregel_paper.pdf). It runs on Kubernetes or YARN framework.

## Features

- Support distributed MPP graph computing, and integrates with HugeGraph as graph input/output storage.
- Based on BSP(Bulk Synchronous Parallel) model, an algorithm performs computing through multiple parallel iterations, every iteration is a superstep.
- Auto memory management. The framework will never be OOM(Out of Memory) since it will split some data to disk if it doesn't have enough memory to hold all the data.
- The part of edges or the messages of super node can be in memory, so you will never lose it.
- You can load the data from HDFS or HugeGraph, output the results to HDFS or HugeGraph, or adapt any other systems manually as needed.
- Easy to develop a new algorithm. You just need to focus on a vertex only processing just like as in a single server, without worrying about message transfer and memory/storage management.
The [hugegraph-computer](./computer/README.md) is a distributed graph processing system for hugegraph.

## Learn More

Expand Down
12 changes: 12 additions & 0 deletions computer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Apache HugeGraph-Computer

The hugegraph-computer is a distributed graph processing system for hugegraph. It is an implementation of [Pregel](https://kowshik.github.io/JPregel/pregel_paper.pdf). It runs on Kubernetes or YARN framework.

## Features

- Support distributed MPP graph computing, and integrates with HugeGraph as graph input/output storage.
- Based on BSP(Bulk Synchronous Parallel) model, an algorithm performs computing through multiple parallel iterations, every iteration is a superstep.
- Auto memory management. The framework will never be OOM(Out of Memory) since it will split some data to disk if it doesn't have enough memory to hold all the data.
- The part of edges or the messages of super node can be in memory, so you will never lose it.
- You can load the data from HDFS or HugeGraph, output the results to HDFS or HugeGraph, or adapt any other systems manually as needed.
- Easy to develop a new algorithm. You just need to focus on a vertex only processing just like as in a single server, without worrying about message transfer and memory/storage management.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public List<ContainerInfo> waitWorkersInitDone() {
LOG.info("Master is waiting for workers init-done");
String path = this.constructPath(BspEvent.BSP_WORKER_INIT_DONE);
List<byte[]> serializedContainers = this.waitOnWorkersEvent(
path, this.registerTimeout());
path, this.registerTimeout());
List<ContainerInfo> containers = new ArrayList<>(this.workerCount());
for (byte[] serializedContainer : serializedContainers) {
ContainerInfo container = new ContainerInfo();
Expand Down Expand Up @@ -110,7 +110,7 @@ public List<WorkerStat> waitWorkersStepDone(int superstep) {
String path = this.constructPath(BspEvent.BSP_WORKER_STEP_DONE,
superstep);
List<byte[]> list = this.waitOnWorkersEvent(path,
this.barrierOnWorkersTimeout());
this.barrierOnWorkersTimeout());
List<WorkerStat> result = new ArrayList<>(this.workerCount());
for (byte[] bytes : list) {
WorkerStat workerStat = new WorkerStat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package org.apache.hugegraph.computer.core.receiver;

import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

package org.apache.hugegraph.computer.core.receiver;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.io.FileUtils;
import org.apache.hugegraph.computer.core.common.ComputerContext;
import org.apache.hugegraph.computer.core.config.Config;
Expand All @@ -27,11 +32,6 @@
import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator;
import org.apache.hugegraph.computer.core.store.entry.KvEntry;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public abstract class MessageRecvPartitions<P extends MessageRecvPartition> {

protected final ComputerContext context;
Expand Down
Loading

0 comments on commit 20cb885

Please sign in to comment.