diff --git a/.gitignore b/.gitignore index 52161aec9c2..55deeb9c1ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ site/ *.DS_Store - +*.diff diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md index 0ab9b829ce1..fa20beaacd7 100644 --- a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md @@ -430,7 +430,7 @@ ## Operation and maintenance statements -* [BALANCE](../synchronization-and-migration/2.balance-syntax.md) +* [SUBMIT JOB BALANCE](../synchronization-and-migration/2.balance-syntax.md) |Syntax|Description| |-|-| diff --git a/docs-2.0/3.ngql-guide/4.job-statements.md b/docs-2.0/3.ngql-guide/4.job-statements.md index 4561146cff8..af4547896b0 100644 --- a/docs-2.0/3.ngql-guide/4.job-statements.md +++ b/docs-2.0/3.ngql-guide/4.job-statements.md @@ -33,6 +33,25 @@ nebula> SUBMIT JOB BALANCE DATA; +------------+ ``` +## SUBMIT JOB BALANCE DATA REMOVE + +!!! enterpriseonly + + Only available for the NebulaGraph Enterprise Edition. + +Starts a job to balance the distribution of storage partitions in the current graph space. The default port is `9779`. It returns the job ID. + +For example: + +```ngql +nebula> SUBMIT JOB BALANCE DATA REMOVE 192.168.8.100:9779; ++------------+ +| New Job Id | ++------------+ +| 29 | ++------------+ +``` + {{ ent.ent_end }} ## Balance leader distribution -To balance the raft leaders, run `BALANCE LEADER`. +To balance the raft leaders, run `SUBMIT JOB BALANCE LEADER`. ### Example ```ngql -nebula> BALANCE LEADER; +nebula> SUBMIT JOB BALANCE LEADER; ``` Run `SHOW HOSTS` to check the balance result. diff --git a/docs-2.0/synchronization-and-migration/2.balance-syntax.md b/docs-2.0/synchronization-and-migration/2.balance-syntax.md index 94a1dc6b53c..5207ea3c781 100644 --- a/docs-2.0/synchronization-and-migration/2.balance-syntax.md +++ b/docs-2.0/synchronization-and-migration/2.balance-syntax.md @@ -1,22 +1,29 @@ # BALANCE syntax -The `BALANCE` statements support the load balancing operations of the NebulaGraph Storage services. For more information about storage load balancing and examples for using the `BALANCE` statements, see [Storage load balance](../8.service-tuning/load-balance.md). +We can submit tasks to load balance Storage services in NebulaGraph. For more information about storage load balancing and examples, see [Storage load balance](../8.service-tuning/load-balance.md). -The `BALANCE` statements are listed as follows. +The syntax for load balance is described as follows. + +{{ comm.comm_begin }} + +|Syntax|Description| +|:---|:---| +|`BALANCE LEADER`| Starts a job to balance the distribution of all the storage leaders in graph spaces. It returns the job ID. | + +{{ comm.comm_end }} + +{{ ent.ent_begin }} |Syntax|Description| |:---|:---| |`BALANCE LEADER`| Starts a job to balance the distribution of all the storage leaders in graph spaces. It returns the job ID. | - + +{{ ent.ent_end }} For details about how to view, stop, and restart a job, see [Job manager and the JOB statements](../3.ngql-guide/4.job-statements.md).