Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

BREAKING CHANGE(server): disable legacy backends include MySQL/PG/c*(.etc) #2746

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
24 changes: 0 additions & 24 deletions .github/outdated/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,6 @@ jobs:
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
Expand All @@ -69,11 +54,6 @@ jobs:
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
Expand Down Expand Up @@ -106,12 +86,8 @@ jobs:
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]\..*$
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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 Driver Framework, support `RocksDB`/`HStore`, `HBase` now and easy to add another backend store driver if needed
- Integration with `Flink/Spark/HDFS`, and friendly to connect other big data platforms


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ search.text_analyzer_mode=INDEX
#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
Expand All @@ -102,25 +92,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
2 changes: 1 addition & 1 deletion hugegraph-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.hugegraph.backend.store;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

Expand All @@ -26,6 +27,7 @@
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;

Expand All @@ -35,6 +37,9 @@ public class BackendProviderFactory {

private static Map<String, Class<? extends BackendStoreProvider>> providers;

private static final List<String> LEGAL_BACKEND = List.of("memory", "rocksdb", "hbase",
"hstore");

static {
providers = new ConcurrentHashMap<>();
}
Expand All @@ -57,6 +62,12 @@ public static BackendStoreProvider open(HugeGraphParams params) {

private static BackendStoreProvider newProvider(HugeConfig config) {
String backend = config.get(CoreOptions.BACKEND).toLowerCase();
// 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.
E.checkState(LEGAL_BACKEND.contains(backend.toLowerCase()),
"backend is illegal: %s", backend);

String graph = config.get(CoreOptions.STORE);

if (InMemoryDBStoreProvider.matchType(backend)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
60 changes: 0 additions & 60 deletions hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,46 +69,6 @@ function config_memory() {
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"
Expand All @@ -128,23 +88,3 @@ function config_rocksdb() {

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
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#

# Backends contains [memory, rocksdb, cassandra, scylladb, mysql]
# Backends contains [memory, rocksdb, mysql]
export BACKEND=memory
# The jenkins script store path
export SCRIPT_DIR="hugegraph-server/hugegraph-dist/src/assembly/jenkins"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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=rocksdb
serializer=binary

Expand All @@ -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
Expand All @@ -64,28 +56,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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ fi
case $BACKEND in
cassandra)
# TODO: replace it with docker
"$TRAVIS_DIR"/install-cassandra.sh
echo "cassandra is not supported since 1.7.0"
;;
scylladb)
"$TRAVIS_DIR"/install-scylladb.sh
echo "scylladb is not supported since 1.7.0"
;;
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"
;;
postgresql)
"$TRAVIS_DIR"/install-postgresql-via-docker.sh
echo "postgresql is not supported since 1.7.0"
;;
hstore)
"$TRAVIS_DIR"/install-hstore.sh
Expand Down
Loading
Loading