Skip to content

Commit

Permalink
Merge branch 'pd-store' into pd-store-api-test
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies committed Jul 20, 2024
2 parents 8958eec + e1bd708 commit 683028d
Show file tree
Hide file tree
Showing 1,186 changed files with 14,122 additions and 14,282 deletions.
1 change: 0 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ github:
- Analyze (java)
- CodeQL
- check-license
- build (memory, 8)
- build (memory, 11)
required_pull_request_reviews:
dismiss_stale_reviews: true
Expand Down
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ insert_final_newline = true
[*.{java,xml,py}]
indent_style = space
indent_size = 4

[*.{java,xml}]
# Ignore the IDEA unsupported warning & it works well (indeed)
continuation_indent_size = 8

[*.md]
max_line_length = off
9 changes: 5 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ published)

## Purpose of the PR

- close #xxx <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->
- close #xxx <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->

<!--
Please explain more context in this section, clarify why the changes are needed.
Expand All @@ -30,7 +30,7 @@ e.g:

## Main Changes

<!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. These change logs are helpful for better ant faster reviews.)
<!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. These change logs are helpful for better and faster reviews.)
For example:
Expand All @@ -51,11 +51,12 @@ For example:

<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->

- [ ] Nope
- [ ] Dependencies (add/update license info) <!-- Don't forget to add/update the info in "LICENSE" & "NOTICE" files (both in root & dist module) -->
- [ ] Dependencies ([add/update license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses) info & [regenerate_dependencies](../hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh)) <!-- Don't forget to add/update the info in "LICENSE" & "NOTICE" files (both in root & dist module) -->
- [ ] Modify configurations
- [ ] The public API
- [ ] Other affects (typed here)
- [ ] Nope


## Documentation Status

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
dependency-check:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency
steps:
- name: Checkout source
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
analyze:
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/licence-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
check-license:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
steps:
- uses: actions/checkout@v4

Expand All @@ -24,7 +24,7 @@ jobs:
token: ${{ github.token }}
config: .licenserc.yaml

- name: License check(RAT)
- name: License Check (RAT)
run: |
mvn apache-rat:check -ntp
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "pd-store"
name: "hugegraph-pd-store-ci"

on:
push:
Expand All @@ -8,11 +8,14 @@ on:
- 'test-*'
pull_request:

# TODO: consider merge to one ci.yml file
jobs:
pd:
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.
# TODO: avoid duplicated env setup in pd & store
USE_STAGE: 'false' # Whether to include the stage repository.
# TODO: remove outdated env
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco

Expand All @@ -31,9 +34,9 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 5

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
Expand All @@ -45,29 +48,26 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp
- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
- name: Run client test
- name: Run common test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test -Dmaven.test.failure.ignore=true
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test
- name: Run core test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test -Dmaven.test.failure.ignore=true
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test
- name: Run cli-tools test
# The above tests do not require starting a PD instance.
- name: Prepare env and service
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-cli-tools-test -Dmaven.test.failure.ignore=true
$TRAVIS_DIR/start-pd.sh
- name: Run common test
- name: Run client test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test -Dmaven.test.failure.ignore=true
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test
- name: Run service test
- name: Run rest test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-service-test -Dmaven.test.failure.ignore=true
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test
- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand All @@ -78,7 +78,8 @@ jobs:
# TODO: avoid duplicated env setup
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.
USE_STAGE: 'false' # Whether to include the stage repository.
# TODO: remove outdated env
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco

Expand All @@ -97,9 +98,9 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 5

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "hugegraph-ci"
name: "hugegraph-server-ci"

on:
push:
Expand All @@ -10,6 +10,7 @@ on:

jobs:
build:
# TODO: we need test & replace it to ubuntu-24.04 or ubuntu-latest
runs-on: ubuntu-20.04
env:
USE_STAGE: 'false' # Whether to include the stage repository.
Expand All @@ -33,7 +34,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 5

# TODO: Remove this step after install-backend.sh updated
- name: Install Java8 for backend
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
days-before-pr-stale: 30
days-before-pr-close: 180
operations-per-run: 10
start-date: '2017-10-01T00:00:00Z'
start-date: '2016-10-01T00:00:00Z'

exempt-all-assignees: true
remove-stale-when-updated: true
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ gen-java
.svn

### IntelliJ IDEA ###
.idea
.idea/
.idea/*
!.idea/vcs.xml
!.idea/icon.png
*.iws
*.iml
*.ipr
Expand Down Expand Up @@ -83,3 +84,6 @@ hs_err_pid*
.mtj.tmp/
# blueJ files
*.ctxt

# docker volumes ignore
hugegraph-server/hugegraph-dist/docker/data/
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 21 additions & 18 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,30 @@ header: # `header` section is configurations for source codes license header.
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.
# `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`.
pattern: |
Licensed to the Apache Software Foundation under one or more contributor
license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright
ownership. The Apache Software Foundation 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
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.
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.
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
- '**'

Expand Down Expand Up @@ -89,14 +91,15 @@ header: # `header` section is configurations for source codes license header.
- '**/META-INF/MANIFEST.MF'
- '.repository/**'
- '**/.flattened-pom.xml'
- '**/optimize/HugeScriptTraversal.java'
- '**/type/Nameable.java'
- '**/define/Cardinality.java'
- '**/util/StringEncoding.java'
# TODO: temporarily added to the ignore list, need handle them before releases ( ↓ )
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java'
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java'
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java'
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java'
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java'
- 'hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java'
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java'
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java'
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java'
- 'hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/metrics/ProcfsEntry.java'
- 'hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/metrics/ProcfsReader.java'
- 'hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/metrics/ProcfsSmaps.java'
Expand Down
37 changes: 17 additions & 20 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
Building hugegraph
Building HugeGraph
--------------

Required:

* Java 8/11
* Maven
* Java 11
* Maven 3.5+

To build without executing tests: `mvn clean package -DskipTests`

## Building in IDEA

To build without executing tests:

```
mvn clean
mvn package -DskipTests
```
1. Click on "File" -> "Open", choose your project location.
2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects".
3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle".
4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top navibar of "Maven Projects" window to skip tests.
5. Double click "package" or "install" to build a project.

Could also refer [Dev-In-IDEA](https://hugegraph.apache.org/docs/contribution-guidelines/hugegraph-server-idea-setup/) for more details.

## Building on Eclipse IDE
Note that this has only been tested on Eclipse Neon.2 Release (4.6.2) with m2e (1.7.0.20160603-1933) and m2e-wtp (1.3.1.20160831-1005) plugin.
## Building in Eclipse

> Note: this has only been tested on Eclipse Neon.2 Release (4.6.2) with m2e (1.7.0.20160603-1933) and m2e-wtp (1.3.1.20160831-1005) plugin.
To build without executing tests:

1. Right-click on your project -> "Run As..." -> "Run Configurations..."
2. On "Goals", populate with `install`
3. Select the options `Update Snapshots` and `Skip Tests`
4. Before clicking "Run", make sure that Eclipse knows where `JAVA_HOME` is. On same window, go to "Environment" tab and click "New".
4. Before clicking "Run", make sure that Eclipse knows where `JAVA_HOME` is. In the same window, go to "Environment" tab and click "New".
5. Under "Name:", add `JAVA_HOME`
6. Under "Value:", add the path where `java` is located
7. Click "OK"
Expand All @@ -32,13 +39,3 @@ To find the Java binary in your environment, run the appropriate command for you
* Linux/macOS: `which java`
* Windows: `for %i in (java.exe) do @echo. %~$PATH:i`

## Building on IDEA

To build without executing tests:

1. Click on "File" -> "Open", choose your project location.
2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects".
3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle".
4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top
navibar of "Maven Projects" window to skip tests.
5. Double click "package" or "install" to build project.
Loading

0 comments on commit 683028d

Please sign in to comment.