Skip to content

Commit 433fda3

Browse files
authored
Merge branch 'master' into feat-vertex-edge-optimization
2 parents d4f1453 + bc421bb commit 433fda3

File tree

791 files changed

+12167
-11888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

791 files changed

+12167
-11888
lines changed

.github/configs/settings.xml

-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
<!--
2-
Licensed to the Apache Software Foundation (ASF) under one or more
3-
contributor license agreements. See the NOTICE file distributed with
4-
this work for additional information regarding copyright ownership.
5-
The ASF licenses this file to You under the Apache License, Version 2.0
6-
(the "License"); you may not use this file except in compliance with
7-
the License. You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
16-
-->
17-
181
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
192
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
203
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">

.github/workflows/licence-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
token: ${{ github.token }}
2525
config: .licenserc.yaml
2626

27-
- name: License check(RAT)
27+
- name: License Check (RAT)
2828
run: |
2929
mvn apache-rat:check -ntp
3030
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt

.licenserc.yaml

+20-17
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,30 @@ header: # `header` section is configurations for source codes license header.
2626
The ASF licenses this file to You under the Apache License, Version 2.0
2727
(the "License"); you may not use this file except in compliance with
2828
the License. You may obtain a copy of the License at
29+
2930
http://www.apache.org/licenses/LICENSE-2.0
31+
3032
Unless required by applicable law or agreed to in writing, software
3133
distributed under the License is distributed on an "AS IS" BASIS,
3234
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3335
See the License for the specific language governing permissions and
3436
limitations under the License.
3537
# `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`.
3638
pattern: |
37-
Licensed to the Apache Software Foundation under one or more contributor
38-
license agreements. See the NOTICE file distributed with
39-
this work for additional information regarding copyright
40-
ownership. The Apache Software Foundation licenses this file to you under
41-
the Apache License, Version 2.0 \(the "License"\); you may
42-
not use this file except in compliance with the License.
43-
You may obtain a copy of the License at
39+
Licensed to the Apache Software Foundation \(ASF\) under one or more
40+
contributor license agreements. See the NOTICE file distributed with
41+
this work for additional information regarding copyright ownership.
42+
The ASF licenses this file to You under the Apache License, Version 2.0
43+
\(the "License"\); you may not use this file except in compliance with
44+
the License. You may obtain a copy of the License at
45+
4446
http://www.apache.org/licenses/LICENSE-2.0
45-
Unless required by applicable law or agreed to in writing,
46-
software distributed under the License is distributed on an
47-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
48-
KIND, either express or implied. See the License for the
49-
specific language governing permissions and limitations
50-
under the License.
47+
48+
Unless required by applicable law or agreed to in writing, software
49+
distributed under the License is distributed on an "AS IS" BASIS,
50+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+
See the License for the specific language governing permissions and
52+
limitations under the License.
5153
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
5254
- '**'
5355

@@ -90,10 +92,11 @@ header: # `header` section is configurations for source codes license header.
9092
- '.repository/**'
9193
- '**/.flattened-pom.xml'
9294
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java'
93-
- '**/optimize/HugeScriptTraversal.java'
94-
- '**/type/Nameable.java'
95-
- '**/define/Cardinality.java'
96-
- '**/util/StringEncoding.java'
95+
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java'
96+
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java'
97+
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java'
98+
- 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java'
99+
- 'hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java'
97100
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java'
98101
- 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java'
99102
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.

hugegraph-server/Dockerfile

+9-10
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ COPY . /pkg
2323
WORKDIR /pkg
2424
ARG MAVEN_ARGS
2525

26-
RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l
26+
RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l && rm ./hugegraph-server/*.tar.gz
2727

2828
# 2nd stage: runtime env
29+
# Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13
2930
FROM openjdk:11-slim
30-
# TODO: get the version from the pom.xml
31-
ENV version=1.2.0
32-
COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-$version/ /hugegraph-server
31+
32+
COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-*/ /hugegraph-server/
3333
LABEL maintainer="HugeGraph Docker Maintainers <dev@hugegraph.apache.org>"
3434

3535
# TODO: use g1gc or zgc as default
@@ -39,7 +39,7 @@ ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:Max
3939
#COPY . /hugegraph/hugegraph-server
4040
WORKDIR /hugegraph-server/
4141

42-
# 1. Install environment
42+
# 1. Install environment and init HugeGraph Sever
4343
RUN set -x \
4444
&& apt-get -q update \
4545
&& apt-get -q install -y --no-install-recommends --no-install-suggests \
@@ -48,15 +48,14 @@ RUN set -x \
4848
curl \
4949
lsof \
5050
vim \
51+
cron \
5152
&& apt-get clean \
52-
&& rm -rf /var/lib/apt/lists/*
53-
54-
# 2. Init HugeGraph Sever
55-
RUN set -e \
53+
&& rm -rf /var/lib/apt/lists/* \
54+
&& service cron start \
5655
&& pwd && cd /hugegraph-server/ \
5756
&& sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties
5857

59-
# 3. Init docker script
58+
# 2. Init docker script
6059
COPY hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts
6160
COPY hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts
6261
COPY hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh .

hugegraph-server/hugegraph-api/pom.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
Licensed to the Apache Software Foundation (ASF) under one or more
4-
contributor license agreements. See the NOTICE file distributed with this
5-
work for additional information regarding copyright ownership. The ASF
6-
licenses this file to You under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance with the License.
8-
You may obtain a copy of the License at
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
99
1010
http://www.apache.org/licenses/LICENSE-2.0
1111
1212
Unless required by applicable law or agreed to in writing, software
13-
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14-
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15-
License for the specific language governing permissions and limitations
16-
under the License.
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
1717
-->
1818
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1919
xmlns="http://maven.apache.org/POM/4.0.0"

hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
22
* Licensed to the Apache Software Foundation (ASF) under one or more
3-
* contributor license agreements. See the NOTICE file distributed with this
4-
* work for additional information regarding copyright ownership. The ASF
5-
* licenses this file to You under the Apache License, Version 2.0 (the
6-
* "License"); you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
88
*
99
* http://www.apache.org/licenses/LICENSE-2.0
1010
*
1111
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14-
* License for the specific language governing permissions and limitations
15-
* under the License.
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
1616
*/
1717

1818
package org.apache.hugegraph.api;
@@ -48,22 +48,23 @@ public class API {
4848
public static final String TEXT_PLAIN = MediaType.TEXT_PLAIN;
4949
public static final String APPLICATION_JSON = MediaType.APPLICATION_JSON;
5050
public static final String APPLICATION_JSON_WITH_CHARSET =
51-
APPLICATION_JSON + ";charset=" + CHARSET;
52-
public static final String APPLICATION_TEXT_WITH_CHARSET = MediaType.TEXT_PLAIN + ";charset=" + CHARSET;
51+
APPLICATION_JSON + ";charset=" + CHARSET;
52+
public static final String APPLICATION_TEXT_WITH_CHARSET =
53+
MediaType.TEXT_PLAIN + ";charset=" + CHARSET;
5354
public static final String JSON = MediaType.APPLICATION_JSON_TYPE
54-
.getSubtype();
55+
.getSubtype();
5556
public static final String ACTION_APPEND = "append";
5657
public static final String ACTION_ELIMINATE = "eliminate";
5758
public static final String ACTION_CLEAR = "clear";
5859
protected static final Logger LOG = Log.logger(API.class);
5960
private static final Meter SUCCEED_METER =
60-
MetricsUtil.registerMeter(API.class, "commit-succeed");
61+
MetricsUtil.registerMeter(API.class, "commit-succeed");
6162
private static final Meter ILLEGAL_ARG_ERROR_METER =
62-
MetricsUtil.registerMeter(API.class, "illegal-arg");
63+
MetricsUtil.registerMeter(API.class, "illegal-arg");
6364
private static final Meter EXPECTED_ERROR_METER =
64-
MetricsUtil.registerMeter(API.class, "expected-error");
65+
MetricsUtil.registerMeter(API.class, "expected-error");
6566
private static final Meter UNKNOWN_ERROR_METER =
66-
MetricsUtil.registerMeter(API.class, "unknown-error");
67+
MetricsUtil.registerMeter(API.class, "unknown-error");
6768

6869
public static HugeGraph graph(GraphManager manager, String graph) {
6970
HugeGraph g = manager.graph(graph);

hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
22
* Licensed to the Apache Software Foundation (ASF) under one or more
3-
* contributor license agreements. See the NOTICE file distributed with this
4-
* work for additional information regarding copyright ownership. The ASF
5-
* licenses this file to You under the Apache License, Version 2.0 (the
6-
* "License"); you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
88
*
99
* http://www.apache.org/licenses/LICENSE-2.0
1010
*
1111
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14-
* License for the specific language governing permissions and limitations
15-
* under the License.
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
1616
*/
1717

1818
package org.apache.hugegraph.api.arthas;
@@ -29,7 +29,6 @@
2929

3030
import io.swagger.v3.oas.annotations.Operation;
3131
import io.swagger.v3.oas.annotations.tags.Tag;
32-
3332
import jakarta.inject.Singleton;
3433
import jakarta.ws.rs.PUT;
3534
import jakarta.ws.rs.Path;
@@ -54,7 +53,8 @@ public Object startArthas() {
5453
configMap.put("arthas.telnetPort", config.get(ServerOptions.ARTHAS_TELNET_PORT));
5554
configMap.put("arthas.httpPort", config.get(ServerOptions.ARTHAS_HTTP_PORT));
5655
configMap.put("arthas.ip", config.get(ServerOptions.ARTHAS_IP));
57-
configMap.put("arthas.disabledCommands", config.get(ServerOptions.ARTHAS_DISABLED_COMMANDS));
56+
configMap.put("arthas.disabledCommands",
57+
config.get(ServerOptions.ARTHAS_DISABLED_COMMANDS));
5858
ArthasAgent.attach(configMap);
5959
return JsonUtil.toJson(configMap);
6060
}

hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
/*
22
* Licensed to the Apache Software Foundation (ASF) under one or more
3-
* contributor license agreements. See the NOTICE file distributed with this
4-
* work for additional information regarding copyright ownership. The ASF
5-
* licenses this file to You under the Apache License, Version 2.0 (the
6-
* "License"); you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
88
*
99
* http://www.apache.org/licenses/LICENSE-2.0
1010
*
1111
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14-
* License for the specific language governing permissions and limitations
15-
* under the License.
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
1616
*/
1717

1818
package org.apache.hugegraph.api.auth;
1919

2020
import java.util.List;
2121

22-
import io.swagger.v3.oas.annotations.tags.Tag;
23-
import jakarta.ws.rs.Consumes;
24-
import jakarta.ws.rs.DELETE;
25-
import jakarta.ws.rs.DefaultValue;
26-
import jakarta.ws.rs.GET;
27-
import jakarta.ws.rs.POST;
28-
import jakarta.ws.rs.PUT;
29-
import jakarta.ws.rs.PathParam;
30-
import jakarta.ws.rs.Produces;
31-
import jakarta.ws.rs.QueryParam;
32-
import jakarta.ws.rs.core.Context;
33-
34-
import jakarta.inject.Singleton;
35-
import jakarta.ws.rs.Path;
36-
import org.apache.hugegraph.core.GraphManager;
37-
import org.apache.hugegraph.define.Checkable;
38-
import org.slf4j.Logger;
39-
4022
import org.apache.hugegraph.HugeGraph;
4123
import org.apache.hugegraph.api.API;
4224
import org.apache.hugegraph.api.filter.StatusFilter.Status;
4325
import org.apache.hugegraph.auth.HugeAccess;
4426
import org.apache.hugegraph.auth.HugePermission;
4527
import org.apache.hugegraph.backend.id.Id;
28+
import org.apache.hugegraph.core.GraphManager;
29+
import org.apache.hugegraph.define.Checkable;
4630
import org.apache.hugegraph.exception.NotFoundException;
4731
import org.apache.hugegraph.util.E;
4832
import org.apache.hugegraph.util.Log;
33+
import org.slf4j.Logger;
34+
4935
import com.codahale.metrics.annotation.Timed;
5036
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5137
import com.fasterxml.jackson.annotation.JsonProperty;
5238

39+
import io.swagger.v3.oas.annotations.tags.Tag;
40+
import jakarta.inject.Singleton;
41+
import jakarta.ws.rs.Consumes;
42+
import jakarta.ws.rs.DELETE;
43+
import jakarta.ws.rs.DefaultValue;
44+
import jakarta.ws.rs.GET;
45+
import jakarta.ws.rs.POST;
46+
import jakarta.ws.rs.PUT;
47+
import jakarta.ws.rs.Path;
48+
import jakarta.ws.rs.PathParam;
49+
import jakarta.ws.rs.Produces;
50+
import jakarta.ws.rs.QueryParam;
51+
import jakarta.ws.rs.core.Context;
52+
5353
@Path("graphs/{graph}/auth/accesses")
5454
@Singleton
5555
@Tag(name = "AccessAPI")

0 commit comments

Comments
 (0)