@@ -65,18 +65,18 @@ listed in the **sys.jobs** table while it's executed::
65
65
Once you identified the dedicated job UUID, you can kill that job with the
66
66
**KILL ** command. A single job is split into several operations which run,
67
67
depending on the query, on distributed nodes of your cluster. The table has
68
- also a system column **_node ** indicating on which node CrateDB actually
68
+ also a system column **node ** indicating on which node CrateDB actually
69
69
executes the operation::
70
70
71
- cr> SELECT _node ['name'], _node['hostname '], * FROM sys.operations;
72
- +---------------+------------------ ...+----+---------------...+---------+---------------+------------+
73
- | _node ['name'] | _node['hostname '] | id | job_id | name | started | used_bytes |
74
- +---------------+------------------ ...+----+---------------...+---------+---------------+------------+
71
+ cr> SELECT node ['name'], node['id '], * FROM sys.operations;
72
+ +---------------+----------...+----+---------------...+---------+---------------+------------+
73
+ | node ['name'] | node['id '] | id | job_id | name | started | used_bytes |
74
+ +---------------+----------...+----+---------------...+---------+---------------+------------+
75
75
...
76
- +---------------+------------------ ...+----+---------------...+---------+---------------+------------+
76
+ +---------------+----------...+----+---------------...+---------+---------------+------------+
77
77
SELECT ... in set (... sec)
78
78
79
- Find out more about the **_node ** system column in the next sections. If there
79
+ Find out more about the **node ** system column in the next sections. If there
80
80
are no current jobs nor operations that are causing problems, check the
81
81
recorded history of finished jobs and operations in the tables **sys.jobs_log **
82
82
and **sys.operations_log **, respectively.
@@ -123,7 +123,7 @@ To list all nodes using more than 98 per cent of system memory, invoke::
123
123
124
124
The table also contains performance metrics like the load average, disk,
125
125
memory, heap, or network throughput.
126
- The object has the same structure as the **_node ** system column of
126
+ The object has the same structure as the **node ** system column of
127
127
**sys.operations ** from the previous section.
128
128
This query lists all available attributes::
129
129
@@ -200,12 +200,12 @@ the cluster.
200
200
You can estimate the progress of that operation with the **recovery ** object.
201
201
Run this query to monitor the progress of the shard transfer::
202
202
203
- cr> select _node['hostname '], id, recovery['stage'], recovery['size']['percent'], routing_state, state from sys.shards
203
+ cr> select node['name '], id, recovery['stage'], recovery['size']['percent'], routing_state, state from sys.shards
204
204
... where routing_state in ('RELOCATING','INITIALIZING') order by id;
205
- +------------------- +----+-------------------+-----------------------------+---------------+-------+
206
- | _node['hostname '] | id | recovery['stage'] | recovery['size']['percent'] | routing_state | state |
207
- +------------------- +----+-------------------+-----------------------------+---------------+-------+
208
- +------------------- +----+-------------------+-----------------------------+---------------+-------+
205
+ +--------------+----+-------------------+-----------------------------+---------------+-------+
206
+ | node['name '] | id | recovery['stage'] | recovery['size']['percent'] | routing_state | state |
207
+ +--------------+----+-------------------+-----------------------------+---------------+-------+
208
+ +--------------+----+-------------------+-----------------------------+---------------+-------+
209
209
SELECT ... in set (... sec)
210
210
211
211
It lists pairs of rows, in which the first row denotes the destination shard
@@ -220,16 +220,16 @@ until the transfer is done. After that, the source row is deleted from
220
220
**sys.shards ** automatically.
221
221
222
222
To find out on which specific node a shard is stored, also use the object in
223
- the **_node ** system column that is available for this table. For example,
223
+ the **node ** system column that is available for this table. For example,
224
224
this query lists the hosts and tables with the highest number of rows inside
225
225
a single shard::
226
226
227
- cr> SELECT _node['hostname '], table_name, num_docs FROM sys.shards ORDER BY num_docs DESC LIMIT 3;
228
- +------------------- ...+-----------...-+----------+
229
- | _node['hostname '] | table_name | num_docs |
230
- +------------------- ...+------------...+----------+
227
+ cr> SELECT node['name '], table_name, num_docs FROM sys.shards ORDER BY num_docs DESC LIMIT 3;
228
+ +--------------...+-----------...-+----------+
229
+ | node['name '] | table_name | num_docs |
230
+ +--------------...+------------...+----------+
231
231
...
232
- +------------------- ...+------------...+----------+
232
+ +--------------...+------------...+----------+
233
233
SELECT ... in set (... sec)
234
234
235
235
.. SEEALSO ::
@@ -261,17 +261,17 @@ table, which lists all shards in the cluster.
261
261
- To find out about the different states of shards of a specific table, you can
262
262
simply filter by ``table_schema `` and ``table_name ``, e.g.::
263
263
264
- cr> SELECT table_name, shard_id, node_id, explanations
264
+ cr> SELECT table_name, shard_id, node_id, explanation
265
265
... FROM sys.allocations
266
266
... WHERE table_schema = 'doc' AND table_name = 'my_table'
267
267
... ORDER BY current_state, shard_id;
268
- +------------+----------+---------+-------------- +
269
- | table_name | shard_id | node_id | explanations |
270
- +------------+----------+---------+-------------- +
271
- | doc | my_table | ... | ... |
272
- +------------+----------+---------+-------------- +
268
+ +------------+----------+---------+-------------+
269
+ | table_name | shard_id | node_id | explanation |
270
+ +------------+----------+---------+-------------+
271
+ | doc | my_table | ... | ... |
272
+ +------------+----------+---------+-------------+
273
273
...
274
- +------------+----------+---------+-------------- +
274
+ +------------+----------+---------+-------------+
275
275
SELECT ... in set (... sec)
276
276
277
277
0 commit comments