CONFIGS 语法

显示配置

SHOW CONFIGS [graph|storage]

例如

nebula> SHOW CONFIGS;
=========================================================================
| module  | name                              | type   | mode    | value
=========================================================================
| GRAPH   | v                                 | INT64  | MUTABLE | 0
-------------------------------------------------------------------------
| GRAPH   | minloglevel                       | INT64  | MUTABLE | 0
-------------------------------------------------------------------------
...

获取变量

GET CONFIGS [graph|storage :] <var>

例如

nebula> GET CONFIGS storage:v;
============================================
| module  | name | type  | mode    | value |
============================================
| STORAGE | v    | INT64 | MUTABLE | 0     |
--------------------------------------------

更新变量

UPDATE CONFIGS [graph|storage :] <var> = <value>

更新的变量将持久化在 meta service 中。 如果配置模式为 MUTABLE,则更改将立即生效。 部分 RocksDB 参数需重启才会生效。 支持在 UPDATE CONFIGS 中使用算术计算。

例如:

nebula> UPDATE CONFIGS storage:heartbeat_interval_secs=1;
nebula> GET CONFIGS storage:heartbeat_interval_secs;
===============================================================
| module  | name                    | type  | mode    | value |
===============================================================
| STORAGE | heartbeat_interval_secs | INT64 | MUTABLE | 1     |
---------------------------------------------------------------

nebula> UPDATE CONFIGS storage:rocksdb_column_family_options = {max_bytes_for_level_base=268435456, max_write_buffer_number=4, disable_auto_compactions=true, write_buffer_size=67108864};
nebula> Get CONFIGS storage:rocksdb_column_family_options;
====================================================================================================================================================================================================================
| module  | name                          | type   | mode    |                                    value                                                                           
====================================================================================================================================================================================================================
| STORAGE | rocksdb_column_family_options | NESTED | MUTABLE | { "max_write_buffer_number": "4", "max_bytes_for_level_base": "268435456", "write_buffer_size": "67108864", "disable_auto_compactions": "true" }     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------