diff --git a/content/cn/docs/config/config-option.md b/content/cn/docs/config/config-option.md index 853bd634b..e8b03cef7 100644 --- a/content/cn/docs/config/config-option.md +++ b/content/cn/docs/config/config-option.md @@ -13,205 +13,316 @@ search_boost: 1.5 对应配置文件`gremlin-server.yaml` -| config option | default value | description | -|-------------------------|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| -| host | 127.0.0.1 | The host or ip of Gremlin Server. | -| port | 8182 | The listening port of Gremlin Server. | -| graphs | {} | 图由 Server 动态加载,不要在此处配置。 | -| evaluationTimeout | 30000 | Gremlin 脚本执行超时,单位为毫秒。 | -| channelizer | org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer | 同时处理 WebSocket 和 HTTP 请求。 | -| authentication | 未配置 | 启用认证时配置认证器、处理器和 `rest-server.properties` 路径。 | +| config option | default value | description | +|---------------------------|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| +| host | 127.0.0.1 | The host or ip of Gremlin Server. | +| port | 8182 | The listening port of Gremlin Server. | +| graphs | {} | 图由 Server 动态加载,不要在此处配置。 | +| evaluationTimeout | 30000 | Gremlin 脚本执行超时,单位为毫秒。 | +| channelizer | org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer | 同时处理 WebSocket 和 HTTP 请求。 | +| maxContentLength | 65536 | Server 接受的单个请求的最大字节数。 | +| maxChunkSize | 8192 | HTTP 请求分块的最大字节数。 | +| maxHeaderSize | 8192 | HTTP 请求头的最大字节数。 | +| resultIterationBatchSize | 64 | 流式返回结果集时,每批返回的结果条数。 | +| ssl.enabled | false | Gremlin Server 是否启用 TLS。 | +| authentication | 未配置 | 启用认证时配置认证器、处理器和 `rest-server.properties` 路径。 | ### Rest Server & API 配置项 对应配置文件`rest-server.properties` -| config option | default value | description | -|------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| graphs | ./conf/graphs | 图配置 properties 文件所在目录。 | -| graph.load_from_local_config | false | 是否在 Server 启动时读取 `graphs` 目录;使用本地图配置时需设为 `true`。 | -| server.id | 空字符串 | The id of rest server, used for license verification. | -| server.role | master | The role of nodes in the cluster, available types are [master, worker, computer] | -| restserver.url | http://127.0.0.1:8080 | The url for listening of rest server. | -| ssl.keystore_file | conf/hugegraph-server.keystore | The path of server keystore file used when https protocol is enabled. | -| ssl.keystore_password | hugegraph | The password of the path of the server keystore file used when the https protocol is enabled. | -| restserver.max_worker_threads | 2 * CPUs | The maximum worker threads of rest server. | -| restserver.min_free_memory | 64 | The minimum free memory(MB) of rest server, requests will be rejected when the available memory of system is lower than this value. | -| restserver.request_timeout | 30 | The time in seconds within which a request must complete, -1 means no timeout. | -| restserver.connection_idle_timeout | 30 | The time in seconds to keep an inactive connection alive, -1 means no timeout. | -| restserver.connection_max_requests | 256 | The max number of HTTP requests allowed to be processed on one keep-alive connection, -1 means unlimited. | -| gremlinserver.url | http://127.0.0.1:8182 | The url of gremlin server. | -| gremlinserver.max_route | 8 | The max route number for gremlin server. | -| gremlinserver.timeout | 30 | The timeout in seconds of waiting for gremlin server. | -| batch.max_edges_per_batch | 2500 | The maximum number of edges submitted per batch. | -| batch.max_vertices_per_batch | 2500 | The maximum number of vertices submitted per batch. | -| batch.max_write_ratio | 70 | The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0. | -| batch.max_write_threads | 0 | The maximum threads for batch writing, if the value is 0, the actual value will be set to batch.max_write_ratio * restserver.max_worker_threads. | -| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. | -| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. | -| auth.admin_pa | pa | PD 模式下内置 admin 用户的初始密码,仅首次创建该用户时生效;部署前必须修改。 | -| auth.audit_log_rate | 1000.0 | The max rate of audit log output per user, default value is 1000 records per second. | -| auth.cache_capacity | 10240 | The max cache capacity of each auth cache item. | -| auth.cache_expire | 600 | The expiration time in seconds of vertex cache. | -| auth.remote_url | | If the address is empty, it provide auth service, otherwise it is auth client and also provide auth service through rpc forwarding. The remote url can be set to multiple addresses, which are concat by ','. | -| auth.token_expire | 86400 | The expiration time in seconds after token created | -| auth.token_secret | 启动时随机生成 | HS256 的密钥;需要跨重启保持既有 token 有效时应显式配置。 | -| exception.allow_trace | true | Whether to allow exception trace stack. | -| memory_monitor.threshold | 0.85 | The threshold of JVM(in-heap) memory usage monitoring , 1 means disabling this function. | -| memory_monitor.period | 2000 | The period in ms of JVM(in-heap) memory usage monitoring. | -| log.slow_query_threshold | 1000 | Slow query log threshold in milliseconds, 0 means disabled. | -| log.slow_query_body_limit | 512 | 慢查询日志记录的请求体最大字节数,0 表示不记录。记录的前缀可能包含敏感的 Gremlin 或 Cypher 字面量。 | +| config option | default value | description | +|----------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| graphs | ./conf/graphs | 图配置 properties 文件所在目录。 | +| graph.load_from_local_config | false | 是否在 Server 启动时读取 `graphs` 目录;使用本地图配置时需设为 `true`。 | +| graphs.enable_dynamic_create_drop | true | Whether to enable create or drop graph dynamically. | +| init_store.enabled | true | Whether init-store initializes the local backend stores and the built-in admin account. Set false in distributed deployments (PD/HStore) where the storage side already owns the metadata. | +| server.id | 空字符串 | The optional legacy id of hugegraph-server. | +| server.role | master | The role of nodes in the cluster, available types are [master, worker, computer] | +| server.role_election | false | Whether to enable role election, if enabled, the server will elect a master node in the cluster. | +| server.node_id | node-id1 | The node id of the server. | +| server.node_role | worker | The node role of the server. | +| server.graphspace | DEFAULT | The graph space of the server. | +| server.service_id | DEFAULT | The service id of the server. | +| server.path_graphspace | DEFAULT | The default path graph space of the server. | +| server.start_ignore_single_graph_error | true | Whether to start ignore single graph error. | +| server.event_hub_threads | 1 | The event hub threads of server. | +| restserver.url | http://127.0.0.1:8080 | The url for listening of graph server. | +| ssl.keystore_file | conf/hugegraph-server.keystore | The path of server keystore file used when https protocol is enabled. | +| ssl.keystore_password | hugegraph | The password of the server keystore file when the https protocol is enabled. | +| white_ip.status | disable | The status of whether enable white ip. | +| restserver.max_worker_threads | 2 * CPUs | The maximum worker threads of rest server. | +| restserver.task_threads | max(4, CPUs / 2) | The task threads of rest server. | +| restserver.min_free_memory | 64 | The minimum free memory(MB) of rest server, requests will be rejected when the available memory of system is lower than this value. | +| restserver.request_timeout | 30 | The time in seconds within which a request must complete, -1 means no timeout. | +| restserver.connection_idle_timeout | 30 | The time in seconds to keep an inactive connection alive, -1 means no timeout. | +| restserver.connection_max_requests | 256 | The max number of HTTP requests allowed to be processed on one keep-alive connection, -1 means unlimited. | +| gremlinserver.url | http://127.0.0.1:8182 | The url of gremlin server. | +| gremlinserver.max_route | 2 * CPUs | The max route number for gremlin server. | +| gremlinserver.timeout | 30 | The timeout in seconds of waiting for gremlin server. | +| batch.max_edges_per_batch | 2500 | The maximum number of edges submitted per batch. | +| batch.max_vertices_per_batch | 2500 | The maximum number of vertices submitted per batch. | +| batch.max_write_ratio | 70 | The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0. | +| batch.max_write_threads | 0 | The maximum threads for batch writing, if the value is 0, the actual value will be set to batch.max_write_ratio * restserver.max_worker_threads. | +| raft.group_peers | 127.0.0.1:8090 | The rpc address of raft group initial peers. | +| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. | +| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. | +| auth.admin_pa | pa | 内置 admin 账户的初始密码,仅首次启动时生效;部署前必须修改。 | +| auth.audit_log_rate | 1000.0 | The max rate of audit log output per user, default value is 1000 records per second. | +| auth.cache_capacity | 10240 | The max cache capacity of each auth cache item. | +| auth.cache_expire | 600 | The expiration time in seconds of auth cache in auth client and auth server. | +| auth.remote_url | | If the address is empty, it provide auth service, otherwise it is auth client and also provide auth service through rpc forwarding. The remote url can be set to multiple addresses, which are concat by ','. | +| auth.token_expire | 86400 | The expiration time in seconds after token created | +| auth.token_secret | 启动时随机生成 | HS256 的密钥;需要跨重启保持既有 token 有效时应显式配置。 | +| exception.allow_trace | true | Whether to allow exception trace stack. | +| memory_monitor.threshold | 0.85 | Threshold for JVM memory usage monitoring, 1 means disabling the memory monitoring task. | +| memory_monitor.period | 2000 | The period in ms of JVM memory usage monitoring, in each period we will detect the jvm memory usage and take corresponding actions. | +| log.slow_query_threshold | 1000 | The threshold time(ms) of logging slow query, 0 means logging slow query is disabled. | +| log.slow_query_body_limit | 512 | 慢查询日志记录的请求体最大字节数,0 表示不记录。记录的前缀原样写入,可能包含敏感的 Gremlin 或 Cypher 字面量。 | + +> [!DETAILS]- **角色选举配置项 (可选)** +> 对应配置文件`rest-server.properties`,仅在 `server.role_election=true` 时生效。 +> +> | config option | default value | description | +> |--------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | server.role.node_external_url | http://127.0.0.1:8080 | The url of external accessibility. | +> | server.role.base_timeout | 500 | The role state machine candidate state base timeout time, in ms. | +> | server.role.random_timeout | 1000 | The random timeout in ms that be used when candidate node request to become master state to reduce competitive voting. | +> | server.role.heartbeat_interval | 2 | The role state machine heartbeat interval second time. | +> | server.role.fail_count | 5 | When the node failed count of update or query heartbeat is reaches this threshold, the node will become abdication state to guardsafe property. | +> | server.role.master_dead_times | 10 | When the worker node detects that the number of times the master node fails to update heartbeat reaches this threshold, the worker node will become to a candidate node. | ### PD/Meta 配置项 (分布式模式) 对应配置文件`rest-server.properties` -| config option | default value | description | -|------------------|------------------------|--------------------------------------------| -| pd.peers | 127.0.0.1:8686 | PD server addresses (comma separated). | -| meta.endpoints | http://127.0.0.1:2379 | Meta service endpoints. | -| usePD | false | 是否通过 PD 管理分布式元数据。 | +| config option | default value | description | +|----------------------|-----------------------|-----------------------------------------------------------------| +| usePD | false | Whether use pd. | +| pd.peers | 127.0.0.1:8686 | The pd server peers, separated with commas. | +| cluster | hg-test | The cluster name. | +| metrics.data_to_pd | true | Whether to report metrics data to pd. | +| meta.endpoints | http://127.0.0.1:2379 | meta 端点的 URL。当前代码中没有任何地方读取该配置项,设置后不会生效;meta 连接由 `pd.peers` 建立。 | +| meta.use_ca | false | Whether to use ca to meta server. | +| meta.ca | | The ca file of meta server. | +| meta.client_ca | | The client ca file of meta server. | +| meta.client_key | | The client key file of meta server. | + +HStore 后端还会从图配置文件 `{graph-name}.properties` 中读取以下两项,默认值 0 表示由 PD 决定: + +| config option | default value | description | +|-------------------------|---------------|-----------------------------------------------------------------| +| hstore.partition_count | 0 | Number of partitions, which PD controls partitions based on. | +| hstore.shard_count | 0 | Number of copies, which PD controls partition copies based on. | ### 基本配置项 基本配置项及后端配置项对应配置文件:{graph-name}.properties,如`hugegraph.properties` -| config option | default value | description | -|---------------------------------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| gremlin.graph | org.apache.hugegraph.HugeFactory | Gremlin entrance to create graph. | -| backend | rocksdb | The data store type. For version 1.7.0+: [memory, rocksdb, hstore, hbase]. Note: cassandra, scylladb, mysql, postgresql were removed in 1.7.0 (use <= 1.5.x for legacy backends). | -| serializer | binary | The serializer for backend store, available values are [text, binary, cassandra, hbase, mysql]. | -| store | hugegraph | The database name like Cassandra Keyspace. | -| store.connection_detect_interval | 600 | The interval in seconds for detecting connections, if the idle time of a connection exceeds this value, detect it and reconnect if needed before using, value 0 means detecting every time. | -| store.graph | g | The graph table name, which store vertex, edge and property. | -| store.schema | m | The schema table name, which store meta data. | -| store.system | s | The system table name, which store system data. | -| schema.illegal_name_regex | .*\s+$|~.* | The regex specified the illegal format for schema name. | -| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. | -| vertex.cache_type | l2 | The type of vertex cache, allowed values are [l1, l2]. | -| vertex.cache_capacity | 10000000 | The max cache size(items) of vertex cache. | -| vertex.cache_expire | 600 | The expire time in seconds of vertex cache. | -| vertex.check_customized_id_exist | false | Whether to check the vertices exist for those using customized id strategy. | -| vertex.default_label | vertex | The default vertex label. | -| vertex.tx_capacity | 10000 | The max size(items) of vertices(uncommitted) in transaction. | -| vertex.check_adjacent_vertex_exist | false | Whether to check the adjacent vertices of edges exist. | -| vertex.lazy_load_adjacent_vertex | true | Whether to lazy load adjacent vertices of edges. | -| vertex.part_edge_commit_size | 5000 | Whether to enable the mode to commit part of edges of vertex, enabled if commit size > 0, 0 means disabled. | -| vertex.encode_primary_key_number | true | Whether to encode number value of primary key in vertex id. | -| vertex.remove_left_index_at_overwrite | false | Whether remove left index at overwrite. | -| edge.cache_type | l2 | The type of edge cache, allowed values are [l1, l2]. | -| edge.cache_capacity | 1000000 | The max cache size(items) of edge cache. | -| edge.cache_expire | 600 | The expiration time in seconds of edge cache. | -| edge.tx_capacity | 10000 | The max size(items) of edges(uncommitted) in transaction. | -| query.page_size | 500 | The size of each page when querying by paging. | -| query.batch_size | 1000 | The size of each batch when querying by batch. | -| query.ignore_invalid_data | true | Whether to ignore invalid data of vertex or edge. | -| query.index_intersect_threshold | 1000 | The maximum number of intermediate results to intersect indexes when querying by multiple single index properties. | -| query.ramtable_edges_capacity | 20000000 | The maximum number of edges in ramtable, include OUT and IN edges. | -| query.ramtable_enable | false | Whether to enable ramtable for query of adjacent edges. | -| query.ramtable_vertices_capacity | 10000000 | The maximum number of vertices in ramtable, generally the largest vertex id is used as capacity. | -| query.optimize_aggregate_by_index | false | Whether to optimize aggregate query(like count) by index. | -| oltp.concurrent_depth | 10 | The min depth to enable concurrent oltp algorithm. | -| oltp.concurrent_threads | 10 | Thread number to concurrently execute oltp algorithm. | -| oltp.collection_type | EC | The implementation type of collections used in oltp algorithm. | -| rate_limit.read | 0 | The max rate(times/s) to execute query of vertices/edges. | -| rate_limit.write | 0 | The max rate(items/s) to add/update/delete vertices/edges. | -| task.wait_timeout | 10 | Timeout in seconds for waiting for the task to complete,such as when truncating or clearing the backend. | -| task.input_size_limit | 16777216 | The job input size limit in bytes. | -| task.result_size_limit | 16777216 | The job result size limit in bytes. | -| task.sync_deletion | false | Whether to delete schema or expired data synchronously. | -| task.ttl_delete_batch | 1 | The batch size used to delete expired data. | -| computer.config | /conf/computer.yaml | The config file path of computer job. | -| search.text_analyzer | ikanalyzer | Choose a text analyzer for searching the vertex/edge properties, available type are [word, ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer]. # if use 'ikanalyzer', need download jar from 'https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar' to lib directory | -| search.text_analyzer_mode | smart | Specify the mode for the text analyzer, the available mode of analyzer are {word: [MaximumMatching, ReverseMaximumMatching, MinimumMatching, ReverseMinimumMatching, BidirectionalMaximumMatching, BidirectionalMinimumMatching, BidirectionalMaximumMinimumMatching, FullSegmentation, MinimalWordCount, MaxNgramScore, PureEnglish], ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, NlpAnalysis], hanlp: [standard, nlp, index, nShort, shortest, speed], smartcn: [], jieba: [SEARCH, INDEX], jcseg: [Simple, Complex], mmseg4j: [Simple, Complex, MaxWord], ikanalyzer: [smart, max_word]}. | -| snowflake.datecenter_id | 0 | The datacenter id of snowflake id generator. | -| snowflake.force_string | false | Whether to force the snowflake long id to be a string. | -| snowflake.worker_id | 0 | The worker id of snowflake id generator. | -| raft.mode | false | Whether the backend storage works in raft mode. | -| raft.safe_read | false | Whether to use linearly consistent read. | -| raft.use_snapshot | false | Whether to use snapshot. | -| raft.endpoint | 127.0.0.1:8281 | The peerid of current raft node. | -| raft.group_peers | 127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283 | The peers of current raft group. | -| raft.path | ./raft-log | The log path of current raft node. | -| raft.use_replicator_pipeline | true | Whether to use replicator line, when turned on it multiple logs can be sent in parallel, and the next log doesn't have to wait for the ack message of the current log to be sent. | -| raft.election_timeout | 10000 | Timeout in milliseconds to launch a round of election. | -| raft.snapshot_interval | 3600 | The interval in seconds to trigger snapshot save. | -| raft.backend_threads | current CPU v-cores | The thread number used to apply task to backend. | -| raft.read_index_threads | 8 | The thread number used to execute reading index. | -| raft.apply_batch | 1 | The apply batch size to trigger disruptor event handler. | -| raft.queue_size | 16384 | The disruptor buffers size for jraft RaftNode, StateMachine and LogManager. | -| raft.queue_publish_timeout | 60 | The timeout in second when publish event into disruptor. | -| raft.rpc_threads | 80 | The rpc threads for jraft RPC layer. | -| raft.rpc_connect_timeout | 5000 | The rpc connect timeout for jraft rpc. | -| raft.rpc_timeout | 60000 | The rpc timeout for jraft rpc. | -| raft.rpc_buf_low_water_mark | 10485760 | The ChannelOutboundBuffer's low water mark of netty, when buffer size less than this size, the method ChannelOutboundBuffer.isWritable() will return true, it means that low downstream pressure or good network. | -| raft.rpc_buf_high_water_mark | 20971520 | The ChannelOutboundBuffer's high water mark of netty, only when buffer size exceed this size, the method ChannelOutboundBuffer.isWritable() will return false, it means that the downstream pressure is too great to process the request or network is very congestion, upstream needs to limit rate at this time. | -| raft.read_strategy | ReadOnlyLeaseBased | The linearizability of read strategy. | +| config option | default value | description | +|---------------------------------------|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| gremlin.graph | org.apache.hugegraph.HugeFactory | Gremlin entrance to create graph. | +| backend | memory | The data store type. For version 1.7.0+ the allowed values are [memory, rocksdb, hstore, hbase]; the shipped `conf/graphs/hugegraph.properties` sets `rocksdb` and `conf/graphs/hstore.properties.template` sets `hstore`. Note: cassandra, scylladb, mysql, postgresql were removed in 1.7.0 (use <= 1.5.x for legacy backends). | +| serializer | text | The serializer for backend store, built-in values are [text, binary, binaryscatter]; a backend may register its own, like `hbase`. The shipped graph templates set `binary`. | +| serializer.buffer_max_capacity | 134217728 | The process-wide max capacity of one serialization buffer in bytes. | +| store | hugegraph | The backend database namespace. | +| store.connection_detect_interval | 600 | The interval in seconds for detecting connections, if the idle time of a connection exceeds this value, detect it and reconnect if needed before using, value 0 means detecting every time. | +| store.graph | g | The graph table name, which store vertex, edge and property. | +| graphspace | DEFAULT | The graph space name. | +| alias.graph.id | | The graph alias id. | +| graph.read_mode | OLTP_ONLY | The graph read mode, which could be ALL | OLTP_ONLY | OLAP_ONLY. | +| pd.peers | 127.0.0.1:8686 | The addresses of pd nodes, separated with commas. Only used by the hstore backend. | +| schema.illegal_name_regex | .*\s+$|~.* | The regex specified the illegal format for schema name. | +| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. | +| schema.init_template | | The template schema used to init graph. | +| schema.index_rebuild_using_pushdown | true | Whether to use pushdown when to create/rebuild index. | +| vertex.cache_type | l2 | The type of vertex cache, allowed values are [l1, l2]. | +| vertex.cache_capacity | 10000000 | The max cache size(items) of vertex cache. | +| vertex.cache_expire | 600 | The expiration time in seconds of vertex cache. | +| vertex.check_customized_id_exist | false | Whether to check the vertices exist for those using customized id strategy. | +| vertex.default_label | vertex | The default vertex label. | +| vertex.tx_capacity | 10000 | The max size(items) of vertices(uncommitted) in transaction. | +| vertex.check_adjacent_vertex_exist | false | Whether to check the adjacent vertices of edges exist. | +| vertex.lazy_load_adjacent_vertex | true | Whether to lazy load adjacent vertices of edges. | +| vertex.part_edge_commit_size | 5000 | Whether to enable the mode to commit part of edges of vertex, enabled if commit size > 0, 0 means disabled. | +| vertex.encode_primary_key_number | true | Whether to encode number value of primary key in vertex id. | +| vertex.remove_left_index_at_overwrite | false | Whether remove left index at overwrite. | +| edge.cache_type | l2 | The type of edge cache, allowed values are [l1, l2]. | +| edge.cache_capacity | 1000000 | The max cache size(items) of edge cache. | +| edge.cache_expire | 600 | The expiration time in seconds of edge cache. | +| edge.tx_capacity | 10000 | The max size(items) of edges(uncommitted) in transaction. | +| query.page_size | 500 | The size of each page when querying by paging. | +| query.batch_size | 1000 | The size of each batch when querying by batch. | +| query.ignore_invalid_data | true | Whether to ignore invalid data of vertex or edge. | +| query.index_intersect_threshold | 1000 | The maximum number of intermediate results to intersect indexes when querying by multiple single index properties. | +| query.max_indexes_available | 1 | The upper limit of the number of indexes that can be used to query. | +| query.dedup_option | limit | The way to dedup data, allowed values are [limit, global]. | +| query.trust_index | false | Whether to trust index. | +| query.ramtable_edges_capacity | 20000000 | The maximum number of edges in ramtable, include OUT and IN edges. | +| query.ramtable_enable | false | Whether to enable ramtable for query of adjacent edges. | +| query.ramtable_vertices_capacity | 10000000 | The maximum number of vertices in ramtable, generally the largest vertex id is used as capacity. | +| query.optimize_aggregate_by_index | false | Whether to optimize aggregate query(like count) by index. | +| oltp.concurrent_depth | 10 | The min depth to enable concurrent oltp algorithm. | +| oltp.concurrent_threads | max(10, CPUs / 2) | Thread number to concurrently execute oltp algorithm. | +| oltp.collection_type | EC | The implementation type of collections used in oltp algorithm, allowed values are [JCF, EC, FU]. | +| oltp.query_batch_size | 10000 | The size of each batch when executing oltp algorithm. | +| oltp.query_batch_avg_degree_ratio | 0.95 | The ratio of exponential approximation for average degree of iterator when executing oltp algorithm. | +| oltp.query_batch_expect_degree | 100000000 | The expect sum of degree in each batch when executing oltp algorithm. | +| rate_limit.read | 0 | The max rate(times/s) to execute query of vertices/edges. | +| rate_limit.write | 0 | The max rate(items/s) to add/update/delete vertices/edges. | +| task.schedule_period | 10 | Period time in seconds when scheduler to schedule task. | +| task.wait_timeout | 10 | Timeout in seconds for waiting for the task to complete, such as when truncating or clearing the backend. | +| task.retry | 0 | Task retry times, allowed range is [0, 3]. | +| task.input_size_limit | 16777216 | The job input size limit in bytes. | +| task.result_size_limit | 16777216 | The job result size limit in bytes. | +| task.sync_deletion | false | Whether to delete schema or expired data synchronously. | +| task.ttl_delete_batch | 1 | The batch size used to delete expired data. | +| computer.config | ./conf/computer.yaml | The config file path of computer job. | +| k8s.operator_template | ./conf/operator-template.yaml | The path of operator container template. | +| k8s.quota_template | ./conf/resource-quota-template.yaml | The path of resource quota template. | +| search.text_analyzer | ikanalyzer | Choose a text analyzer for searching the vertex/edge properties, available type are [ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer]. The shipped graph templates set `jieba`. If use 'ikanalyzer', need download jar from 'https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar' to lib directory | +| search.text_analyzer_mode | smart | Specify the mode for the text analyzer, the available mode of analyzer are {ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, NlpAnalysis], hanlp: [standard, nlp, index, nShort, shortest, speed], smartcn: [], jieba: [SEARCH, INDEX], jcseg: [Simple, Complex], mmseg4j: [Simple, Complex, MaxWord], ikanalyzer: [smart, max_word]}. | +| snowflake.datacenter_id | 0 | The datacenter id of snowflake id generator. | +| snowflake.force_string | false | Whether to force the snowflake long id to be a string. | +| snowflake.worker_id | 0 | The worker id of snowflake id generator. | +| memory.mode | off-heap | The memory mode used for query in HugeGraph. | +| memory.max_capacity | 1073741824 | The maximum memory capacity in bytes that can be managed for all queries in HugeGraph. | +| memory.one_query_max_capacity | 104857600 | The maximum memory capacity in bytes that can be managed for a query in HugeGraph. | +| memory.alignment | 8 | The alignment used for round memory size. | + +> [!DETAILS]- **Raft 配置项 (已废弃)** +> 发行包中的图配置模板已将这些配置项标注为废弃。它们仅在 `raft.mode=true` 时生效, +> 且 `raft.group_peers` 从 `rest-server.properties` 读取,而不是图配置文件。 +> +> | config option | default value | description | +> |-----------------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | raft.mode | false | Whether the backend storage works in raft mode. | +> | raft.safe_read | false | Whether to use linearly consistent read. | +> | raft.path | ./raftlog | The log path of current raft node. | +> | raft.use_replicator_pipeline | true | Whether to use replicator line, when turned on it multiple logs can be sent in parallel, and the next log doesn't have to wait for the ack message of the current log to be sent. | +> | raft.election_timeout | 10000 | Timeout in milliseconds to launch a round of election. | +> | raft.snapshot_interval | 3600 | The interval in seconds to trigger snapshot save. | +> | raft.snapshot_threads | 4 | The thread number used to do snapshot. | +> | raft.snapshot_parallel_compress | false | Whether to enable parallel compress. | +> | raft.snapshot_compress_threads | 4 | The thread number used to do snapshot compress. | +> | raft.snapshot_decompress_threads | 4 | The thread number used to do snapshot decompress. | +> | raft.backend_threads | CPUs | The thread number used to apply task to backend. | +> | raft.read_index_threads | 8 | The thread number used to execute reading index. | +> | raft.read_strategy | ReadOnlyLeaseBased | The linearizability of read strategy, allowed values are [ReadOnlyLeaseBased, ReadOnlySafe]. | +> | raft.apply_batch | 1 | The apply batch size to trigger disruptor event handler. | +> | raft.queue_size | 16384 | The disruptor buffers size for jraft RaftNode, StateMachine and LogManager. | +> | raft.queue_publish_timeout | 60 | The timeout in second when publish event into disruptor. | +> | raft.rpc_threads | max(CPUs * 2, 80) | The rpc threads for jraft RPC layer. | +> | raft.rpc_connect_timeout | 5000 | The rpc connect timeout in milliseconds for jraft rpc. | +> | raft.rpc_timeout | 60 | The general rpc timeout in seconds for jraft rpc. | +> | raft.install_snapshot_rpc_timeout | 36000 | The install snapshot rpc timeout in seconds for jraft rpc. | +> | raft.rpc_buf_low_water_mark | 10485760 | The ChannelOutboundBuffer's low water mark of netty, when buffer size less than this size, the method ChannelOutboundBuffer.isWritable() will return true, it means that low downstream pressure or good network. | +> | raft.rpc_buf_high_water_mark | 20971520 | The ChannelOutboundBuffer's high water mark of netty, only when buffer size exceed this size, the method ChannelOutboundBuffer.isWritable() will return false, it means that the downstream pressure is too great to process the request or network is very congestion, upstream needs to limit rate at this time. | ### RocksDB 后端配置项 -| config option | default value | description | -|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| backend | | Must be set to `rocksdb`. | -| serializer | | Must be set to `binary`. | -| rocksdb.data_disks | [] | The optimized disks for storing data of RocksDB. The format of each element: `STORE/TABLE: /path/disk`.Allowed keys are [g/vertex, g/edge_out, g/edge_in, g/vertex_label_index, g/edge_label_index, g/range_int_index, g/range_float_index, g/range_long_index, g/range_double_index, g/secondary_index, g/search_index, g/shard_index, g/unique_index, g/olap] | -| rocksdb.data_path | rocksdb-data/data | The path for storing data of RocksDB. | -| rocksdb.wal_path | rocksdb-data/wal | The path for storing WAL of RocksDB. | -| rocksdb.option_path | | The YAML file for configuring ToplingDB/RocksDB parameters. | -| rocksdb.open_http | false | Whether to start ToplingDB HTTP service. Security: enable only in trusted networks and restrict access (firewall/ACL); the port and document_root are configured in the YAML (http.listening_ports/document_root). | -| rocksdb.allow_mmap_reads | false | Allow the OS to mmap file for reading sst tables. | -| rocksdb.allow_mmap_writes | false | Allow the OS to mmap file for writing. | -| rocksdb.block_cache_capacity | 8388608 | The amount of block cache in bytes that will be used by RocksDB, 0 means no block cache. | -| rocksdb.bloom_filter_bits_per_key | -1 | The bits per key in bloom filter, a good value is 10, which yields a filter with ~ 1% false positive rate, -1 means no bloom filter. | -| rocksdb.bloom_filter_block_based_mode | false | Use block based filter rather than full filter. | -| rocksdb.bloom_filter_whole_key_filtering | true | True if place whole keys in the bloom filter, else place the prefix of keys. | -| rocksdb.bottommost_compression | NO_COMPRESSION | The compression algorithm for the bottommost level of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.bulkload_mode | false | Switch to the mode to bulk load data into RocksDB. | -| rocksdb.cache_index_and_filter_blocks | false | Indicating if we'd put index/filter blocks to the block cache. | -| rocksdb.compaction_style | LEVEL | Set compaction style for RocksDB: LEVEL/UNIVERSAL/FIFO. | -| rocksdb.compression | SNAPPY_COMPRESSION | The compression algorithm for compressing blocks of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.compression_per_level | [NO_COMPRESSION, NO_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION] | The compression algorithms for different levels of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.delayed_write_rate | 16777216 | The rate limit in bytes/s of user write requests when need to slow down if the compaction gets behind. | -| rocksdb.log_level | INFO | The info log level of RocksDB. | -| rocksdb.max_background_jobs | 8 | Maximum number of concurrent background jobs, including flushes and compactions. | -| rocksdb.level_compaction_dynamic_level_bytes | false | Whether to enable level_compaction_dynamic_level_bytes, if it's enabled we give max_bytes_for_level_multiplier a priority against max_bytes_for_level_base, the bytes of base level is dynamic for a more predictable LSM tree, it is useful to limit worse case space amplification. Turning this feature on/off for an existing DB can cause unexpected LSM tree structure so it's not recommended. | -| rocksdb.max_bytes_for_level_base | 536870912 | The upper-bound of the total size of level-1 files in bytes. | -| rocksdb.max_bytes_for_level_multiplier | 10.0 | The ratio between the total size of level (L+1) files and the total size of level L files for all L. | -| rocksdb.max_open_files | -1 | The maximum number of open files that can be cached by RocksDB, -1 means no limit. | -| rocksdb.max_subcompactions | 4 | The value represents the maximum number of threads per compaction job. | -| rocksdb.max_write_buffer_number | 6 | The maximum number of write buffers that are built up in memory. | -| rocksdb.max_write_buffer_number_to_maintain | 0 | The total maximum number of write buffers to maintain in memory. | -| rocksdb.min_write_buffer_number_to_merge | 2 | The minimum number of write buffers that will be merged together. | -| rocksdb.num_levels | 7 | Set the number of levels for this database. | -| rocksdb.optimize_filters_for_hits | false | This flag allows us to not store filters for the last level. | -| rocksdb.optimize_mode | true | Optimize for heavy workloads and big datasets. | -| rocksdb.pin_l0_filter_and_index_blocks_in_cache | false | Indicating if we'd put index/filter blocks to the block cache. | -| rocksdb.sst_path | | The path for ingesting SST file into RocksDB. | -| rocksdb.target_file_size_base | 67108864 | The target file size for compaction in bytes. | -| rocksdb.target_file_size_multiplier | 1 | The size ratio between a level L file and a level (L+1) file. | -| rocksdb.use_direct_io_for_flush_and_compaction | false | Enable the OS to use direct read/writes in flush and compaction. | -| rocksdb.use_direct_reads | false | Enable the OS to use direct I/O for reading sst tables. | -| rocksdb.write_buffer_size | 134217728 | Amount of data in bytes to build up in memory. | -| rocksdb.max_manifest_file_size | 104857600 | The max size of manifest file in bytes. | -| rocksdb.skip_stats_update_on_db_open | false | Whether to skip statistics update when opening the database, setting this flag true allows us to not update statistics. | -| rocksdb.max_file_opening_threads | 16 | The max number of threads used to open files. | -| rocksdb.max_total_wal_size | 0 | Total size of WAL files in bytes. Once WALs exceed this size, we will start forcing the flush of column families related, 0 means no limit. | -| rocksdb.db_write_buffer_size | 0 | Total size of write buffers in bytes across all column families, 0 means no limit. | -| rocksdb.delete_obsolete_files_period | 21600 | The periodicity in seconds when obsolete files get deleted, 0 means always do full purge. | -| rocksdb.hard_pending_compaction_bytes_limit | 274877906944 | The hard limit to impose on pending compaction in bytes. | -| rocksdb.level0_file_num_compaction_trigger | 2 | Number of files to trigger level-0 compaction. | -| rocksdb.level0_slowdown_writes_trigger | 20 | Soft limit on number of level-0 files for slowing down writes. | -| rocksdb.level0_stop_writes_trigger | 36 | Hard limit on number of level-0 files for stopping writes. | -| rocksdb.soft_pending_compaction_bytes_limit | 68719476736 | The soft limit to impose on pending compaction in bytes. | +| config option | default value | description | +|-------------------------------------------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| backend | | Must be set to `rocksdb`. | +| serializer | | Must be set to `binary`. | +| rocksdb.data_path | rocksdb-data/data | The path for storing data of RocksDB. | +| rocksdb.wal_path | rocksdb-data/wal | The path for storing WAL of RocksDB. | +| rocksdb.sst_path | | The path for ingesting SST file into RocksDB. | +| rocksdb.data_disks | [] | The optimized disks for storing data of RocksDB. The format of each element: `STORE/TABLE: /path/disk`.Allowed keys are [g/vertex, g/edge_out, g/edge_in, g/vertex_label_index, g/edge_label_index, g/range_int_index, g/range_float_index, g/range_long_index, g/range_double_index, g/secondary_index, g/search_index, g/shard_index, g/unique_index, g/olap] | +| rocksdb.log_level | INFO | The info log level of RocksDB. | +| rocksdb.num_levels | 7 | Set the number of levels for this database. | +| rocksdb.compaction_style | LEVEL | Set compaction style for RocksDB: LEVEL/UNIVERSAL/FIFO. | +| rocksdb.optimize_mode | true | Optimize for heavy workloads and big datasets. | +| rocksdb.bulkload_mode | false | Switch to the mode to bulk load data into RocksDB. | +| rocksdb.compression_per_level | [none, none, snappy, snappy, snappy, snappy, snappy] | The compression algorithms for different levels of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.bottommost_compression | none | The compression algorithm for the bottommost level of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.compression | snappy | The compression algorithm for compressing blocks of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.max_background_jobs | 8 | Maximum number of concurrent background jobs, including flushes and compactions. | +| rocksdb.max_subcompactions | 4 | The value represents the maximum number of threads per compaction job. | +| rocksdb.delayed_write_rate | 16777216 | The rate limit in bytes/s of user write requests when need to slow down if the compaction gets behind. | +| rocksdb.max_open_files | -1 | The maximum number of open files that can be cached by RocksDB, -1 means no limit. | +| rocksdb.max_manifest_file_size | 104857600 | The max size of manifest file in bytes. | +| rocksdb.skip_stats_update_on_db_open | false | Whether to skip statistics update when opening the database, setting this flag true allows us to not update statistics. | +| rocksdb.skip_check_sst_size_on_db_open | false | Whether to skip checking sizes of all sst files when opening the database. | +| rocksdb.max_file_opening_threads | 16 | The max number of threads used to open files. | +| rocksdb.max_total_wal_size | 0 | Total size of WAL files in bytes. Once WALs exceed this size, we will start forcing the flush of column families related, 0 means no limit. | +| rocksdb.bytes_per_sync | 0 | Allows OS to incrementally sync SST files to disk while they are being written, asynchronously in the background. Issue one request for every bytes_per_sync written. 0 turns it off. | +| rocksdb.wal_bytes_per_sync | 0 | Allows OS to incrementally sync WAL files to disk while they are being written, asynchronously in the background. Issue one request for every bytes_per_sync written. 0 turns it off. | +| rocksdb.strict_bytes_per_sync | false | When true, guarantees SST/WAL files have at most bytes_per_sync/wal_bytes_per_sync bytes submitted for writeback at any given time. This can be used to handle cases where processing speed exceeds I/O speed. | +| rocksdb.db_write_buffer_size | 0 | Total size of write buffers in bytes across all column families, 0 means no limit. | +| rocksdb.log_readahead_size | 0 | The number of bytes to prefetch when reading the log. 0 means the prefetching is disabled. | +| rocksdb.compaction_readahead_size | 0 | The number of bytes to perform bigger reads when doing compaction. If running RocksDB on spinning disks, you should set this to at least 2MB. 0 means the prefetching is disabled. | +| rocksdb.row_cache_capacity | 0 | The capacity in bytes of global cache for table-level rows. 0 means the row_cache is disabled. | +| rocksdb.delete_obsolete_files_period | 21600 | The periodicity in seconds when obsolete files get deleted, 0 means always do full purge. | +| rocksdb.write_buffer_size | 134217728 | Amount of data in bytes to build up in memory. | +| rocksdb.max_write_buffer_number | 6 | The maximum number of write buffers that are built up in memory. | +| rocksdb.min_write_buffer_number_to_merge | 2 | The minimum number of write buffers that will be merged together. | +| rocksdb.max_write_buffer_number_to_maintain | 0 | The total maximum number of write buffers to maintain in memory for conflict checking when transactions are used. | +| rocksdb.memtable_bloom_size_ratio | 0.0 | If prefix-extractor is set and memtable_bloom_size_ratio is not 0, or if memtable_whole_key_filtering is set true, create bloom filter for memtable with the size of write_buffer_size * memtable_bloom_size_ratio. If it is larger than 0.25, it is santinized to 0.25. | +| rocksdb.memtable_whole_key_filtering | false | Enable whole key bloom filter in memtable, it can potentially reduce CPU usage for point-look-ups. Note this will only take effect if memtable_bloom_size_ratio > 0. | +| rocksdb.memtable_huge_page_size | 0 | The page size for huge page TLB for bloom in memtable. If <= 0, not allocate from huge page TLB but from malloc. | +| rocksdb.inplace_update_support | false | Allows thread-safe inplace updates if a put key exists in current memtable and sizeof new value is smaller. | +| rocksdb.level_compaction_dynamic_level_bytes | false | Whether to enable level_compaction_dynamic_level_bytes, if it's enabled we give max_bytes_for_level_multiplier a priority against max_bytes_for_level_base, the bytes of base level is dynamic for a more predictable LSM tree, it is useful to limit worse case space amplification. Turning this feature on/off for an existing DB can cause unexpected LSM tree structure so it's not recommended. | +| rocksdb.max_bytes_for_level_base | 536870912 | The upper-bound of the total size of level-1 files in bytes. | +| rocksdb.max_bytes_for_level_multiplier | 10.0 | The ratio between the total size of level (L+1) files and the total size of level L files for all L. | +| rocksdb.target_file_size_base | 67108864 | The target file size for compaction in bytes. | +| rocksdb.target_file_size_multiplier | 1 | The size ratio between a level L file and a level (L+1) file. | +| rocksdb.level0_file_num_compaction_trigger | 2 | Number of files to trigger level-0 compaction. | +| rocksdb.level0_slowdown_writes_trigger | 20 | Soft limit on number of level-0 files for slowing down writes. | +| rocksdb.level0_stop_writes_trigger | 36 | Hard limit on number of level-0 files for stopping writes. | +| rocksdb.soft_pending_compaction_bytes_limit | 68719476736 | The soft limit to impose on pending compaction in bytes. | +| rocksdb.hard_pending_compaction_bytes_limit | 274877906944 | The hard limit to impose on pending compaction in bytes. | +| rocksdb.allow_mmap_writes | false | Allow the OS to mmap file for writing. | +| rocksdb.allow_mmap_reads | false | Allow the OS to mmap file for reading sst tables. | +| rocksdb.use_direct_reads | false | Enable the OS to use direct I/O for reading sst tables. | +| rocksdb.use_direct_io_for_flush_and_compaction | false | Enable the OS to use direct read/writes in flush and compaction. | +| rocksdb.use_fsync | false | If true, then every store to stable storage will issue a fsync. | +| rocksdb.atomic_flush | false | If true, flushing multiple column families and committing their results atomically to MANIFEST. Note that it's not necessary to set atomic_flush=true if WAL is always enabled. | +| rocksdb.format_version | 5 | The format version of BlockBasedTable, allowed values are 0~5. | +| rocksdb.index_type | kBinarySearch | The index type used to lookup between data blocks with the sst table, allowed values are [kBinarySearch,kHashSearch,kTwoLevelIndexSearch,kBinarySearchWithFirstKey]. | +| rocksdb.data_block_index_type | kDataBlockBinarySearch | The search type used to point lookup in data block with the sst table, allowed values are [kDataBlockBinarySearch,kDataBlockBinaryAndHash]. | +| rocksdb.data_block_hash_table_util_ratio | 0.75 | The hash table utilization ratio value of entries/buckets. It is valid only when data_block_index_type=kDataBlockBinaryAndHash. | +| rocksdb.block_size | 4096 | Approximate size of user data packed per block, Note that it corresponds to uncompressed data. | +| rocksdb.block_size_deviation | 10 | The percentage of free space used to close a block. | +| rocksdb.block_restart_interval | 16 | The block restart interval for delta encoding in blocks. | +| rocksdb.block_cache_capacity | 8388608 | The amount of block cache in bytes that will be used by RocksDB, 0 means no block cache. | +| rocksdb.cache_index_and_filter_blocks | true | Set this option true if we'd put index/filter blocks to the block cache. | +| rocksdb.pin_l0_filter_and_index_blocks_in_cache | true | Set this option true if we'd pin L0 index/filter blocks to the block cache. | +| rocksdb.bloom_filter_bits_per_key | -1 | The bits per key in bloom filter, a good value is 10, which yields a filter with ~ 1% false positive rate. Set bloom_filter_bits_per_key > 0 to enable bloom filter, -1 means no bloom filter (0~0.5 round down to no filter). | +| rocksdb.bloom_filter_block_based_mode | false | If bloom filter is enabled, set this option true to use block based filter rather than full filter. | +| rocksdb.bloom_filter_whole_key_filtering | true | If bloom filter is enabled, set this option true to place whole keys in the bloom filter, else place the prefix of keys when prefix-extractor is set. | +| rocksdb.optimize_filters_for_hits | true | If bloom filter is enabled, this flag allows us to not store filters for the last level. set this option true to optimize the filters mainly for cases where keys are found rather than also optimize for keys missed. | +| rocksdb.partition_filters_and_indexes | false | If bloom filter is enabled, set this option true to use partitioned full filters and indexes for each sst file. This option is incompatible with block-based filters. | +| rocksdb.pin_top_level_index_and_filter | true | If partition_filters_and_indexes is set true, set this option true if we'd pin top-level index of partitioned filter and index blocks to the block cache. | +| rocksdb.prefix_extractor_n_bytes | 0 | The prefix-extractor uses the first N bytes of a key as its prefix, it will use the full key when a key is shorter than the N. 0 means unset prefix-extractor. | > [!DETAILS]- **K8s 配置项 (可选)** > 对应配置文件`rest-server.properties` > -> | config option | default value | description | -> |------------------|-------------------------------|------------------------------------------| -> | server.use_k8s | false | Whether to enable K8s multi-tenancy mode. | -> | k8s.namespace | hugegraph-computer-system | K8s namespace for compute jobs. | -> | k8s.kubeconfig | | Path to kubeconfig file. | +> | config option | default value | description | +> |-------------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------| +> | server.use_k8s | false | Whether to use k8s to support multiple tenancy. | +> | server.deploy_in_k8s | false | Whether to deploy server in k8s. | +> | server.urls_to_pd | http://0.0.0.0:8080 | Used as the server address reserved for PD and provided to clients, only used when starting the server in k8s. | +> | server.k8s_url | https://127.0.0.1:8888 | The url of k8s. | +> | server.k8s_use_ca | false | Whether to use ca to k8s api server. | +> | server.k8s_ca | | The ca file of k8s api server. | +> | server.k8s_client_ca | | The client ca file of k8s api server. | +> | server.k8s_client_key | | The client key file of k8s api server. | +> | k8s.api | false | The k8s api start status when the computer service is enabled. | +> | k8s.namespace | hugegraph-computer-system | The namespace used for k8s work when the computer service is enabled. | +> | k8s.kubeconfig | | The k8s kube config file when the computer service is enabled. | +> | k8s.hugegraph_url | | The hugegraph url for k8s work when the computer service is enabled. | +> | k8s.enable_internal_algorithm | true | Whether to open k8s internal algorithm. | +> | service.access_pd_name | hg | Service name for server to access pd service. | +> | service.access_pd_token | | Service token for server to access pd service. | +> | server.k8s_oltp_image | 127.0.0.1/kgs_bd/hugegraphserver:3.0.0 | The oltp server image of k8s. | +> | server.k8s_olap_image | hugegraph/hugegraph-server:v1 | The olap server image of k8s. | +> | server.k8s_storage_image | hugegraph/hugegraph-server:v1 | The storage server image of k8s. | +> | server.default_oltp_k8s_namespace | hugegraph-server | The default oltp namespace for HugeGraph default graph space. | +> | server.default_olap_k8s_namespace | hugegraph-computer-system | The default olap namespace for HugeGraph default graph space. | +> | k8s.internal_algorithm | [page-rank, degree-centrality, wcc, triangle-count, rings, rings-with-filter, betweenness-centrality, closeness-centrality, lpa, links, kcore, louvain, clustering-coefficient, ppr, subgraph-match] | The names of the built-in k8s algorithms. | +> | k8s.algorithms | See `ServerOptions.K8S_ALGORITHMS` | The `name:paramsClass` mapping of the built-in k8s algorithms. | > [!DETAILS]- **Arthas 诊断配置项 (可选)** > 对应配置文件`rest-server.properties` @@ -221,34 +332,28 @@ search_boost: 1.5 > | arthas.telnetPort | 8562 | Arthas telnet port. | > | arthas.httpPort | 8561 | Arthas HTTP port. | > | arthas.ip | 0.0.0.0 | Arthas bind IP. | +> | arthas.disabledCommands | jad | Disabled Arthas commands, separated by commas. | -> [!DETAILS]- **RPC Server 配置** +> [!DETAILS]- **RPC Server 配置项** +> 对应配置文件`rest-server.properties` +> > | config option | default value | description | > |-----------------------------|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | rpc.server_host | | The hosts/ips bound by rpc server to provide services, empty value means not enabled. | +> | rpc.server_port | 8090 | The port bound by rpc server to provide services. | +> | rpc.server_adaptive_port | false | Whether the bound port is adaptive, if it's enabled, when the port is in use, automatically +1 to detect the next available port. Note that this process is not atomic, so there may still be port conflicts. | +> | rpc.server_timeout | 30 | The timeout(in seconds) of rpc server execution. | +> | rpc.remote_url | | The remote urls of rpc peers, it can be set to multiple addresses, which are concat by ',', empty value means not enabled. | > | rpc.client_connect_timeout | 20 | The timeout(in seconds) of rpc client connect to rpc server. | -> | rpc.client_load_balancer | consistentHash | The rpc client uses a load-balancing algorithm to access multiple rpc servers in one cluster. Default value is 'consistentHash', means forwarding by request parameters. | -> | rpc.client_read_timeout | 40 | The timeout(in seconds) of rpc client read from rpc server. | > | rpc.client_reconnect_period | 10 | The period(in seconds) of rpc client reconnect to rpc server. | +> | rpc.client_read_timeout | 40 | The timeout(in seconds) of rpc client read from rpc server. | > | rpc.client_retries | 3 | Failed retry number of rpc client calls to rpc server. | -> | rpc.config_order | 999 | Sofa rpc configuration file loading order, the larger the more later loading. | -> | rpc.logger_impl | com.alipay.sofa.rpc.log.SLF4JLoggerImpl | Sofa rpc log implementation class. | +> | rpc.client_load_balancer | consistentHash | The rpc client uses a load-balancing algorithm to access multiple rpc servers in one cluster. Default value is 'consistentHash', means forwarding by request parameters. | > | rpc.protocol | bolt | Rpc communication protocol, client and server need to be specified the same value. | -> | rpc.remote_url | | The remote urls of rpc peers, it can be set to multiple addresses, which are concat by ',', empty value means not enabled. | -> | rpc.server_adaptive_port | false | Whether the bound port is adaptive, if it's enabled, when the port is in use, automatically +1 to detect the next available port. Note that this process is not atomic, so there may still be port conflicts. | -> | rpc.server_host | | The hosts/ips bound by rpc server to provide services, empty value means not enabled. | -> | rpc.server_port | 8090 | The port bound by rpc server to provide services. | -> | rpc.server_timeout | 30 | The timeout(in seconds) of rpc server execution. | +> | rpc.serialization | hessian2 | Rpc serialization type, client and server must set the same value. Note: If you choose 'protobuf', you need to add the relative IDL file. (Could refer PD/Store *.proto) | +> | rpc.config_order | 999 | Sofa-RPC configuration file loading order, the larger the more later loading. | +> | rpc.logger_impl | com.alipay.sofa.rpc.log.SLF4JLoggerImpl | Sofa-RPC log implementation class. | -> [!DETAILS]- **Arthas 诊断配置项 (可选)** -> 对应配置文件`rest-server.properties` -> -> | config option | default value | description | -> |--------------------|---------------|-----------------------| -> | arthas.telnetPort | 8562 | Arthas telnet port. | -> | arthas.httpPort | 8561 | Arthas HTTP port. | -> | arthas.ip | 0.0.0.0 | Arthas bind IP. | -> | arthas.disabledCommands | jad | Disabled Arthas commands, separated by commas. | -> > [!DETAILS]- **HBase 后端配置项** > | config option | default value | description | > |---------------------------|--------------------------------|--------------------------------------------------------------------------| @@ -259,11 +364,12 @@ search_boost: 1.5 > | hbase.threads_max | 64 | The max threads num of hbase connections. | > | hbase.znode_parent | /hbase | The znode parent path of HBase zookeeper. | > | hbase.zk_retry | 3 | The recovery retry times of HBase zookeeper. | +> | hbase.truncate_timeout | 30 | The timeout in seconds of waiting for store truncate. | > | hbase.aggregation_timeout | 43200 | The timeout in seconds of waiting for aggregation. | > | hbase.kerberos_enable | false | Is Kerberos authentication enabled for HBase. | > | hbase.kerberos_keytab | | The HBase's key tab file for kerberos authentication. | > | hbase.kerberos_principal | | The HBase's principal for kerberos authentication. | -> | hbase.krb5_conf | etc/krb5.conf | Kerberos configuration file, including KDC IP, default realm, etc. | +> | hbase.krb5_conf | /etc/krb5.conf | Kerberos configuration file, including KDC IP, default realm, etc. | > | hbase.hbase_site | /etc/hbase/conf/hbase-site.xml | The HBase's configuration file | > | hbase.enable_partition | true | Is pre-split partitions enabled for HBase. | > | hbase.vertex_partitions | 10 | The number of partitions of the HBase vertex table. | diff --git a/content/cn/docs/guides/custom-plugin.md b/content/cn/docs/guides/custom-plugin.md index 0f0783151..f098d8c1b 100644 --- a/content/cn/docs/guides/custom-plugin.md +++ b/content/cn/docs/guides/custom-plugin.md @@ -8,7 +8,7 @@ weight: 3 1. HugeGraph 不仅开源开放,而且要做到简单易用,一般用户无需更改源码也能轻松增加插件扩展功能。 2. HugeGraph 支持多种内置存储后端,也允许用户无需更改现有源码的情况下扩展自定义后端。 -3. HugeGraph 支持全文检索,全文检索功能涉及到各语言分词,目前已内置 8 种中文分词器,也允许用户无需更改现有源码的情况下扩展自定义分词器。 +3. HugeGraph 支持全文检索,全文检索功能涉及到各语言分词,目前已内置 7 种分词器(ansj、hanlp、smartcn、jieba、jcseg、mmseg4j、ikanalyzer),也允许用户无需更改现有源码的情况下扩展自定义分词器。 ### 可扩展维度 @@ -22,7 +22,7 @@ weight: 3 ### 插件实现机制 1. HugeGraph 提供插件接口 HugeGraphPlugin,通过 Java SPI 机制支持插件化 -2. HugeGraph 提供了 4 个扩展项注册函数:`registerOptions()`、`registerBackend()`、`registerSerializer()`、`registerAnalyzer()` +2. HugeGraph 在 HugeGraphPlugin 接口上以静态方法提供了 4 个扩展项注册函数:`registerOptions()`、`registerBackend()`、`registerSerializer()`、`registerAnalyzer()` 3. 插件实现者实现相应的 Options、Backend、Serializer 或 Analyzer 的接口 4. 插件实现者实现 HugeGraphPlugin 接口的`register()`方法,在该方法中注册上述第 3 点所列的具体实现类,并打成 jar 包 5. 插件使用者将 jar 包放在 HugeGraph Server 安装目录的`plugins`目录下,修改相关配置项为插件自定义值,重启即可生效 @@ -82,13 +82,18 @@ public class RocksDBStoreProvider extends AbstractBackendStoreProvider { } @Override - protected BackendStore newSchemaStore(String store) { - return new RocksDBSchemaStore(this, this.database(), store); + protected BackendStore newSchemaStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBSchemaStore(this, this.database(), store); } @Override - protected BackendStore newGraphStore(String store) { - return new RocksDBGraphStore(this, this.database(), store); + protected BackendStore newGraphStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBGraphStore(this, this.database(), store); + } + + @Override + protected BackendStore newSystemStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBSystemStore(this, this.database(), store); } @Override @@ -97,8 +102,8 @@ public class RocksDBStoreProvider extends AbstractBackendStoreProvider { } @Override - public String version() { - return "1.0"; + public String driverVersion() { + return "1.11"; } } ``` @@ -110,41 +115,59 @@ BackendStore 接口定义如下: ```java public interface BackendStore { // Store name - public String store(); + String store(); + + // Stored version + String storedVersion(); // Database name - public String database(); + String database(); // Get the parent provider - public BackendStoreProvider provider(); + BackendStoreProvider provider(); + + // Get the system schema store + SystemSchemaStore systemSchemaStore(); + + // Whether it is the storage of schema + boolean isSchemaStore(); // Open/close database - public void open(HugeConfig config); - public void close(); + void open(HugeConfig config); + void close(); + boolean opened(); // Initialize/clear database - public void init(); - public void clear(); + void init(); + void clear(boolean clearSpace); + boolean initialized(); + + // Delete all data of database (keep table structure) + void truncate(); // Add/delete data - public void mutate(BackendMutation mutation); + void mutate(BackendMutation mutation); // Query data - public Iterator query(Query query); + Iterator query(Query query); + Number queryNumber(Query query); // Transaction - public void beginTx(); - public void commitTx(); - public void rollbackTx(); + void beginTx(); + void commitTx(); + void rollbackTx(); // Get metadata by key - public R metadata(HugeType type, String meta, Object[] args); + R metadata(HugeType type, String meta, Object[] args); // Backend features - public BackendFeatures features(); + BackendFeatures features(); - // Generate an id for a specific type - public Id nextId(HugeType type); + // Increase next id for specific type + void increaseCounter(HugeType type, long increment); + + // Get current counter for a specific type + long getCounter(HugeType type); } ``` @@ -155,27 +178,29 @@ public interface BackendStore { ```java public interface GraphSerializer { - public BackendEntry writeVertex(HugeVertex vertex); - public BackendEntry writeVertexProperty(HugeVertexProperty prop); - public HugeVertex readVertex(HugeGraph graph, BackendEntry entry); - public BackendEntry writeEdge(HugeEdge edge); - public BackendEntry writeEdgeProperty(HugeEdgeProperty prop); - public HugeEdge readEdge(HugeGraph graph, BackendEntry entry); - public BackendEntry writeIndex(HugeIndex index); - public HugeIndex readIndex(HugeGraph graph, ConditionQuery query, BackendEntry entry); - public BackendEntry writeId(HugeType type, Id id); - public Query writeQuery(Query query); + BackendEntry writeVertex(HugeVertex vertex); + BackendEntry writeOlapVertex(HugeVertex vertex); + BackendEntry writeVertexProperty(HugeVertexProperty prop); + HugeVertex readVertex(HugeGraph graph, BackendEntry entry); + BackendEntry writeEdge(HugeEdge edge); + BackendEntry writeEdgeProperty(HugeEdgeProperty prop); + HugeEdge readEdge(HugeGraph graph, BackendEntry entry); + CIter readEdges(HugeGraph graph, BackendEntry bytesEntry); + BackendEntry writeIndex(HugeIndex index); + HugeIndex readIndex(HugeGraph graph, ConditionQuery query, BackendEntry entry); + BackendEntry writeId(HugeType type, Id id); + Query writeQuery(Query query); } public interface SchemaSerializer { - public BackendEntry writeVertexLabel(VertexLabel vertexLabel); - public VertexLabel readVertexLabel(HugeGraph graph, BackendEntry entry); - public BackendEntry writeEdgeLabel(EdgeLabel edgeLabel); - public EdgeLabel readEdgeLabel(HugeGraph graph, BackendEntry entry); - public BackendEntry writePropertyKey(PropertyKey propertyKey); - public PropertyKey readPropertyKey(HugeGraph graph, BackendEntry entry); - public BackendEntry writeIndexLabel(IndexLabel indexLabel); - public IndexLabel readIndexLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writeVertexLabel(VertexLabel vertexLabel); + VertexLabel readVertexLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writeEdgeLabel(EdgeLabel edgeLabel); + EdgeLabel readEdgeLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writePropertyKey(PropertyKey propertyKey); + PropertyKey readPropertyKey(HugeGraph graph, BackendEntry entry); + BackendEntry writeIndexLabel(IndexLabel indexLabel); + IndexLabel readIndexLabel(HugeGraph graph, BackendEntry entry); } ``` @@ -211,7 +236,7 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.data_path", "The path for storing data of RocksDB.", disallowEmpty(), - "rocksdb-data" + "rocksdb-data/data" ); public static final ConfigOption WAL_PATH = @@ -219,7 +244,7 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.wal_path", "The path for storing WAL of RocksDB.", disallowEmpty(), - "rocksdb-data" + "rocksdb-data/wal" ); public static final ConfigListOption DATA_DISKS = @@ -227,9 +252,13 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.data_disks", false, "The optimized disks for storing data of RocksDB. " + - "The format of each element: `STORE/TABLE: /path/to/disk`." + - "Allowed keys are [graph/vertex, graph/edge_out, graph/edge_in, " + - "graph/secondary_index, graph/range_index]", + "The format of each element: `STORE/TABLE: /path/disk`." + + "Allowed keys are [g/vertex, g/edge_out, g/edge_in, " + + "g/vertex_label_index, g/edge_label_index, " + + "g/range_int_index, g/range_float_index, " + + "g/range_long_index, g/range_double_index, " + + "g/secondary_index, g/search_index, g/shard_index, " + + "g/unique_index, g/olap]", null, String.class, ImmutableList.of() @@ -267,13 +296,13 @@ public class SpaceAnalyzer implements Analyzer { ```java public interface HugeGraphPlugin { - public String name(); + String name(); - public void register(); + void register(); - public String supportsMinVersion(); + String supportsMinVersion(); - public String supportsMaxVersion(); + String supportsMaxVersion(); } ``` @@ -301,6 +330,16 @@ public class DemoPlugin implements HugeGraphPlugin { public void register() { HugeGraphPlugin.registerAnalyzer("demo", SpaceAnalyzer.class.getName()); } + + @Override + public String supportsMinVersion() { + return "1.7.0"; + } + + @Override + public String supportsMaxVersion() { + return "1.8.0"; + } } ``` diff --git a/content/cn/docs/guides/desgin-concept.md b/content/cn/docs/guides/desgin-concept.md index 3a678f096..9ec72b795 100644 --- a/content/cn/docs/guides/desgin-concept.md +++ b/content/cn/docs/guides/desgin-concept.md @@ -31,11 +31,12 @@ HugeGraph目前采用EdgeCut的分区方案。 ### 3. VertexId 策略 -HugeGraph的Vertex支持三种ID策略,在同一个图数据库中不同的VertexLabel可以使用不同的Id策略,目前HugeGraph支持的Id策略分别是: +HugeGraph的Vertex支持四种ID策略,在同一个图数据库中不同的VertexLabel可以使用不同的Id策略,目前HugeGraph支持的Id策略分别是: - 自动生成(AUTOMATIC):使用Snowflake算法自动生成全局唯一Id,Long类型; - 主键(PRIMARY_KEY):通过VertexLabel+PrimaryKeyValues生成Id,String类型; - 自定义(CUSTOMIZE_STRING|CUSTOMIZE_NUMBER):用户自定义Id,分为String和Long类型两种,需自己保证Id的唯一性; +- 自定义UUID(CUSTOMIZE_UUID):用户自定义UUID形式的Id,需自己保证Id的唯一性; 默认的Id策略是AUTOMATIC,如果用户调用primaryKeys()方法并设置了正确的PrimaryKeys,则自动启用PRIMARY_KEY策略。 启用PRIMARY_KEY策略后HugeGraph能根据PrimaryKeys实现数据去重。 @@ -77,6 +78,15 @@ schema.vertexLabel("person") graph.addVertex(T.label, "person", T.id, 123456, "name", "marko","age", 18, "city", "Beijing"); ``` + 5. CUSTOMIZE_UUID ID策略 + ```java +schema.vertexLabel("person") + .useCustomizeUuidId() + .properties("name", "age", "city") + .create(); +graph.addVertex(T.label, "person", T.id, UUID.randomUUID(), "name", "marko","age", 18, "city", "Beijing"); + ``` + 如果用户需要Vertex去重,有三种方案分别是: 1. 采用PRIMARY_KEY策略,自动覆盖,适合大数据量批量插入,用户无法知道是否发生了覆盖行为 @@ -200,7 +210,7 @@ TinkerPop transaction事务是指对数据库执行操作的工作单元,一 - 服务端内部通过将事务与线程绑定实现隔离(ThreadLocal) - 本事务未提交的内容按照时间顺序覆盖老数据以供本事务查询最新版本数据 -- 底层依赖后端数据库保证事务原子性操作(如Cassandra/RocksDB的batch接口均保证原子性) +- 底层依赖后端数据库保证事务原子性操作(如RocksDB的batch接口保证原子性) ###### *注意* diff --git a/content/cn/docs/guides/faq.md b/content/cn/docs/guides/faq.md index 311e932e1..f592d3f30 100644 --- a/content/cn/docs/guides/faq.md +++ b/content/cn/docs/guides/faq.md @@ -75,15 +75,15 @@ weight: 6 - 如何删除图中的全部数据 - 管理员可调用 `DELETE /graphspaces/{graphspace}/graphs/{graph}/clear`。请求必须携带源码要求的 `confirm_message`,具体格式见 [Graph API](../clients/restful-api/graphs)。该操作会清除 schema、顶点、边和索引。 + 管理员可调用 `DELETE /graphspaces/{graphspace}/graphs/{graph}/clear?confirm_message=I'm sure to delete all data`。`confirm_message` 查询参数必须与该值完全一致,否则请求会被拒绝,详见 [Graph API](../clients/restful-api/graphs)。该操作会清除 schema、顶点、边和索引。 - 清空了数据库,并且执行了`init-store`,但是添加`schema`时提示"xxx has existed" `HugeGraphServer`内是有缓存的,清空数据库的同时是需要重启`Server`的,否则残留的缓存会产生不一致。 -- 插入顶点或边的过程中报错:`Id max length is 128, but got xxx {yyy}` 或 `Big id max length is 32768, but got xxx` +- 插入顶点或边的过程中报错:`The max length of vertex id is 16384, but got xxx {yyy}` 或 `The max length of edge id is 65536, but got xxx {yyy}` - 为了保证查询性能,目前的后端存储对id列的长度做了限制,顶点id不能超过128字节,边id长度不能超过32768字节,索引id不能超过128字节。 + 为了保证查询性能,目前的后端存储对id列的长度做了限制,顶点id不能超过16384字节,边id长度不能超过65536字节;索引id超过32字节时会转为哈希存储,而不是报错。 - 是否支持嵌套属性,如果不支持,是否有什么替代方案 @@ -91,7 +91,7 @@ weight: 6 - 一个`EdgeLabel`是否可以连接多对`VertexLabel`,比如"投资"关系,可以是"个人"投资"企业",也可以是"企业"投资"企业" - 一个`EdgeLabel`不支持连接多对`VertexLabel`,需要用户将`EdgeLabel`拆分得更细一点,如:"个人投资","企业投资"。 + 可以。创建`EdgeLabel`时对每一对顶点标签各调用一次`link(sourceLabel, targetLabel)`,所有配对都会被保留,因此同一个"投资"标签可以同时覆盖"个人"投资"企业"和"企业"投资"企业"。旧的`sourceLabel()`和`targetLabel()`构建方法已废弃,且只支持单一配对。 - 通过`RestAPI`发送请求时提示`HTTP 415 Unsupported Media Type` diff --git a/content/cn/docs/language/hugegraph-example.md b/content/cn/docs/language/hugegraph-example.md index 3bb98a4fe..0835e12ab 100644 --- a/content/cn/docs/language/hugegraph-example.md +++ b/content/cn/docs/language/hugegraph-example.md @@ -46,12 +46,13 @@ HugeGraph 相对于 TitanDB 而言,其主要特点如下: | father | edge | character | character | - | | mother | edge | character | character | - | | brother | edge | character | character | - | +| battled | edge | character | character | time | | pet | edge | character | character | - | | lives | edge | character | location | reason | -在 HugeGraph 中,每个 edge label 只能作用于一对 source vertex label 和 target vertex label。也就是说,如果一个图内定义了一种关系 father 连接 character 和 character,那 farther 就不能再连接其他的 vertex labels。 +一个 edge label 可以连接多对 source vertex label 和 target vertex label:创建时对每一对顶点标签各调用一次 `link(sourceLabel, targetLabel)` 即可。已废弃的 `sourceLabel()` 和 `targetLabel()` 构建方法只支持单一配对。 -因此本例子将原TitanDB中的monster, god, human, demigod均使用相同的`vertex label: character`来表示, 同时增加属性type来标识人物的类型。`edge label`与原TitanDB保持一致。当然为了满足`edge label`约束,也可以通过调整`edge label`的`name`来实现。 +本例子将原TitanDB中的monster, god, human, demigod均使用相同的`vertex label: character`来表示, 同时增加属性type来标识人物的类型。`edge label`与原TitanDB保持一致。 ### 2 Graph Schema and Data Ingest Examples @@ -158,7 +159,7 @@ g.V().hasLabel('character').has('name','pluto').out('lives').in('lives').values( ```groovy pluto = g.V().hasLabel('character').has('name', 'pluto') -g.V(pluto).out('lives').in('lives').where(is(neq(pluto)).values('name') +g.V(pluto).out('lives').in('lives').where(is(neq(pluto))).values('name') // use 'as' g.V().hasLabel('character').has('name', 'pluto').as('x').out('lives').in('lives').where(neq('x')).values('name') diff --git a/content/cn/docs/language/hugegraph-gremlin.md b/content/cn/docs/language/hugegraph-gremlin.md index 9eda438fe..1b5afa7d3 100644 --- a/content/cn/docs/language/hugegraph-gremlin.md +++ b/content/cn/docs/language/hugegraph-gremlin.md @@ -30,17 +30,17 @@ HugeGraph实现了TinkerPop框架,但是并没有实现TinkerPop所有的特 | Name | Description | Support | |--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| -| UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | false | +| UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | true | | NumericIds | Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | UuidIds | Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | AnyIds | Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}. | false | | AddProperty | Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting "data types" and refers to support of calls to {@link Element#property(String, Object)}. | true | | RemoveProperty | Determines if an {@link Element} allows properties to be removed. | true | | AddVertices | Determines if a {@link Vertex} can be added to the {@code Graph}. | true | -| MultiProperties | Determines if a {@link Vertex} can support multiple properties with the same key. | false | -| DuplicateMultiProperties | Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method, just returns what {@link #supportsMultiProperties()} returns. | false | +| MultiProperties | Determines if a {@link Vertex} can support multiple properties with the same key. | true | +| DuplicateMultiProperties | Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method, just returns what {@link #supportsMultiProperties()} returns. | true | | MetaProperties | Determines if a {@link Vertex} can support properties on vertex properties. It is assumed that a graph will support all the same data types for meta-properties that are supported for regular properties. | false | | RemoveVertices | Determines if a {@link Vertex} can be removed from the {@code Graph}. | true | @@ -50,9 +50,9 @@ HugeGraph实现了TinkerPop框架,但是并没有实现TinkerPop所有的特 |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| | UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | false | | NumericIds | Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | UuidIds | Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | AnyIds | Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}. | false | | AddProperty | Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting "data types" and refers to support of calls to {@link Element#property(String, Object)}. | true | | RemoveProperty | Determines if an {@link Element} allows properties to be removed. | true | @@ -80,7 +80,7 @@ HugeGraph实现了TinkerPop框架,但是并没有实现TinkerPop所有的特 | SerializableValues | | false | | StringArrayValues | | false | | StringValues | | true | -| UniformListValues | Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is "uniform" it must contain objects of the same type. | false | +| UniformListValues | Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is "uniform" it must contain objects of the same type. | true | ### Gremlin的步骤 @@ -90,12 +90,12 @@ HugeGraph支持Gremlin的所有步骤。有关Gremlin的完整参考信息,请 |------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------| | addE | 在两个顶点之间添加边 | [addE step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | | addV | 将顶点添加到图形 | [addV step](http://tinkerpop.apache.org/docs/current/reference/#addvertex-step) | -| and | 确保所有遍历都返回值 | [and step](http://tinkerpop.apache.org/docs/current/reference/#add-step) | +| and | 确保所有遍历都返回值 | [and step](http://tinkerpop.apache.org/docs/current/reference/#and-step) | | as | 用于向步骤的输出分配变量的步骤调制器 | [as step](http://tinkerpop.apache.org/docs/current/reference/#as-step) | | by | 与`group`和`order`配合使用的步骤调制器 | [by step](http://tinkerpop.apache.org/docs/current/reference/#by-step) | | coalesce | 返回第一个返回结果的遍历 | [coalesce step](http://tinkerpop.apache.org/docs/current/reference/#coalesce-step) | | constant | 返回常量值。 与`coalesce`配合使用 | [constant step](http://tinkerpop.apache.org/docs/current/reference/#constant-step) | -| count | 从遍历返回计数 | [count step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | +| count | 从遍历返回计数 | [count step](http://tinkerpop.apache.org/docs/current/reference/#count-step) | | dedup | 返回已删除重复内容的值 | [dedup step](http://tinkerpop.apache.org/docs/current/reference/#dedup-step) | | drop | 丢弃值(顶点/边缘) | [drop step](http://tinkerpop.apache.org/docs/current/reference/#drop-step) | | fold | 充当用于计算结果聚合值的屏障 | [fold step](http://tinkerpop.apache.org/docs/current/reference/#fold-step) | @@ -109,7 +109,7 @@ HugeGraph支持Gremlin的所有步骤。有关Gremlin的完整参考信息,请 | optional | 如果生成了某个结果,则返回指定遍历的结果,否则返回调用元素 | [optional step](http://tinkerpop.apache.org/docs/current/reference/#optional-step) | | or | 确保至少有一个遍历会返回值 | [or step](http://tinkerpop.apache.org/docs/current/reference/#or-step) | | order | 按指定的排序顺序返回结果 | [order step](http://tinkerpop.apache.org/docs/current/reference/#order-step) | -| path | 返回遍历的完整路径 | [path step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | +| path | 返回遍历的完整路径 | [path step](http://tinkerpop.apache.org/docs/current/reference/#path-step) | | project | 将属性投影为映射 | [project step](http://tinkerpop.apache.org/docs/current/reference/#project-step) | | properties | 返回指定标签的属性 | [properties step](http://tinkerpop.apache.org/docs/current/reference/#properties-step) | | range | 根据指定的值范围进行筛选 | [range step](http://tinkerpop.apache.org/docs/current/reference/#range-step) | @@ -120,5 +120,5 @@ HugeGraph支持Gremlin的所有步骤。有关Gremlin的完整参考信息,请 | tree | 将顶点中的路径聚合到树中 | [tree step](http://tinkerpop.apache.org/docs/current/reference/#tree-step) | | unfold | 将迭代器作为步骤展开 | [unfold step](http://tinkerpop.apache.org/docs/current/reference/#unfold-step) | | union | 合并多个遍历返回的结果 | [union step](http://tinkerpop.apache.org/docs/current/reference/#union-step) | -| V | 包括顶点与边之间的遍历所需的步骤:`V`、`E`、`out`、`in`、`both`、`outE`、`inE`、`bothE`、`outV`、`inV`、`bothV` 和 `otherV` | [order step](http://tinkerpop.apache.org/docs/current/reference/#vertex-steps) | +| V | 包括顶点与边之间的遍历所需的步骤:`V`、`E`、`out`、`in`、`both`、`outE`、`inE`、`bothE`、`outV`、`inV`、`bothV` 和 `otherV` | [vertex steps](http://tinkerpop.apache.org/docs/current/reference/#vertex-steps) | | where | 用于筛选遍历返回的结果。 支持 `eq`、`neq`、`lt`、`lte`、`gt`、`gte` 和 `between` 运算符 | [where step](http://tinkerpop.apache.org/docs/current/reference/#where-step) | diff --git a/content/en/docs/config/config-option.md b/content/en/docs/config/config-option.md index 42c419523..fa43f13e5 100644 --- a/content/en/docs/config/config-option.md +++ b/content/en/docs/config/config-option.md @@ -13,205 +13,317 @@ search_boost: 1.5 Corresponding configuration file `gremlin-server.yaml` -| config option | default value | description | -|-------------------------|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| -| host | 127.0.0.1 | The host or ip of Gremlin Server. | -| port | 8182 | The listening port of Gremlin Server. | -| graphs | {} | Graphs are loaded dynamically by the Server; do not configure them here. | -| evaluationTimeout | 30000 | Gremlin script evaluation timeout in milliseconds. | -| channelizer | org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer | Handles both WebSocket and HTTP requests. | -| authentication | Not configured | When enabling authentication, configure the authenticator, handler, and path to `rest-server.properties`. | +| config option | default value | description | +|---------------------------|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| +| host | 127.0.0.1 | The host or ip of Gremlin Server. | +| port | 8182 | The listening port of Gremlin Server. | +| graphs | {} | Graphs are loaded dynamically by the Server; do not configure them here. | +| evaluationTimeout | 30000 | Gremlin script evaluation timeout in milliseconds. | +| channelizer | org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer | Handles both WebSocket and HTTP requests. | +| maxContentLength | 65536 | Maximum size in bytes of a request that the server accepts. | +| maxChunkSize | 8192 | Maximum chunk size in bytes of an HTTP request. | +| maxHeaderSize | 8192 | Maximum size in bytes of the HTTP request headers. | +| resultIterationBatchSize | 64 | Number of results returned per batch when streaming a result set. | +| ssl.enabled | false | Whether Gremlin Server serves over TLS. | +| authentication | Not configured | When enabling authentication, configure the authenticator, handler, and path to `rest-server.properties`. | ### Rest Server & API Config Options Corresponding configuration file `rest-server.properties` -| config option | default value | description | -|------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| graphs | ./conf/graphs | Directory containing graph configuration properties files. | -| graph.load_from_local_config | false | Whether to read the `graphs` directory when the Server starts; set to `true` when using local graph configuration. | -| server.id | Empty string | The id of rest server, used for license verification. | -| server.role | master | The role of nodes in the cluster, available types are [master, worker, computer] | -| restserver.url | http://127.0.0.1:8080 | The url for listening of rest server. | -| ssl.keystore_file | conf/hugegraph-server.keystore | The path of server keystore file used when https protocol is enabled. | -| ssl.keystore_password | hugegraph | The password of the server keystore file used when the https protocol is enabled. | -| restserver.max_worker_threads | 2 * CPUs | The maximum worker threads of rest server. | -| restserver.min_free_memory | 64 | The minimum free memory(MB) of rest server, requests will be rejected when the available memory of system is lower than this value. | -| restserver.request_timeout | 30 | The time in seconds within which a request must complete, -1 means no timeout. | -| restserver.connection_idle_timeout | 30 | The time in seconds to keep an inactive connection alive, -1 means no timeout. | -| restserver.connection_max_requests | 256 | The max number of HTTP requests allowed to be processed on one keep-alive connection, -1 means unlimited. | -| gremlinserver.url | http://127.0.0.1:8182 | The url of gremlin server. | -| gremlinserver.max_route | 8 | The max route number for gremlin server. | -| gremlinserver.timeout | 30 | The timeout in seconds of waiting for gremlin server. | -| batch.max_edges_per_batch | 2500 | The maximum number of edges submitted per batch. | -| batch.max_vertices_per_batch | 2500 | The maximum number of vertices submitted per batch. | -| batch.max_write_ratio | 70 | The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0. | -| batch.max_write_threads | 0 | The maximum threads for batch writing, if the value is 0, the actual value will be set to batch.max_write_ratio * restserver.max_worker_threads. | -| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. | -| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. | -| auth.admin_pa | pa | Initial password for the built-in admin user in PD mode. It only applies when the user is first created and must be changed before deployment. | -| auth.audit_log_rate | 1000.0 | The max rate of audit log output per user, default value is 1000 records per second. | -| auth.cache_capacity | 10240 | The max cache capacity of each auth cache item. | -| auth.cache_expire | 600 | The expiration time in seconds of vertex cache. | -| auth.remote_url | | If the address is empty, it provide auth service, otherwise it is auth client and also provide auth service through rpc forwarding. The remote url can be set to multiple addresses, which are concat by ','. | -| auth.token_expire | 86400 | The expiration time in seconds after token created | -| auth.token_secret | Randomly generated at startup | HS256 secret; configure it explicitly if existing tokens must remain valid across restarts. | -| exception.allow_trace | true | Whether to allow exception trace stack. | -| memory_monitor.threshold | 0.85 | The threshold of JVM(in-heap) memory usage monitoring , 1 means disabling this function. | -| memory_monitor.period | 2000 | The period in ms of JVM(in-heap) memory usage monitoring. | -| log.slow_query_threshold | 1000 | Slow query log threshold in milliseconds, 0 means disabled. | -| log.slow_query_body_limit | 512 | Maximum bytes of a request body recorded in the slow query log, 0 means disabled. The recorded prefix may contain sensitive Gremlin or Cypher literals. | +| config option | default value | description | +|----------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| graphs | ./conf/graphs | Directory containing graph configuration properties files. | +| graph.load_from_local_config | false | Whether to read the `graphs` directory when the Server starts; set to `true` when using local graph configuration. | +| graphs.enable_dynamic_create_drop | true | Whether to enable create or drop graph dynamically. | +| init_store.enabled | true | Whether init-store initializes the local backend stores and the built-in admin account. Set false in distributed deployments (PD/HStore) where the storage side already owns the metadata. | +| server.id | Empty string | The optional legacy id of hugegraph-server. | +| server.role | master | The role of nodes in the cluster, available types are [master, worker, computer] | +| server.role_election | false | Whether to enable role election, if enabled, the server will elect a master node in the cluster. | +| server.node_id | node-id1 | The node id of the server. | +| server.node_role | worker | The node role of the server. | +| server.graphspace | DEFAULT | The graph space of the server. | +| server.service_id | DEFAULT | The service id of the server. | +| server.path_graphspace | DEFAULT | The default path graph space of the server. | +| server.start_ignore_single_graph_error | true | Whether to start ignore single graph error. | +| server.event_hub_threads | 1 | The event hub threads of server. | +| restserver.url | http://127.0.0.1:8080 | The url for listening of graph server. | +| ssl.keystore_file | conf/hugegraph-server.keystore | The path of server keystore file used when https protocol is enabled. | +| ssl.keystore_password | hugegraph | The password of the server keystore file when the https protocol is enabled. | +| white_ip.status | disable | The status of whether enable white ip. | +| restserver.max_worker_threads | 2 * CPUs | The maximum worker threads of rest server. | +| restserver.task_threads | max(4, CPUs / 2) | The task threads of rest server. | +| restserver.min_free_memory | 64 | The minimum free memory(MB) of rest server, requests will be rejected when the available memory of system is lower than this value. | +| restserver.request_timeout | 30 | The time in seconds within which a request must complete, -1 means no timeout. | +| restserver.connection_idle_timeout | 30 | The time in seconds to keep an inactive connection alive, -1 means no timeout. | +| restserver.connection_max_requests | 256 | The max number of HTTP requests allowed to be processed on one keep-alive connection, -1 means unlimited. | +| gremlinserver.url | http://127.0.0.1:8182 | The url of gremlin server. | +| gremlinserver.max_route | 2 * CPUs | The max route number for gremlin server. | +| gremlinserver.timeout | 30 | The timeout in seconds of waiting for gremlin server. | +| batch.max_edges_per_batch | 2500 | The maximum number of edges submitted per batch. | +| batch.max_vertices_per_batch | 2500 | The maximum number of vertices submitted per batch. | +| batch.max_write_ratio | 70 | The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0. | +| batch.max_write_threads | 0 | The maximum threads for batch writing, if the value is 0, the actual value will be set to batch.max_write_ratio * restserver.max_worker_threads. | +| raft.group_peers | 127.0.0.1:8090 | The rpc address of raft group initial peers. | +| auth.authenticator | | The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or a custom implementation. | +| auth.graph_store | hugegraph | The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator. | +| auth.admin_pa | pa | The default password for built-in admin account, takes effect on first startup. It must be changed before deployment. | +| auth.audit_log_rate | 1000.0 | The max rate of audit log output per user, default value is 1000 records per second. | +| auth.cache_capacity | 10240 | The max cache capacity of each auth cache item. | +| auth.cache_expire | 600 | The expiration time in seconds of auth cache in auth client and auth server. | +| auth.remote_url | | If the address is empty, it provide auth service, otherwise it is auth client and also provide auth service through rpc forwarding. The remote url can be set to multiple addresses, which are concat by ','. | +| auth.token_expire | 86400 | The expiration time in seconds after token created | +| auth.token_secret | Randomly generated at startup | HS256 secret; configure it explicitly if existing tokens must remain valid across restarts. | +| exception.allow_trace | true | Whether to allow exception trace stack. | +| memory_monitor.threshold | 0.85 | Threshold for JVM memory usage monitoring, 1 means disabling the memory monitoring task. | +| memory_monitor.period | 2000 | The period in ms of JVM memory usage monitoring, in each period we will detect the jvm memory usage and take corresponding actions. | +| log.slow_query_threshold | 1000 | The threshold time(ms) of logging slow query, 0 means logging slow query is disabled. | +| log.slow_query_body_limit | 512 | The max bytes of request body recorded in the slow query log, 0 means the body is not recorded. The recorded prefix is written as-is and may contain sensitive Gremlin or Cypher literals. | + +> [!DETAILS]- **Role Election Config Options (Optional)** +> Corresponding configuration file `rest-server.properties`, only used when `server.role_election=true`. +> +> | config option | default value | description | +> |--------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | server.role.node_external_url | http://127.0.0.1:8080 | The url of external accessibility. | +> | server.role.base_timeout | 500 | The role state machine candidate state base timeout time, in ms. | +> | server.role.random_timeout | 1000 | The random timeout in ms that be used when candidate node request to become master state to reduce competitive voting. | +> | server.role.heartbeat_interval | 2 | The role state machine heartbeat interval second time. | +> | server.role.fail_count | 5 | When the node failed count of update or query heartbeat is reaches this threshold, the node will become abdication state to guardsafe property. | +> | server.role.master_dead_times | 10 | When the worker node detects that the number of times the master node fails to update heartbeat reaches this threshold, the worker node will become to a candidate node. | ### PD/Meta Config Options (Distributed Mode) Corresponding configuration file `rest-server.properties` -| config option | default value | description | -|------------------|------------------------|--------------------------------------------| -| pd.peers | 127.0.0.1:8686 | PD server addresses (comma separated). | -| meta.endpoints | http://127.0.0.1:2379 | Meta service endpoints. | -| usePD | false | Whether to use PD to manage distributed metadata. | +| config option | default value | description | +|----------------------|-----------------------|-----------------------------------------------------------------| +| usePD | false | Whether use pd. | +| pd.peers | 127.0.0.1:8686 | The pd server peers, separated with commas. | +| cluster | hg-test | The cluster name. | +| metrics.data_to_pd | true | Whether to report metrics data to pd. | +| meta.endpoints | http://127.0.0.1:2379 | The URL of meta endpoints. No code reads this option, so setting it has no effect; the meta connection is built from `pd.peers`. | +| meta.use_ca | false | Whether to use ca to meta server. | +| meta.ca | | The ca file of meta server. | +| meta.client_ca | | The client ca file of meta server. | +| meta.client_key | | The client key file of meta server. | + +The HStore backend also reads two options from the graph configuration file `{graph-name}.properties`. Both default to +0, which means the value is decided by PD: + +| config option | default value | description | +|-------------------------|---------------|-----------------------------------------------------------------| +| hstore.partition_count | 0 | Number of partitions, which PD controls partitions based on. | +| hstore.shard_count | 0 | Number of copies, which PD controls partition copies based on. | ### Basic Config Options Basic Config Options and Backend Config Options correspond to configuration files:{graph-name}.properties, such as `hugegraph.properties` -| config option | default value | description | -|---------------------------------------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| gremlin.graph | org.apache.hugegraph.HugeFactory | Gremlin entrance to create graph. | -| backend | rocksdb | The data store type. For version 1.7.0+: [memory, rocksdb, hstore, hbase]. Note: cassandra, scylladb, mysql, postgresql were removed in 1.7.0 (use <= 1.5.x for legacy backends). | -| serializer | binary | The serializer for backend store, available values are [text, binary, cassandra, hbase, mysql]. | -| store | hugegraph | The database name like Cassandra Keyspace. | -| store.connection_detect_interval | 600 | The interval in seconds for detecting connections, if the idle time of a connection exceeds this value, detect it and reconnect if needed before using, value 0 means detecting every time. | -| store.graph | g | The graph table name, which store vertex, edge and property. | -| store.schema | m | The schema table name, which store meta data. | -| store.system | s | The system table name, which store system data. | -| schema.illegal_name_regex | .*\s+$|~.* | The regex specified the illegal format for schema name. | -| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. | -| vertex.cache_type | l2 | The type of vertex cache, allowed values are [l1, l2]. | -| vertex.cache_capacity | 10000000 | The max cache size(items) of vertex cache. | -| vertex.cache_expire | 600 | The expire time in seconds of vertex cache. | -| vertex.check_customized_id_exist | false | Whether to check the vertices exist for those using customized id strategy. | -| vertex.default_label | vertex | The default vertex label. | -| vertex.tx_capacity | 10000 | The max size(items) of vertices(uncommitted) in transaction. | -| vertex.check_adjacent_vertex_exist | false | Whether to check the adjacent vertices of edges exist. | -| vertex.lazy_load_adjacent_vertex | true | Whether to lazy load adjacent vertices of edges. | -| vertex.part_edge_commit_size | 5000 | Whether to enable the mode to commit part of edges of vertex, enabled if commit size > 0, 0 means disabled. | -| vertex.encode_primary_key_number | true | Whether to encode number value of primary key in vertex id. | -| vertex.remove_left_index_at_overwrite | false | Whether remove left index at overwrite. | -| edge.cache_type | l2 | The type of edge cache, allowed values are [l1, l2]. | -| edge.cache_capacity | 1000000 | The max cache size(items) of edge cache. | -| edge.cache_expire | 600 | The expiration time in seconds of edge cache. | -| edge.tx_capacity | 10000 | The max size(items) of edges(uncommitted) in transaction. | -| query.page_size | 500 | The size of each page when querying by paging. | -| query.batch_size | 1000 | The size of each batch when querying by batch. | -| query.ignore_invalid_data | true | Whether to ignore invalid data of vertex or edge. | -| query.index_intersect_threshold | 1000 | The maximum number of intermediate results to intersect indexes when querying by multiple single index properties. | -| query.ramtable_edges_capacity | 20000000 | The maximum number of edges in ramtable, include OUT and IN edges. | -| query.ramtable_enable | false | Whether to enable ramtable for query of adjacent edges. | -| query.ramtable_vertices_capacity | 10000000 | The maximum number of vertices in ramtable, generally the largest vertex id is used as capacity. | -| query.optimize_aggregate_by_index | false | Whether to optimize aggregate query(like count) by index. | -| oltp.concurrent_depth | 10 | The min depth to enable concurrent oltp algorithm. | -| oltp.concurrent_threads | 10 | Thread number to concurrently execute oltp algorithm. | -| oltp.collection_type | EC | The implementation type of collections used in oltp algorithm. | -| rate_limit.read | 0 | The max rate(times/s) to execute query of vertices/edges. | -| rate_limit.write | 0 | The max rate(items/s) to add/update/delete vertices/edges. | -| task.wait_timeout | 10 | Timeout in seconds for waiting for the task to complete,such as when truncating or clearing the backend. | -| task.input_size_limit | 16777216 | The job input size limit in bytes. | -| task.result_size_limit | 16777216 | The job result size limit in bytes. | -| task.sync_deletion | false | Whether to delete schema or expired data synchronously. | -| task.ttl_delete_batch | 1 | The batch size used to delete expired data. | -| computer.config | /conf/computer.yaml | The config file path of computer job. | -| search.text_analyzer | ikanalyzer | Choose a text analyzer for searching the vertex/edge properties, available type are [word, ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer]. if use 'ikanalyzer', need download jar from 'https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar' to lib directory | -| search.text_analyzer_mode | smart | Specify the mode for the text analyzer, the available mode of analyzer are {word: [MaximumMatching, ReverseMaximumMatching, MinimumMatching, ReverseMinimumMatching, BidirectionalMaximumMatching, BidirectionalMinimumMatching, BidirectionalMaximumMinimumMatching, FullSegmentation, MinimalWordCount, MaxNgramScore, PureEnglish], ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, NlpAnalysis], hanlp: [standard, nlp, index, nShort, shortest, speed], smartcn: [], jieba: [SEARCH, INDEX], jcseg: [Simple, Complex], mmseg4j: [Simple, Complex, MaxWord], ikanalyzer: [smart, max_word]}. | -| snowflake.datacenter_id | 0 | The datacenter id of snowflake id generator. | -| snowflake.force_string | false | Whether to force the snowflake long id to be a string. | -| snowflake.worker_id | 0 | The worker id of snowflake id generator. | -| raft.mode | false | Whether the backend storage works in raft mode. | -| raft.safe_read | false | Whether to use linearly consistent read. | -| raft.use_snapshot | false | Whether to use snapshot. | -| raft.endpoint | 127.0.0.1:8281 | The peerid of current raft node. | -| raft.group_peers | 127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283 | The peers of current raft group. | -| raft.path | ./raft-log | The log path of current raft node. | -| raft.use_replicator_pipeline | true | Whether to use replicator line, when turned on it multiple logs can be sent in parallel, and the next log doesn't have to wait for the ack message of the current log to be sent. | -| raft.election_timeout | 10000 | Timeout in milliseconds to launch a round of election. | -| raft.snapshot_interval | 3600 | The interval in seconds to trigger snapshot save. | -| raft.backend_threads | current CPU v-cores | The thread number used to apply task to backend. | -| raft.read_index_threads | 8 | The thread number used to execute reading index. | -| raft.apply_batch | 1 | The apply batch size to trigger disruptor event handler. | -| raft.queue_size | 16384 | The disruptor buffers size for jraft RaftNode, StateMachine and LogManager. | -| raft.queue_publish_timeout | 60 | The timeout in second when publish event into disruptor. | -| raft.rpc_threads | 80 | The rpc threads for jraft RPC layer. | -| raft.rpc_connect_timeout | 5000 | The rpc connect timeout for jraft rpc. | -| raft.rpc_timeout | 60000 | The rpc timeout for jraft rpc. | -| raft.rpc_buf_low_water_mark | 10485760 | The ChannelOutboundBuffer's low water mark of netty, when buffer size less than this size, the method ChannelOutboundBuffer.isWritable() will return true, it means that low downstream pressure or good network. | -| raft.rpc_buf_high_water_mark | 20971520 | The ChannelOutboundBuffer's high water mark of netty, only when buffer size exceed this size, the method ChannelOutboundBuffer.isWritable() will return false, it means that the downstream pressure is too great to process the request or network is very congestion, upstream needs to limit rate at this time. | -| raft.read_strategy | ReadOnlyLeaseBased | The linearizability of read strategy. | +| config option | default value | description | +|---------------------------------------|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| gremlin.graph | org.apache.hugegraph.HugeFactory | Gremlin entrance to create graph. | +| backend | memory | The data store type. For version 1.7.0+ the allowed values are [memory, rocksdb, hstore, hbase]; the shipped `conf/graphs/hugegraph.properties` sets `rocksdb` and `conf/graphs/hstore.properties.template` sets `hstore`. Note: cassandra, scylladb, mysql, postgresql were removed in 1.7.0 (use <= 1.5.x for legacy backends). | +| serializer | text | The serializer for backend store, built-in values are [text, binary, binaryscatter]; a backend may register its own, like `hbase`. The shipped graph templates set `binary`. | +| serializer.buffer_max_capacity | 134217728 | The process-wide max capacity of one serialization buffer in bytes. | +| store | hugegraph | The backend database namespace. | +| store.connection_detect_interval | 600 | The interval in seconds for detecting connections, if the idle time of a connection exceeds this value, detect it and reconnect if needed before using, value 0 means detecting every time. | +| store.graph | g | The graph table name, which store vertex, edge and property. | +| graphspace | DEFAULT | The graph space name. | +| alias.graph.id | | The graph alias id. | +| graph.read_mode | OLTP_ONLY | The graph read mode, which could be ALL | OLTP_ONLY | OLAP_ONLY. | +| pd.peers | 127.0.0.1:8686 | The addresses of pd nodes, separated with commas. Only used by the hstore backend. | +| schema.illegal_name_regex | .*\s+$|~.* | The regex specified the illegal format for schema name. | +| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. | +| schema.init_template | | The template schema used to init graph. | +| schema.index_rebuild_using_pushdown | true | Whether to use pushdown when to create/rebuild index. | +| vertex.cache_type | l2 | The type of vertex cache, allowed values are [l1, l2]. | +| vertex.cache_capacity | 10000000 | The max cache size(items) of vertex cache. | +| vertex.cache_expire | 600 | The expiration time in seconds of vertex cache. | +| vertex.check_customized_id_exist | false | Whether to check the vertices exist for those using customized id strategy. | +| vertex.default_label | vertex | The default vertex label. | +| vertex.tx_capacity | 10000 | The max size(items) of vertices(uncommitted) in transaction. | +| vertex.check_adjacent_vertex_exist | false | Whether to check the adjacent vertices of edges exist. | +| vertex.lazy_load_adjacent_vertex | true | Whether to lazy load adjacent vertices of edges. | +| vertex.part_edge_commit_size | 5000 | Whether to enable the mode to commit part of edges of vertex, enabled if commit size > 0, 0 means disabled. | +| vertex.encode_primary_key_number | true | Whether to encode number value of primary key in vertex id. | +| vertex.remove_left_index_at_overwrite | false | Whether remove left index at overwrite. | +| edge.cache_type | l2 | The type of edge cache, allowed values are [l1, l2]. | +| edge.cache_capacity | 1000000 | The max cache size(items) of edge cache. | +| edge.cache_expire | 600 | The expiration time in seconds of edge cache. | +| edge.tx_capacity | 10000 | The max size(items) of edges(uncommitted) in transaction. | +| query.page_size | 500 | The size of each page when querying by paging. | +| query.batch_size | 1000 | The size of each batch when querying by batch. | +| query.ignore_invalid_data | true | Whether to ignore invalid data of vertex or edge. | +| query.index_intersect_threshold | 1000 | The maximum number of intermediate results to intersect indexes when querying by multiple single index properties. | +| query.max_indexes_available | 1 | The upper limit of the number of indexes that can be used to query. | +| query.dedup_option | limit | The way to dedup data, allowed values are [limit, global]. | +| query.trust_index | false | Whether to trust index. | +| query.ramtable_edges_capacity | 20000000 | The maximum number of edges in ramtable, include OUT and IN edges. | +| query.ramtable_enable | false | Whether to enable ramtable for query of adjacent edges. | +| query.ramtable_vertices_capacity | 10000000 | The maximum number of vertices in ramtable, generally the largest vertex id is used as capacity. | +| query.optimize_aggregate_by_index | false | Whether to optimize aggregate query(like count) by index. | +| oltp.concurrent_depth | 10 | The min depth to enable concurrent oltp algorithm. | +| oltp.concurrent_threads | max(10, CPUs / 2) | Thread number to concurrently execute oltp algorithm. | +| oltp.collection_type | EC | The implementation type of collections used in oltp algorithm, allowed values are [JCF, EC, FU]. | +| oltp.query_batch_size | 10000 | The size of each batch when executing oltp algorithm. | +| oltp.query_batch_avg_degree_ratio | 0.95 | The ratio of exponential approximation for average degree of iterator when executing oltp algorithm. | +| oltp.query_batch_expect_degree | 100000000 | The expect sum of degree in each batch when executing oltp algorithm. | +| rate_limit.read | 0 | The max rate(times/s) to execute query of vertices/edges. | +| rate_limit.write | 0 | The max rate(items/s) to add/update/delete vertices/edges. | +| task.schedule_period | 10 | Period time in seconds when scheduler to schedule task. | +| task.wait_timeout | 10 | Timeout in seconds for waiting for the task to complete, such as when truncating or clearing the backend. | +| task.retry | 0 | Task retry times, allowed range is [0, 3]. | +| task.input_size_limit | 16777216 | The job input size limit in bytes. | +| task.result_size_limit | 16777216 | The job result size limit in bytes. | +| task.sync_deletion | false | Whether to delete schema or expired data synchronously. | +| task.ttl_delete_batch | 1 | The batch size used to delete expired data. | +| computer.config | ./conf/computer.yaml | The config file path of computer job. | +| k8s.operator_template | ./conf/operator-template.yaml | The path of operator container template. | +| k8s.quota_template | ./conf/resource-quota-template.yaml | The path of resource quota template. | +| search.text_analyzer | ikanalyzer | Choose a text analyzer for searching the vertex/edge properties, available type are [ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer]. The shipped graph templates set `jieba`. If use 'ikanalyzer', need download jar from 'https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar' to lib directory | +| search.text_analyzer_mode | smart | Specify the mode for the text analyzer, the available mode of analyzer are {ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, NlpAnalysis], hanlp: [standard, nlp, index, nShort, shortest, speed], smartcn: [], jieba: [SEARCH, INDEX], jcseg: [Simple, Complex], mmseg4j: [Simple, Complex, MaxWord], ikanalyzer: [smart, max_word]}. | +| snowflake.datacenter_id | 0 | The datacenter id of snowflake id generator. | +| snowflake.force_string | false | Whether to force the snowflake long id to be a string. | +| snowflake.worker_id | 0 | The worker id of snowflake id generator. | +| memory.mode | off-heap | The memory mode used for query in HugeGraph. | +| memory.max_capacity | 1073741824 | The maximum memory capacity in bytes that can be managed for all queries in HugeGraph. | +| memory.one_query_max_capacity | 104857600 | The maximum memory capacity in bytes that can be managed for a query in HugeGraph. | +| memory.alignment | 8 | The alignment used for round memory size. | + +> [!DETAILS]- **Raft Config Options (Deprecated)** +> The shipped graph configuration templates mark these options as deprecated. They only take effect when +> `raft.mode=true`, and `raft.group_peers` is read from `rest-server.properties` instead of the graph file. +> +> | config option | default value | description | +> |-----------------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | raft.mode | false | Whether the backend storage works in raft mode. | +> | raft.safe_read | false | Whether to use linearly consistent read. | +> | raft.path | ./raftlog | The log path of current raft node. | +> | raft.use_replicator_pipeline | true | Whether to use replicator line, when turned on it multiple logs can be sent in parallel, and the next log doesn't have to wait for the ack message of the current log to be sent. | +> | raft.election_timeout | 10000 | Timeout in milliseconds to launch a round of election. | +> | raft.snapshot_interval | 3600 | The interval in seconds to trigger snapshot save. | +> | raft.snapshot_threads | 4 | The thread number used to do snapshot. | +> | raft.snapshot_parallel_compress | false | Whether to enable parallel compress. | +> | raft.snapshot_compress_threads | 4 | The thread number used to do snapshot compress. | +> | raft.snapshot_decompress_threads | 4 | The thread number used to do snapshot decompress. | +> | raft.backend_threads | CPUs | The thread number used to apply task to backend. | +> | raft.read_index_threads | 8 | The thread number used to execute reading index. | +> | raft.read_strategy | ReadOnlyLeaseBased | The linearizability of read strategy, allowed values are [ReadOnlyLeaseBased, ReadOnlySafe]. | +> | raft.apply_batch | 1 | The apply batch size to trigger disruptor event handler. | +> | raft.queue_size | 16384 | The disruptor buffers size for jraft RaftNode, StateMachine and LogManager. | +> | raft.queue_publish_timeout | 60 | The timeout in second when publish event into disruptor. | +> | raft.rpc_threads | max(CPUs * 2, 80) | The rpc threads for jraft RPC layer. | +> | raft.rpc_connect_timeout | 5000 | The rpc connect timeout in milliseconds for jraft rpc. | +> | raft.rpc_timeout | 60 | The general rpc timeout in seconds for jraft rpc. | +> | raft.install_snapshot_rpc_timeout | 36000 | The install snapshot rpc timeout in seconds for jraft rpc. | +> | raft.rpc_buf_low_water_mark | 10485760 | The ChannelOutboundBuffer's low water mark of netty, when buffer size less than this size, the method ChannelOutboundBuffer.isWritable() will return true, it means that low downstream pressure or good network. | +> | raft.rpc_buf_high_water_mark | 20971520 | The ChannelOutboundBuffer's high water mark of netty, only when buffer size exceed this size, the method ChannelOutboundBuffer.isWritable() will return false, it means that the downstream pressure is too great to process the request or network is very congestion, upstream needs to limit rate at this time. | ### RocksDB Backend Config Options -| config option | default value | description | -|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| backend | | Must be set to `rocksdb`. | -| serializer | | Must be set to `binary`. | -| rocksdb.data_disks | [] | The optimized disks for storing data of RocksDB. The format of each element: `STORE/TABLE: /path/disk`.Allowed keys are [g/vertex, g/edge_out, g/edge_in, g/vertex_label_index, g/edge_label_index, g/range_int_index, g/range_float_index, g/range_long_index, g/range_double_index, g/secondary_index, g/search_index, g/shard_index, g/unique_index, g/olap] | -| rocksdb.data_path | rocksdb-data/data | The path for storing data of RocksDB. | -| rocksdb.wal_path | rocksdb-data/wal | The path for storing WAL of RocksDB. | -| rocksdb.option_path | | The YAML file for configuring ToplingDB/RocksDB parameters. | -| rocksdb.open_http | false | Whether to start ToplingDB HTTP service. Security: enable only in trusted networks and restrict access (firewall/ACL); the port and document_root are configured in the YAML (http.listening_ports/document_root). | -| rocksdb.allow_mmap_reads | false | Allow the OS to mmap file for reading sst tables. | -| rocksdb.allow_mmap_writes | false | Allow the OS to mmap file for writing. | -| rocksdb.block_cache_capacity | 8388608 | The amount of block cache in bytes that will be used by RocksDB, 0 means no block cache. | -| rocksdb.bloom_filter_bits_per_key | -1 | The bits per key in bloom filter, a good value is 10, which yields a filter with ~ 1% false positive rate, -1 means no bloom filter. | -| rocksdb.bloom_filter_block_based_mode | false | Use block based filter rather than full filter. | -| rocksdb.bloom_filter_whole_key_filtering | true | True if place whole keys in the bloom filter, else place the prefix of keys. | -| rocksdb.bottommost_compression | NO_COMPRESSION | The compression algorithm for the bottommost level of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.bulkload_mode | false | Switch to the mode to bulk load data into RocksDB. | -| rocksdb.cache_index_and_filter_blocks | false | Indicating if we'd put index/filter blocks to the block cache. | -| rocksdb.compaction_style | LEVEL | Set compaction style for RocksDB: LEVEL/UNIVERSAL/FIFO. | -| rocksdb.compression | SNAPPY_COMPRESSION | The compression algorithm for compressing blocks of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.compression_per_level | [NO_COMPRESSION, NO_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION] | The compression algorithms for different levels of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | -| rocksdb.delayed_write_rate | 16777216 | The rate limit in bytes/s of user write requests when need to slow down if the compaction gets behind. | -| rocksdb.log_level | INFO | The info log level of RocksDB. | -| rocksdb.max_background_jobs | 8 | Maximum number of concurrent background jobs, including flushes and compactions. | -| rocksdb.level_compaction_dynamic_level_bytes | false | Whether to enable level_compaction_dynamic_level_bytes, if it's enabled we give max_bytes_for_level_multiplier a priority against max_bytes_for_level_base, the bytes of base level is dynamic for a more predictable LSM tree, it is useful to limit worse case space amplification. Turning this feature on/off for an existing DB can cause unexpected LSM tree structure so it's not recommended. | -| rocksdb.max_bytes_for_level_base | 536870912 | The upper-bound of the total size of level-1 files in bytes. | -| rocksdb.max_bytes_for_level_multiplier | 10.0 | The ratio between the total size of level (L+1) files and the total size of level L files for all L. | -| rocksdb.max_open_files | -1 | The maximum number of open files that can be cached by RocksDB, -1 means no limit. | -| rocksdb.max_subcompactions | 4 | The value represents the maximum number of threads per compaction job. | -| rocksdb.max_write_buffer_number | 6 | The maximum number of write buffers that are built up in memory. | -| rocksdb.max_write_buffer_number_to_maintain | 0 | The total maximum number of write buffers to maintain in memory. | -| rocksdb.min_write_buffer_number_to_merge | 2 | The minimum number of write buffers that will be merged together. | -| rocksdb.num_levels | 7 | Set the number of levels for this database. | -| rocksdb.optimize_filters_for_hits | false | This flag allows us to not store filters for the last level. | -| rocksdb.optimize_mode | true | Optimize for heavy workloads and big datasets. | -| rocksdb.pin_l0_filter_and_index_blocks_in_cache | false | Indicating if we'd put index/filter blocks to the block cache. | -| rocksdb.sst_path | | The path for ingesting SST file into RocksDB. | -| rocksdb.target_file_size_base | 67108864 | The target file size for compaction in bytes. | -| rocksdb.target_file_size_multiplier | 1 | The size ratio between a level L file and a level (L+1) file. | -| rocksdb.use_direct_io_for_flush_and_compaction | false | Enable the OS to use direct read/writes in flush and compaction. | -| rocksdb.use_direct_reads | false | Enable the OS to use direct I/O for reading sst tables. | -| rocksdb.write_buffer_size | 134217728 | Amount of data in bytes to build up in memory. | -| rocksdb.max_manifest_file_size | 104857600 | The max size of manifest file in bytes. | -| rocksdb.skip_stats_update_on_db_open | false | Whether to skip statistics update when opening the database, setting this flag true allows us to not update statistics. | -| rocksdb.max_file_opening_threads | 16 | The max number of threads used to open files. | -| rocksdb.max_total_wal_size | 0 | Total size of WAL files in bytes. Once WALs exceed this size, we will start forcing the flush of column families related, 0 means no limit. | -| rocksdb.db_write_buffer_size | 0 | Total size of write buffers in bytes across all column families, 0 means no limit. | -| rocksdb.delete_obsolete_files_period | 21600 | The periodicity in seconds when obsolete files get deleted, 0 means always do full purge. | -| rocksdb.hard_pending_compaction_bytes_limit | 274877906944 | The hard limit to impose on pending compaction in bytes. | -| rocksdb.level0_file_num_compaction_trigger | 2 | Number of files to trigger level-0 compaction. | -| rocksdb.level0_slowdown_writes_trigger | 20 | Soft limit on number of level-0 files for slowing down writes. | -| rocksdb.level0_stop_writes_trigger | 36 | Hard limit on number of level-0 files for stopping writes. | -| rocksdb.soft_pending_compaction_bytes_limit | 68719476736 | The soft limit to impose on pending compaction in bytes. | +| config option | default value | description | +|-------------------------------------------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| backend | | Must be set to `rocksdb`. | +| serializer | | Must be set to `binary`. | +| rocksdb.data_path | rocksdb-data/data | The path for storing data of RocksDB. | +| rocksdb.wal_path | rocksdb-data/wal | The path for storing WAL of RocksDB. | +| rocksdb.sst_path | | The path for ingesting SST file into RocksDB. | +| rocksdb.data_disks | [] | The optimized disks for storing data of RocksDB. The format of each element: `STORE/TABLE: /path/disk`.Allowed keys are [g/vertex, g/edge_out, g/edge_in, g/vertex_label_index, g/edge_label_index, g/range_int_index, g/range_float_index, g/range_long_index, g/range_double_index, g/secondary_index, g/search_index, g/shard_index, g/unique_index, g/olap] | +| rocksdb.log_level | INFO | The info log level of RocksDB. | +| rocksdb.num_levels | 7 | Set the number of levels for this database. | +| rocksdb.compaction_style | LEVEL | Set compaction style for RocksDB: LEVEL/UNIVERSAL/FIFO. | +| rocksdb.optimize_mode | true | Optimize for heavy workloads and big datasets. | +| rocksdb.bulkload_mode | false | Switch to the mode to bulk load data into RocksDB. | +| rocksdb.compression_per_level | [none, none, snappy, snappy, snappy, snappy, snappy] | The compression algorithms for different levels of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.bottommost_compression | none | The compression algorithm for the bottommost level of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.compression | snappy | The compression algorithm for compressing blocks of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd. | +| rocksdb.max_background_jobs | 8 | Maximum number of concurrent background jobs, including flushes and compactions. | +| rocksdb.max_subcompactions | 4 | The value represents the maximum number of threads per compaction job. | +| rocksdb.delayed_write_rate | 16777216 | The rate limit in bytes/s of user write requests when need to slow down if the compaction gets behind. | +| rocksdb.max_open_files | -1 | The maximum number of open files that can be cached by RocksDB, -1 means no limit. | +| rocksdb.max_manifest_file_size | 104857600 | The max size of manifest file in bytes. | +| rocksdb.skip_stats_update_on_db_open | false | Whether to skip statistics update when opening the database, setting this flag true allows us to not update statistics. | +| rocksdb.skip_check_sst_size_on_db_open | false | Whether to skip checking sizes of all sst files when opening the database. | +| rocksdb.max_file_opening_threads | 16 | The max number of threads used to open files. | +| rocksdb.max_total_wal_size | 0 | Total size of WAL files in bytes. Once WALs exceed this size, we will start forcing the flush of column families related, 0 means no limit. | +| rocksdb.bytes_per_sync | 0 | Allows OS to incrementally sync SST files to disk while they are being written, asynchronously in the background. Issue one request for every bytes_per_sync written. 0 turns it off. | +| rocksdb.wal_bytes_per_sync | 0 | Allows OS to incrementally sync WAL files to disk while they are being written, asynchronously in the background. Issue one request for every bytes_per_sync written. 0 turns it off. | +| rocksdb.strict_bytes_per_sync | false | When true, guarantees SST/WAL files have at most bytes_per_sync/wal_bytes_per_sync bytes submitted for writeback at any given time. This can be used to handle cases where processing speed exceeds I/O speed. | +| rocksdb.db_write_buffer_size | 0 | Total size of write buffers in bytes across all column families, 0 means no limit. | +| rocksdb.log_readahead_size | 0 | The number of bytes to prefetch when reading the log. 0 means the prefetching is disabled. | +| rocksdb.compaction_readahead_size | 0 | The number of bytes to perform bigger reads when doing compaction. If running RocksDB on spinning disks, you should set this to at least 2MB. 0 means the prefetching is disabled. | +| rocksdb.row_cache_capacity | 0 | The capacity in bytes of global cache for table-level rows. 0 means the row_cache is disabled. | +| rocksdb.delete_obsolete_files_period | 21600 | The periodicity in seconds when obsolete files get deleted, 0 means always do full purge. | +| rocksdb.write_buffer_size | 134217728 | Amount of data in bytes to build up in memory. | +| rocksdb.max_write_buffer_number | 6 | The maximum number of write buffers that are built up in memory. | +| rocksdb.min_write_buffer_number_to_merge | 2 | The minimum number of write buffers that will be merged together. | +| rocksdb.max_write_buffer_number_to_maintain | 0 | The total maximum number of write buffers to maintain in memory for conflict checking when transactions are used. | +| rocksdb.memtable_bloom_size_ratio | 0.0 | If prefix-extractor is set and memtable_bloom_size_ratio is not 0, or if memtable_whole_key_filtering is set true, create bloom filter for memtable with the size of write_buffer_size * memtable_bloom_size_ratio. If it is larger than 0.25, it is santinized to 0.25. | +| rocksdb.memtable_whole_key_filtering | false | Enable whole key bloom filter in memtable, it can potentially reduce CPU usage for point-look-ups. Note this will only take effect if memtable_bloom_size_ratio > 0. | +| rocksdb.memtable_huge_page_size | 0 | The page size for huge page TLB for bloom in memtable. If <= 0, not allocate from huge page TLB but from malloc. | +| rocksdb.inplace_update_support | false | Allows thread-safe inplace updates if a put key exists in current memtable and sizeof new value is smaller. | +| rocksdb.level_compaction_dynamic_level_bytes | false | Whether to enable level_compaction_dynamic_level_bytes, if it's enabled we give max_bytes_for_level_multiplier a priority against max_bytes_for_level_base, the bytes of base level is dynamic for a more predictable LSM tree, it is useful to limit worse case space amplification. Turning this feature on/off for an existing DB can cause unexpected LSM tree structure so it's not recommended. | +| rocksdb.max_bytes_for_level_base | 536870912 | The upper-bound of the total size of level-1 files in bytes. | +| rocksdb.max_bytes_for_level_multiplier | 10.0 | The ratio between the total size of level (L+1) files and the total size of level L files for all L. | +| rocksdb.target_file_size_base | 67108864 | The target file size for compaction in bytes. | +| rocksdb.target_file_size_multiplier | 1 | The size ratio between a level L file and a level (L+1) file. | +| rocksdb.level0_file_num_compaction_trigger | 2 | Number of files to trigger level-0 compaction. | +| rocksdb.level0_slowdown_writes_trigger | 20 | Soft limit on number of level-0 files for slowing down writes. | +| rocksdb.level0_stop_writes_trigger | 36 | Hard limit on number of level-0 files for stopping writes. | +| rocksdb.soft_pending_compaction_bytes_limit | 68719476736 | The soft limit to impose on pending compaction in bytes. | +| rocksdb.hard_pending_compaction_bytes_limit | 274877906944 | The hard limit to impose on pending compaction in bytes. | +| rocksdb.allow_mmap_writes | false | Allow the OS to mmap file for writing. | +| rocksdb.allow_mmap_reads | false | Allow the OS to mmap file for reading sst tables. | +| rocksdb.use_direct_reads | false | Enable the OS to use direct I/O for reading sst tables. | +| rocksdb.use_direct_io_for_flush_and_compaction | false | Enable the OS to use direct read/writes in flush and compaction. | +| rocksdb.use_fsync | false | If true, then every store to stable storage will issue a fsync. | +| rocksdb.atomic_flush | false | If true, flushing multiple column families and committing their results atomically to MANIFEST. Note that it's not necessary to set atomic_flush=true if WAL is always enabled. | +| rocksdb.format_version | 5 | The format version of BlockBasedTable, allowed values are 0~5. | +| rocksdb.index_type | kBinarySearch | The index type used to lookup between data blocks with the sst table, allowed values are [kBinarySearch,kHashSearch,kTwoLevelIndexSearch,kBinarySearchWithFirstKey]. | +| rocksdb.data_block_index_type | kDataBlockBinarySearch | The search type used to point lookup in data block with the sst table, allowed values are [kDataBlockBinarySearch,kDataBlockBinaryAndHash]. | +| rocksdb.data_block_hash_table_util_ratio | 0.75 | The hash table utilization ratio value of entries/buckets. It is valid only when data_block_index_type=kDataBlockBinaryAndHash. | +| rocksdb.block_size | 4096 | Approximate size of user data packed per block, Note that it corresponds to uncompressed data. | +| rocksdb.block_size_deviation | 10 | The percentage of free space used to close a block. | +| rocksdb.block_restart_interval | 16 | The block restart interval for delta encoding in blocks. | +| rocksdb.block_cache_capacity | 8388608 | The amount of block cache in bytes that will be used by RocksDB, 0 means no block cache. | +| rocksdb.cache_index_and_filter_blocks | true | Set this option true if we'd put index/filter blocks to the block cache. | +| rocksdb.pin_l0_filter_and_index_blocks_in_cache | true | Set this option true if we'd pin L0 index/filter blocks to the block cache. | +| rocksdb.bloom_filter_bits_per_key | -1 | The bits per key in bloom filter, a good value is 10, which yields a filter with ~ 1% false positive rate. Set bloom_filter_bits_per_key > 0 to enable bloom filter, -1 means no bloom filter (0~0.5 round down to no filter). | +| rocksdb.bloom_filter_block_based_mode | false | If bloom filter is enabled, set this option true to use block based filter rather than full filter. | +| rocksdb.bloom_filter_whole_key_filtering | true | If bloom filter is enabled, set this option true to place whole keys in the bloom filter, else place the prefix of keys when prefix-extractor is set. | +| rocksdb.optimize_filters_for_hits | true | If bloom filter is enabled, this flag allows us to not store filters for the last level. set this option true to optimize the filters mainly for cases where keys are found rather than also optimize for keys missed. | +| rocksdb.partition_filters_and_indexes | false | If bloom filter is enabled, set this option true to use partitioned full filters and indexes for each sst file. This option is incompatible with block-based filters. | +| rocksdb.pin_top_level_index_and_filter | true | If partition_filters_and_indexes is set true, set this option true if we'd pin top-level index of partitioned filter and index blocks to the block cache. | +| rocksdb.prefix_extractor_n_bytes | 0 | The prefix-extractor uses the first N bytes of a key as its prefix, it will use the full key when a key is shorter than the N. 0 means unset prefix-extractor. | > [!DETAILS]- **K8s Config Options (Optional)** > Corresponding configuration file `rest-server.properties` > -> | config option | default value | description | -> |------------------|-------------------------------|------------------------------------------| -> | server.use_k8s | false | Whether to enable K8s multi-tenancy mode. | -> | k8s.namespace | hugegraph-computer-system | K8s namespace for compute jobs. | -> | k8s.kubeconfig | | Path to kubeconfig file. | +> | config option | default value | description | +> |-------------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------| +> | server.use_k8s | false | Whether to use k8s to support multiple tenancy. | +> | server.deploy_in_k8s | false | Whether to deploy server in k8s. | +> | server.urls_to_pd | http://0.0.0.0:8080 | Used as the server address reserved for PD and provided to clients, only used when starting the server in k8s. | +> | server.k8s_url | https://127.0.0.1:8888 | The url of k8s. | +> | server.k8s_use_ca | false | Whether to use ca to k8s api server. | +> | server.k8s_ca | | The ca file of k8s api server. | +> | server.k8s_client_ca | | The client ca file of k8s api server. | +> | server.k8s_client_key | | The client key file of k8s api server. | +> | k8s.api | false | The k8s api start status when the computer service is enabled. | +> | k8s.namespace | hugegraph-computer-system | The namespace used for k8s work when the computer service is enabled. | +> | k8s.kubeconfig | | The k8s kube config file when the computer service is enabled. | +> | k8s.hugegraph_url | | The hugegraph url for k8s work when the computer service is enabled. | +> | k8s.enable_internal_algorithm | true | Whether to open k8s internal algorithm. | +> | service.access_pd_name | hg | Service name for server to access pd service. | +> | service.access_pd_token | | Service token for server to access pd service. | +> | server.k8s_oltp_image | 127.0.0.1/kgs_bd/hugegraphserver:3.0.0 | The oltp server image of k8s. | +> | server.k8s_olap_image | hugegraph/hugegraph-server:v1 | The olap server image of k8s. | +> | server.k8s_storage_image | hugegraph/hugegraph-server:v1 | The storage server image of k8s. | +> | server.default_oltp_k8s_namespace | hugegraph-server | The default oltp namespace for HugeGraph default graph space. | +> | server.default_olap_k8s_namespace | hugegraph-computer-system | The default olap namespace for HugeGraph default graph space. | +> | k8s.internal_algorithm | [page-rank, degree-centrality, wcc, triangle-count, rings, rings-with-filter, betweenness-centrality, closeness-centrality, lpa, links, kcore, louvain, clustering-coefficient, ppr, subgraph-match] | The names of the built-in k8s algorithms. | +> | k8s.algorithms | See `ServerOptions.K8S_ALGORITHMS` | The `name:paramsClass` mapping of the built-in k8s algorithms. | > [!DETAILS]- **Arthas Diagnostic Config Options (Optional)** > Corresponding configuration file `rest-server.properties` @@ -223,6 +335,26 @@ Basic Config Options and Backend Config Options correspond to configuration file > | arthas.ip | 0.0.0.0 | Arthas bind IP. | > | arthas.disabledCommands | jad | Disabled Arthas commands, separated by commas. | +> [!DETAILS]- **RPC Server Config Options** +> Corresponding configuration file `rest-server.properties` +> +> | config option | default value | description | +> |-----------------------------|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +> | rpc.server_host | | The hosts/ips bound by rpc server to provide services, empty value means not enabled. | +> | rpc.server_port | 8090 | The port bound by rpc server to provide services. | +> | rpc.server_adaptive_port | false | Whether the bound port is adaptive, if it's enabled, when the port is in use, automatically +1 to detect the next available port. Note that this process is not atomic, so there may still be port conflicts. | +> | rpc.server_timeout | 30 | The timeout(in seconds) of rpc server execution. | +> | rpc.remote_url | | The remote urls of rpc peers, it can be set to multiple addresses, which are concat by ',', empty value means not enabled. | +> | rpc.client_connect_timeout | 20 | The timeout(in seconds) of rpc client connect to rpc server. | +> | rpc.client_reconnect_period | 10 | The period(in seconds) of rpc client reconnect to rpc server. | +> | rpc.client_read_timeout | 40 | The timeout(in seconds) of rpc client read from rpc server. | +> | rpc.client_retries | 3 | Failed retry number of rpc client calls to rpc server. | +> | rpc.client_load_balancer | consistentHash | The rpc client uses a load-balancing algorithm to access multiple rpc servers in one cluster. Default value is 'consistentHash', means forwarding by request parameters. | +> | rpc.protocol | bolt | Rpc communication protocol, client and server need to be specified the same value. | +> | rpc.serialization | hessian2 | Rpc serialization type, client and server must set the same value. Note: If you choose 'protobuf', you need to add the relative IDL file. (Could refer PD/Store *.proto) | +> | rpc.config_order | 999 | Sofa-RPC configuration file loading order, the larger the more later loading. | +> | rpc.logger_impl | com.alipay.sofa.rpc.log.SLF4JLoggerImpl | Sofa-RPC log implementation class. | + > [!DETAILS]- **HBase Backend Config Options** > | config option | default value | description | > |---------------------------|--------------------------------|--------------------------------------------------------------------------| @@ -233,11 +365,12 @@ Basic Config Options and Backend Config Options correspond to configuration file > | hbase.threads_max | 64 | The max threads num of hbase connections. | > | hbase.znode_parent | /hbase | The znode parent path of HBase zookeeper. | > | hbase.zk_retry | 3 | The recovery retry times of HBase zookeeper. | +> | hbase.truncate_timeout | 30 | The timeout in seconds of waiting for store truncate. | > | hbase.aggregation_timeout | 43200 | The timeout in seconds of waiting for aggregation. | > | hbase.kerberos_enable | false | Is Kerberos authentication enabled for HBase. | > | hbase.kerberos_keytab | | The HBase's key tab file for kerberos authentication. | > | hbase.kerberos_principal | | The HBase's principal for kerberos authentication. | -> | hbase.krb5_conf | etc/krb5.conf | Kerberos configuration file, including KDC IP, default realm, etc. | +> | hbase.krb5_conf | /etc/krb5.conf | Kerberos configuration file, including KDC IP, default realm, etc. | > | hbase.hbase_site | /etc/hbase/conf/hbase-site.xml | The HBase's configuration file | > | hbase.enable_partition | true | Is pre-split partitions enabled for HBase. | > | hbase.vertex_partitions | 10 | The number of partitions of the HBase vertex table. | diff --git a/content/en/docs/guides/custom-plugin.md b/content/en/docs/guides/custom-plugin.md index af3acb141..c05f8c72b 100644 --- a/content/en/docs/guides/custom-plugin.md +++ b/content/en/docs/guides/custom-plugin.md @@ -8,8 +8,8 @@ weight: 3 1. HugeGraph is not only open source and open, but also simple and easy to use. General users can easily add plug-in extension functions without changing the source code. 2. HugeGraph supports a variety of built-in storage backends, and also allows users to extend custom backends without changing the existing source code. -3. HugeGraph supports full-text search. The full-text search function involves word segmentation in various languages. Currently, there are 8 built-in Chinese word -breakers, and it also allows users to expand custom word breakers without changing the existing source code. +3. HugeGraph supports full-text search. The full-text search function involves word segmentation in various languages. Currently, there are 7 built-in word +breakers (ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer), and it also allows users to expand custom word breakers without changing the existing source code. ### Scalable dimension @@ -23,7 +23,7 @@ Currently, the plug-in method provides extensions in the following dimensions: ### Plug-in implementation mechanism 1. HugeGraph provides a plug-in interface HugeGraphPlugin, which supports plug-in through the Java SPI mechanism -2. HugeGraph provides four extension registration functions: registerOptions(), registerBackend(), registerSerializer(),registerAnalyzer() +2. HugeGraph provides four extension registration functions as static methods on HugeGraphPlugin: registerOptions(), registerBackend(), registerSerializer(), registerAnalyzer() 3. The plug-in implementer implements the corresponding Options, Backend, Serializer or Analyzer interface 4. The plug-in implementer implements register()the method of the HugeGraphPlugin interface, registers the specific implementation class listed in the above point 3 in this method, and packs it into a jar package @@ -85,13 +85,18 @@ public class RocksDBStoreProvider extends AbstractBackendStoreProvider { } @Override - protected BackendStore newSchemaStore(String store) { - return new RocksDBSchemaStore(this, this.database(), store); + protected BackendStore newSchemaStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBSchemaStore(this, this.database(), store); } @Override - protected BackendStore newGraphStore(String store) { - return new RocksDBGraphStore(this, this.database(), store); + protected BackendStore newGraphStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBGraphStore(this, this.database(), store); + } + + @Override + protected BackendStore newSystemStore(HugeConfig config, String store) { + return new RocksDBStore.RocksDBSystemStore(this, this.database(), store); } @Override @@ -100,8 +105,8 @@ public class RocksDBStoreProvider extends AbstractBackendStoreProvider { } @Override - public String version() { - return "1.0"; + public String driverVersion() { + return "1.11"; } } ``` @@ -113,41 +118,59 @@ The BackendStore interface is defined as follows: ```java public interface BackendStore { // Store name - public String store(); + String store(); + + // Stored version + String storedVersion(); // Database name - public String database(); + String database(); // Get the parent provider - public BackendStoreProvider provider(); + BackendStoreProvider provider(); + + // Get the system schema store + SystemSchemaStore systemSchemaStore(); + + // Whether it is the storage of schema + boolean isSchemaStore(); // Open/close database - public void open(HugeConfig config); - public void close(); + void open(HugeConfig config); + void close(); + boolean opened(); // Initialize/clear database - public void init(); - public void clear(); + void init(); + void clear(boolean clearSpace); + boolean initialized(); + + // Delete all data of database (keep table structure) + void truncate(); // Add/delete data - public void mutate(BackendMutation mutation); + void mutate(BackendMutation mutation); // Query data - public Iterator query(Query query); + Iterator query(Query query); + Number queryNumber(Query query); // Transaction - public void beginTx(); - public void commitTx(); - public void rollbackTx(); + void beginTx(); + void commitTx(); + void rollbackTx(); // Get metadata by key - public R metadata(HugeType type, String meta, Object[] args); + R metadata(HugeType type, String meta, Object[] args); // Backend features - public BackendFeatures features(); + BackendFeatures features(); - // Generate an id for a specific type - public Id nextId(HugeType type); + // Increase next id for specific type + void increaseCounter(HugeType type, long increment); + + // Get current counter for a specific type + long getCounter(HugeType type); } ``` @@ -158,27 +181,29 @@ The serializer must inherit the abstract class: `org.apache.hugegraph.backend.se ```java public interface GraphSerializer { - public BackendEntry writeVertex(HugeVertex vertex); - public BackendEntry writeVertexProperty(HugeVertexProperty prop); - public HugeVertex readVertex(HugeGraph graph, BackendEntry entry); - public BackendEntry writeEdge(HugeEdge edge); - public BackendEntry writeEdgeProperty(HugeEdgeProperty prop); - public HugeEdge readEdge(HugeGraph graph, BackendEntry entry); - public BackendEntry writeIndex(HugeIndex index); - public HugeIndex readIndex(HugeGraph graph, ConditionQuery query, BackendEntry entry); - public BackendEntry writeId(HugeType type, Id id); - public Query writeQuery(Query query); + BackendEntry writeVertex(HugeVertex vertex); + BackendEntry writeOlapVertex(HugeVertex vertex); + BackendEntry writeVertexProperty(HugeVertexProperty prop); + HugeVertex readVertex(HugeGraph graph, BackendEntry entry); + BackendEntry writeEdge(HugeEdge edge); + BackendEntry writeEdgeProperty(HugeEdgeProperty prop); + HugeEdge readEdge(HugeGraph graph, BackendEntry entry); + CIter readEdges(HugeGraph graph, BackendEntry bytesEntry); + BackendEntry writeIndex(HugeIndex index); + HugeIndex readIndex(HugeGraph graph, ConditionQuery query, BackendEntry entry); + BackendEntry writeId(HugeType type, Id id); + Query writeQuery(Query query); } public interface SchemaSerializer { - public BackendEntry writeVertexLabel(VertexLabel vertexLabel); - public VertexLabel readVertexLabel(HugeGraph graph, BackendEntry entry); - public BackendEntry writeEdgeLabel(EdgeLabel edgeLabel); - public EdgeLabel readEdgeLabel(HugeGraph graph, BackendEntry entry); - public BackendEntry writePropertyKey(PropertyKey propertyKey); - public PropertyKey readPropertyKey(HugeGraph graph, BackendEntry entry); - public BackendEntry writeIndexLabel(IndexLabel indexLabel); - public IndexLabel readIndexLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writeVertexLabel(VertexLabel vertexLabel); + VertexLabel readVertexLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writeEdgeLabel(EdgeLabel edgeLabel); + EdgeLabel readEdgeLabel(HugeGraph graph, BackendEntry entry); + BackendEntry writePropertyKey(PropertyKey propertyKey); + PropertyKey readPropertyKey(HugeGraph graph, BackendEntry entry); + BackendEntry writeIndexLabel(IndexLabel indexLabel); + IndexLabel readIndexLabel(HugeGraph graph, BackendEntry entry); } ``` @@ -214,7 +239,7 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.data_path", "The path for storing data of RocksDB.", disallowEmpty(), - "rocksdb-data" + "rocksdb-data/data" ); public static final ConfigOption WAL_PATH = @@ -222,7 +247,7 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.wal_path", "The path for storing WAL of RocksDB.", disallowEmpty(), - "rocksdb-data" + "rocksdb-data/wal" ); public static final ConfigListOption DATA_DISKS = @@ -230,9 +255,13 @@ public class RocksDBOptions extends OptionHolder { "rocksdb.data_disks", false, "The optimized disks for storing data of RocksDB. " + - "The format of each element: `STORE/TABLE: /path/to/disk`." + - "Allowed keys are [graph/vertex, graph/edge_out, graph/edge_in, " + - "graph/secondary_index, graph/range_index]", + "The format of each element: `STORE/TABLE: /path/disk`." + + "Allowed keys are [g/vertex, g/edge_out, g/edge_in, " + + "g/vertex_label_index, g/edge_label_index, " + + "g/range_int_index, g/range_float_index, " + + "g/range_long_index, g/range_double_index, " + + "g/secondary_index, g/search_index, g/shard_index, " + + "g/unique_index, g/olap]", null, String.class, ImmutableList.of() @@ -270,13 +299,13 @@ items defined above inside it. The interface `org.apache.hugegraph.plugin.HugeGr ```java public interface HugeGraphPlugin { - public String name(); + String name(); - public void register(); + void register(); - public String supportsMinVersion(); + String supportsMinVersion(); - public String supportsMaxVersion(); + String supportsMaxVersion(); } ``` @@ -304,6 +333,16 @@ public class DemoPlugin implements HugeGraphPlugin { public void register() { HugeGraphPlugin.registerAnalyzer("demo", SpaceAnalyzer.class.getName()); } + + @Override + public String supportsMinVersion() { + return "1.7.0"; + } + + @Override + public String supportsMaxVersion() { + return "1.8.0"; + } } ``` diff --git a/content/en/docs/guides/desgin-concept.md b/content/en/docs/guides/desgin-concept.md index ddbffefef..6a9048a9c 100644 --- a/content/en/docs/guides/desgin-concept.md +++ b/content/en/docs/guides/desgin-concept.md @@ -36,12 +36,13 @@ analysis, so EdgeCut is suitable for OLTP graph query, and VertexCut is more sui ### 3. VertexId Strategy -Vertex of HugeGraph supports three ID strategies. Different VertexLabels in the same graph database can use different Id strategies. Currently, the Id strategies +Vertex of HugeGraph supports four ID strategies. Different VertexLabels in the same graph database can use different Id strategies. Currently, the Id strategies supported by HugeGraph are: - Automatic generation (AUTOMATIC): Use the Snowflake algorithm to automatically generate a globally unique Id, Long type; - Primary Key (PRIMARY_KEY): Generate Id through VertexLabel+PrimaryKeyValues, String type; - Custom (CUSTOMIZE_STRING|CUSTOMIZE_NUMBER): User-defined Id, which is divided into two types: String and Long, and you need to ensure the uniqueness of the Id yourself; +- Custom UUID (CUSTOMIZE_UUID): User-defined Id in UUID form, you need to ensure the uniqueness of the Id yourself; The default Id policy is AUTOMATIC, if the user calls the primaryKeys() method and sets the correct PrimaryKeys, the PRIMARY_KEY policy is automatically enabled. After enabling the PRIMARY_KEY strategy, HugeGraph can implement data deduplication based on PrimaryKeys. @@ -83,6 +84,15 @@ schema.vertexLabel("person") graph.addVertex(T.label, "person", T.id, 123456, "name", "marko","age", 18, "city", "Beijing"); ``` + 5. CUSTOMIZE_UUID ID Policy + ```java +schema.vertexLabel("person") + .useCustomizeUuidId() + .properties("name", "age", "city") + .create(); +graph.addVertex(T.label, "person", T.id, UUID.randomUUID(), "name", "marko","age", 18, "city", "Beijing"); + ``` + If users need Vertex deduplication, there are three options: 1. Adopt PRIMARY_KEY strategy, automatic overwriting, suitable for batch insertion of large amount of data, users cannot know whether overwriting has occurred @@ -92,16 +102,16 @@ If users need Vertex deduplication, there are three options: ### 4. EdgeId policy The EdgeId of HugeGraph is composed of `srcVertexId` + `edgeLabel` + `sortKey` + `tgtVertexId`. Among them `sortKey` is an important concept of HugeGraph. -There are two reasons for adding Edge sortKeyas the unique ID of Edge: +There are two reasons for adding `sortKey` to Edge as the unique ID of Edge: -1. If there are multiple edges of the same Label between two vertices, they can be sortKeydistinguished by -2. For SuperNode nodes, it can be sortKeysorted and truncated by. +1. If there are multiple edges of the same Label between two vertices, they can be distinguished by `sortKey` +2. For SuperNode nodes, edges can be sorted and truncated by `sortKey`. Since EdgeId is composed of `srcVertexId` + `edgeLabel` + `sortKey` + `tgtVertexId`, HugeGraph will automatically overwrite when the same Edge is inserted multiple times to achieve deduplication. It should be noted that the properties of Edge will also be overwritten in the batch insert mode. In addition, because HugeGraph's EdgeId adopts an automatic deduplication strategy, HugeGraph considers that there is only one edge in the case of self-loop -(a vertex has an edge pointing to itself). The graph has two edges. +(a vertex has an edge pointing to itself), while a graph database that uses the AUTOMATIC strategy (TitanDB for example) considers that the graph has two edges. > The edges of HugeGraph only support directed edges, and undirected edges can be realized by creating two edges, Out and In. @@ -109,9 +119,9 @@ In addition, because HugeGraph's EdgeId adopts an automatic deduplication strate ##### TinkerPop transaction overview -A TinkerPop transaction refers to a unit of work that performs operations on the database. A set of operations within a transaction either succeeds or all fail. For a detailed introduction, please refer to the official documentation of TinkerPop: http://tinkerpop.apache.org/docs/current/reference/#transactions:http://tinkerpop.apache.org/docs/current/reference/#transactions +A TinkerPop transaction refers to a unit of work that performs operations on the database. A set of operations within a transaction either succeeds or all fail. For a detailed introduction, please refer to the official documentation of TinkerPop: http://tinkerpop.apache.org/docs/current/reference/#transactions -##### TinkerPop transaction overview +##### TinkerPop transaction interfaces - open open transaction - commit commit transaction @@ -206,7 +216,7 @@ Example: One transaction cannot read another transaction's uncommitted content - The server internally realizes isolation by binding transactions to threads (ThreadLocal) - The uncommitted content of this transaction overwrites the old data in chronological order for this transaction to query the latest version of data -- The bottom layer relies on the back-end database to ensure transaction atomicity (for example, the batch interface of Cassandra/RocksDB guarantees atomicity) +- The bottom layer relies on the back-end database to ensure transaction atomicity (for example, the batch interface of RocksDB guarantees atomicity) ###### Notice diff --git a/content/en/docs/guides/faq.md b/content/en/docs/guides/faq.md index bec8fb40d..fdd2be441 100644 --- a/content/en/docs/guides/faq.md +++ b/content/en/docs/guides/faq.md @@ -22,7 +22,7 @@ weight: 6 - Do all backends need to be executed before use init-store, and can the serialization options be filled in at will? - Memory and HStore do not use `init-store`; persistent local backends such as RocksDB and HBase must be initialized before first use. The serializer must match the backend—for example, RocksDB uses `binary`. + Memory and HStore do not use `init-store`; persistent local backends such as RocksDB and HBase must be initialized before first use. The serializer must match the backend, for example RocksDB uses `binary`. - Execution `init-store` error: ```Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni3226083071221514754.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.10' not found (required by /tmp/librocksdbjni3226083071221514754.so)``` @@ -75,15 +75,15 @@ weight: 6 - How to delete all data from a graph - An administrator can call `DELETE /graphspaces/{graphspace}/graphs/{graph}/clear`. The request must include the `confirm_message` required by the source code; see the [Graph API](../clients/restful-api/graphs) for the exact format. This operation removes schemas, vertices, edges, and indexes. + An administrator can call `DELETE /graphspaces/{graphspace}/graphs/{graph}/clear?confirm_message=I'm sure to delete all data`. The `confirm_message` query parameter must match that value exactly, otherwise the request is rejected. See the [Graph API](../clients/restful-api/graphs) for details. This operation removes schemas, vertices, edges, and indexes. - The database has been cleared and `init-store` has been executed, but when trying to add a schema, the prompt "xxx has existed" appeared. There is a cache in the `HugeGraphServer`, and it is necessary to restart the `Server` when the database is cleared, otherwise the residual cache will be inconsistent. -- An error is reported during the process of inserting vertices or edges: `Id max length is 128, but got xxx {yyy}` or `Big id max length is 32768, but got xxx` +- An error is reported during the process of inserting vertices or edges: `The max length of vertex id is 16384, but got xxx {yyy}` or `The max length of edge id is 65536, but got xxx {yyy}` - In order to ensure query performance, the current backend storage limits the length of the id column. The vertex id cannot exceed 128 bytes, the edge id cannot exceed 32768 bytes, and the index id cannot exceed 128 bytes. + In order to ensure query performance, the current backend storage limits the length of the id column. The vertex id cannot exceed 16384 bytes and the edge id cannot exceed 65536 bytes. An index id longer than 32 bytes is stored as a hash instead of being rejected. - Is there support for nested attributes, and if not, are there any alternatives? @@ -91,7 +91,7 @@ weight: 6 - Can an `EdgeLabel` connect multiple pairs of `VertexLabel`, such as "investment" relationship, which can be "individual" investing in "enterprise", or "enterprise" investing in "enterprise"? - An `EdgeLabel` does not support connecting multiple pairs of `VertexLabels`, users need to split the `EdgeLabel` into finer details, such as: "personal investment", "enterprise investment". + Yes. Call `link(sourceLabel, targetLabel)` once per pair when building the `EdgeLabel`; every pair is kept, so one "investment" label can cover both "individual" to "enterprise" and "enterprise" to "enterprise". The older `sourceLabel()` and `targetLabel()` builder methods are deprecated and accept only a single pair. - Prompt `HTTP 415 Unsupported Media Type` when sending a request through `RestAPI` diff --git a/content/en/docs/language/hugegraph-example.md b/content/en/docs/language/hugegraph-example.md index a0415029c..19510fc1b 100644 --- a/content/en/docs/language/hugegraph-example.md +++ b/content/en/docs/language/hugegraph-example.md @@ -46,12 +46,13 @@ There are six types of relationships: father, mother, brother, battled, lives, a | father | edge | character | character | - | | mother | edge | character | character | - | | brother | edge | character | character | - | +| battled | edge | character | character | time | | pet | edge | character | character | - | | lives | edge | character | location | reason | -In HugeGraph, each edge label can only act on one pair of source and target vertex labels. In other words, if a relationship called "father" is defined in the graph to connect character to character, then "father" cannot be used to connect to other vertex labels. +An edge label can be linked to more than one pair of source and target vertex labels: call `link(sourceLabel, targetLabel)` once per pair when creating it. The deprecated `sourceLabel()` and `targetLabel()` builder methods accept only a single pair. -Therefore, in this example, the original TitanDB's monster, god, human, and demigod are all represented using the same `vertex label: character` in HugeGraph, with an additional `type` attribute to indicate the type of character. The `edge labels` remain consistent with the original TitanDB. Of course, to satisfy the `edge label` constraints, adjustments can be made to the `name` of the `edge label`. +In this example, the original TitanDB's monster, god, human, and demigod are all represented using the same `vertex label: character` in HugeGraph, with an additional `type` attribute to indicate the type of character. The `edge labels` remain consistent with the original TitanDB. ### 2 Graph Schema and Data Ingest Examples @@ -118,7 +119,7 @@ cerberus.addEdge("lives", tartarus) #### 2.3 Indices -HugeGraph by default automatically generates IDs. However, if a user specifies the `primaryKeys` field list for a `VertexLabel` through `primaryKeys`, the ID strategy for that `VertexLabel` will automatically switch to the `primaryKeys` strategy. Once the `primaryKeys` strategy is enabled, HugeGraph generates `VertexId` by concatenating `vertexLabel+primaryKeys`, which allows for automatic deduplication. Additionally, there is no need to create extra indexes to use the properties in `primaryKeys` for fast querying. For example, both "character" and "location" have the `primaryKeys("name")` attribute, so without creating additional indexes, vertices can be queried using `g.V().hasLabel('character') .has('name','hercules')`. +HugeGraph by default automatically generates IDs. However, if a user specifies the `primaryKeys` field list for a `VertexLabel` through `primaryKeys`, the ID strategy for that `VertexLabel` will automatically switch to the `primaryKeys` strategy. Once the `primaryKeys` strategy is enabled, HugeGraph generates `VertexId` by concatenating `vertexLabel+primaryKeys`, which allows for automatic deduplication. Additionally, there is no need to create extra indexes to use the properties in `primaryKeys` for fast querying. For example, both "character" and "location" have the `primaryKeys("name")` attribute, so without creating additional indexes, vertices can be queried using `g.V().hasLabel('character').has('name','hercules')`. ### 3 Graph Traversal Examples @@ -158,7 +159,7 @@ g.V().hasLabel('character').has('name','pluto').out('lives').in('lives').values( ```groovy pluto = g.V().hasLabel('character').has('name', 'pluto') -g.V(pluto).out('lives').in('lives').where(is(neq(pluto)).values('name') +g.V(pluto).out('lives').in('lives').where(is(neq(pluto))).values('name') // use 'as' g.V().hasLabel('character').has('name', 'pluto').as('x').out('lives').in('lives').where(neq('x')).values('name') diff --git a/content/en/docs/language/hugegraph-gremlin.md b/content/en/docs/language/hugegraph-gremlin.md index 5349f11bd..a8e37671e 100644 --- a/content/en/docs/language/hugegraph-gremlin.md +++ b/content/en/docs/language/hugegraph-gremlin.md @@ -30,17 +30,17 @@ The table below lists the support status of various TinkerPop features in HugeGr | Name | Description | Support | |--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| -| UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | false | +| UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | true | | NumericIds | Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | UuidIds | Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | AnyIds | Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}. | false | | AddProperty | Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting "data types" and refers to support of calls to {@link Element#property(String, Object)}. | true | | RemoveProperty | Determines if an {@link Element} allows properties to be removed. | true | | AddVertices | Determines if a {@link Vertex} can be added to the {@code Graph}. | true | -| MultiProperties | Determines if a {@link Vertex} can support multiple properties with the same key. | false | -| DuplicateMultiProperties | Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method, just returns what {@link #supportsMultiProperties()} returns. | false | +| MultiProperties | Determines if a {@link Vertex} can support multiple properties with the same key. | true | +| DuplicateMultiProperties | Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method, just returns what {@link #supportsMultiProperties()} returns. | true | | MetaProperties | Determines if a {@link Vertex} can support properties on vertex properties. It is assumed that a graph will support all the same data types for meta-properties that are supported for regular properties. | false | | RemoveVertices | Determines if a {@link Vertex} can be removed from the {@code Graph}. | true | @@ -50,9 +50,9 @@ The table below lists the support status of various TinkerPop features in HugeGr |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| | UserSuppliedIds | Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept. | false | | NumericIds | Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| StringIds | Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | UuidIds | Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | -| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | false | +| CustomIds | Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB's {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. | true | | AnyIds | Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}. | false | | AddProperty | Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting "data types" and refers to support of calls to {@link Element#property(String, Object)}. | true | | RemoveProperty | Determines if an {@link Element} allows properties to be removed. | true | @@ -80,7 +80,7 @@ The table below lists the support status of various TinkerPop features in HugeGr | SerializableValues | | false | | StringArrayValues | | false | | StringValues | | true | -| UniformListValues | Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is "uniform" it must contain objects of the same type. | false | +| UniformListValues | Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is "uniform" it must contain objects of the same type. | true | ### Gremlin Steps @@ -90,12 +90,12 @@ HugeGraph supports all steps of Gremlin. For complete reference information abou |------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------| | addE | Add an edge between two vertices. | [addE step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | | addV | add vertices to graph. | [addV step](http://tinkerpop.apache.org/docs/current/reference/#addvertex-step) | -| and | Make sure all traversals return values. | [and step](http://tinkerpop.apache.org/docs/current/reference/#add-step) | +| and | Make sure all traversals return values. | [and step](http://tinkerpop.apache.org/docs/current/reference/#and-step) | | as | Step modulator for assigning variables to the step's output. | [as step](http://tinkerpop.apache.org/docs/current/reference/#as-step) | | by | Step Modulators used in conjunction with group and order. | [by step](http://tinkerpop.apache.org/docs/current/reference/#by-step) | | coalesce | Returns the first traversal that returns a result. | [coalesce step](http://tinkerpop.apache.org/docs/current/reference/#coalesce-step) | | constant | Returns a constant value. Used in conjunction with coalesce. | [constant step](http://tinkerpop.apache.org/docs/current/reference/#constant-step) | -| count | Returns a count from the traversal. | [count step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | +| count | Returns a count from the traversal. | [count step](http://tinkerpop.apache.org/docs/current/reference/#count-step) | | dedup | Returns values with duplicates removed. | [dedup step](http://tinkerpop.apache.org/docs/current/reference/#dedup-step) | | drop | Discards a value (vertex/edge). | [drop step](http://tinkerpop.apache.org/docs/current/reference/#drop-step) | | fold | Acts as a barrier for computing aggregated values from results. | [fold step](http://tinkerpop.apache.org/docs/current/reference/#fold-step) | @@ -109,16 +109,16 @@ HugeGraph supports all steps of Gremlin. For complete reference information abou | optional | Returns the result of a specified traversal if it generates any results, otherwise returns the calling element. | [optional step](http://tinkerpop.apache.org/docs/current/reference/#optional-step) | | or | Ensures that at least one traversal returns a value. | [or step](http://tinkerpop.apache.org/docs/current/reference/#or-step) | | order | Returns results in the specified order. | [order step](http://tinkerpop.apache.org/docs/current/reference/#order-step) | -| path | Returns the full path of the traversal. | [path step](http://tinkerpop.apache.org/docs/current/reference/#addedge-step) | +| path | Returns the full path of the traversal. | [path step](http://tinkerpop.apache.org/docs/current/reference/#path-step) | | project | Projects properties as a map. | [project step](http://tinkerpop.apache.org/docs/current/reference/#project-step) | | properties | Returns properties with specified labels. | [properties step](http://tinkerpop.apache.org/docs/current/reference/#properties-step) | | range | Filters based on a specified range of values. | [range step](http://tinkerpop.apache.org/docs/current/reference/#range-step) | | repeat | Repeats a step a specified number of times. Used for looping. | [repeat step](http://tinkerpop.apache.org/docs/current/reference/#repeat-step) | | sample | Used to sample results returned by the traversal. | [sample step](http://tinkerpop.apache.org/docs/current/reference/#sample-step) | | select | Used to project the results returned by the traversal. | [select step](http://tinkerpop.apache.org/docs/current/reference/#select-step) | -| store | This step is used fo.r non-blocking aggregation of results returned by traversal | [store step](http://tinkerpop.apache.org/docs/current/reference/#store-step) | -| tree | Aggregate the paths in vertices into a tree. | [tree step](http://tinkerpop.apac.he.org/docs/current/reference/#tree-step) | -| unfold | Unfolds an iterator as a step. | [unfold step](http://tinkerpop.apache.org/docs/c.urrent/reference/#unfold-step) | +| store | This step is used for non-blocking aggregation of results returned by traversal | [store step](http://tinkerpop.apache.org/docs/current/reference/#store-step) | +| tree | Aggregate the paths in vertices into a tree. | [tree step](http://tinkerpop.apache.org/docs/current/reference/#tree-step) | +| unfold | Unfolds an iterator as a step. | [unfold step](http://tinkerpop.apache.org/docs/current/reference/#unfold-step) | | union | Merge the results returned by multiple traversals. | [union step](http://tinkerpop.apache.org/docs/current/reference/#union-step) | -| V | These are the steps required for traversing between vertices and edges: `V`, `E`, `out`, `in`, `both`, `outE`, `inE`, `bothE`, `outV`, `inV`, `bothV`, and `otherV`. | [order step](http://tinkerpop.apache.org/docs/current/reference/#vertex-steps) | +| V | These are the steps required for traversing between vertices and edges: `V`, `E`, `out`, `in`, `both`, `outE`, `inE`, `bothE`, `outV`, `inV`, `bothV`, and `otherV`. | [vertex steps](http://tinkerpop.apache.org/docs/current/reference/#vertex-steps) | | where | Used to filter the results returned by a traversal. Supports `eq`, `neq`, `lt`, `lte`, `gt`, `gte`, and `between` operators. | [where step](http://tinkerpop.apache.org/docs/current/reference/#where-step) |