-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
493 changed files
with
38,180 additions
and
1,649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: "HugeGraph-Commons CI" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
- /^release-.*$/ | ||
- /^test-.*$/ | ||
pull_request: | ||
|
||
jobs: | ||
build-commons: | ||
runs-on: ubuntu-latest | ||
env: | ||
# TODO: reset use stage to false later | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
JAVA_VERSION: ['11'] | ||
|
||
steps: | ||
- name: Install JDK ${{ matrix.JAVA_VERSION }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.JAVA_VERSION }} | ||
distribution: 'zulu' | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Use staged maven repo settings | ||
if: ${{ env.USE_STAGE == 'true' }} | ||
run: | | ||
cp $HOME/.m2/settings.xml /tmp/settings.xml | ||
cp -vf .github/configs/settings.xml $HOME/.m2/settings.xml && cat $HOME/.m2/settings.xml | ||
- name: Compile | ||
run: | | ||
mvn compile -Dmaven.javadoc.skip=true -ntp | ||
- name: Run common test | ||
run: | | ||
mvn test -pl hugegraph-commons/hugegraph-common -Dtest=UnitTestSuite -DskipCommonsTests=false | ||
- name: Run rpc test | ||
run: | | ||
mvn test -pl hugegraph-commons/hugegraph-rpc -Dtest=UnitTestSuite -DskipCommonsTests=false | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: target/jacoco.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Graph PD & Store & Hstore CI" | ||
name: "HugeGraph-PD & Store & Hstore CI" | ||
|
||
on: | ||
push: | ||
|
@@ -14,7 +14,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
# TODO: avoid duplicated env setup in pd & store | ||
USE_STAGE: 'false' # Whether to include the stage repository. | ||
# TODO: reset use stage to false later | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
# TODO: remove outdated env | ||
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | ||
REPORT_DIR: target/site/jacoco | ||
|
@@ -46,11 +47,11 @@ jobs: | |
- name: Run common test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test -DskipCommonsTests=true | ||
- name: Run core test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test -DskipCommonsTests=true | ||
# The above tests do not require starting a PD instance. | ||
|
||
|
@@ -64,11 +65,11 @@ jobs: | |
- name: Run client test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test -DskipCommonsTests=true | ||
- name: Run rest test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test -DskipCommonsTests=true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
|
@@ -79,7 +80,7 @@ jobs: | |
# TODO: avoid duplicated env setup | ||
runs-on: ubuntu-latest | ||
env: | ||
USE_STAGE: 'false' # Whether to include the stage repository. | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
# TODO: remove outdated env | ||
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | ||
REPORT_DIR: target/site/jacoco | ||
|
@@ -120,27 +121,27 @@ jobs: | |
- name: Run common test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test -DskipCommonsTests=true | ||
- name: Run client test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test -DskipCommonsTests=true | ||
- name: Run core test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test -DskipCommonsTests=true | ||
- name: Run rocksdb test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test -DskipCommonsTests=true | ||
- name: Run server test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test -DskipCommonsTests=true | ||
- name: Run raft-core test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test -DskipCommonsTests=true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ build/ | |
*.pyc | ||
|
||
# maven ignore | ||
apache-hugegraph-incubating-*/ | ||
apache-hugegraph-*/ | ||
output/ | ||
*.war | ||
*.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# hugegraph-commons | ||
|
||
[![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) | ||
[![codecov](https://codecov.io/gh/hugegraph/hugegraph-common/branch/master/graph/badge.svg)](https://codecov.io/gh/hugegraph/hugegraph-common) | ||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/org.apache.hugegraph/hugegraph-common) | ||
[![CodeQL](https://github.com/apache/incubator-hugegraph-commons/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/incubator-hugegraph-commons/actions/workflows/codeql-analysis.yml) | ||
[![hugegraph-commons ci](https://github.com/apache/incubator-hugegraph-commons/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-hugegraph-commons/actions/workflows/ci.yml) | ||
|
||
|
||
hugegraph-commons is a common module for [HugeGraph](https://github.com/apache/hugegraph) and its peripheral components. | ||
hugegraph-commons encapsulates locks, configurations, events, iterators, rest and some | ||
numeric or collection util classes to simplify the development of HugeGraph and its components. | ||
|
||
## Components | ||
|
||
- Lock: atomic lock, key lock, lock group and lock manger | ||
- Config: register and load config option with security check | ||
- Event: listening and notification, do something asynchronously | ||
- Iterator: some iterators with extra functions, map, filter, extend, etc. | ||
- Rest: RESTful client implemented on OkHttp, POST, PUT, GET and DELETE | ||
- Util: performance analyzer, version checker, numeric and Collection utils, log and exception utils, etc. | ||
- Rpc: rpc component for inner module communication, currently it's based on [Sofa-RPC](https://github.com/sofastack/sofa-rpc) | ||
|
||
You could use import the dependencies in `maven` like this: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>org.apache.hugegraph</groupId> | ||
<artifactId>hugegraph-common</artifactId> | ||
<version>1.2.0</version> | ||
</dependency> | ||
``` | ||
|
||
## Learn More | ||
|
||
The [doc page](https://hugegraph.apache.org/docs/) contains more information about hugegraph modules. | ||
|
||
And here are links of other repositories: | ||
1. [hugegraph-server](https://github.com/apache/hugegraph) (graph's core component - OLTP server) | ||
2. [hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain) (include loader/dashboard/tool/client) | ||
3. [hugegraph-computer](https://github.com/apache/hugegraph-computer) (graph processing system - OLAP) | ||
4. [hugegraph-website/doc](https://github.com/apache/hugegraph-doc) (include doc & website code) | ||
|
||
|
||
|
||
## Contributing | ||
|
||
- Welcome to contribute to HugeGraph, please see [How to Contribute](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/) for more information. | ||
- Note: It's recommended to use [GitHub Desktop](https://desktop.github.com/) to greatly simplify the PR and commit process. | ||
- Thank you to all the people who already contributed to HugeGraph! | ||
|
||
[![contributors graph](https://contrib.rocks/image?repo=apache/hugegraph-commons)](https://github.com/apache/incubator-hugegraph-commons/graphs/contributors) | ||
|
||
## Licence | ||
|
||
Same as HugeGraph, hugegraph-commons are also licensed under [Apache 2.0](./LICENSE) License. | ||
|
||
### Contact Us | ||
|
||
--- | ||
|
||
- [GitHub Issues](https://github.com/apache/incubator-hugegraph-commons/issues): Feedback on usage issues and functional requirements (quick response) | ||
- Feedback Email: [[email protected]](mailto:[email protected]) ([subscriber](https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/) only) | ||
- WeChat public account: Apache HugeGraph, welcome to scan this QR code to follow us. | ||
|
||
<img src="https://raw.githubusercontent.com/apache/incubator-hugegraph-doc/master/assets/images/wechat.png" alt="QR png" width="350"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# hugegraph-common | ||
|
||
[![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) | ||
[![Build Status](https://travis-ci.org/hugegraph/hugegraph-common.svg?branch=master)](https://travis-ci.org/hugegraph/hugegraph-common) | ||
[![codecov](https://codecov.io/gh/hugegraph/hugegraph-common/branch/master/graph/badge.svg)](https://codecov.io/gh/hugegraph/hugegraph-common) | ||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.hugegraph/hugegraph-common/badge.svg)](https://mvnrepository.com/artifact/org.apache.hugegraph/hugegraph-common) | ||
|
||
hugegraph-common is a common module for [HugeGraph](https://github.com/hugegraph/hugegraph) and its peripheral components. | ||
hugegraph-common encapsulates locks, configurations, events, iterators, rest and some | ||
numeric or collection util classes to simplify the development of HugeGraph and | ||
its components. | ||
|
||
## Components | ||
|
||
- Lock: atomic lock, key lock, lock group and lock manger | ||
- Config: register and load config option with security check | ||
- Event: listening and notification, do something asynchronously | ||
- Iterator: some iterators with extra functions, map, filter, extend, etc. | ||
- Rest: RESTful client implemented on Jersey, POST, PUT, GET and DELETE | ||
- Util: Performance analyzer, version checker, numeric and Collection utils, log and exception utils, etc. | ||
|
||
## Licence | ||
The same as HugeGraph, hugegraph-common is also licensed under Apache 2.0 License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# 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. | ||
# | ||
|
||
export MAVEN_HOME=/home/scmtools/buildkit/maven/apache-maven-3.3.9/ | ||
export JAVA_HOME=/home/scmtools/buildkit/java/jdk1.8.0_25/ | ||
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH | ||
|
||
mvn clean test -Dtest=UnitTestSuite |
Oops, something went wrong.