Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clustertest): add basic MiniCluster module for distributed system #2615

Merged
merged 51 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1c3794f
fix(server): Random generate default jwt secret key
HJ-Young Jul 2, 2024
1460469
fix(server): random generate default jwt secret key
HJ-Young Jul 5, 2024
9840c7c
Merge branch 'apache:master' into master
HJ-Young Jul 5, 2024
85c2b6d
Apply suggestions from code review
imbajin Jul 13, 2024
f3199fa
Merge branch 'apache:master' into master
HJ-Young Jul 19, 2024
d43da0b
Merge branch 'apache:master' into master
HJ-Young Aug 4, 2024
0d50758
feat(it): add basic miniCluster supports SimpleEnv
HJ-Young Aug 4, 2024
d7d3fc7
feat(it): add dist to generate configuration files
HJ-Young Aug 7, 2024
c21c936
chore(it): move the path in Env Object to ClusterConstant
HJ-Young Aug 8, 2024
ab08c68
chore(it): move the path in Env Object to ClusterConstant
HJ-Young Aug 8, 2024
1c44444
Merge branch 'apache:master' into master
HJ-Young Aug 8, 2024
efa6c9c
chore(it): move the path in Env Object to ClusterConstant
HJ-Young Aug 8, 2024
92a8001
Merge remote-tracking branch 'origin/master'
HJ-Young Aug 8, 2024
1ef2cd0
feat(it): add the config and implement of multiEnv
HJ-Young Aug 9, 2024
530f3ea
feat(it): amend the implement of reading configuration files
HJ-Young Aug 16, 2024
ce20f44
fix(it): fix the bug of coping wrong node dir
HJ-Young Aug 17, 2024
31c58f4
fix(it): add configuration files in dist
HJ-Young Aug 17, 2024
3476109
Merge branch 'apache:master' into master
HJ-Young Aug 17, 2024
9f02e27
fix(it): get hugegraph.properties through template file
HJ-Young Aug 17, 2024
1714213
fix(it): add 5s intervals between generation of pd nodes
HJ-Young Aug 18, 2024
16a4347
Merge branch 'apache:master' into master
HJ-Young Aug 18, 2024
7c57f67
Merge branch 'apache:master' into master
HJ-Young Sep 9, 2024
a23ab6f
feat(ct): add test and ci to CT module
HJ-Young Sep 9, 2024
deedb7d
feat(ct): add CI yml file
HJ-Young Sep 9, 2024
7275b67
fix(ct): add dependency to ct-test pom
HJ-Young Sep 9, 2024
4dfea30
fix(ct): delete unused pom dependencies
HJ-Young Sep 9, 2024
2d1896a
fix(ct): fix ci file
HJ-Young Sep 9, 2024
17f96a4
fix(ct): fix ci file
HJ-Young Sep 9, 2024
94a60ba
fix(ct): fix ci file
HJ-Young Sep 11, 2024
956226e
fix(ct): update dependency file
HJ-Young Sep 11, 2024
4fa78c2
fix(ct): add Multi cluster test
HJ-Young Sep 12, 2024
48cfc6e
chore(ct): reformat code & update config files
HJ-Young Sep 23, 2024
80835a3
chore(ct): reformat code style based on code review comment
HJ-Young Sep 25, 2024
1f593d8
fix(ct): resolve dependency problems & add exegesis in BaseTest class
HJ-Young Sep 25, 2024
2f769d7
Merge branch 'apache:master' into master
HJ-Young Sep 25, 2024
dd0bbd6
fix(ct): use different Logger to record log
HJ-Young Oct 6, 2024
6d391f6
Merge branch 'apache:master' into master
HJ-Young Oct 6, 2024
57d39ad
fix(ct): sync new commit
HJ-Young Oct 6, 2024
7ca4c8a
Apply suggestions from code review
HJ-Young Oct 8, 2024
69b7623
fix(ct): update code based on comments
HJ-Young Oct 8, 2024
359b832
fix(ct): fix pom file problem
HJ-Young Oct 9, 2024
82d3dd3
fix(ct): update pom.xml
HJ-Young Oct 9, 2024
981d572
fix code
imbajin Oct 9, 2024
ab3d76c
Apply suggestions from code review
HJ-Young Oct 10, 2024
436c2ac
fix(ct): fix code style problems
HJ-Young Oct 10, 2024
d916ad8
Merge branch 'apache:master' into master
HJ-Young Oct 10, 2024
2896c07
fix(ct): update hg-client version
HJ-Young Oct 13, 2024
584c79b
fix(ct): simplify the dist
HJ-Young Oct 14, 2024
cf6994d
fix(ct): simplify the dist
HJ-Young Oct 14, 2024
e677136
fix(ct): simplify the dist
HJ-Young Oct 14, 2024
b4f451d
fix(ct): fix server config file path
HJ-Young Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/cluster-test-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Cluster Test CI"

on:
push:
branches:
- master
- 'release-*'
- 'test-*'
pull_request:

jobs:
cluster-test:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.

steps:
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
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@v4
with:
fetch-depth: 5

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml

- name: Package
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp

- name: Run simple cluster test
run: |
mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test -am -P simple-cluster-test -DskipCommonsTests=true

- name: Run multi cluster test
run: |
mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test -am -P multi-cluster-test -DskipCommonsTests=true
78 changes: 78 additions & 0 deletions hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph-cluster-test</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>hugegraph-clustertest-dist</artifactId>

<properties>
<dist.dir>${project.parent.basedir}</dist.dir>
<shell-executable>bash</shell-executable>
<assembly.dir>${project.basedir}/src/assembly</assembly.dir>
<assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir>
<assembly.static.dir>${assembly.dir}/static</assembly.static.dir>
<executable.jar.name>hg-ct</executable.jar.name>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>assembly-hugegraph-ct</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${dist.dir}</outputDirectory>
<descriptors>
<descriptor>
${assembly.descriptor.dir}/assembly.xml
</descriptor>
</descriptors>
<finalName>${final.name}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph-clustertest-minicluster</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
~ 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.
-->

<assembly>
<id>distribution</id>
<includeBaseDirectory>false</includeBaseDirectory>

<formats>
<format>dir</format>
</formats>

<fileSets>
<fileSet>
<directory>${assembly.static.dir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>

</fileSets>

<dependencySets>
<!-- code jars -->
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.apache.hugegraph:${executable.jar.name}:jar:*</include>
</includes>
</dependencySet>
</dependencySets>

</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# 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.
#
# common parameters
common: {
worker_heap: 10000,
vertex_input_dir: /data,
workers: 51,
zookeeper_list: "127.0.0.1:2181",
max_edges_per_segment: 10485760,
edges_immutable: true,
partitions: 255,
compute_threads: 5,
input_threads: 5,
message_async: false,
message_queue_size: 1000,
message_send_threads: 10,
messages_per_segment: 104857600,
hugegraph_url: "http://127.0.0.1:8080",
hugegraph_name: hugegraph,
hugegraph_timeout: 60
}

env: {
computer_home: /home/computer
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# 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.
#
hosts: [localhost]
port: 8182
serializer: {
className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,
config: {
serializeResultToString: false,
ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#
# 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.
#
# host and port of gremlin server, need to be consistent with host and port in rest-server.properties
host: 127.0.0.1
port: 8182

# timeout in ms of gremlin query
evaluationTimeout: 30000

channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
# don't set graph at here, this happens after support for dynamically adding graph
graphs: {
}
scriptEngines: {
gremlin-groovy: {
staticImports: [
org.opencypher.gremlin.process.traversal.CustomPredicates.*',
org.opencypher.gremlin.traversal.CustomFunctions.*
],
plugins: {
org.apache.hugegraph.plugin.HugeGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {
classImports: [
java.lang.Math,
org.apache.hugegraph.backend.id.IdGenerator,
org.apache.hugegraph.type.define.Directions,
org.apache.hugegraph.type.define.NodeRole,
org.apache.hugegraph.masterelection.GlobalMasterInfo,
org.apache.hugegraph.util.DateUtil,
org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser,
org.apache.hugegraph.traversal.algorithm.CountTraverser,
org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser,
org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser,
org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser,
org.apache.hugegraph.traversal.algorithm.HugeTraverser,
org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser,
org.apache.hugegraph.traversal.algorithm.KneighborTraverser,
org.apache.hugegraph.traversal.algorithm.KoutTraverser,
org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser,
org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser,
org.apache.hugegraph.traversal.algorithm.PathsTraverser,
org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser,
org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser,
org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser,
org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser,
org.apache.hugegraph.traversal.algorithm.SubGraphTraverser,
org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser,
org.apache.hugegraph.traversal.algorithm.steps.EdgeStep,
org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep,
org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep,
org.apache.hugegraph.traversal.optimize.ConditionP,
org.apache.hugegraph.traversal.optimize.Text,
org.apache.hugegraph.traversal.optimize.TraversalUtil,
org.opencypher.gremlin.traversal.CustomFunctions,
org.opencypher.gremlin.traversal.CustomPredicate
],
methodImports: [
java.lang.Math#*,
org.opencypher.gremlin.traversal.CustomPredicate#*,
org.opencypher.gremlin.traversal.CustomFunctions#*
]
},
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {
files: [scripts/empty-sample.groovy]
}
}
}
}
serializers:
- {className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1,
config: {
serializeResultToString: false,
ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry]
}
}
- {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,
config: {
serializeResultToString: false,
ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry]
}
}
- {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0,
config: {
serializeResultToString: false,
ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry]
}
}
- {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0,
config: {
serializeResultToString: false,
ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry]
}
}
metrics: {
consoleReporter: {enabled: false, interval: 180000},
csvReporter: {enabled: false, interval: 180000, fileName: ./metrics/gremlin-server-metrics.csv},
jmxReporter: {enabled: false},
slf4jReporter: {enabled: false, interval: 180000},
gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
graphiteReporter: {enabled: false, interval: 180000}
}
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536
ssl: {
enabled: false
}
Binary file not shown.
Binary file not shown.
Loading
Loading