diff --git a/hugegraph-dist/src/assembly/static/conf/hugegraph.properties b/hugegraph-dist/src/assembly/static/conf/hugegraph.properties index 5a83ffd30b..0a5c7803e6 100644 --- a/hugegraph-dist/src/assembly/static/conf/hugegraph.properties +++ b/hugegraph-dist/src/assembly/static/conf/hugegraph.properties @@ -2,9 +2,14 @@ gremlin.graph=com.baidu.hugegraph.HugeFactory # cache config -#schema.cache_capacity=1048576 -#graph.cache_capacity=10485760 -#graph.cache_expire=600 +#schema.cache_capacity=100000 +# vertex-cache default is 1000w, 10min expired +#vertex.cache_capacity=10000000 +#vertex.cache_expire=600 +# edge-cache default is 100w, 10min expired +#edge.cache_capacity=1000000 +#edge.cache_expire=600 + # schema illegal name template #schema.illegal_name_regex=\s+|~.* @@ -31,6 +36,11 @@ cassandra.password= #cassandra.keyspace.strategy=SimpleStrategy #cassandra.keyspace.replication=3 +# hbase backend config +#hbase.hosts=localhost +#hbase.port=2181 +#hbase.znode_parent=/hbsae +#hbase.threads_max=64 # mysql backend config #jdbc.driver=com.mysql.jdbc.Driver @@ -39,7 +49,7 @@ cassandra.password= #jdbc.password= #jdbc.reconnect_max_times=3 #jdbc.reconnect_interval=3 -#jdbc.sslmode=disable +#jdbc.sslmode=false # palo backend config #palo.host=127.0.0.1 diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlOptions.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlOptions.java index 7f5ddeffbd..a4b40b72db 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlOptions.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlOptions.java @@ -90,12 +90,12 @@ public static synchronized MysqlOptions instance() { 3 ); - public static final ConfigOption SSL_MODE = + public static final ConfigOption JDBC_SSL_MODE = new ConfigOption<>( "jdbc.ssl_mode", "The SSL mode of connections with database.", disallowEmpty(), - "disable" + "false" ); public static final ConfigOption STORAGE_ENGINE = diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java index 05343b0cf5..c8a2c19ca6 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java @@ -97,9 +97,11 @@ private Connection open(boolean autoReconnect) throws SQLException { int maxTimes = this.config.get(MysqlOptions.JDBC_RECONNECT_MAX_TIMES); int interval = this.config.get(MysqlOptions.JDBC_RECONNECT_INTERVAL); + String sslMode = this.config.get(MysqlOptions.JDBC_SSL_MODE); URIBuilder uriBuilder = this.newConnectionURIBuilder(); uriBuilder.setPath(url) + .setParameter("useSSL", sslMode) .setParameter("characterEncoding", "utf-8") .setParameter("rewriteBatchedStatements", "true") .setParameter("useServerPrepStmts", "false")