Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add error code with show job id #1652

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ nebula> SHOW TAG INDEX STATUS;

# 也可以使用 SHOW JOB <job_id>查看重建索引的任务状态。
nebula> SHOW JOB 31;
+----------------+---------------------+------------+-------------------------+-------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+---------------------+------------+-------------------------+-------------------------+
| 31 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:24.000 |
| 0 | "storaged1" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 |
| 1 | "storaged2" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 |
| 2 | "storaged0" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 |
+----------------+---------------------+------------+-------------------------+-------------------------+
+----------------+---------------------+------------+-------------------------+-------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+---------------------+------------+-------------------------+-------------------------+-------------+
| 31 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:24.000 | "SUCCEEDED" |
| 0 | "storaged1" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | "SUCCEEDED" |
| 1 | "storaged2" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | "SUCCEEDED" |
| 2 | "storaged0" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | "SUCCEEDED" |
+----------------+---------------------+------------+-------------------------+-------------------------+-------------+
```

Nebula Graph 创建一个任务去重建索引,因此可以根据返回的任务 ID,通过`SHOW JOB <job_id>`语句查看任务状态。详情请参见 [SHOW JOB](../4.job-statements.md#show_job)。
Expand Down
28 changes: 15 additions & 13 deletions docs-2.0/3.ngql-guide/4.job-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ nebula> SUBMIT JOB STATS;
+------------+
| New Job Id |
+------------+
| 34 |
| 9 |
+------------+
```

Expand All @@ -98,22 +98,24 @@ Meta 服务将`SUBMIT JOB`请求解析为多个任务,然后分配给进程 ne
示例:

```ngql
nebula> SHOW JOB 34;
+----------------+-----------------+------------+----------------------------+----------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+-----------------+------------+----------------------------+----------------------------+
| 34 | "STATS" | "FINISHED" | 2021-11-01T03:32:27.000000 | 2021-11-01T03:32:27.000000 |
| 0 | "192.168.8.111" | "FINISHED" | 2021-11-01T03:32:27.000000 | 2021-11-01T03:32:41.000000 |
+----------------+-----------------+------------+----------------------------+----------------------------+
nebula> SHOW JOB 9;
+----------------+-----------------+------------+----------------------------+----------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+-----------------+------------+----------------------------+----------------------------+-------------+
| 9 | "STATS" | "FINISHED" | 2022-04-12T08:47:33.000000 | 2022-04-12T08:47:33.000000 | "SUCCEEDED" |
| 0 | "192.168.8.100" | "FINISHED" | 2022-04-12T08:47:33.000000 | 2022-04-12T08:47:34.000000 | "SUCCEEDED" |
| 1 | "192.168.8.101" | "FINISHED" | 2022-04-12T08:47:33.000000 | 2022-04-12T08:47:34.000000 | "SUCCEEDED" |
+----------------+-----------------+------------+----------------------------+----------------------------+-------------+
```

|参数|说明|
|:---|:---|
|Job Id(TaskId)|第一行显示作业 ID,其他行显示作业相关的任务 ID。|
|Command(Dest)|第一行显示执行的作业命令名称,其他行显示任务对应的 nebula-storaged 进程。|
|Status|显示作业或任务的状态。详情请参见[作业状态](#_2)。|
|Start Time|显示作业或任务开始执行的时间。|
|Stop Time|显示作业或任务结束执行的时间,结束后的状态包括`FINISHED`、`FAILED`或`STOPPED`。|
|`Job Id(TaskId)`|第一行显示作业 ID,其他行显示作业相关的任务 ID。|
|`Command(Dest)`|第一行显示执行的作业命令名称,其他行显示任务对应的 nebula-storaged 进程。|
|`Status`|显示作业或任务的状态。详情请参见[作业状态](#_2)。|
|`Start Time`|显示作业或任务开始执行的时间。|
|`Stop Time`|显示作业或任务结束执行的时间,结束后的状态包括`FINISHED`、`FAILED`或`STOPPED`。|
|`Error Code`|任务的错误码。|

### 作业状态

Expand Down
32 changes: 16 additions & 16 deletions docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ nebula> REBUILD EDGE INDEX follow_index;

# 确认重建索引成功。
nebula> SHOW JOB 121;
+----------------+---------------------+------------+----------------------------+----------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+---------------------+------------+----------------------------+----------------------------+
| 121 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 |
| 0 | "storaged1" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 |
| 1 | "storaged0" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 |
| 2 | "storaged2" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 |
+----------------+---------------------+------------+----------------------------+----------------------------+
+----------------+---------------------+------------+----------------------------+----------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+---------------------+------------+----------------------------+----------------------------+-------------+
| 121 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 | "SUCCEEDED" |
| 0 | "storaged1" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 | "SUCCEEDED" |
| 1 | "storaged0" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 | "SUCCEEDED" |
| 2 | "storaged2" | "FINISHED" | 2021-05-27T02:18:02.000000 | 2021-05-27T02:18:02.000000 | "SUCCEEDED" |
+----------------+---------------------+------------+----------------------------+----------------------------+-------------+

nebula> SHOW JOB 122;
+----------------+----------------------+------------+----------------------------+----------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+----------------------+------------+----------------------------+----------------------------+
| 122 | "REBUILD_EDGE_INDEX" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:11.000000 |
| 0 | "storaged1" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 |
| 1 | "storaged0" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 |
| 2 | "storaged2" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 |
+----------------+----------------------+------------+----------------------------+----------------------------+
+----------------+----------------------+------------+----------------------------+----------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+----------------------+------------+----------------------------+----------------------------+-------------+
| 122 | "REBUILD_EDGE_INDEX" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:11.000000 | "SUCCEEDED" |
| 0 | "storaged1" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 | "SUCCEEDED" |
| 1 | "storaged0" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 | "SUCCEEDED" |
| 2 | "storaged2" | "FINISHED" | 2021-05-27T02:18:11.000000 | 2021-05-27T02:18:21.000000 | "SUCCEEDED" |
+----------------+----------------------+------------+----------------------------+----------------------------+-------------+
```

### 匹配点
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ nebula> SUBMIT JOB STATS;

# 确认作业执行成功。
nebula> SHOW JOB 98;
+----------------+---------------+------------+----------------------------+----------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+---------------+------------+----------------------------+----------------------------+
| 98 | "STATS" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 0 | "storaged2" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 1 | "storaged0" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 2 | "storaged1" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
+----------------+---------------+------------+----------------------------+----------------------------+
+----------------+---------------+------------+----------------------------+----------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+---------------+------------+----------------------------+----------------------------+-------------+
| 98 | "STATS" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 0 | "storaged2" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 1 | "storaged0" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 2 | "storaged1" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
+----------------+---------------+------------+----------------------------+----------------------------+-------------+

# 显示图空间统计信息。
nebula> SHOW STATS;
Expand Down
16 changes: 8 additions & 8 deletions docs-2.0/8.service-tuning/load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@

```ngql
nebula> SHOW JOB 30;
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+
| Job Id(spaceId:partId) | Command(src->dst) | Status | Start Time | Stop Time |
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+
| 30 | "DATA_BALANCE" | "FINISHED" | "2022-01-12T02:27:00.000000000" | "2022-01-12T02:30:31.000000000" |
| "30, 23:1" | "192.168.10.100:9779->192.168.10.103:9779" | "SUCCEEDED" | 2022-01-12T02:27:00.000000 | 2022-01-12T02:27:30.000000 |
| "30, 23:2" | "192.168.10.100:9779->192.168.10.103:9779" | "SUCCEEDED" | 2022-01-12T02:27:00.000000 | 2022-01-12T02:27:01.000000 |
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+-------------+
| Job Id(spaceId:partId) | Command(src->dst) | Status | Start Time | Stop Time | Error Code |
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+-------------+
| 30 | "DATA_BALANCE" | "FINISHED" | "2022-01-12T02:27:00.000000000" | "2022-01-12T02:30:31.000000000" | "SUCCEEDED" |
| "30, 23:1" | "192.168.10.100:9779->192.168.10.103:9779" | "SUCCEEDED" | 2022-01-12T02:27:00.000000 | 2022-01-12T02:27:30.000000 | "SUCCEEDED" |
| "30, 23:2" | "192.168.10.100:9779->192.168.10.103:9779" | "SUCCEEDED" | 2022-01-12T02:27:00.000000 | 2022-01-12T02:27:01.000000 | "SUCCEEDED" |
......
| "Total:21" | "Succeeded:21" | "Failed:0" | "In Progress:0" | "Invalid:0" |
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+
| "Total:21" | "Succeeded:21" | "Failed:0" | "In Progress:0" | "Invalid:0" | "" |
+-------------------------+--------------------------------------------+-------------+---------------------------------+---------------------------------+-------------+
```

5. 等待所有子任务完成,负载均衡进程结束,执行命令`SHOW HOSTS`确认分片已经均衡分布。
Expand Down