You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "aroundabout (via GitHub)" <gi...@apache.org> on 2023/09/09 04:41:02 UTC
[GitHub] [incubator-hugegraph] aroundabout opened a new pull request, #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
aroundabout opened a new pull request, #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307
…840)
<!--
Thank you very much for contributing to Apache HugeGraph, we are happy that you want to help us improve it!
Here are some tips for you:
1. If this is your first time, please read the [contributing guidelines](https://github.com/apache/hugegraph/blob/master/CONTRIBUTING.md)
2. If a PR fix/close an issue, type the message "close xxx" (xxx is the link of related
issue) in the content, GitHub will auto link it (Required)
3. Name the PR title in "Google Commit Format", start with "feat | fix | perf | refactor | doc | chore",
such like: "feat(core): support the PageRank algorithm" or "fix: wrong break in the compute loop" (module is optional)
skip it if you are unsure about which is the best component.
4. One PR address one issue, better not to mix up multiple issues.
5. Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]` (or click it directly after
published)
-->
## Purpose of the PR
- subtask of #840 : support Cassandra(Docker) as backend (compose with HugeGraph) <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->
- Now support use docker to start hugegraph with cassandra backend
- problem like #2298 can also be solved.
<!--
Please explain more context in this section, clarify why the changes are needed.
e.g:
- If you propose a new API, clarify the use case for a new API.
- If you fix a bug, you can clarify why it is a bug, and should be associated with an issue.
-->
## Main Changes
1. change the dockerfile, adding the shell to wait for storage backend and use a docker-entrypoint.sh to manage the starting process.
2. delete a deprecated class in gremlin-console.sh (reference: [doc of ScriptExecutor](https://tinkerpop.apache.org/javadocs/3.2.3/full/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.html))
3. add a healthy check in docker-compose
4. add an example folder where we can put all the template docker-compose.yml here
5. add `*swagger-ui*` in gitignore, which appears after you compile the source code locally.
Detailed doc of the pr is here: https://hugegraph.feishu.cn/wiki/BBrgwmytNi0DiQkvDj1cpNbFn5b
Some test case: https://hugegraph.feishu.cn/docx/CBcydSr6CokDpexlZAQcH4Icnlb#TbYrdpl3io1c9NxT4vLcDTn8nhg
<!-- 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.)
For example:
- If you introduce a new feature, please show detailed design here or add the link of design documentation.
- If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
- If there is a discussion in the mailing list, please add the link. -->
## Verifying these changes
<!-- Please pick the proper options below -->
- [ ] Trivial rework / code cleanup without any test coverage. (No Need)
- [x] Already covered by existing tests, such as *(please modify tests here)*.
- [ ] Need tests and can be verified as follows:
- xxx
## Does this PR potentially affect the following parts?
<!-- 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) -->
- [ ] Modify configurations
- [ ] The public API
- [x] Other affects ( docker images )
## Documentation Status
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [x] `Doc - TODO` <!-- Your PR changes impact docs and you will update later -->
- [ ] `Doc - Done` <!-- Related docs have been already added or updated -->
- [ ] `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#… [incubator-hugegraph]
Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1357066315
##########
hugegraph-dist/docker/scripts/try-storage.groovy:
##########
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+import org.apache.hugegraph.HugeFactory
+import org.apache.hugegraph.dist.RegisterUtil
+
+// register all the backend to avoid changes if docker needs to support othre backend
+RegisterUtil.registerPlugins()
+RegisterUtil.registerRocksDB()
+RegisterUtil.registerCassandra()
+RegisterUtil.registerScyllaDB()
+RegisterUtil.registerHBase()
+RegisterUtil.registerMysql()
+RegisterUtil.registerPalo()
+RegisterUtil.registerPostgresql()
+
+graph = HugeFactory.open('./conf/graphs/hugegraph.properties')
Review Comment:
can we rename this file to `detect-storage.groovy`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320546787
##########
Dockerfile:
##########
@@ -50,11 +50,10 @@ RUN set -x \
# 2. Init HugeGraph Sever
RUN set -e \
&& pwd && cd /hugegraph/ \
- && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties \
- && ./bin/init-store.sh
+ && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties
EXPOSE 8080
VOLUME /hugegraph
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
-CMD ["./bin/start-hugegraph.sh", "-d false -j $JAVA_OPTS -g zgc"]
+CMD ["./bin/docker-entrypoint.sh"]
Review Comment:
https://github.com/JanusGraph/janusgraph/tree/master/janusgraph-dist/docker
maybe I can try to move the docker related file in a split folder in hugegraph-dist, like janusgraph?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#… [incubator-hugegraph]
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1359861932
##########
hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -0,0 +1,55 @@
+#!/bin/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.
+#
+
+function abs_path() {
+ SOURCE="${BASH_SOURCE[0]}"
+ while [[ -h "$SOURCE" ]]; do
+ DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+ done
+ cd -P "$(dirname "$SOURCE")" && pwd
+}
+
+BIN=$(abs_path)
+TOP="$(cd "$BIN"/../ && pwd)"
+GRAPH_PROP="$TOP/conf/graphs/hugegraph.properties"
Review Comment:
The changes have been applied on the var name
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#… [incubator-hugegraph]
Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1359772501
##########
hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -0,0 +1,55 @@
+#!/bin/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.
+#
+
+function abs_path() {
+ SOURCE="${BASH_SOURCE[0]}"
+ while [[ -h "$SOURCE" ]]; do
+ DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+ done
+ cd -P "$(dirname "$SOURCE")" && pwd
+}
+
+BIN=$(abs_path)
+TOP="$(cd "$BIN"/../ && pwd)"
+GRAPH_PROP="$TOP/conf/graphs/hugegraph.properties"
+HUGE_STORAGE_TIMEOUT_S=120
+TRY_STORAGE="$TOP/scripts/detect-storage.groovy"
Review Comment:
also update TRY_STORAGE
##########
hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -0,0 +1,55 @@
+#!/bin/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.
+#
+
+function abs_path() {
+ SOURCE="${BASH_SOURCE[0]}"
+ while [[ -h "$SOURCE" ]]; do
+ DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+ done
+ cd -P "$(dirname "$SOURCE")" && pwd
+}
+
+BIN=$(abs_path)
+TOP="$(cd "$BIN"/../ && pwd)"
+GRAPH_PROP="$TOP/conf/graphs/hugegraph.properties"
+HUGE_STORAGE_TIMEOUT_S=120
Review Comment:
prefer WAIT_STORAGE_TIMEOUT_S
##########
hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -0,0 +1,55 @@
+#!/bin/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.
+#
+
+function abs_path() {
+ SOURCE="${BASH_SOURCE[0]}"
+ while [[ -h "$SOURCE" ]]; do
+ DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+ done
+ cd -P "$(dirname "$SOURCE")" && pwd
+}
+
+BIN=$(abs_path)
+TOP="$(cd "$BIN"/../ && pwd)"
+GRAPH_PROP="$TOP/conf/graphs/hugegraph.properties"
Review Comment:
prefer GRAPH_CONF
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1330005590
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: cas-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: ca-cassandra
Review Comment:
```suggestion
hugegraph.cassandra.host: cas-cassandra
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320541029
##########
Dockerfile:
##########
@@ -50,11 +50,10 @@ RUN set -x \
# 2. Init HugeGraph Sever
RUN set -e \
&& pwd && cd /hugegraph/ \
- && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties \
- && ./bin/init-store.sh
+ && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties
EXPOSE 8080
VOLUME /hugegraph
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
-CMD ["./bin/start-hugegraph.sh", "-d false -j $JAVA_OPTS -g zgc"]
+CMD ["./bin/docker-entrypoint.sh"]
Review Comment:
maybe we shouldn't put the `docker` files in general path?
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,44 @@
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: ca-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: ca-cassandra
+ hugegraph.cassandra.port: 9042
+ networks:
+ - ca-network
+ depends_on:
+ - cassandra
+ healthcheck:
+ test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
Review Comment:
we still need `-e`?
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,44 @@
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: ca-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: ca-cassandra
+ hugegraph.cassandra.port: 9042
+ networks:
+ - ca-network
+ depends_on:
+ - cassandra
+ healthcheck:
+ test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
+ interval: 10s
+ timeout: 30s
+ retries: 3
+
+ cassandra:
+ image: cassandra:3.11
Review Comment:
try C* 4 for it
##########
.gitignore:
##########
@@ -83,3 +83,5 @@ hs_err_pid*
.mtj.tmp/
# blueJ files
*.ctxt
+
+*swagger-ui*
Review Comment:
seems no need to add here due to the master code has fixed it (#2277)
##########
hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh:
##########
@@ -0,0 +1,24 @@
+#!/bin/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.
+#
+
+
+./bin/wait-storage.sh
+
+./bin/init-store.sh
+
+./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc
Review Comment:
why the params here? could we get the value of `$JAVA_OPTS`?
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,44 @@
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: ca-graph
Review Comment:
```suggestion
container_name: cas-graph
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320558359
##########
.gitignore:
##########
@@ -83,3 +83,5 @@ hs_err_pid*
.mtj.tmp/
# blueJ files
*.ctxt
+
+*swagger-ui*
Review Comment:
and also need handle the CI error
![image](https://github.com/apache/incubator-hugegraph/assets/17706099/f4c84ffd-5343-47ee-a90b-d36351b1620e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] codecov[bot] commented on pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#issuecomment-1712414405
## [Codecov](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2307?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#2307](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2307?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9e5f1ee) into [master](https://app.codecov.io/gh/apache/incubator-hugegraph/commit/1d0969dedeb693b964cfe7a34d6b7538834e9967?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (1d0969d) will **decrease** coverage by `16.15%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #2307 +/- ##
=============================================
- Coverage 65.06% 48.92% -16.15%
+ Complexity 981 654 -327
=============================================
Files 498 498
Lines 41241 41238 -3
Branches 5738 5725 -13
=============================================
- Hits 26832 20174 -6658
- Misses 11750 18899 +7149
+ Partials 2659 2165 -494
```
[see 168 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2307/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#… [incubator-hugegraph]
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1358142561
##########
hugegraph-dist/docker/scripts/try-storage.groovy:
##########
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+import org.apache.hugegraph.HugeFactory
+import org.apache.hugegraph.dist.RegisterUtil
+
+// register all the backend to avoid changes if docker needs to support othre backend
+RegisterUtil.registerPlugins()
+RegisterUtil.registerRocksDB()
+RegisterUtil.registerCassandra()
+RegisterUtil.registerScyllaDB()
+RegisterUtil.registerHBase()
+RegisterUtil.registerMysql()
+RegisterUtil.registerPalo()
+RegisterUtil.registerPostgresql()
+
+graph = HugeFactory.open('./conf/graphs/hugegraph.properties')
Review Comment:
Sure. And "detect" seems better than "try". I have applied the change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1330006318
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: cas-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: cas-cassandra
+ hugegraph.cassandra.port: 9042
+ networks:
+ - ca-network
+ depends_on:
+ - cassandra
+ healthcheck:
+ test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
+ interval: 10s
+ timeout: 30s
+ retries: 3
+
+ cassandra:
+ image: cassandra:4
+ container_name: ca-cassandra
Review Comment:
```suggestion
container_name: cas-cassandra
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1330008043
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,44 @@
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: ca-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: ca-cassandra
+ hugegraph.cassandra.port: 9042
+ networks:
+ - ca-network
+ depends_on:
+ - cassandra
+ healthcheck:
+ test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
+ interval: 10s
+ timeout: 30s
+ retries: 3
+
+ cassandra:
+ image: cassandra:3.11
Review Comment:
tested, no problem
![image](https://github.com/apache/incubator-hugegraph/assets/49650772/2e732c44-54cd-4c98-bef0-4c56be1b694c)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320546132
##########
hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh:
##########
@@ -0,0 +1,24 @@
+#!/bin/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.
+#
+
+
+./bin/wait-storage.sh
+
+./bin/init-store.sh
+
+./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc
Review Comment:
JAVA_OPTS is an env var which is set in dockerfile. And this shell is only used in dockerfile, hence I think this way is available.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320546010
##########
hugegraph-dist/docker/example/docker-compose-cassandra.yml:
##########
@@ -0,0 +1,44 @@
+version: "3"
+
+services:
+ graph:
+ image: hugegraph/hugegraph
+ container_name: ca-graph
+ ports:
+ - 18080:8080
+ environment:
+ hugegraph.backend: cassandra
+ hugegraph.serializer: cassandra
+ hugegraph.cassandra.host: ca-cassandra
+ hugegraph.cassandra.port: 9042
+ networks:
+ - ca-network
+ depends_on:
+ - cassandra
+ healthcheck:
+ test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
Review Comment:
https://tinkerpop.apache.org/docs/3.6.2-SNAPSHOT/reference/#execution-mode
`-e` is for the gremlin console to use the execution mode to execute scripts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] aroundabout commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "aroundabout (via GitHub)" <gi...@apache.org>.
aroundabout commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320546132
##########
hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh:
##########
@@ -0,0 +1,24 @@
+#!/bin/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.
+#
+
+
+./bin/wait-storage.sh
+
+./bin/init-store.sh
+
+./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc
Review Comment:
JAVA_OPTS is an env var which is set in dockerfile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2307: feat: support Cassandra(Docker) as backend (compose with HugeGraph)(#…
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1320558359
##########
.gitignore:
##########
@@ -83,3 +83,5 @@ hs_err_pid*
.mtj.tmp/
# blueJ files
*.ctxt
+
+*swagger-ui*
Review Comment:
and also need handle the CI error (if we used refined github plugin)
![image](https://github.com/apache/incubator-hugegraph/assets/17706099/f4c84ffd-5343-47ee-a90b-d36351b1620e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra in docker-compose with server [incubator-hugegraph]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307#discussion_r1368282100
##########
hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# Copyright 2023 JanusGraph Authors
+#
+# Licensed 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.
+#
Review Comment:
we also need add the refer of this file in root [LICENSE](https://github.com/apache/incubator-hugegraph/blob/869fc81811017b9780297cfaafb22d0328478afe/LICENSE#L214) file & dist [LICENSE](https://github.com/apache/incubator-hugegraph/blob/869fc81811017b9780297cfaafb22d0328478afe/hugegraph-dist/release-docs/LICENSE#L222) file
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [PR] feat: support Cassandra in docker-compose with server [incubator-hugegraph]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #2307:
URL: https://github.com/apache/incubator-hugegraph/pull/2307
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org