This is an automated email from the ASF dual-hosted git repository. yangjiaqi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
The following commit(s) were added to refs/heads/master by this push: new 1badd931e BREAKING CHANGE(server): disable legacy backends include `MySQL/PG/c*`(.etc) (#2746) 1badd931e is described below commit 1badd931e2ea0214a8bfd17c3f7ce81c1531dc36 Author: Peng Junzhi <78788603+peng...@users.noreply.github.com> AuthorDate: Mon Apr 28 15:20:37 2025 +0800 BREAKING CHANGE(server): disable legacy backends include `MySQL/PG/c*`(.etc) (#2746) * disable Cassandra、MySQL、Postgre、scyllaDB、palo backend --- .github/outdated/.travis.yml | 124 ----------------- .github/outdated/release.yml | 2 +- .github/workflows/server-ci.yml | 11 +- README.md | 3 +- .../static/conf/hugegraph.properties.template | 59 +------- hugegraph-server/README.md | 2 +- .../backend/store/BackendProviderFactory.java | 29 ++-- .../docker/scripts/detect-storage.groovy | 5 - .../hugegraph-dist/src/assembly/jenkins/build.sh | 33 ----- .../hugegraph-dist/src/assembly/jenkins/config.sh | 150 --------------------- .../hugegraph-dist/src/assembly/jenkins/deploy.sh | 19 --- .../hugegraph-dist/src/assembly/jenkins/jenkins.sh | 103 -------------- .../hugegraph-dist/src/assembly/jenkins/publish.sh | 51 ------- .../hugegraph-dist/src/assembly/jenkins/test.sh | 65 --------- .../static/conf/graphs/hstore.properties.template | 36 +---- .../static/conf/graphs/hugegraph.properties | 35 +---- .../src/assembly/travis/install-backend.sh | 12 +- .../src/assembly/travis/start-server.sh | 11 +- .../org/apache/hugegraph/dist/RegisterUtil.java | 89 +----------- .../src/main/resources/backend.properties | 2 +- .../org/apache/hugegraph/example/ExampleUtil.java | 4 - .../src/main/resources/hugegraph.properties | 26 ---- .../src/main/resources/hugegraph.properties | 27 ---- 23 files changed, 54 insertions(+), 844 deletions(-) diff --git a/.github/outdated/.travis.yml b/.github/outdated/.travis.yml deleted file mode 100644 index 485fe441f..000000000 --- a/.github/outdated/.travis.yml +++ /dev/null @@ -1,124 +0,0 @@ -language: java - -jdk: - - openjdk8 - -dist: xenial - -sudo: required - -cache: - directories: - - $HOME/.m2 - - $HOME/downloads - -branches: - only: - - master - - /^release-.*$/ - - /^test-.*$/ - - /^v[0-9]\..*$/ - -install: mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded" - -before_script: - - $TRAVIS_DIR/install-backend.sh - -script: - - mvn test -P core-test,$BACKEND - - $TRAVIS_DIR/run-api-test.sh - - $TRAVIS_DIR/run-unit-test.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) - -jobs: - include: - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=memory SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=cassandra SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=scylladb SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=mysql SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=hbase SUITE=structure - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=hbase SUITE=process - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=rocksdb SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: tinkerpop-test - if: branch =~ env(RELEASE_BRANCH) - env: BACKEND=postgresql SUITE=tinkerpop - script: $TRAVIS_DIR/run-tinkerpop-test.sh - - - stage: deploy - if: tag =~ env(RELEASE_TAG) - script: skip - - before_deploy: - - | - if [ $DEPLOYED = 0 ]; then - DEPLOYED=1 - mvn clean package -DskipTests - else - echo "Skipping before_deploy since it has been executed once." - fi - deploy: - - provider: releases - skip_cleanup: true - file_glob: true - file: "$TRAVIS_BUILD_DIR/hugegraph-*.tar.gz" - api_key: - secure: nSGEnk5tJsTHMGABO8OJMTk47L3QA2O4xHXLKGIuTK5kLGJkrl0Bs27IveggLxf1E7DSrhcfNW44yIjn5lWA/5QX3DweWH4FGDAgWYFyj7QsBZl7WT2NReMW7BLzpvsIjyEKDw5pLbYBOpOrHflmyQB4w0oXTZVl6awll7JicuL1air7lpqJ4Ju4ukj1mo6rcX3MHRkzgMuS5eemArm8T15y9IlDqK3gmjVUOVo7LoYDFaq3eMzQ7ufrOFiiVIV2LUxn2t2/YRcKU05zal4IKifMKbXISX5u7ZwYe8T14ZQ7eMTOzmFY21gv3HEg+KXWh4gq8HvG4FKbzrl+KYSacJ1xINJQaQGIOD7Pz7vzQdj9wpM/WLqmYF5SE5ZYzXV3ejrtYlEUpJQSnpyiHlfyRuDRzYq/dB2V1ua6t9xkbjL/a2uqHa9WjbOi1jqw2E2XSnx794pzCvKYn1RLOiqpzVlE [...] - on: - tags: true - - provider: script - skip_cleanup: true - script: - echo $GPG_KEY_ENC_PASSW | gpg -d --passphrase-fd 0 $TRAVIS_DIR/private-key.gpg.gpg | gpg --import && - mvn deploy --settings $TRAVIS_DIR/maven.xml -DskipTests=true -B -U -P release - on: - tags: true - -env: - matrix: - - BACKEND=memory - - BACKEND=cassandra - - BACKEND=scylladb - - BACKEND=mysql - - BACKEND=hbase - - BACKEND=rocksdb - - BACKEND=postgresql - global: - - RELEASE_BRANCH=^release-.*$ - - RELEASE_TAG=^v[0-9]\..*$ - - TRAVIS_DIR=hugegraph-server/hugegraph-dist/src/assembly/travis - - DEPLOYED=0 - - secure: dYmFTVeEtRzLNaHp9ToTV/+CkTD0/rEj+K7dRN8wsv/yg4pbqwnyWbSXcqMlj6iNFzAz3nPbmFLCvAWON9/SMN9iJIT6x/xfcf+LqCT8QWczo2nc9xeX144ij2VHX1Drvtk5fRTMaTXRfWEQIrjqx2yrJTIdrXWzWSaZLFv1CRCUizEiGGCePnzUWxx9dBypNyC6IaH6lIv8uN5E6+10SYhb7UJGjWUMDg1bCeW9X7X2wg4QpsGDzlGFXT2EBPU/dAb5attTAtW8dKxrCZqZJTPWe0BarXDBR4PO15BC+a0V1g8LwexedtDjJeFRcGPaJ5NN4d3jDSusCzt5Jf4U0Wa1gDRMVTU3jT+KYkm5eoV4wOZMySobjh6VpQH/LyL0QTDy5apRPAxw+wO+tc91P+nkJmnlr3pN8abtMZ6NciZizUBYQRgR/m2Ir0stvtbZxBQOATuPtBgNDKiDgVdSYcRJzSqYEM [...] - - secure: XbX6AX5zDPc2PcWYAMW+6fazqRRUqpgQkt4eXUugLuVIYZBmJ0WqncEhJ4+mdwOGPIhnP2HsOaSeK2eE/O+iLY2XpBFbugoBgm9VaZlCC4CY1gRNHaanYg64Lrm3NPY3n08IHRMazHqMpJwUqNO+OG/6QwkepULQLj5Rluf716AoXHa7IEJhAIrwr+OXQvdEaJdUXlS1lRycXVeYtOewl7qYxCO4dD4RMhPlNykh9KEK7fd5wnPkiUsp1SwF4g5XsaLvGXmT/qQ1nj8oa9Caej/iaj6HMKG3BO057mq4KK5JDxTPWhBueNpEkUwldAnrMhYWLRnNf4IyjUsaB/Pmi6HspzcaiORPLYwPmdvLGGSnYwbtO+fAHebgpgOnj/vGmRmY4YtIkYdFtbPBI0HpbGB77tqNRFCe/5deLrjx0hXJBfoKTy7d42SI1eBhNR0svZYUHkSfuXwly6hMTlH1DN/bumMFxf [...] - - secure: GKdjRHR35FBPY6oGBfjVdGxnVeoMmZHgNCnsyGNvRVJiQLhXBjUQ9bYjxPRX3JkmztdofNVd3gV8xqIOfLD6XA/0qHVvZ5GlWK4O77eGDur5InobzMlRDIUvJkpqM2SdSU8vKoAUBWgKnfzvlbA14kiwCID72zDVa/E8G0gBl0GZ2zWXIWRg0zC3ZyaJwTZC8WLqn0Kl7UxMy6i/xmK1F+apLooFIBEXYZuoH3pY83L4BvPozmJzT66HonrfcnaifaVHShBntPhQ6Sjlq5suMhtQENcPqWxaORL69s6Y/uF+RAdmnRHPZnXFhjRvq3rQAdMKM/DBOcaYlu1aIxCJJmWLm+b+75EQgdtwYGtwDpunzKXzH7ewB6rTYAghJNjGxt/KfROniooAs8mO3DqhygV5/BInJk0aKab5GlHCAioesV7TKSObhSDlKU8CSBRr/j8T7anL+lkXVZ89fkGg+EBSoXkVCN [...] - - secure: MOn1SM0cwpKshyhCAZ5pdDVcu1VZ6s11lOuO/3rskKwxsWfL3duxg5yV5iAmyIPeBB69kzYg6zEIHOM7cjocR55bakurkaYiSE+OBYKickjryNnYFJ6gAaEmgykFHpwhlIKkyceiApgMJ4LFDNhd48GGjBLfpJZcLFfHbCwg3Mpr+KSihrrv9z2+omEuwsW43FoIoeFiYdx3Z2LoggLtGKbWjjbbf/Lq+ozb+O6J7pTJpIV3WwZ42M39HB+9whiMHeu5PAoOXzDsScyJ4fkInMbTUg1mqWlzg1mlAfOgFOmAzNcBhTqOBYkF0QDsOP/V6cXKVMe/P9AU+MPf86vrNgse8iW5DF5VNoyN15HztvNdyvdSTJRncym1LfloYaYFyhBZ87PLT98erenqmFJym7atrcH5xiQwD+19g35H09Fmw8N2ZsHZKHccZuKqb3bg0+UvdJk4M0PGo/XXse9smHckv6dRjd [...] - - secure: XIFolSD+Jsx9EyHOo+UHeWeBd+RGbxm5FMiBPe8r3fWr3Evs1HAk6//YyPSvGMGUfJwvEPZ5o5GBGT1hPIy8s9+wgHAOxUWwLFkSHGdeXUHMI6zWCQ09DomFhgBidJGnT63mAnwLOTeOtV953hEJDOWp+nHXB9VrDy1rPR25NIyF6eS2ym7OZBa1tnk87pVXbLBFhmYn75D2Bc0VEc+7HM6WuGc+VQ5hZv04lrlRl4kOdkrrV97ie2v42oW7FnebzqjgTgsEbzlXriXeLlBsNCkdenn8U5pqW0V2Odv8iLNalCvF4rrVxsMTeWpqEEL/keLhFO31B20E6BOlKTJsDYgd/ehYMUdboPmxeOuwY6MA1V98gnXyxu8eVKm3RTV81pma7GxcHEVsnl6kZ3eK2LA0xD5UzOKK4nkUs0gAtEahykjbVJaVva0AOsDUId4U0+fHPRmMA4mbXcsxnivnIAC1XKu45C [...] diff --git a/.github/outdated/release.yml b/.github/outdated/release.yml index 771ece85f..d2eb193fa 100644 --- a/.github/outdated/release.yml +++ b/.github/outdated/release.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: TAG_NAME: ${{ github.ref_name }} steps: diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml index 05f8ae9bc..f91bd809a 100644 --- a/.github/workflows/server-ci.yml +++ b/.github/workflows/server-ci.yml @@ -11,7 +11,7 @@ on: jobs: build-server: # TODO: we need test & replace it to ubuntu-24.04 or ubuntu-latest - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: USE_STAGE: 'false' # Whether to include the stage repository. TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - BACKEND: [ memory, rocksdb, hbase, cassandra, mysql, postgresql, scylladb ] + BACKEND: [ memory, rocksdb, hbase ] JAVA_VERSION: [ '11' ] steps: @@ -38,7 +38,7 @@ jobs: # TODO: Remove this step after install-backend.sh updated - name: Install Java8 for backend - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'zulu' @@ -48,13 +48,13 @@ jobs: $TRAVIS_DIR/install-backend.sh $BACKEND && jps -l - name: Install Java ${{ matrix.JAVA_VERSION }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.JAVA_VERSION }} distribution: 'zulu' - name: Cache Maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -95,6 +95,7 @@ jobs: $TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop - name: Upload coverage to Codecov + # TODO: update to v5 later uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 80e5186dd..a57e8c5d2 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,9 @@ achieved through the powerful [Gremlin](https://tinkerpop.apache.org/gremlin.htm - Compliant to [Apache TinkerPop 3](https://tinkerpop.apache.org/), supports [Gremlin](https://tinkerpop.apache.org/gremlin.html) & [Cypher](https://en.wikipedia.org/wiki/Cypher) language - Schema Metadata Management, including VertexLabel, EdgeLabel, PropertyKey and IndexLabel - Multi-type Indexes, supporting exact query, range query and complex conditions combination query -- Plug-in Backend Store Driver Framework, support `RocksDB`/`HStore`, `HBase`, `Cassandra/ScyllaDB`, and `MySQL/Postgre` now and easy to add another backend store driver if needed +- Plug-in Backend Store Framework, mainly support `RocksDB`/`HStore` + `HBase` for now and you could choose other backends in the [legacy version](https://hugegraph.apache.org/docs/download/download/) ≤ `1.5.0` (like `MySQL/PG`/`Cassandra` ...) - Integration with `Flink/Spark/HDFS`, and friendly to connect other big data platforms +- Complete graph ecosystem (including both in/out-memory `Graph Computing` + `Graph Visualization & Tools` + `Graph Learning & AI`, see [here](#3-build-from-source)) ## Quick Start diff --git a/hugegraph-cluster-test/hugegraph-clustertest-dist/src/assembly/static/conf/hugegraph.properties.template b/hugegraph-cluster-test/hugegraph-clustertest-dist/src/assembly/static/conf/hugegraph.properties.template index 8eaf0adff..2a086bd32 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-dist/src/assembly/static/conf/hugegraph.properties.template +++ b/hugegraph-cluster-test/hugegraph-clustertest-dist/src/assembly/static/conf/hugegraph.properties.template @@ -39,6 +39,7 @@ edge.cache_type=l2 backend=hstore serializer=binary +# graph name store=hugegraph # pd config @@ -50,48 +51,16 @@ task.schedule_period=10 task.retry=0 task.wait_timeout=10 -# raft config -raft.mode=false -raft.path=./raft-log -raft.safe_read=true -raft.use_replicator_pipeline=true -raft.election_timeout=10000 -raft.snapshot_interval=3600 -raft.backend_threads=48 -raft.read_index_threads=8 -raft.snapshot_threads=4 -raft.snapshot_parallel_compress=false -raft.snapshot_compress_threads=4 -raft.snapshot_decompress_threads=4 -raft.read_strategy=ReadOnlyLeaseBased -raft.queue_size=16384 -raft.queue_publish_timeout=60 -raft.apply_batch=1 -raft.rpc_threads=80 -raft.rpc_connect_timeout=5000 -raft.rpc_timeout=60 -raft.install_snapshot_rpc_timeout=36000 - # search config search.text_analyzer=jieba search.text_analyzer_mode=INDEX -# rocksdb backend config +### RocksDB backend config #rocksdb.data_path=/path/to/disk #rocksdb.wal_path=/path/to/disk -# cassandra backend config -cassandra.host=localhost -cassandra.port=9042 -cassandra.username= -cassandra.password= -#cassandra.connect_timeout=5 -#cassandra.read_timeout=20 -#cassandra.keyspace.strategy=SimpleStrategy -#cassandra.keyspace.replication=3 - -# hbase backend config +### HBase backend config #hbase.hosts=localhost #hbase.port=2181 #hbase.znode_parent=/hbase @@ -102,25 +71,3 @@ cassandra.password= #hbase.enable_partition=true #hbase.vertex_partitions=10 #hbase.edge_partitions=30 - -# mysql backend config -#jdbc.driver=com.mysql.jdbc.Driver -#jdbc.url=jdbc:mysql://127.0.0.1:3306 -#jdbc.username=root -#jdbc.password= -#jdbc.reconnect_max_times=3 -#jdbc.reconnect_interval=3 -#jdbc.ssl_mode=false - -# postgresql & cockroachdb backend config -#jdbc.driver=org.postgresql.Driver -#jdbc.url=jdbc:postgresql://localhost:5432/ -#jdbc.username=postgres -#jdbc.password= -#jdbc.postgresql.connect_database=template1 - -# palo backend config -#palo.host=127.0.0.1 -#palo.poll_interval=10 -#palo.temp_dir=./palo-data -#palo.file_limit_size=32 diff --git a/hugegraph-server/README.md b/hugegraph-server/README.md index f2c3ceee7..597d41294 100644 --- a/hugegraph-server/README.md +++ b/hugegraph-server/README.md @@ -8,4 +8,4 @@ HugeGraph Server consists of two layers of functionality: the graph engine layer - Backend Interface: Implements the storage of graph data to the backend. - Storage Layer: - - Storage Backend: Supports multiple built-in storage backends (RocksDB/MySQL/HBase/...) and allows users to extend custom backends without modifying the existing source code. + - Storage Backend: Supports multiple built-in storage backends (RocksDB/Memory/HStore/HBase/...) and allows users to extend custom backends without modifying the existing source code. diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java index bcfb31e4f..b2ca79104 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java @@ -17,6 +17,7 @@ package org.apache.hugegraph.backend.store; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -26,14 +27,24 @@ import org.apache.hugegraph.backend.store.memory.InMemoryDBStoreProvider; import org.apache.hugegraph.backend.store.raft.RaftBackendStoreProvider; import org.apache.hugegraph.config.CoreOptions; import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; import org.slf4j.Logger; +/** + * BREAKING CHANGE: + * since 1.7.0, only "hstore, rocksdb, hbase, memory" are supported for backend. + * if you want to use cassandra, mysql, postgresql, cockroachdb or palo as backend, + * please find a version before 1.7.0 of apache hugegraph for your application. + */ public class BackendProviderFactory { private static final Logger LOG = Log.logger(BackendProviderFactory.class); - private static Map<String, Class<? extends BackendStoreProvider>> providers; + private static final Map<String, Class<? extends BackendStoreProvider>> providers; + + private static final List<String> ALLOWED_BACKENDS = List.of("memory", "rocksdb", "hbase", + "hstore"); static { providers = new ConcurrentHashMap<>(); @@ -47,8 +58,7 @@ public class BackendProviderFactory { BackendStoreProvider provider = newProvider(config); if (raftMode) { - LOG.info("Opening backend store '{}' in raft mode for graph '{}'", - backend, graph); + LOG.info("Opening backend store '{}' in raft mode for graph '{}'", backend, graph); provider = new RaftBackendStoreProvider(params, provider); } provider.open(graph); @@ -57,8 +67,10 @@ public class BackendProviderFactory { private static BackendStoreProvider newProvider(HugeConfig config) { String backend = config.get(CoreOptions.BACKEND).toLowerCase(); - String graph = config.get(CoreOptions.STORE); + E.checkState(ALLOWED_BACKENDS.contains(backend.toLowerCase()), + "backend is illegal: %s", backend); + String graph = config.get(CoreOptions.STORE); if (InMemoryDBStoreProvider.matchType(backend)) { return InMemoryDBStoreProvider.instance(graph); } @@ -68,24 +80,23 @@ public class BackendProviderFactory { "Not exists BackendStoreProvider: %s", backend); assert BackendStoreProvider.class.isAssignableFrom(clazz); - BackendStoreProvider instance = null; + BackendStoreProvider instance; try { - instance = clazz.newInstance(); + instance = clazz.getDeclaredConstructor().newInstance(); } catch (Exception e) { throw new BackendException(e); } BackendException.check(backend.equals(instance.type()), "BackendStoreProvider with type '%s' " + - "can't be opened by key '%s'", - instance.type(), backend); + "can't be opened by key '%s'", instance.type(), backend); return instance; } @SuppressWarnings({"rawtypes", "unchecked"}) public static void register(String name, String classPath) { ClassLoader classLoader = BackendProviderFactory.class.getClassLoader(); - Class<?> clazz = null; + Class<?> clazz; try { clazz = classLoader.loadClass(classPath); } catch (Exception e) { diff --git a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy index 96571d4e1..104bd7c8f 100644 --- a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy +++ b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy @@ -21,11 +21,6 @@ import org.apache.hugegraph.dist.RegisterUtil // register all the backend to avoid changes if needs to support other backend RegisterUtil.registerPlugins() RegisterUtil.registerRocksDB() -RegisterUtil.registerCassandra() -RegisterUtil.registerScyllaDB() RegisterUtil.registerHBase() -RegisterUtil.registerMysql() -RegisterUtil.registerPalo() -RegisterUtil.registerPostgresql() graph = HugeFactory.open('./conf/graphs/hugegraph.properties') diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/build.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/build.sh deleted file mode 100644 index 0ec2397b5..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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. -# -if [ $ACTION = "test" ]; then - . $SCRIPT_DIR/config.sh - CONF=`config_${BACKEND}` - if [ $? -ne 0 ]; then - echo "Failed to config backend: $CONF" - exit 1 - fi - - sh $SCRIPT_DIR/test.sh $CONF -# Deploy -elif [ $ACTION = "deploy" ]; then - sh $SCRIPT_DIR/deploy.sh -# Publish -elif [ $ACTION = "publish" ]; then - sh $SCRIPT_DIR/publish.sh -fi diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh deleted file mode 100644 index 3e9696746..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/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. -# -BASE_DIR="hugegraph-test/src/main/resources" -ORIGIN_CONF="$BASE_DIR/hugegraph.properties" - -STATUS=0 - -function config_common() { - BACKEND=$1 - SERIALIZER=$2 - STORE=$3 - - CONF="$BASE_DIR/$BACKEND.properties" - - # Copy a new config file - cp $ORIGIN_CONF $CONF - if [ $? -ne 0 ] ; then - echo "Failed to copy config file: $CONF" - exit 1 - fi - - # Set option: backend, serializer, store - sed -i "s/backend=.*/backend=$BACKEND/" $CONF - sed -i "s/serializer=.*/serializer=$SERIALIZER/" $CONF - sed -i "s/store=.*/store=$STORE/" $CONF - - # Specify filter file according trigger value then set to config - FILTER="" - if [ $TRIGGER = "before-merge" ]; then - FILTER="fast-methods.filter" - elif [ $TRIGGER = "after-merge" ]; then - FILTER="methods.filter" - else - echo "TRIGGER can only be 'before-merge' or 'after-merge', but got $TRIGGER" - exit 1 - fi - sed -i "s/test.tinkerpop.filter=.*/test.tinkerpop.filter=$FILTER/" $CONF - - echo $CONF -} - -function config_memory() { - - BACKEND="memory" - SERIALIZER="text" - STORE="hugegraph_$BUILD_ID" - - CONF=`config_common $BACKEND $SERIALIZER $STORE` - if [ $? -ne 0 ]; then - echo $CONF - exit 1 - fi - - echo $CONF -} - -function config_cassandra() { - - BACKEND="cassandra" - SERIALIZER="cassandra" - STORE="hugegraph_$BUILD_ID" - HOST=${CASSANDRA_HOST} - PORT=${CASSANDRA_PORT} - - CONF=`config_common $BACKEND $SERIALIZER $STORE` - if [ $? -ne 0 ]; then - echo $CONF - exit 1 - fi - - sed -i "s/cassandra\.host=.*/cassandra\.host=$HOST/" $CONF - sed -i "s/cassandra\.port=.*/cassandra\.port=$PORT/" $CONF - - echo $CONF -} - -function config_scylladb() { - - BACKEND="scylladb" - SERIALIZER="scylladb" - STORE="hugegraph_${BACKEND}_${BUILD_ID}" - HOST=${SCYLLADB_HOST} - PORT=${SCYLLADB_PORT} - - CONF=`config_common $BACKEND $SERIALIZER $STORE` - if [ $? -ne 0 ]; then - echo $CONF - exit 1 - fi - - sed -i "s/cassandra\.host=.*/cassandra\.host=$HOST/" $CONF - sed -i "s/cassandra\.port=.*/cassandra\.port=$PORT/" $CONF - - echo $CONF -} - -function config_rocksdb() { - - BACKEND="rocksdb" - SERIALIZER="binary" - STORE="hugegraph_$BUILD_ID" - DATA_PATH="$STORE" - - CONF=`config_common $BACKEND $SERIALIZER $STORE` - if [ $? -ne 0 ]; then - echo $CONF - exit 1 - fi - - mkdir -p hugegraph-test/$DATA_PATH - sed -i "s/rocksdb\.data_path=.*/rocksdb\.data_path=$DATA_PATH/" $CONF - sed -i "s/rocksdb\.wal_path=.*/rocksdb\.wal_path=$DATA_PATH/" $CONF - - echo $CONF -} - -function config_mysql() { - - BACKEND="mysql" - SERIALIZER="mysql" - STORE="hugegraph_$BUILD_ID" - JDBC_URL=${MYSQL_JDBC_URL} - JDBC_USERNAME=${MYSQL_JDBC_USERNAME} - - CONF=`config_common $BACKEND $SERIALIZER $STORE` - if [ $? -ne 0 ]; then - echo $CONF - exit 1 - fi - - sed -i "s/jdbc\.url=.*/jdbc\.url=$JDBC_URL/" $CONF - sed -i "s/jdbc\.username=.*/jdbc\.username=$JDBC_USERNAME/" $CONF - - echo $CONF -} diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/deploy.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/deploy.sh deleted file mode 100644 index 3bb5dcaa6..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/deploy.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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. -# -echo "Start deploy..." -echo "Finish deploy." diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh deleted file mode 100644 index 5a714be62..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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. -# - -# Backends contains [memory, rocksdb, cassandra, scylladb, mysql] -export BACKEND=memory -# The jenkins script store path -export SCRIPT_DIR="hugegraph-server/hugegraph-dist/src/assembly/jenkins" - -# The jenkins job integrated behavior: [test, deploy, publish] -export ACTION=${ACTION} -# How to trigger the jenkins job: [before-merge, after-merge] -export TRIGGER=${TRIGGER} -# The test cases run mode: [serial, parallel] -export RUNMODE=${RUNMODE} - -export BUILD_ID=${AGILE_COMPILE_BUILD_ID} -export BRANCH=${AGILE_COMPILE_BRANCH} -export BRANCH_REF=${AGILE_COMPILE_BRANCH_REF} - -# The user who clone code repository -export USER=${GIT_USER} -# The name of code repository -export REPO=${GIT_REPO} -# The url of the code repository for cloning -export REPO_URL=${GIT_REPO_URL} - -# We will upload the compiled compressed package to a server using FTP and -# generate a download link for the user to download, this server called -# release server -export RELEASE_SERVER=${RELEASE_SERVER} -# The FTP user -export RELEASE_SERVER_USER=${FTP_USER} - -# cassandra config -export CASSANDRA_HOST=${CASSANDRA_HOST} -export CASSANDRA_PORT=${CASSANDRA_PORT} - -# scylladb config -export SCYLLADB_HOST=${SCYLLADB_HOST} -export SCYLLADB_PORT=${SCYLLADB_PORT} - -# mysql config -export MYSQL_JDBC_URL=${MYSQL_JDBC_URL} -export MYSQL_JDBC_USERNAME=${MYSQL_JDBC_USERNAME} - -# Clone code from repo if necessary -if [ ! -d $REPO ]; then - echo "Clone code from repo..." - git clone ssh://$USER@$REPO_URL - if [ $? -ne 0 ]; then - echo "Failed to clone code." - exit 1 - fi -fi - -# Change dir into local repo -cd $REPO -if [ $? -ne 0 ]; then - echo "Failed to cd $REPO." - exit 1 -fi - -if [ -n "$BRANCH_REF" ]; then - # Fetch code from repo if necessary - echo "Fetch code from repo: ${BRANCH_REF}..." - git checkout . && git checkout $BRANCH - git fetch ssh://$USER@$REPO_URL ${BRANCH_REF} && git checkout FETCH_HEAD - if [ $? -ne 0 ]; then - echo "Failed to fetch code." - exit 1 - fi -else - # Pull or checkout release branch - git checkout . - git rev-parse --verify $BRANCH >/dev/null 2>&1 - if [ $? -eq 0 ]; then - git checkout $BRANCH && git pull - else - git fetch origin && git checkout -b $BRANCH origin/$BRANCH - fi - - if [ $? -ne 0 ]; then - echo "Failed to pull code." - exit 1 - fi -fi - -sh $SCRIPT_DIR/build.sh diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/publish.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/publish.sh deleted file mode 100644 index ce0ae8955..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/publish.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/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. -# -OUTPUT="hugegraph-release-*.tar.gz" - -echo "Start publish..." - -mvn clean package -DskipTests -if [ $? -ne 0 ]; then - echo "Failed to package." - exit 1 -fi - -echo "Upload $OUTPUT to release server $RELEASE_SERVER..." -ftp -n <<- FTP_EOF - open $RELEASE_SERVER - user $RELEASE_SERVER_USER - cd /download/$REPO - bin - put $OUTPUT - bye -FTP_EOF - -if [ $? -ne 0 ]; then - echo "Failed to upload." - exit 1 -fi - -# Use maven-deploy plugin instead if 401 error -#echo "Publish maven packages..." -#mvn deploy -DskipTests -#if [ $? -ne 0 ]; then -# echo "Failed to publish." -# exit 1 -#fi - -echo "Finish publish." diff --git a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/test.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/test.sh deleted file mode 100644 index 92ff9974d..000000000 --- a/hugegraph-server/hugegraph-dist/src/assembly/jenkins/test.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/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. -# -CONFIG_PATH=$1 - -function serial_test() { - mvn clean test -Dconfig_path=$CONFIG_PATH -Pcore-test - - if [ $? -ne 0 ]; then - echo "Failed to test." - exit 1 - fi -} - -function parallel_test() { - # Run tests with background process - (mvn clean test -Dconfig_path=$CONFIG_PATH -Pcore-test) & - (mvn clean test -Dconfig_path=$CONFIG_PATH -Punit-test) & - (mvn clean test -Dconfig_path=$CONFIG_PATH -Ptinkerpop-structure-test) & - (mvn clean test -Dconfig_path=$CONFIG_PATH -Ptinkerpop-process-test) & - - # Wait for all child process finished - for i in `seq 0 3`; do - num=$(echo "$i+1" | bc -l) - wait %$num - if [ $? -ne 0 ]; then - echo "Failed to test." - exit 1 - fi - done -} - -# Remove dir prefix 'hugegraph-test' as mvn test execute in hugegraph-test -CONFIG_PATH=$(echo $CONFIG_PATH | sed 's/hugegraph-test\///g') - -echo "Start test with config $CONFIG_PATH" - -# Get the run-mode and run test -if [ $RUNMODE = "serial" ]; then - echo "Run test in serial mode" - serial_test -elif [ $RUNMODE = "parallel" ]; then - echo "Run test in parallel mode" - parallel_test -else - echo "RUNMODE can only be 'serial' or 'parallel', but got $RUNMODE" - echo "Failed to test." - exit 1 -fi - -echo "Finish test." diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template index 3e90c5f4b..d3834baf5 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template @@ -19,6 +19,9 @@ edge.cache_type=l2 #vertex.default_label=vertex +# NOTE: since 1.7.0, only hstore, rocksdb, hbase, memory are supported for backend. +# if you want to use cassandra, mysql, postgresql, cockroachdb or palo as backend, please find a +# version before 1.7.0 of apache hugegraph for your application. backend=hstore serializer=binary @@ -41,17 +44,6 @@ search.text_analyzer_mode=INDEX #rocksdb.data_path=/path/to/disk #rocksdb.wal_path=/path/to/disk - -# cassandra backend config -cassandra.host=localhost -cassandra.port=9042 -cassandra.username= -cassandra.password= -#cassandra.connect_timeout=5 -#cassandra.read_timeout=20 -#cassandra.keyspace.strategy=SimpleStrategy -#cassandra.keyspace.replication=3 - # hbase backend config #hbase.hosts=localhost #hbase.port=2181 @@ -64,27 +56,5 @@ cassandra.password= #hbase.vertex_partitions=10 #hbase.edge_partitions=30 -# mysql backend config -#jdbc.driver=com.mysql.jdbc.Driver -#jdbc.url=jdbc:mysql://127.0.0.1:3306 -#jdbc.username=root -#jdbc.password= -#jdbc.reconnect_max_times=3 -#jdbc.reconnect_interval=3 -#jdbc.ssl_mode=false - -# postgresql & cockroachdb backend config -#jdbc.driver=org.postgresql.Driver -#jdbc.url=jdbc:postgresql://localhost:5432/ -#jdbc.username=postgres -#jdbc.password= -#jdbc.postgresql.connect_database=template1 - -# palo backend config -#palo.host=127.0.0.1 -#palo.poll_interval=10 -#palo.temp_dir=./palo-data -#palo.file_limit_size=32 - # WARNING: These raft configurations are deprecated, please use the latest version instead. # raft.mode=false diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties index b879d190a..b77cacb2d 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties @@ -19,6 +19,8 @@ edge.cache_type=l2 #vertex.default_label=vertex +# NOTE: since 1.7.0, only hstore, rocksdb, hbase, memory are supported for backend. +# if you want to use Cassandra/MySql/PG... as backend, please use version < 1.7.0 backend=rocksdb serializer=binary @@ -41,17 +43,6 @@ search.text_analyzer_mode=INDEX #rocksdb.data_path=/path/to/disk #rocksdb.wal_path=/path/to/disk - -# cassandra backend config -cassandra.host=localhost -cassandra.port=9042 -cassandra.username= -cassandra.password= -#cassandra.connect_timeout=5 -#cassandra.read_timeout=20 -#cassandra.keyspace.strategy=SimpleStrategy -#cassandra.keyspace.replication=3 - # hbase backend config #hbase.hosts=localhost #hbase.port=2181 @@ -64,28 +55,6 @@ cassandra.password= #hbase.vertex_partitions=10 #hbase.edge_partitions=30 -# mysql backend config -#jdbc.driver=com.mysql.jdbc.Driver -#jdbc.url=jdbc:mysql://127.0.0.1:3306 -#jdbc.username=root -#jdbc.password= -#jdbc.reconnect_max_times=3 -#jdbc.reconnect_interval=3 -#jdbc.ssl_mode=false - -# postgresql & cockroachdb backend config -#jdbc.driver=org.postgresql.Driver -#jdbc.url=jdbc:postgresql://localhost:5432/ -#jdbc.username=postgres -#jdbc.password= -#jdbc.postgresql.connect_database=template1 - -# palo backend config -#palo.host=127.0.0.1 -#palo.poll_interval=10 -#palo.temp_dir=./palo-data -#palo.file_limit_size=32 - # WARNING: These raft configurations are deprecated, please use the latest version instead. # raft.mode=false diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh index 2c66b00cf..917fc742f 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh @@ -32,20 +32,24 @@ fi case $BACKEND in cassandra) # TODO: replace it with docker - "$TRAVIS_DIR"/install-cassandra.sh + echo "cassandra is not supported since 1.7.0" + exit 1 ;; scylladb) - "$TRAVIS_DIR"/install-scylladb.sh + echo "scylladb is not supported since 1.7.0" + exit 1 ;; hbase) # TODO: replace it with hbase2.3+ to avoid java8 env "$TRAVIS_DIR"/install-hbase.sh ;; mysql) - "$TRAVIS_DIR"/install-mysql-via-docker.sh + echo "mysql is not supported since 1.7.0" + exit 1 ;; postgresql) - "$TRAVIS_DIR"/install-postgresql-via-docker.sh + echo "postgresql is not supported since 1.7.0" + exit 1 ;; hstore) "$TRAVIS_DIR"/install-hstore.sh diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh index b6ce9d12c..667a6329a 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh @@ -31,15 +31,11 @@ CONF=$BASE_DIR/conf/graphs/hugegraph.properties REST_CONF=$BASE_DIR/conf/rest-server.properties GREMLIN_CONF=$BASE_DIR/conf/gremlin-server.yaml -. ${BIN}/util.sh +. "${BIN}"/util.sh declare -A backend_serializer_map=(["memory"]="text" \ - ["cassandra"]="cassandra" \ - ["scylladb"]="scylladb" \ - ["mysql"]="mysql" \ ["hbase"]="hbase" \ ["rocksdb"]="binary" \ - ["postgresql"]="postgresql" \ ["hstore"]="binary") SERIALIZER=${backend_serializer_map[$BACKEND]} @@ -48,11 +44,6 @@ SERIALIZER=${backend_serializer_map[$BACKEND]} sed -i "s/backend=.*/backend=$BACKEND/" $CONF sed -i "s/serializer=.*/serializer=$SERIALIZER/" $CONF -# Set PostgresSQL configurations if needed -if [ "$BACKEND" == "postgresql" ]; then - sed -i '/org.postgresql.Driver/,+2 s/\#//g' $CONF -fi - # Set timeout for hbase if [ "$BACKEND" == "hbase" ]; then sed -i '$arestserver.request_timeout=200' $REST_CONF diff --git a/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java index 74c630dd9..44c074c6a 100644 --- a/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java +++ b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java @@ -38,6 +38,12 @@ import org.apache.hugegraph.util.VersionUtil; import org.apache.hugegraph.version.CoreVersion; import org.slf4j.Logger; +/** + * BREAKING CHANGE: + * since 1.7.0, only "hstore, rocksdb, hbase, memory" are supported for backend. + * if you want to use cassandra, mysql, postgresql, cockroachdb or palo as backend, + * please find a version before 1.7.0 of apache hugegraph for your application. + */ public class RegisterUtil { private static final Logger LOG = Log.logger(RegisterUtil.class); @@ -70,27 +76,12 @@ public class RegisterUtil { private static void registerBackend(String backend) { switch (backend) { - case "cassandra": - registerCassandra(); - break; - case "scylladb": - registerScyllaDB(); - break; case "hbase": registerHBase(); break; case "rocksdb": registerRocksDB(); break; - case "mysql": - registerMysql(); - break; - case "palo": - registerPalo(); - break; - case "postgresql": - registerPostgresql(); - break; case "hstore": registerHstore(); break; @@ -99,34 +90,6 @@ public class RegisterUtil { } } - public static void registerCassandra() { - // Register config - OptionSpace.register("cassandra", - "org.apache.hugegraph.backend.store.cassandra.CassandraOptions"); - // Register serializer - SerializerFactory.register("cassandra", - "org.apache.hugegraph.backend.store.cassandra" + - ".CassandraSerializer"); - // Register backend - BackendProviderFactory.register("cassandra", - "org.apache.hugegraph.backend.store.cassandra" + - ".CassandraStoreProvider"); - } - - public static void registerScyllaDB() { - // Register config - OptionSpace.register("scylladb", - "org.apache.hugegraph.backend.store.cassandra.CassandraOptions"); - // Register serializer - SerializerFactory.register("scylladb", - "org.apache.hugegraph.backend.store.cassandra" + - ".CassandraSerializer"); - // Register backend - BackendProviderFactory.register("scylladb", - "org.apache.hugegraph.backend.store.scylladb" + - ".ScyllaDBStoreProvider"); - } - public static void registerHBase() { // Register config OptionSpace.register("hbase", @@ -153,46 +116,6 @@ public class RegisterUtil { ".RocksDBSstStoreProvider"); } - public static void registerMysql() { - // Register config - OptionSpace.register("mysql", - "org.apache.hugegraph.backend.store.mysql.MysqlOptions"); - // Register serializer - SerializerFactory.register("mysql", - "org.apache.hugegraph.backend.store.mysql.MysqlSerializer"); - // Register backend - BackendProviderFactory.register("mysql", - "org.apache.hugegraph.backend.store.mysql" + - ".MysqlStoreProvider"); - } - - public static void registerPalo() { - // Register config - OptionSpace.register("palo", - "org.apache.hugegraph.backend.store.palo.PaloOptions"); - // Register serializer - SerializerFactory.register("palo", - "org.apache.hugegraph.backend.store.palo.PaloSerializer"); - // Register backend - BackendProviderFactory.register("palo", - "org.apache.hugegraph.backend.store.palo" + - ".PaloStoreProvider"); - } - - public static void registerPostgresql() { - // Register config - OptionSpace.register("postgresql", - "org.apache.hugegraph.backend.store.postgresql.PostgresqlOptions"); - // Register serializer - SerializerFactory.register("postgresql", - "org.apache.hugegraph.backend.store.postgresql" + - ".PostgresqlSerializer"); - // Register backend - BackendProviderFactory.register("postgresql", - "org.apache.hugegraph.backend.store.postgresql" + - ".PostgresqlStoreProvider"); - } - public static void registerHstore() { // Register config OptionSpace.register("hstore", diff --git a/hugegraph-server/hugegraph-dist/src/main/resources/backend.properties b/hugegraph-server/hugegraph-dist/src/main/resources/backend.properties index de7e31bd5..45060f90c 100644 --- a/hugegraph-server/hugegraph-dist/src/main/resources/backend.properties +++ b/hugegraph-server/hugegraph-dist/src/main/resources/backend.properties @@ -15,4 +15,4 @@ # limitations under the License. # -backends=[cassandra, scylladb, rocksdb, mysql, palo, hbase, postgresql, hstore] +backends=[rocksdb, hbase, hstore] diff --git a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java index e81d5e403..c5f0a4206 100644 --- a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java +++ b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java @@ -44,12 +44,8 @@ public class ExampleUtil { } registered = true; - RegisterUtil.registerCassandra(); - RegisterUtil.registerScyllaDB(); RegisterUtil.registerHBase(); RegisterUtil.registerRocksDB(); - RegisterUtil.registerMysql(); - RegisterUtil.registerPalo(); } public static HugeGraph loadGraph() { diff --git a/hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties b/hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties index 385426b6d..93fb83e73 100644 --- a/hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties +++ b/hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties @@ -17,9 +17,6 @@ gremlin.graph=org.apache.hugegraph.HugeFactory -#backend=cassandra -#serializer=cassandra - backend=rocksdb serializer=binary @@ -29,29 +26,6 @@ rate_limit=0 search.text_analyzer=ikanalyzer search.text_analyzer_mode=smart -# cassandra backend config -cassandra.host=localhost -cassandra.port=9042 -cassandra.username= -cassandra.password= - # rocksdb backend config #rocksdb.data_path= #rocksdb.wal_path= - -# mysql backend config -jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://127.0.0.1:3306 -jdbc.username=root -jdbc.password= -jdbc.reconnect_max_times=3 -jdbc.reconnect_interval=3 - -# postgresql & cockroachdb backend config -#jdbc.driver=org.postgresql.Driver -#jdbc.url=jdbc:postgresql://localhost:5432/ -#jdbc.username=postgres -#jdbc.password= - -# palo backend config -palo.host=127.0.0.1 diff --git a/hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties b/hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties index 8b53eed4c..0f6c9e3bb 100644 --- a/hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties +++ b/hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties @@ -39,14 +39,6 @@ query.index_intersect_threshold=2 #query.ramtable_vertices_capacity=1800 #query.ramtable_edges_capacity=1200 -# cassandra backend config -cassandra.host=127.0.0.1 -cassandra.port=9042 -cassandra.username= -cassandra.password= -cassandra.connect_timeout=30 -cassandra.read_timeout=120 - # rocksdb backend config rocksdb.data_path=rocksdb-data rocksdb.wal_path=rocksdb-data @@ -57,25 +49,6 @@ hbase.hosts=localhost hbase.port=2181 hbase.znode_parent=/hbase -# mysql backend config -jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://127.0.0.1:3306 -jdbc.username=root -jdbc.password=****** -jdbc.forced_auto_reconnect=true -jdbc.reconnect_max_times=3 -jdbc.reconnect_interval=3 -jdbc.ssl_mode=false - -# postgresql & cockroachdb backend config -#jdbc.driver=org.postgresql.Driver -#jdbc.url=jdbc:postgresql://localhost:5432/ -#jdbc.username=postgres -#jdbc.password= - -# palo backend config -palo.host=localhost - snowflake.force_string=true task.sync_deletion=true expired.delete_batch=1