Skip to content

Commit

Permalink
tools: update the usage of region startkey to region keys (#6951) (#8612
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ti-chi-bot authored May 13, 2022
1 parent d0764f8 commit 0617789
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,20 +599,38 @@ Usage:
}
```
### `region startkey [--format=raw|encode|hex] <key> <limit>`
### `region keys [--format=raw|encode|hex] <start_key> <end_key> <limit>`
Use this command to query all Regions starting from a key.
Use this command to query all Regions in a given range `[startkey, endkey)`. Ranges without `endKey`s are supported.
Usage:
The `limit` parameter limits the number of keys. The default value of `limit` is `16`, and the value of `-1` means unlimited keys.
{{< copyable "" >}}
Usage:
```bash
>> region startkey --format=raw abc
>> region keys --format=raw a // Display all Regions that start from the key a with a default limit count of 16
{
"count": 16,
"regions": [......],
}
>> region keys --format=raw a z // Display all Regions in the range [a, z) with a default limit count of 16
{
"count": 16,
"regions": [......],
}
>> region keys --format=raw a z -1 // Display all Regions in the range [a, z) without a limit count
{
"count": ...,
"regions": [......],
}
>> region keys --format=raw a "" 20 // Display all Regions that start from the key a with a limit count of 20
{
"count": 20,
"regions": [......],
}
```
### `region store <store_id>`
Expand Down

0 comments on commit 0617789

Please sign in to comment.