diff options
author | alextarazanov <alextarazanov@yandex-team.com> | 2022-11-01 14:13:38 +0300 |
---|---|---|
committer | alextarazanov <alextarazanov@yandex-team.com> | 2022-11-01 14:13:38 +0300 |
commit | a113b3420abb1f01119ca4002ee938d5ec4a4cbb (patch) | |
tree | 841e4d5d30b6bf5a3cb71d10ef9e201faef749bf | |
parent | 8049e68d98d4a7614ecb8772dd5c63b1c50df4f2 (diff) | |
download | ydb-a113b3420abb1f01119ca4002ee938d5ec4a4cbb.tar.gz |
[review] [YDB] "Added ydb operation docs" check translate
6 files changed, 166 insertions, 7 deletions
diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md index 5a82582d0cb..2955c33bf51 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md @@ -35,10 +35,10 @@ Any command can be run from the command line with the `--help` option to get hel | [import file tsv](../export_import/import-file.md) | Importing data from a TSV file | | [import s3](../export_import/s3_import.md) | Importing data from S3 storage | | [init](../profile/create.md) | Initializing the CLI, creating a [profile](../profile/index.md) | -| operation cancel | Aborting background operations | -| operation forget | Deleting background operations from history | -| operation get | Status of background operations | -| operation list | List of background operations | +| [operation cancel](../operation-cancel.md) | Aborting long running operations | +| [operation forget](../operation-forget.md) | Deleting long running operations from the list | +| [operation get](../operation-get.md) | Status of long running operations | +| [operation list](../operation-list.md) | List of long running operations | | [scheme describe](../commands/scheme-describe.md) | Description of a data schema object | | [scheme ls](../commands/scheme-ls.md) | List of data schema objects | | [scheme mkdir](../commands/dir.md#mkdir) | Creating a directory | @@ -78,4 +78,3 @@ Any command can be run from the command line with the `--help` option to get hel [version](../commands/service.md) | Output details about the {{ ydb-short-name }} CLI version {% endif %} [workload](../commands/workload/index.md) | Generate the yql workload | Execute a YQL script (with streaming support) - diff --git a/ydb/docs/en/core/reference/ydb-cli/operation-cancel.md b/ydb/docs/en/core/reference/ydb-cli/operation-cancel.md new file mode 100644 index 00000000000..cd1d0d75f38 --- /dev/null +++ b/ydb/docs/en/core/reference/ydb-cli/operation-cancel.md @@ -0,0 +1,23 @@ +# Canceling long running operations + +Use the `ydb operation cancel` subcommand to cancel the specified long running operation. Only an incomplete operation can be canceled. + +General format of the command: + +```bash +{{ ydb-cli }} [global options...] operation cancel <id> +``` + +* `global options`: [Global parameters](commands/global-options.md). +* `options`: [Parameters of the subcommand](#options). +* `id`: The ID of the long running operation. The ID contains characters that can be interpreted by your command shell. If necessary, use shielding, for example, `'<id>'` for bash. + +View a description of the command to obtain the status of a long running operation: + +```bash +{{ ydb-cli }} operation cancel --help +``` + +## Examples {examples} + +{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %} diff --git a/ydb/docs/en/core/reference/ydb-cli/operation-forget.md b/ydb/docs/en/core/reference/ydb-cli/operation-forget.md new file mode 100644 index 00000000000..9627d141c52 --- /dev/null +++ b/ydb/docs/en/core/reference/ydb-cli/operation-forget.md @@ -0,0 +1,30 @@ +# Deleting long running operations from the list + +Use the `ydb operation forget` subcommand to delete information about the specified long running operation from the list. The operation must be complete. + +General format of the command: + +```bash +{{ ydb-cli }} [global options...] operation forget <id> +``` + +* `global options`: [Global parameters](commands/global-options.md). +* `options`: [Parameters of the subcommand](#options). +* `id`: The ID of the long running operation. The ID contains characters that can be interpreted by your command shell. If necessary, use shielding, for example, `'<id>'` for bash. + +View a description of the command to delete information about the specified long running operation: + +```bash +{{ ydb-cli }} operation forget --help +``` + +## Examples {examples} + +{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %} + +Delete the long running operation with the `ydb://buildindex/7?id=281489389055514` ID from the list: + +```bash +ydb -p db1 operation forget \ + 'ydb://buildindex/7?id=281489389055514' +``` diff --git a/ydb/docs/en/core/reference/ydb-cli/operation-get.md b/ydb/docs/en/core/reference/ydb-cli/operation-get.md new file mode 100644 index 00000000000..273693b47e7 --- /dev/null +++ b/ydb/docs/en/core/reference/ydb-cli/operation-get.md @@ -0,0 +1,46 @@ +# Obtaining the status of long running operations + +Use the `ydb operation get` subcommand to obtain the status of the specified long running operation. + +General format of the command: + +```bash +{{ ydb-cli }} [global options...] operation get [options...] <id> +``` + +* `global options`: [Global parameters](commands/global-options.md). +* `options`: [Parameters of the subcommand](#options). +* `id`: The ID of the long running operation. The ID contains characters that can be interpreted by your command shell. If necessary, use shielding, for example, `'<id>'` for bash. + +View a description of the command to obtain the status of a long running operation: + +```bash +{{ ydb-cli }} operation get --help +``` + +## Parameters of the subcommand {#options} + +| Name | Description | +---|--- +| `--format` | Input format.<br>Default value: `pretty`.<br>Acceptable values:<ul><li>`pretty`: A human-readable format.</li><li>`proto-json-base64`: Protobuf result in [JSON] format{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %}, binary strings are encoded in [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}.</li></ul> | + +## Examples {examples} + +{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %} + +Obtain the status of the long running operation with the `ydb://buildindex/7?id=281489389055514` ID: + +```bash +ydb -p db1 operation get \ + 'ydb://buildindex/7?id=281489389055514' +``` + +Result: + +```text +┌───────────────────────────────────────┬───────┬─────────┬───────┬──────────┬─────────────────────┬─────────────┐ +| id | ready | status | state | progress | table | index | +├───────────────────────────────────────┼───────┼─────────┼───────┼──────────┼─────────────────────┼─────────────┤ +| ydb://buildindex/7?id=281489389055514 | true | SUCCESS | Done | 100.00% | /my-database/series | idx_release | +└───────────────────────────────────────┴───────┴─────────┴───────┴──────────┴─────────────────────┴─────────────┘ +``` diff --git a/ydb/docs/en/core/reference/ydb-cli/operation-list.md b/ydb/docs/en/core/reference/ydb-cli/operation-list.md new file mode 100644 index 00000000000..798e13a1c86 --- /dev/null +++ b/ydb/docs/en/core/reference/ydb-cli/operation-list.md @@ -0,0 +1,53 @@ +# Getting a list of long running operations + +Use the `ydb operation list` subcommand to get a list of long running operations of the specified type. + +General format of the command: + +```bash +{{ ydb-cli }} [global options...] operation list [options...] <kind> +``` + +* `global options`: [Global parameters](commands/global-options.md). +* `options`: [Parameters of the subcommand](#options). +* `kind`: The type of operation. Possible values: + * `buildindex`: The build index operations. + * `export/s3`: The export operations. + * `import/s3`: The import operations. + +View a description of the command to get a list of long running operations: + +```bash +{{ ydb-cli }} operation list --help +``` + +## Parameters of the subcommand {#options} + +| Name | Description | +---|--- +| `-s`, `--page-size` | Number of operations on one page. If the list of operations contains more strings than specified in the `--page-size` parameter, the result will be split into several pages. To get the next page, specify the `--page-token` parameter. | +| `-t`, `--page-token` | Page token. | +| `--format` | Input format.<br>Default value: `pretty`.<br>Acceptable values:<ul><li>`pretty`: A human-readable format.</li><li>`proto-json-base64`: Protobuf result in [JSON] format{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/JSON){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/JSON){% endif %}, binary strings are encoded in [Base64]{% if lang == "ru" %}(https://ru.wikipedia.org/wiki/Base64){% endif %}{% if lang == "en" %}(https://en.wikipedia.org/wiki/Base64){% endif %}.</li></ul> | + +## Examples {examples} + +{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %} + +Get a list of long running build index operations for the `series` table: + +```bash +ydb -p db1 operation list \ + buildindex +``` + +Result: + +```text +┌───────────────────────────────────────┬───────┬─────────┬───────┬──────────┬─────────────────────┬─────────────┐ +| id | ready | status | state | progress | table | index | +├───────────────────────────────────────┼───────┼─────────┼───────┼──────────┼─────────────────────┼─────────────┤ +| ydb://buildindex/7?id=281489389055514 | true | SUCCESS | Done | 100.00% | /my-database/series | idx_release | +└───────────────────────────────────────┴───────┴─────────┴───────┴──────────┴─────────────────────┴─────────────┘ + +Next page token: 0 +``` diff --git a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml index bfeb30957b3..d5fd5fd269f 100644 --- a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml +++ b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml @@ -61,6 +61,16 @@ items: # href: commands/tools/dump.md # - name: Restore backup # href: commands/tools/restore.md + - name: Managing long running operations + items: + - name: Getting a list of long running operations + href: operation-list.md + - name: Obtaining the status of long running operations + href: operation-get.md + - name: Canceling long running operations + href: operation-cancel.md + - name: Deleting long running operations from the list + href: operation-forget.md - name: Managing profiles include: { mode: link, path: profile/toc_p.yaml } - name: Information services @@ -79,5 +89,3 @@ items: href: commands/workload/stock.md - name: Key-Value load href: workload-kv.md - - |