Skip to content

Commit 0fdd71d

Browse files
authored
Merge branch 'master' into feat-vertex-edge-optimization
2 parents 8a0e07f + 1dd0580 commit 0fdd71d

20 files changed

+236
-184
lines changed

.github/workflows/check-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
dependency-check:
1414
runs-on: ubuntu-latest
1515
env:
16-
USE_STAGE: 'true' # Whether to include the stage repository.
16+
USE_STAGE: 'false' # Whether to include the stage repository.
1717
SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency
1818
steps:
1919
- name: Checkout source

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-20.04
1414
env:
15-
USE_STAGE: 'true' # Whether to include the stage repository.
15+
USE_STAGE: 'false' # Whether to include the stage repository.
1616
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
1717
REPORT_DIR: target/site/jacoco
1818
BACKEND: ${{ matrix.BACKEND }}

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
analyze:
1414
env:
15-
USE_STAGE: 'true' # Whether to include the stage repository.
15+
USE_STAGE: 'false' # Whether to include the stage repository.
1616
name: Analyze
1717
runs-on: ubuntu-latest
1818
permissions:

.github/workflows/licence-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
check-license:
1212
runs-on: ubuntu-latest
1313
env:
14-
USE_STAGE: 'true' # Whether to include the stage repository.
14+
USE_STAGE: 'false' # Whether to include the stage repository.
1515
steps:
1616
- uses: actions/checkout@v4
1717

.licenserc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ header: # `header` section is configurations for source codes license header.
9696
- '**/util/StringEncoding.java'
9797
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java'
9898
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java'
99-
- 'hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh'
10099
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
101100

102101
# license-location-threshold specifies the index threshold where the license header can be located,

LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,5 @@ hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptT
214214
hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph
215215
hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph
216216
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph
217-
hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph
218217
hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java from https://github.com/opencypher/cypher-for-gremlin
219218
hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java from https://github.com/opencypher/cypher-for-gremlin

NOTICE

+2-38
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache HugeGraph(incubating)
2-
Copyright 2022-2023 The Apache Software Foundation
2+
Copyright 2022-2024 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
@@ -13,9 +13,6 @@ This product contains code form the Apache TinkerPop Project:
1313
Apache TinkerPop
1414
Copyright 2015-2022 The Apache Software Foundation.
1515

16-
This product includes software developed at
17-
The Apache Software Foundation (http://www.apache.org/).
18-
1916
------------------------------------------------------------------------
2017
Activiti
2118
------------------------------------------------------------------------
@@ -42,7 +39,7 @@ This product contains code form the JanusGraph Project:
4239
-----------------------------------------------------------------------
4340
==============================================================
4441
JanusGraph: Distributed Graph Database
45-
Copyright 2012 and onwards JanusGraph Authors
42+
Copyright 2012 with JanusGraph Authors
4643
==============================================================
4744

4845
This product includes software developed by JanusGraph contributors listed
@@ -56,36 +53,3 @@ DataStax) and the following individuals:
5653
* Marko A. Rodriguez
5754
* Stephen Mallette
5855
* Pavel Yaskevich
59-
60-
It also includes software from other open source projects including, but not limited to (check pom.xml for complete listing):
61-
62-
* Apache Cassandra [https://cassandra.apache.org/]
63-
* Apache Commons [https://commons.apache.org/]
64-
* Apache Groovy [http://groovy-lang.org/]
65-
* Apache HBase [https://hbase.apache.org/]
66-
* Apache Hadoop [https://hadoop.apache.org/]
67-
* Apache Kerby [https://github.com/apache/directory-kerby]
68-
* Apache Log4j [https://logging.apache.org/log4j]
69-
* Apache Lucene [https://lucene.apache.org/]
70-
* Apache Solr [https://lucene.apache.org/solr/]
71-
* Apache TinkerPop [https://tinkerpop.apache.org/]
72-
* Astyanax [https://github.com/Netflix/astyanax]
73-
* DataStax Driver for Apache Cassandra [https://github.com/datastax/java-driver]
74-
* EasyMock [http://easymock.org/]
75-
* Elasticsearch [https://www.elastic.co/]
76-
* Google Cloud Bigtable [https://github.com/googlecloudplatform/cloud-bigtable-client]
77-
* Google Guava [https://github.com/google/guava]
78-
* HPPC [https://labs.carrotsearch.com/hppc.html]
79-
* JUnit [https://www.junit.org/]
80-
* Jackson [https://github.com/FasterXML/jackson]
81-
* Kryo [https://github.com/EsotericSoftware/kryo]
82-
* Metrics [https://metrics.dropwizard.io]
83-
* Mockito [https://site.mockito.org/]
84-
* Noggit [https://github.com/yonik/noggit]
85-
* OpenRDF [http://rdf4j.org/]
86-
* Oracle BerkeleyDB Java Edition [https://www.oracle.com/technetwork/products/berkeleydb/] (see license below)
87-
* Project Lombok [https://projectlombok.org/]
88-
* Reflections8 [https://github.com/aschoerk/reflections8]
89-
* SLF4J [https://www.slf4j.org/]
90-
* Spatial4j [https://github.com/locationtech/spatial4j]
91-
* Vavr [https://www.vavr.io/]

README.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,24 @@ Billions of vertices and edges can be easily stored into and queried from HugeGr
3030

3131
## Quick Start
3232

33-
### 1. Download Way
33+
### 1. Docker Way (Convenient for Test)
34+
35+
We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner
36+
HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**.
37+
You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details.
38+
39+
> Note:
40+
>
41+
> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
42+
>
43+
> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
44+
45+
### 2. Download Way
3446

3547
Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#32-download-the-binary-tar-tarball)
3648
to download the latest release package and start the server.
3749

38-
### 2. Source Building Way
50+
### 3. Source Building Way
3951

4052
Visit [Source Building Page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) and follow the
4153
steps to build the source code and start the server.
@@ -49,21 +61,11 @@ And here are links of other **HugeGraph** component/repositories:
4961
3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** libs)
5062
4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code)
5163

52-
### 3. Docker Way (Convenient for Test)
53-
54-
We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner
55-
HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**.
56-
You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details.
5764

58-
> Note:
59-
>
60-
> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
61-
>
62-
> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
6365

6466
## License
6567

66-
HugeGraph is licensed under Apache 2.0 License.
68+
HugeGraph is licensed under [Apache 2.0 License](LICENSE).
6769

6870

6971
## Contributing

hugegraph-server/hugegraph-dist/docker/README.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
>
55
> 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
66
>
7-
> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
7+
> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
88
99
## 1. Deploy
1010

1111
We can use docker to quickly start an inner HugeGraph server with RocksDB in background.
1212

1313
1. Using docker run
1414

15-
Use `docker run -itd --name=graph -p 18080:8080 hugegraph/hugegraph` to start hugegraph server.
15+
Use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to start hugegraph server.
1616

1717
2. Using docker compose
1818

@@ -35,7 +35,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script
3535

3636
1. Using docker run
3737

38-
Use `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph`
38+
Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph`
3939
to start hugegraph server.
4040

4141
2. Using docker compose
@@ -57,4 +57,27 @@ If you want to customize the pre-loaded data, please mount the the groovy script
5757

5858
3. Using start-hugegraph.sh
5959

60-
If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`.
60+
If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`.
61+
62+
## 3. Enable Authentication
63+
64+
1. Using docker run
65+
66+
Use `docker run -itd --name=graph -p 8080:8080 -e AUTH=true -e PASSWORD=123456 hugegraph/hugegraph` to enable the authentication and set the password with `-e AUTH=true -e PASSWORD=123456`.
67+
68+
2. Using docker compose
69+
70+
Similarly, we can set the envionment variables in the docker-compose.yaml:
71+
72+
```yaml
73+
version: '3'
74+
services:
75+
server:
76+
image: hugegraph/hugegraph
77+
container_name: graph
78+
ports:
79+
- 8080:8080
80+
environment:
81+
- AUTH=true
82+
- PASSWORD=123456
83+
```

hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh

+15-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,24 @@
1616
# under the License.
1717
#
1818

19-
19+
# wait for storage like cassandra
2020
./bin/wait-storage.sh
2121

22-
./bin/init-store.sh
22+
# set auth if needed
23+
if [[ $AUTH == "true" ]]; then
24+
# set password if use do not provide
25+
if [ -z "$PASSWORD" ]; then
26+
echo "you have not set the password, we will use the default password"
27+
PASSWORD="hugegraph"
28+
fi
29+
echo "init hugegraph with auth"
30+
./bin/enable-auth.sh
31+
echo "$PASSWORD" | ./bin/init-store.sh
32+
else
33+
./bin/init-store.sh
34+
fi
2335

36+
# start hugegraph
2437
./bin/start-hugegraph.sh -j "$JAVA_OPTS" -g zgc
2538

2639
tail -f /dev/null

hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
image: hugegraph/hugegraph
2323
container_name: cas-graph
2424
ports:
25-
- 18080:8080
25+
- 8080:8080
2626
environment:
2727
hugegraph.backend: cassandra
2828
hugegraph.serializer: cassandra

hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh hugegraph-server/hugegraph-dist/download_keystore.sh

+15-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@
1616
# under the License.
1717
#
1818

19+
curl --version >/dev/null 2>&1 ||
20+
{
21+
echo 'ERROR: Please install `curl` first if you need `hugegraph-server.keystore`'
22+
exit
23+
}
1924

20-
./bin/wait-storage.sh
25+
# TODO: perhaps it's necessary verify the checksum before reusing the existing keystore
26+
if [[ ! -f hugegraph-server.keystore ]]; then
27+
curl -s -S -L -o hugegraph-server.keystore \
28+
https://github.com/apache/hugegraph-doc/raw/binary-1.0/dist/server/hugegraph-server.keystore ||
29+
{
30+
echo 'ERROR: Download `hugegraph-server.keystore` from GitHub failed, please check your network connection'
31+
exit
32+
}
33+
fi
2134

22-
./bin/init-store.sh
23-
24-
./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc
35+
echo 'INFO: Successfully download `hugegraph-server.keystore`'

hugegraph-server/hugegraph-dist/pom.xml

+40-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
<exec executable="${shell-executable}"
188188
dir="${project.basedir}"
189189
failonerror="false">
190-
<arg line="./dist.sh"/>
190+
<arg line="./download_swagger_ui.sh"/>
191191
</exec>
192192
</target>
193193
</configuration>
@@ -216,6 +216,45 @@
216216
</target>
217217
</configuration>
218218
</execution>
219+
<execution>
220+
<id>download-keystore</id>
221+
<phase>prepare-package</phase>
222+
<goals>
223+
<goal>run</goal>
224+
</goals>
225+
<configuration>
226+
<target>
227+
<exec executable="${shell-executable}"
228+
dir="${project.basedir}"
229+
failonerror="false">
230+
<arg line="./download_keystore.sh"/>
231+
</exec>
232+
</target>
233+
</configuration>
234+
</execution>
235+
<execution>
236+
<id>cp-keystore</id>
237+
<phase>package</phase>
238+
<goals>
239+
<goal>run</goal>
240+
</goals>
241+
<configuration>
242+
<target>
243+
<exec executable="cp"
244+
dir="${project.basedir}"
245+
failonerror="false">
246+
<arg value="hugegraph-server.keystore"/>
247+
<arg value="../${final.name}/conf/hugegraph-server.keystore"/>
248+
</exec>
249+
<exec executable="rm"
250+
dir="${project.basedir}"
251+
failonerror="false">
252+
<arg value="-rf"/>
253+
<arg value="hugegraph-server.keystore"/>
254+
</exec>
255+
</target>
256+
</configuration>
257+
</execution>
219258
</executions>
220259
</plugin>
221260
</plugins>

hugegraph-server/hugegraph-dist/release-docs/LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ The text of each license is the standard Apache 2.0 license.
220220
hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph
221221
hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph
222222
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph
223-
hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph
224223
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java from https://github.com/apache/tinkerpop
225224
hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java from https://github.com/apache/tinkerpop
226225
hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java from https://github.com/apache/tinkerpop

0 commit comments

Comments
 (0)