CONFIG Syntax¶
Introduction to Configuration¶
Nebula Graph gets configuration from meta by default. If you want to get configuration locally, please add the --local_config=true
option in the configuration files metad.conf
, storaged.conf
, graphd.conf
(directory is /home/user/nebula/build/install/etc
) respectively.
NOTE:
- Configuration precedence: meta > console > environment variable > configuration files.
- If set
--local_config
to true, the configuration files take precedence.- Restart the services after changing the configuration files to take effect.
- Configuration changes in console take effect in real time.
SHOW CONFIGS¶
SHOW CONFIGS [graph|meta|storage]
For example:
nebula> SHOW CONFIGS meta;
============================================================================================================================
| module | name | type | mode | value |
============================================================================================================================
| META | v | INT64 | IMMUTABLE | 4 |
----------------------------------------------------------------------------------------------------------------------------
| META | help | BOOL | IMMUTABLE | False |
----------------------------------------------------------------------------------------------------------------------------
| META | port | INT64 | IMMUTABLE | 45500 |
----------------------------------------------------------------------------------------------------------------------------
GET CONFIGS¶
GET CONFIGS [graph|meta|storage :] var
For example
nebula> GET CONFIGS storage:local_ip;
=======================================================
| module | name | type | mode | value |
=======================================================
| STORAGE | local_ip | STRING | IMMUTABLE | 127.0.0.1 |
-------------------------------------------------------
nebula> GET CONFIGS heartbeat_interval_secs;
=================================================================
| module | name | type | mode | value |
=================================================================
| GRAPH | heartbeat_interval_secs | INT64 | MUTABLE | 10 |
-----------------------------------------------------------------
| STORAGE | heartbeat_interval_secs | INT64 | MUTABLE | 10 |
-----------------------------------------------------------------
UPDATE CONFIGS¶
UPDATE CONFIGS [graph|meta|storage :] var = value
The updated CONFIGS will be stored into the
meta service
permanently. If the configuration's mode isMUTABLE
, the change will take effect immediately. The configurations of some RocksDB parameters take effect after the services are restarted. Expressions are supported in theUPDATE CONFIGS
command.
For example:
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 |
---------------------------------------------------------------