blob: 1c234d1fc7b3b59ddc5b9eaa1a73935d5436d9a9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pegasus | Shell</title>
<link rel="stylesheet" href="/assets/css/app.css">
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="stylesheet" href="/assets/css/utilities.min.css">
<link rel="stylesheet" href="/assets/css/docsearch.v3.css">
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/all.min.js"></script>
<script src="/assets/js/docsearch.v3.js"></script>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Shell | Pegasus</title>
<meta name="generator" content="Jekyll v4.3.3" />
<meta property="og:title" content="Shell" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Pegasus offers a comprehensive Shell utility designed for perusing cluster-related data, crafting and eliminating tables, and orchestrating data operations, among other functions. This document base on version 2.5.0." />
<meta property="og:description" content="Pegasus offers a comprehensive Shell utility designed for perusing cluster-related data, crafting and eliminating tables, and orchestrating data operations, among other functions. This document base on version 2.5.0." />
<meta property="og:site_name" content="Pegasus" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2024-04-22T06:39:52+00:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Shell" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2024-04-22T06:39:52+00:00","datePublished":"2024-04-22T06:39:52+00:00","description":"Pegasus offers a comprehensive Shell utility designed for perusing cluster-related data, crafting and eliminating tables, and orchestrating data operations, among other functions. This document base on version 2.5.0.","headline":"Shell","mainEntityOfPage":{"@type":"WebPage","@id":"/docs/tools/shell/"},"url":"/docs/tools/shell/"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<div class="dashboard is-full-height">
<!-- left panel -->
<div class="dashboard-panel is-medium is-hidden-mobile pl-0">
<div class="dashboard-panel-header has-text-centered">
<a href="/">
<img src="/assets/images/pegasus-logo-inv.png" style="width: 80%;">
</a>
</div>
<div class="dashboard-panel-main is-scrollable pl-6">
<aside class="menu">
<p class="menu-label">The Pegasus documentation</p>
<ul class="menu-list">
<li>
<a href="/docs/downloads"
class="">
Downloads
</a>
</li>
</ul>
<p class="menu-label">Building Pegasus</p>
<ul class="menu-list">
<li>
<a href="/docs/build/compile-by-docker"
class="">
Compile by docker (recommended)
</a>
</li>
<li>
<a href="/docs/build/compile-from-source"
class="">
Compile from source
</a>
</li>
</ul>
<p class="menu-label">Client Libs</p>
<ul class="menu-list">
<li>
<a href="/clients/java-client"
class="">
Java Client
</a>
</li>
<li>
<a href="/clients/cpp-client"
class="">
C++ Client
</a>
</li>
<li>
<a href="https://github.com/apache/incubator-pegasus/tree/master/go-client"
class="">
Golang Client
</a>
</li>
<li>
<a href="/clients/python-client"
class="">
Python Client
</a>
</li>
<li>
<a href="/clients/node-client"
class="">
NodeJS Client
</a>
</li>
<li>
<a href="/clients/scala-client"
class="">
Scala Client
</a>
</li>
</ul>
<p class="menu-label">Tools</p>
<ul class="menu-list">
<li>
<a href="/docs/tools/shell"
class="">
Pegasus Shell
</a>
</li>
<li>
<a href="https://github.com/pegasus-kv/admin-cli"
class="">
Admin CLI
</a>
</li>
<li>
<a href="https://github.com/pegasus-kv/pegic"
class="">
Pegasus data access CLI
</a>
</li>
</ul>
<p class="menu-label">API</p>
<ul class="menu-list">
<li>
<a href="/api/ttl"
class="">
TTL(Time To Live)
</a>
</li>
<li>
<a href="/api/single-atomic"
class="">
Single-Atomic Operations
</a>
</li>
<li>
<a href="/api/redis"
class="">
Redis Adaption
</a>
</li>
<li>
<a href="/api/geo"
class="">
GEO Support
</a>
</li>
<li>
<a href="/api/http"
class="">
HTTP API
</a>
</li>
</ul>
<p class="menu-label">Admin</p>
<ul class="menu-list">
<li>
<a href="/administration/deployment"
class="">
Deployment
</a>
</li>
<li>
<a href="/administration/config"
class="">
Configurations
</a>
</li>
<li>
<a href="/administration/rebalance"
class="">
Rebalance
</a>
</li>
<li>
<a href="/administration/monitoring"
class="">
Monitoring
</a>
</li>
<li>
<a href="/administration/rolling-update"
class="">
Rolling Restart and Upgrade
</a>
</li>
<li>
<a href="/administration/scale-in-out"
class="">
Scale-in and Scale-out
</a>
</li>
<li>
<a href="/administration/resource-management"
class="">
Resource Management
</a>
</li>
<li>
<a href="/administration/cold-backup"
class="">
Cold Backup
</a>
</li>
<li>
<a href="/administration/meta-recovery"
class="">
Metadata Recovery
</a>
</li>
<li>
<a href="/administration/replica-recovery"
class="">
Replica Data Recovery
</a>
</li>
<li>
<a href="/administration/zk-migration"
class="">
Zookeeper Migration
</a>
</li>
<li>
<a href="/administration/table-migration"
class="">
Table Migration
</a>
</li>
<li>
<a href="/administration/table-soft-delete"
class="">
Table Soft-Delete
</a>
</li>
<li>
<a href="/administration/table-env"
class="">
Table Environment Variables
</a>
</li>
<li>
<a href="/administration/remote-commands"
class="">
Remote Command
</a>
</li>
<li>
<a href="/administration/partition-split"
class="">
Partition-Split
</a>
</li>
<li>
<a href="/administration/duplication"
class="">
Duplication
</a>
</li>
<li>
<a href="/administration/compression"
class="">
Data Compression
</a>
</li>
<li>
<a href="/administration/throttling"
class="">
Throttling
</a>
</li>
<li>
<a href="/administration/experiences"
class="">
Experiences
</a>
</li>
<li>
<a href="/administration/manual-compact"
class="">
Manual Compact
</a>
</li>
<li>
<a href="/administration/usage-scenario"
class="">
Usage Scenario
</a>
</li>
<li>
<a href="/administration/bad-disk"
class="">
Bad Disk Repair
</a>
</li>
<li>
<a href="/administration/whitelist"
class="">
Replica Server Whitelist
</a>
</li>
<li>
<a href="/administration/backup-request"
class="">
Backup Request
</a>
</li>
<li>
<a href="/administration/hotspot-detection"
class="">
Hotspot Detection
</a>
</li>
</ul>
</aside>
</div>
</div>
<!-- main section -->
<div class="dashboard-main is-scrollable">
<nav class="navbar is-hidden-desktop">
<div class="navbar-brand">
<a href="/" class="navbar-item">
<!-- Pegasus Icon -->
<img src="/assets/images/pegasus-square.png">
</a>
<div class="navbar-item">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-light is-outlined is-inverted" href="/zh/docs/tools/shell/"><strong></strong></a>
</div>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<!-- Appears in mobile mode only -->
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
The Pegasus documentation
</span>
</a>
<div class="navbar-dropdown">
<a href="/docs/downloads"
class="navbar-item ">
Downloads
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
Building Pegasus
</span>
</a>
<div class="navbar-dropdown">
<a href="/docs/build/compile-by-docker"
class="navbar-item ">
Compile by docker (recommended)
</a>
<a href="/docs/build/compile-from-source"
class="navbar-item ">
Compile from source
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
Client Libs
</span>
</a>
<div class="navbar-dropdown">
<a href="/clients/java-client"
class="navbar-item ">
Java Client
</a>
<a href="/clients/cpp-client"
class="navbar-item ">
C++ Client
</a>
<a href="https://github.com/apache/incubator-pegasus/tree/master/go-client"
class="navbar-item ">
Golang Client
</a>
<a href="/clients/python-client"
class="navbar-item ">
Python Client
</a>
<a href="/clients/node-client"
class="navbar-item ">
NodeJS Client
</a>
<a href="/clients/scala-client"
class="navbar-item ">
Scala Client
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
Tools
</span>
</a>
<div class="navbar-dropdown">
<a href="/docs/tools/shell"
class="navbar-item ">
Pegasus Shell
</a>
<a href="https://github.com/pegasus-kv/admin-cli"
class="navbar-item ">
Admin CLI
</a>
<a href="https://github.com/pegasus-kv/pegic"
class="navbar-item ">
Pegasus data access CLI
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
API
</span>
</a>
<div class="navbar-dropdown">
<a href="/api/ttl"
class="navbar-item ">
TTL(Time To Live)
</a>
<a href="/api/single-atomic"
class="navbar-item ">
Single-Atomic Operations
</a>
<a href="/api/redis"
class="navbar-item ">
Redis Adaption
</a>
<a href="/api/geo"
class="navbar-item ">
GEO Support
</a>
<a href="/api/http"
class="navbar-item ">
HTTP API
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
Admin
</span>
</a>
<div class="navbar-dropdown">
<a href="/administration/deployment"
class="navbar-item ">
Deployment
</a>
<a href="/administration/config"
class="navbar-item ">
Configurations
</a>
<a href="/administration/rebalance"
class="navbar-item ">
Rebalance
</a>
<a href="/administration/monitoring"
class="navbar-item ">
Monitoring
</a>
<a href="/administration/rolling-update"
class="navbar-item ">
Rolling Restart and Upgrade
</a>
<a href="/administration/scale-in-out"
class="navbar-item ">
Scale-in and Scale-out
</a>
<a href="/administration/resource-management"
class="navbar-item ">
Resource Management
</a>
<a href="/administration/cold-backup"
class="navbar-item ">
Cold Backup
</a>
<a href="/administration/meta-recovery"
class="navbar-item ">
Metadata Recovery
</a>
<a href="/administration/replica-recovery"
class="navbar-item ">
Replica Data Recovery
</a>
<a href="/administration/zk-migration"
class="navbar-item ">
Zookeeper Migration
</a>
<a href="/administration/table-migration"
class="navbar-item ">
Table Migration
</a>
<a href="/administration/table-soft-delete"
class="navbar-item ">
Table Soft-Delete
</a>
<a href="/administration/table-env"
class="navbar-item ">
Table Environment Variables
</a>
<a href="/administration/remote-commands"
class="navbar-item ">
Remote Command
</a>
<a href="/administration/partition-split"
class="navbar-item ">
Partition-Split
</a>
<a href="/administration/duplication"
class="navbar-item ">
Duplication
</a>
<a href="/administration/compression"
class="navbar-item ">
Data Compression
</a>
<a href="/administration/throttling"
class="navbar-item ">
Throttling
</a>
<a href="/administration/experiences"
class="navbar-item ">
Experiences
</a>
<a href="/administration/manual-compact"
class="navbar-item ">
Manual Compact
</a>
<a href="/administration/usage-scenario"
class="navbar-item ">
Usage Scenario
</a>
<a href="/administration/bad-disk"
class="navbar-item ">
Bad Disk Repair
</a>
<a href="/administration/whitelist"
class="navbar-item ">
Replica Server Whitelist
</a>
<a href="/administration/backup-request"
class="navbar-item ">
Backup Request
</a>
<a href="/administration/hotspot-detection"
class="navbar-item ">
Hotspot Detection
</a>
</div>
</div>
</div>
</div>
</nav>
<nav class="navbar is-hidden-mobile">
<div class="navbar-start w-full">
<div class="navbar-item pl-0 w-full">
<!--TODO(wutao): Given the limitation of docsearch that couldn't handle multiple input,
I make searchbox only shown in desktop. Fix this issue when docsearch.js v3 released.
Related issue: https://github.com/algolia/docsearch/issues/230-->
<div id="docsearch"></div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-light is-outlined is-inverted" href="/zh/docs/tools/shell/"><strong></strong></a>
</div>
</div>
</nav>
<section class="hero is-info lg:mr-3">
<div class="hero-body">
<p class="title is-size-2 is-centered">Pegasus Shell</p>
</div>
</section>
<section class="section" style="padding-top: 2rem;">
<div class="content">
<p>Pegasus offers a comprehensive Shell utility designed for perusing cluster-related data, crafting and eliminating tables, and orchestrating data operations, among other functions. This document base on version 2.5.0.</p>
<h1 id="obtaining-the-tool">Obtaining the tool</h1>
<p>After successfully <a href="compilation">compiling Pegasus</a> and initiating <a href="overviwe/onebox">onebox</a>, initiate the Shell utility in the Pegasus directory:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh shell
</code></pre></div></div>
<p>You can also utilize the ‘pack’ tool to package the Shell utility, making it convenient for use on other machines:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh pack_tools
</code></pre></div></div>
<p>After a successful execution of ‘pack’, a file named <code class="language-plaintext highlighter-rouge">pegasus-tools-{version}-{gitSHA}-{platform}-{buildType}.tar.gz</code> will be generated in your local directory. Copy this file to your target machine, extract it, navigate to the folder, and run ‘./run.sh shell’ to use the Shell utility. You can also use the ‘-h’ option to retrieve assistance:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ./run.sh shell -h
Options for subcommand 'shell':
-h|--help print the help info
-c|--config &lt;path&gt; config file path, default './config-shell.ini.{PID}'
--cluster &lt;str&gt; cluster meta lists, default '127.0.0.1:34601,127.0.0.1:34602,127.0.0.1:34603'
</code></pre></div></div>
<p>For instance, when accessing a particular cluster:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh shell --cluster 127.0.0.1:34601,127.0.0.1:34602
</code></pre></div></div>
<h1 id="introduction-to-tool-usage">Introduction to Tool Usage</h1>
<p>The Shell tool adopts a subcommand mode. Entering the subcommand mode and executing <code class="language-plaintext highlighter-rouge">help</code> will display the help document. (Note: Commands may vary depending on the version. The following is for version 2.5.0). For each subcommand, you can also use the <code class="language-plaintext highlighter-rouge">-h</code> option to obtain help information for that subcommand.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Usage:
help
version
cluster_info [-r|--resolve_ip] [-o|--output file_name] [-j|--json]
app &lt;app_name&gt; [-d|--detailed] [-r|--resolve_ip] [-o|--output file_name]
[-j|--json]
app_disk &lt;app_name&gt; [-d|--detailed] [-r|--resolve_ip] [-j|--json]
[-o|--output file_name]
ls [-a|-all] [-d|--detailed] [-j|--json]
[-o|--output file_name][-s|--status all|available|creating|dropping|dropped]
nodes [-d|--detailed] [-j|--json] [-r|--resolve_ip] [-u|--resource_usage]
[-o|--output file_name] [-s|--status all|alive|unalive] [-q|--qps]
[-p|latency_percentile 50|90|95|99|999]
create &lt;app_name&gt; [-p|--partition_count num] [-r|--replica_count num]
[-e|--envs k1=v1,k2=v2...]
drop &lt;app_name&gt; [-r|--reserve_seconds num]
recall &lt;app_id&gt; [new_app_name]
set_meta_level &lt;stopped|blind|freezed|steady|lively&gt;
get_meta_level
balance &lt;-g|--gpid appid.pidx&gt; &lt;-p|--type move_pri|copy_pri|copy_sec&gt;
&lt;-f|--from from_address&gt; &lt;-t|--to to_address&gt;
propose [-f|--force] &lt;-g|--gpid appid.pidx&gt;
&lt;-p|--type ASSIGN_PRIMARY|ADD_SECONDARY|DOWNGRADE_TO_INACTIVE...&gt;
&lt;-t|--target node_to_exec_command&gt; &lt;-n|--node node_to_be_affected&gt;
use [app_name]
cc [cluster_name]
escape_all [true|false]
timeout [time_in_ms]
hash &lt;hash_key&gt; &lt;sort_key&gt;
set &lt;hash_key&gt; &lt;sort_key&gt; &lt;value&gt; [ttl_in_seconds]
multi_set &lt;hash_key&gt; &lt;sort_key&gt; &lt;value&gt; [sort_key value...]
get &lt;hash_key&gt; &lt;sort_key&gt;
multi_get &lt;hash_key&gt; [sort_key...]
multi_get_range &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false] [-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix|postfix]
[-y|--sort_key_filter_pattern str] [-n|--max_count num]
[-i|--no_value] [-r|--reverse]
multi_get_sortkeys &lt;hash_key&gt;
del &lt;hash_key&gt; &lt;sort_key&gt;
multi_del &lt;hash_key&gt; &lt;sort_key&gt; [sort_key...]
multi_del_range &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false] [-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix|postfix]
[-y|--sort_key_filter_pattern str] [-o|--output file_name]
[-i|--silent]
incr &lt;hash_key&gt; &lt;sort_key&gt; [increment]
check_and_set &lt;hash_key&gt; [-c|--check_sort_key str]
[-t|--check_type not_exist|not_exist_or_empty|exist|not_empty]
[match_anywhere|match_prefix|match_postfix]
[bytes_less|bytes_less_or_equal|bytes_equal|bytes_greater_or_equal|bytes_greater]
[int_less|int_less_or_equal|int_equal|int_greater_or_equal|int_greater]
[-o|--check_operand str] [-s|--set_sort_key str] [-v|--set_value str]
[-l|--set_value_ttl_seconds num] [-r|--return_check_value]
check_and_mutate &lt;hash_key&gt; [-c|--check_sort_key str]
[-t|--check_type not_exist|not_exist_or_empty|exist|not_empty]
[match_anywhere|match_prefix|match_postfix]
[bytes_less|bytes_less_or_equal|bytes_equal|bytes_greater_or_equal|bytes_greater]
[int_less|int_less_or_equal|int_equal|int_greater_or_equal|int_greater]
[-o|--check_operand str] [-r|--return_check_value]
exist &lt;hash_key&gt; &lt;sort_key&gt;
count &lt;hash_key&gt;
ttl &lt;hash_key&gt; &lt;sort_key&gt;
hash_scan &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false] [-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix|postfix]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str] [-o|--output file_name]
[-n|--max_count num] [-t|--timeout_ms num] [-d|--detailed]
[-i|--no_value]
full_scan [-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str] [-o|--output file_name]
[-n|--max_count num] [-t|--timeout_ms num] [-d|--detailed]
[-i|--no_value] [-p|--partition num]
copy_data &lt;-c|--target_cluster_name str&gt; &lt;-a|--target_app_name str&gt;
[-p|--partition num] [-b|--max_batch_count num] [-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str] [-m|--max_multi_set_concurrency]
[-o|--scan_option_batch_size] [-n|--no_overwrite] [-i|--no_value]
[-g|--geo_data] [-u|--use_multi_set]
clear_data [-p|--partition num] [-b|--max_batch_count num] [-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str] [-f|--force]
count_data [-c|--precise][-p|--partition num]
[-b|--max_batch_count num][-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str][-d|--diff_hash_key] [-a|--stat_size]
[-n|--top_count num] [-r|--run_seconds num]
remote_command [-t all|meta-server|replica-server] [-r|--resolve_ip]
[-l ip:port,ip:port...]&lt;command&gt; [arguments...]
server_info [-t all|meta-server|replica-server] [-l ip:port,ip:port...]
[-r|--resolve_ip]
server_stat [-t all|meta-server|replica-server] [-l ip:port,ip:port...]
[-r|--resolve_ip]
app_stat [-a|--app_name str] [-q|--only_qps] [-u|--only_usage] [-j|--json]
[-o|--output file_name]
flush_log [-t all|meta-server|replica-server]
[-l ip:port,ip:port...][-r|--resolve_ip]
local_get &lt;db_path&gt; &lt;hash_key&gt; &lt;sort_key&gt;
rdb_key_str2hex &lt;hash_key&gt; &lt;sort_key&gt;
rdb_key_hex2str &lt;rdb_key_in_hex&gt;
rdb_value_hex2str &lt;value_in_hex&gt;
sst_dump [--command=check|scan|none|raw] &lt;--file=data_dir_OR_sst_file&gt;
[--from=user_key] [--to=user_key] [--read_num=num] [--show_properties]
[--pegasus_data]
mlog_dump &lt;-i|--input log_dir&gt; [-o|--output file_name] [-d|--detailed]
recover [-f|--node_list_file file_name] [-s|--node_list_str str]
[-w|--wait_seconds num] [-b|--skip_bad_nodes]
[-l|--skip_lost_partitions] [-o|--output file_name]
add_backup_policy &lt;-p|--policy_name str&gt; &lt;-b|--backup_provider_type str&gt;
&lt;-a|--app_ids 1,2...&gt; &lt;-i|--backup_interval_seconds num&gt;
&lt;-s|--start_time hour:minute&gt; &lt;-c|--backup_history_cnt num&gt;
ls_backup_policy
query_backup_policy &lt;-p|--policy_name p1,p2...&gt; [-b|--backup_info_cnt num]
modify_backup_policy &lt;-p|--policy_name str&gt; [-a|--add_app 1,2...] [-r|--remove_app 1,2...]
[-i|--backup_interval_seconds num] [-c|--backup_history_count num]
[-s|--start_time hour:minute]
disable_backup_policy &lt;-p|--policy_name str&gt;
enable_backup_policy &lt;-p|--policy_name str&gt;
restore_app &lt;-c|--old_cluster_name str&gt; &lt;-p|--old_policy_name str&gt;
&lt;-a|--old_app_name str&gt; &lt;-i|--old_app_id id&gt;
&lt;-t|--timestamp/backup_id timestamp&gt; &lt;-b|--backup_provider_type str&gt;
[-n|--new_app_name str] [-s|--skip_bad_partition]
query_restore_status &lt;restore_app_id&gt; [-d|--detailed]
get_app_envs [-j|--json]
set_app_envs &lt;key&gt; &lt;value&gt; [key value...]
del_app_envs &lt;key&gt; [key...]
clear_app_envs [-a|--all] [-p|--prefix str]
ddd_diagnose [-g|--gpid appid|appid.pidx] [-d|--diagnose] [-a|--auto_diagnose]
[-s|--skip_prompt] [-o|--output file_name]
add_dup &lt;app_name&gt; &lt;remote_cluster_name&gt; [-f|--freezed]
query_dup &lt;app_name&gt; [-d|--detail]
remove_dup &lt;app_name&gt; &lt;dup_id&gt;
start_dup &lt;app_name&gt; &lt;dup_id&gt;
pause_dup &lt;app_name&gt; &lt;dup_id&gt;
disk_capacity [-n|--node replica_server(ip:port)][-o|--out file_name][-j|-json][-d|--detail]
disk_replica [-n|--node replica_server(ip:port)][-a|-app app_name][-o|--out file_name][-j|--json]
set_dup_fail_mode &lt;app_name&gt; &lt;dup_id&gt; &lt;slow|skip&gt;
get_replica_count &lt;app_name&gt;
set_replica_count &lt;app_name&gt; &lt;replica_count&gt;
exit
</code></pre></div></div>
<p>To enhance user-friendliness, we have classified them according to their distinct functionalities.</p>
<h2 id="basic-commands">Basic Commands</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>help</td>
<td>To obtain assistance and information.</td>
</tr>
<tr>
<td>version</td>
<td>Obtain the version details of the Shell tool.</td>
</tr>
<tr>
<td>exit</td>
<td>Exiting the Shell tool is analogous to entering “Ctrl-C” or “Ctrl-D”.</td>
</tr>
</tbody>
</table>
<h3 id="help">help</h3>
<p>To obtain assistance and information.</p>
<h3 id="version">version</h3>
<p>Obtain the version details of the Shell tool.</p>
<h3 id="exit">exit</h3>
<p>Exiting the Shell tool is analogous to entering “Ctrl-C” or “Ctrl-D”.</p>
<h2 id="global-properties">Global properties</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>cc</td>
<td>Full name Change Cluster, altering the presently employed cluster.</td>
</tr>
<tr>
<td>use</td>
<td>Specify the currently utilized table; certain subcommands require you to designate a table before usage, such as data manipulation commands.</td>
</tr>
<tr>
<td>escape_all</td>
<td>When presenting byte-class data, the default behavior is to convert only “invisible characters” into hexadecimal encoding, rather than converting “all characters” to hexadecimal encoding.</td>
</tr>
<tr>
<td>timeout</td>
<td>The default timeout duration for data operations is set to a specific period.</td>
</tr>
</tbody>
</table>
<h3 id="cc">cc</h3>
<p>Full name Change Cluster, altering the presently employed cluster.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: cc [cluster_name]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The specified cluster name must be present in the [pegasus.clusters] section of the <code class="language-plaintext highlighter-rouge">src/shell/config.ini</code> configuration file.</li>
<li>You can configure multiple clusters within the [pegasus.clusters] section.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; cc my_cluster
</code></pre></div></div>
<h3 id="use">use</h3>
<p>Specify the currently utilized table; certain subcommands require you to designate a table before usage, such as data manipulation commands.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: use [app_name]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Tables must be created before they can be used. By default, there is a <code class="language-plaintext highlighter-rouge">temp</code> table available.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; use tmp
</code></pre></div></div>
<h3 id="escape_all">escape_all</h3>
<p>When presenting byte-class data, the default behavior is to convert only “invisible characters” into hexadecimal encoding, rather than converting “all characters” to hexadecimal encoding.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: escape_all [true|false]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The default value is ‘false’.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; escape_all true
</code></pre></div></div>
<h3 id="timeout">timeout</h3>
<p>Specify the default timeout duration for data operations, in milliseconds (ms).</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: timeout [time_in_ms]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>If you do not specify [time_in_ms], it will display the current timeout duration.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; timeout 1000
</code></pre></div></div>
<h2 id="node-management">Node Management</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>cluster_info</td>
<td>Obtain Basic Cluster Information.</td>
</tr>
<tr>
<td>nodes</td>
<td>Retrieve a List of Nodes; you can include the <code class="language-plaintext highlighter-rouge">-d</code> option to obtain the load status of each node.</td>
</tr>
<tr>
<td>server_info</td>
<td>Obtain essential information about each node, primarily including the server version and node startup time.</td>
</tr>
<tr>
<td>server_stat</td>
<td>The statistical data for each node includes essential metrics, such as the Queries Per Second (QPS) and latency for <strong>get</strong> and <strong>put</strong> operations, as well as memory and storage utilization.</td>
</tr>
<tr>
<td>remote_command</td>
<td>Dispatch remote commands to the nodes to execute certain specialized operations.</td>
</tr>
<tr>
<td>flush_log</td>
<td>Transmit remote commands to the nodes to flush log data from the recent buffer into the log files.</td>
</tr>
<tr>
<td>disk_replica</td>
<td>The distribution of each node’s replicas across the disks.</td>
</tr>
<tr>
<td>disk_capacity</td>
<td>The disk space utilization of each node.</td>
</tr>
</tbody>
</table>
<h3 id="cluster_info">cluster_info</h3>
<p>Obtain Basic Cluster Information.</p>
<p>Explanation:</p>
<ul>
<li>The primary components of cluster information primarily encompass:
<ul>
<li>Information on the nodes for meta_server and zookeeper.</li>
<li>Meta_function_level: Strategies for load balancing.</li>
<li>balance_operation_count: Statistics for load balancing operations, including <strong>move_pri</strong>, <strong>move_pri</strong>, <strong>copy_sec</strong>, and <strong>total</strong>. For more information on load balancing, refer to <a href="/administration/rebalance">Load balancing</a>.</li>
<li>Primary_replica_count_stddev: A metric for measuring load balancing.</li>
<li>Total_replica_count_stddev: A metric for measuring load balancing.</li>
</ul>
</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; cluster_info
[cluster_info]
meta_servers :
primary_meta_server :
zookeeper_hosts :
zookeeper_root :
meta_function_level :
balance_operation_count :
primary_replica_count_stddev :
total_replica_count_stddev :
</code></pre></div></div>
<h3 id="nodes">nodes</h3>
<p>Retrieve the list of replica nodes, typically represented by their IP addresses, and display their fundamental information.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: nodes [-d|--detailed] [-j|--json] [-r|--resolve_ip] [-u|--resource_usage]
[-o|--output file_name] [-s|--status all|alive|unalive] [-q|--qps]
[-p|latency_percentile 50|90|95|99|999]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: When specified, it provides detailed information about each node, such as the load conditions of the nodes.</li>
<li>The <code class="language-plaintext highlighter-rouge">-r</code> option: When specified, represent the node using domain name information and display its basic details. If the domain name corresponding to the node’s address cannot be found, indicate it as <strong>UNRESOLVABLE</strong>.</li>
<li>The <code class="language-plaintext highlighter-rouge">-u</code> option: When specified, display the resource utilization of the nodes.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: When specified, export basic information to a specified file, defaulting to the current path.</li>
<li>The <code class="language-plaintext highlighter-rouge">-s</code> option: When specified, output information of nodes in a specific status, including options like <strong>all</strong>, <strong>alive</strong>, and <strong>unalive</strong>.</li>
<li>The <code class="language-plaintext highlighter-rouge">-q</code> option: When specified, display only the QPS information of the specified node.</li>
<li>The <code class="language-plaintext highlighter-rouge">-p</code> option: When specified, exhibit the latency levels of the specified node.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; nodes -s alive
</code></pre></div></div>
<h3 id="server_info">server_info</h3>
<p>Obtain essential information about each node, primarily including the server version and node startup time.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: server_info [-t all|meta-server|replica-server] [-l ip:port,ip:port...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-t</code> option: When specified, opt to output information regarding the categories of server nodes, including <strong>all</strong>, <strong>meta-server</strong>, and <strong>replica-server</strong>.</li>
<li>The <code class="language-plaintext highlighter-rouge">-l</code> option: When specified, choose to output information for nodes with specific IP addresses, connecting multiple nodes with a comma <strong>”,”</strong>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; server_info -t meta-server
</code></pre></div></div>
<h3 id="server_stat">server_stat</h3>
<p>The statistical data for each node includes essential metrics, such as the Queries Per Second (QPS) and latency for <strong>get</strong> and <strong>put</strong> operations, as well as memory and storage utilization.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: server_stat [-t all|meta-server|replica-server] [-l ip:port,ip:port...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The explanation of option parameters same as <a href="#server_info">server_info</a></li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; server_stat -t meta-server
</code></pre></div></div>
<h3 id="remote_command">remote_command</h3>
<p>Dispatch remote commands to the nodes to execute certain specialized operations.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: remote_command [-t all|meta-server|replica-server] [-l ip:port,ip:port...] &lt;command&gt;
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-t</code><code class="language-plaintext highlighter-rouge">-l</code> option: Used to select specific target machines,see <a href="#server_info">server_info</a> explanation.</li>
<li>Detailed information on remote commands, refer to <a href="/administration/remote-commands">remote commands</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; recommand -t meta-server server-info
</code></pre></div></div>
<h3 id="flush_log">flush_log</h3>
<p>Transmit remote commands to the nodes to flush log data from the recent buffer into the log files.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: flush_log [-t all|meta-server|replica-server] [-l ip:port,ip:port...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-t</code><code class="language-plaintext highlighter-rouge">-l</code> option: Used to select specific target machines,see <a href="#server_info">server_info</a> explanation.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; flush_log -t meta-server
</code></pre></div></div>
<h3 id="disk_replica">disk_replica</h3>
<p>The distribution of each node’s replicas across the disks. Version 1.12.3 offers support.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: disk_replica [-n|--node replica_server(ip:port)][-a|-app app_name][-o|--out file_name][-j|--json]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-n</code> option: Utilized to view the distribution of replicas on the disk of a specific node, formatted as ip:port.</li>
<li>The <code class="language-plaintext highlighter-rouge">-a</code> option: Used to observe the distribution of a table’s replicas across the disk of a node.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: Direct the output to a specified file.</li>
<li>The <code class="language-plaintext highlighter-rouge">-j</code> option: Output the query results in JSON format.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; disk_replica -n 127.0.0.1:34608 -a temp
</code></pre></div></div>
<h3 id="disk_capacity">disk_capacity</h3>
<p>Query the disk space utilization of replica_server nodes. Version 1.12.3 offers support.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: disk_capacity [-n|--node replica_server(ip:port)][-o|--out file_name][-j|-json][-d|--detail]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-n</code> option: Utilized to view the distribution of replicas on the disk of a specific node, formatted as ip:port.</li>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: Used to examine the space utilization information for each disk on a node.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: Direct the results to a specific file.</li>
<li>The <code class="language-plaintext highlighter-rouge">-j</code> option: Output the query results in JSON format.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; disk_capacity -n 127.0.0.1:34608 -d
</code></pre></div></div>
<h2 id="table-management">Table management</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>ls</td>
<td>Retrieve a list of all tables, with the option to add <code class="language-plaintext highlighter-rouge">-d</code> to obtain the health status of each table, and <code class="language-plaintext highlighter-rouge">-a</code> to include information on tables that have been deleted.</td>
</tr>
<tr>
<td>app</td>
<td>Acquire information about a specific table, with the option to add <code class="language-plaintext highlighter-rouge">-d</code> for detailed information, including the distribution and health status of each partition.</td>
</tr>
<tr>
<td>app_stat</td>
<td>Obtain the read-write status and storage statistics of tables, with the option to add <code class="language-plaintext highlighter-rouge">-a</code> to specify an individual table and access detailed statistical information for each of its partitions.</td>
</tr>
<tr>
<td>app_disk</td>
<td>Retrieve detailed storage information for a specific table, with the option to add <code class="language-plaintext highlighter-rouge">-d</code> to obtain comprehensive storage details for each partition.</td>
</tr>
<tr>
<td>create</td>
<td>Create a table, with the option to add <code class="language-plaintext highlighter-rouge">-p</code> and <code class="language-plaintext highlighter-rouge">-r</code> to specify the number of partitions and replicas, respectively. The number of partitions must be a power of two. If <code class="language-plaintext highlighter-rouge">-r</code> is not specified, the default number of replicas is set to 3 (recommended value).</td>
</tr>
<tr>
<td>drop</td>
<td>Delete a table, refer to <a href="/administration/table-soft-delete#drop_commands">use drop commands to delete a table</a>.</td>
</tr>
<tr>
<td>recall</td>
<td>Restore a previously deleted table, refer to <a href="/administration/table-soft-delete#recall_commands">use recall commands to recovery table</a>.</td>
</tr>
<tr>
<td>get_app_envs</td>
<td>Retrieve the environmental variables of a table.</td>
</tr>
<tr>
<td>set_app_envs</td>
<td>Set the environmental variables for a table.</td>
</tr>
<tr>
<td>del_app_envs</td>
<td>Delete the environmental variables of a table.</td>
</tr>
<tr>
<td>clear_app_envs</td>
<td>Clean up the environmental variables of a table.</td>
</tr>
<tr>
<td>add_dup</td>
<td>Add a cluster with duplication, refer to <a href="/administration/duplication">duplication</a>.</td>
</tr>
<tr>
<td>query_dup</td>
<td>Query the clusters for cross-data center synchronization of a table, refer to <a href="/administration/duplication">duplication</a>.</td>
</tr>
<tr>
<td>remove_dup</td>
<td>Remove a cluster with duplication, refer to <a href="/administration/duplication">duplication</a>.</td>
</tr>
<tr>
<td>start_dup</td>
<td>Initiate cross-data center synchronization and activate the duplication backup feature, refer to <a href="/administration/duplication">duplication</a>.</td>
</tr>
<tr>
<td>pause_dup</td>
<td>Pause cross-data center synchronization and suspend the duplication backup feature, refer to <a href="/administration/duplication">duplication</a>.</td>
</tr>
<tr>
<td>set_dup_fail_mode</td>
<td>Configure the handling method for duplication failures, setting it for a specified table and its synchronization cluster, with options to set as <strong>fail</strong> or <strong>skip</strong>.</td>
</tr>
<tr>
<td>get_replica_count</td>
<td>Retrieve the replica count parameter value for the table.</td>
</tr>
<tr>
<td>set_replica_count</td>
<td>Set the replica count parameter for the table.</td>
</tr>
</tbody>
</table>
<h3 id="ls">ls</h3>
<p>Retrieve a list of all tables.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: ls [-a|-all] [-d|--detailed] [-o|--output file_name]
[-s|--status all|available|creating|dropping|dropped]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-a</code> option: When specified, display all tables, including those that have been deleted.</li>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: When specified, show detailed information for each table, primarily focusing on the health status of the partitions.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: When specified, direct the results to the file specified by the parameter.</li>
<li>The <code class="language-plaintext highlighter-rouge">-s</code> option: When specified, display only the tables that match the status specified by the parameter.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; ls -d -o ls.txt
</code></pre></div></div>
<h3 id="app">app</h3>
<p>Acquire information about a specific table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: app &lt;app_name&gt; [-d|--detailed] [-o|--output file_name]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: When specified, display detailed information for each table, such as the distribution and health status of partitions.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: When specified, output the results to the file designated by the parameter.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; app temp
</code></pre></div></div>
<h3 id="app_stat">app_stat</h3>
<p>Retrieve the read, write, and storage statistical information of the table, including operations like <strong>get</strong>, <strong>put</strong>, <strong>del</strong>, etc.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: app_stat [-a|--app_name str] [-q|--only_qps] [-u|--only_usage]
[-o|--output file_name]
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; app_stat temp
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-a</code> option: When specified, display detailed information categorized by the partitions of the specified table.</li>
<li>The <code class="language-plaintext highlighter-rouge">-q</code> option: When specified, display only the QPS information of the specified table.</li>
<li>The <code class="language-plaintext highlighter-rouge">-u</code> option: When specified, display only the usage information of the specified table.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: When specified, output the results to the specified file.</li>
</ul>
<h3 id="app_disk">app_disk</h3>
<p>Retrieve detailed storage information for a specific table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: app_disk &lt;app_name&gt; [-d|--detailed] [-o|--output file_name]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: When specified, will allows for obtaining detailed information about the table, such as the status of primary and secondary elements.</li>
<li>The <code class="language-plaintext highlighter-rouge">-o</code> option: When specified, output the results to the specified file.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; app_disk temp
</code></pre></div></div>
<h3 id="create">create</h3>
<p>Create table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: create &lt;app_name&gt; [-p|--partition_count num] [-r|--replica_count num]
[-e|--envs k1=v1,k2=v2...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-p</code> option: When specified, will allows for setting the number of partitions, with the requirement that the number of partitions be a power of two.</li>
<li>The <code class="language-plaintext highlighter-rouge">-r</code> option: When specified, will allows for specifying the number of replicas, with a recommended replica count of 3.</li>
<li>The <code class="language-plaintext highlighter-rouge">-e</code> option: When specified, will allows for setting environmental variables, refer to <a href="/administration/table-env">Table environment</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; create temp
</code></pre></div></div>
<h3 id="drop">drop</h3>
<p>Delete table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: drop &lt;app_name&gt; [-r|--reserve_seconds num]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-r</code> option: When specified, will sets the data retention duration (counted from the time of deletion, in seconds). If not specified, it uses the value from the configuration file hold_seconds_for_dropped_app, which defaults to 7 days, refer to <a href="/administration/table-soft-delete#drop_commands">Table soft delete#drop_commands</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; drop temp
</code></pre></div></div>
<h3 id="recall">recall</h3>
<p>Restore a previously deleted table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: recall &lt;app_id&gt; [new_app_name]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Note that this command restores tables using the <code class="language-plaintext highlighter-rouge">app_id</code>.</li>
<li>The <code class="language-plaintext highlighter-rouge">new_app_name</code> parameter: If a new table name is not specified, the original table name will be used. Otherwise, the specified new table name will be adopted. If the original table name already exists (a new table with the same name was created after the deletion), a different new table name must be specified; otherwise, the operation will fail.</li>
<li>For more information please to refer to <a href="/administration/table-soft-delete#recall_commands">Table soft delete#recall_commands</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; recall 19
</code></pre></div></div>
<h3 id="get_app_envs">get_app_envs</h3>
<p>Retrieve the environmental variables of a table. For more information about environmental variables, please refer to <a href="/administration/table-env">Table environment</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: get_app_envs
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>This command outputs the current environmental variables of the table. Please use <code class="language-plaintext highlighter-rouge">use [app_name]</code> to select a specific table before executing this command.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; use temp
OK
&gt;&gt;&gt; get_app_envs
[app_envs]
rocksdb.usage_scenario : normal
</code></pre></div></div>
<h3 id="set_app_envs">set_app_envs</h3>
<p>Set the environmental variables for a table. For more information about environmental variables, please refer to <a href="/administration/table-env">Table environment</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: set_app_envs &lt;key&gt; &lt;value&gt; [key value...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>This command will set the current environmental variables of the table. Please use <code class="language-plaintext highlighter-rouge">use [app_name]</code> to select a specific table before executing this command.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; use temp
OK
&gt;&gt;&gt; set_app_envs rocksdb.usage_scenario bulk_load
set app envs succeed
</code></pre></div></div>
<h3 id="del_app_envs">del_app_envs</h3>
<p>Delete the environmental variables of a table. For more information about environmental variables, please refer to <a href="/administration/table-env">Table environment</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: del_app_envs &lt;key&gt; [key...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>This command deletes the environmental variables of the current table. Please use <code class="language-plaintext highlighter-rouge">use [app_name]</code> to select a specific table before executing this command.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; use temp
OK
&gt;&gt;&gt; set_app_envs rocksdb.usage_scenario bulk_load
set app envs succeed
&gt;&gt;&gt; del_app_envs rocksdb.usage_scenario
del app envs succeed
=============================
deleted keys:
rocksdb.usage_scenario
=============================
</code></pre></div></div>
<h3 id="clear_app_envs">clear_app_envs</h3>
<p>Cleanse the environmental variables of the table. For further details regarding environmental variables, kindly refer to <a href="/administration/table-env">Table environment</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: clear_app_envs [-a|--all] [-p|--prefix str]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>This command eradicates the present table’s environmental variables. Prior to employment, please ensure to employ <code class="language-plaintext highlighter-rouge">use [app_name]</code> to designate a specific table.</li>
<li>The <code class="language-plaintext highlighter-rouge">-a</code> option: When specified, it results in the purging of all environmental variables.</li>
<li>The <code class="language-plaintext highlighter-rouge">-p</code> option: When specified, it allows for the elimination of environmental variables with a specific prefix string.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; use temp
OK
&gt;&gt;&gt; set_app_envs manual_compact.once.trigger_time 1713700000
set app envs succeed
&gt;&gt;&gt; set_app_envs manual_compact.once.target_level -1
set app envs succeed
&gt;&gt;&gt; set_app_envs manual_compact.once.bottommost_level_compaction force
set app envs succeed
&gt;&gt;&gt; set_app_envs rocksdb.usage_scenario bulk_load
set app envs succeed
&gt;&gt;&gt; clear_app_envs -p manual_compact
clear app envs succeed
=============================
deleted keys:
manual_compact.once.bottommost_level_compaction
manual_compact.once.target_level
manual_compact.once.trigger_time
=============================
&gt;&gt;&gt; get_app_envs
[app_envs]
rocksdb.usage_scenario : bulk_load
</code></pre></div></div>
<h3 id="add_dup">add_dup</h3>
<p>Incorporate a cluster with duplication, as indicated in <a href="/administration/duplication">duplication</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: add_dup &lt;app_name&gt; &lt;remote_cluster_name&gt;
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Apply the specified duplication cluster to the designated table.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; add_dup temp my_cluster
</code></pre></div></div>
<h3 id="query_dup">query_dup</h3>
<p>Retrieve the clusters responsible for cross-data center synchronization of the table, as referenced in <a href="/administration/duplication">duplication</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: query_dup &lt;app_name&gt; [-d|--detail]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-d</code> option: When specified, print out the detailed information.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; query_dup temp -d
</code></pre></div></div>
<h3 id="remove_dup">remove_dup</h3>
<p>Remove a duplication cluster, as specified in <a href="/administration/duplication">duplication</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: remove_dup &lt;app_name&gt; &lt;dup_id&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; remove_dup temp my_cluster:8000
</code></pre></div></div>
<h3 id="start_dup">start_dup</h3>
<p>Initiate cross-data center synchronization and activate the duplication backup feature, as described in <a href="/administration/duplication">duplication</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: start_dup &lt;app_name&gt; &lt;dup_id&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; start_dup temp my_cluster
</code></pre></div></div>
<h3 id="pause_dup">pause_dup</h3>
<p>Pause cross-data center synchronization and suspend the duplication backup feature, as outlined in <a href="/administration/duplication">duplication</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: pause_dup &lt;app_name&gt; &lt;dup_id&gt;
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>This command pause the present app’s duplication function. Prior to employment, please ensure to employ <code class="language-plaintext highlighter-rouge">use [app_name]</code> to designate a specific table.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; pause_dup temp my_cluster
&gt;&gt;&gt;
</code></pre></div></div>
<h3 id="set_dup_fail_mode">set_dup_fail_mode</h3>
<p>Configure the handling method for duplication failures for a specified table and synchronization cluster. Options include <code class="language-plaintext highlighter-rouge">fail</code> and <code class="language-plaintext highlighter-rouge">skip</code>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: set_dup_fail_mode &lt;app_name&gt; &lt;dup_id&gt; &lt;slow|skip&gt;
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">slow mode</code> is the default mode. In this mode, it will endlessly retry for any failure.</li>
<li>The <code class="language-plaintext highlighter-rouge">skip mode</code> when encountering a failure that persists through multiple retries, it will skip the hot backup for the current batch of data and proceed to replicate the next batch.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; set_dup_fail_mode temp my_cluster slow
&gt;&gt;&gt; set_dup_fail_mode temp my_cluster skip
</code></pre></div></div>
<h3 id="get_replica_count">get_replica_count</h3>
<p>Retrieve the parameter value for the number of replicas for the table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: get_replica_count &lt;app_name&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; get_replica_count temp
&gt;&gt;&gt; the replica count of app(temp) is 3
</code></pre></div></div>
<h3 id="set_replica_count">set_replica_count</h3>
<p>Set the replica count parameter for the table.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: set_replica_count &lt;app_name&gt; &lt;replica_count&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; set_replica_count temp 4
&gt;&gt;&gt; PLEASE be CAUTIOUS with this operation ! Are you sure to set the replica count of app(temp) to 4 ? [Y/n]: Y
</code></pre></div></div>
<h2 id="data-manipulation">Data manipulation</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>set</td>
<td>Set a single piece of data.</td>
</tr>
<tr>
<td>multi_set</td>
<td>Configure multiple pieces of data under the same HashKey.</td>
</tr>
<tr>
<td>get</td>
<td>Retrieve a single piece of data.</td>
</tr>
<tr>
<td>multi_get</td>
<td>Retrieve multiple pieces of data under the same HashKey by specifying multiple SortKeys.</td>
</tr>
<tr>
<td>multi_get_range</td>
<td>Retrieve multiple pieces of data under the same HashKey by specifying a query range and filtering criteria for the SortKey.</td>
</tr>
<tr>
<td>multi_get_sortkeys</td>
<td>Retrieve all SortKeys under the same HashKey.</td>
</tr>
<tr>
<td>del</td>
<td>Delete a single piece of data.</td>
</tr>
<tr>
<td>multi_del</td>
<td>Delete multiple pieces of data under the same HashKey by specifying multiple SortKeys.</td>
</tr>
<tr>
<td>multi_del_range</td>
<td>Delete multiple pieces of data under the same HashKey by specifying a query range and filtering criteria for the SortKey.</td>
</tr>
<tr>
<td>incr</td>
<td><a href="/api/single-atomic#Atomic-Increment-Decrement">Atomic Increment-Decrement</a>.</td>
</tr>
<tr>
<td>check_and_set</td>
<td><a href="/api/single-atomic#cas-operation">Atomic CAS operation</a>.</td>
</tr>
<tr>
<td>check_and_mutate</td>
<td><a href="/clients/java-client#checkandmutate">Atomic CAS extented version</a>.</td>
</tr>
<tr>
<td>exist</td>
<td>Query whether a specific piece of data exists.</td>
</tr>
<tr>
<td>count</td>
<td>Retrieve the count of SortKeys under the same HashKey.</td>
</tr>
<tr>
<td>ttl</td>
<td>Inquire about the TTL (Time To Live) duration for a specific piece of data, returning the remaining live time in seconds. If “Infinite” is returned, it indicates there is no TTL limit.</td>
</tr>
<tr>
<td>hash</td>
<td>Compute the hash value of the key.</td>
</tr>
<tr>
<td>hash_scan</td>
<td>Scan the data under the same HashKey one item at a time, with the option to specify a query range and filtering criteria for the SortKey. The results will be sorted by SortKey.</td>
</tr>
<tr>
<td>full_scan</td>
<td>Perform a full scan of the table, with the option to specify filtering conditions for HashKey, SortKey, and Value. Results under the same HashKey will be sorted by SortKey. There is no guaranteed order between HashKeys.</td>
</tr>
<tr>
<td>copy_data</td>
<td>Insert the data from one table into another table one item at a time. Specify the source table using the <code class="language-plaintext highlighter-rouge">use</code> command and the target table using the <code class="language-plaintext highlighter-rouge">-c</code> and <code class="language-plaintext highlighter-rouge">-a</code> commands. The target table can be in another cluster. For detailed usage, refer to <a href="/administration/table-migration#copy-data-migration">Table Migration#copy_data_migration</a>. You can specify filtering conditions for HashKey, SortKey, and Value.</td>
</tr>
<tr>
<td>clear_data</td>
<td>Delete the data from one table one item at a time, which involves scanning the data and performing deletion for each item. You can specify filtering conditions for HashKey, SortKey, and Value.</td>
</tr>
<tr>
<td>count_data</td>
<td>Count the number of data items in a table, with the option to add <code class="language-plaintext highlighter-rouge">-z</code> to calculate the data size. You can also specify filtering conditions for HashKey, SortKey, and Value.</td>
</tr>
</tbody>
</table>
<h3 id="set">set</h3>
<p>Set a single piece of data.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: set &lt;hash_key&gt; &lt;sort_key&gt; &lt;value&gt; [ttl_in_seconds]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The data format for writing must follow the pattern <code class="language-plaintext highlighter-rouge">hash_key</code> + <code class="language-plaintext highlighter-rouge">sort_key</code> + <code class="language-plaintext highlighter-rouge">value</code>.</li>
<li>The <code class="language-plaintext highlighter-rouge">ttl_in_seconds</code> parameter: When specified, it sets the lifespan of the data item in seconds.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; set pegasus cloud 000
</code></pre></div></div>
<h3 id="multi_set">multi_set</h3>
<p>Configure multiple pieces of data under the same <strong>HashKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_set &lt;hash_key&gt; &lt;sort_key&gt; &lt;value&gt; [sort_key value...]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Sort_key is a data model defined by Pegasus. For detailed information, please refer to the <a href="/overview/data-model">Data Model</a>.</li>
<li>Different sort_key names must be distinct; otherwise, an “ERROR: duplicate sort key <sort_key>" will be generated.</sort_key></li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_set pegasus cloud0 000 cloud1 001
</code></pre></div></div>
<h3 id="get">get</h3>
<p>Retrieve a single piece of data.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: get &lt;hash_key&gt; &lt;sort_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; get pegasus cloud
</code></pre></div></div>
<h3 id="multi_get">multi_get</h3>
<p>Retrieve multiple pieces of data under the same <strong>HashKey</strong> by specifying multiple SortKeys.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_get &lt;hash_key&gt; [sort_key...]
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_get pegasus cloud0 cloud1
</code></pre></div></div>
<h3 id="multi_get_range">multi_get_range</h3>
<p>Retrieve multiple pieces of data under the same <strong>HashKey</strong> by specifying a query range and filtering criteria for the <strong>SortKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_get_range &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false] [-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix|postfix]
[-y|--sort_key_filter_pattern str] [-n|--max_count num]
[-i|--no_value] [-r|--reverse]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li><code class="language-plaintext highlighter-rouge">-a|--start_inclusive</code>: Specifies whether to include the StartSortKey. Default is true.</li>
<li><code class="language-plaintext highlighter-rouge">-b|--stop_inclusive</code>: Specifies whether to include the StopSortKey. Default is false.</li>
<li><code class="language-plaintext highlighter-rouge">-s|--sort_key_filter_type</code>: Specifies the filter type for <strong>SortKey</strong>, including no filter, any position match, prefix match, and suffix match. Default is no filter.</li>
<li><code class="language-plaintext highlighter-rouge">-y|--sort_key_filter_pattern</code>: Specifies the filter pattern for <strong>SortKey</strong>. An empty string is equivalent to no filter.</li>
<li><code class="language-plaintext highlighter-rouge">-n|--max_count</code>: Specifies the maximum number of data items to read.</li>
<li><code class="language-plaintext highlighter-rouge">-i|--no_value</code>: Specifies whether to only return <strong>HashKey</strong> and <strong>SortKey</strong> without returning <strong>Value</strong> data. Default is false.</li>
<li><code class="language-plaintext highlighter-rouge">-r|--reverse</code>: Specifies whether to scan the database in reverse order, from the end to the beginning while returning results in ascending <strong>SortKey</strong> order. This parameter is supported from <a href="https://github.com/apache/incubator-pegasus/releases/tag/v1.8.0">v1.8.0 version</a> onward.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_get_range pegasus cloud0 cloud5 -a true -b true -s prefix -y str -n 100 -i false -r false
</code></pre></div></div>
<h3 id="multi_get_sortkeys">multi_get_sortkeys</h3>
<p>Retrieve all SortKeys under the same <strong>HashKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_get_sortkeys &lt;hash_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_get_sortkeys pegasus
</code></pre></div></div>
<h3 id="del">del</h3>
<p>Delete a single piece of data.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: del &lt;hash_key&gt; &lt;sort_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; del pegasus cloud0
</code></pre></div></div>
<h3 id="multi_del">multi_del</h3>
<p>Delete multiple pieces of data under the same <strong>HashKey</strong> by specifying multiple <strong>SortKey</strong>s.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_del &lt;hash_key&gt; &lt;sort_key&gt; [sort_key...]
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_del del pegasus cloud0 cloud1
</code></pre></div></div>
<h3 id="multi_del_range">multi_del_range</h3>
<p>Delete multiple pieces of data under the same <strong>HashKey</strong> by specifying a query range and filtering criteria for the <strong>SortKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: multi_del_range &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false] [-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix|postfix]
[-y|--sort_key_filter_pattern str] [-o|--output file_name]
[-i|--silent]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The <code class="language-plaintext highlighter-rouge">-i|--silent</code> parameter: If set to <code class="language-plaintext highlighter-rouge">true</code>, it means not to print logs during deletion.</li>
<li>The rest of the parameters are explained in the <a href="#multi_get_range">multi_get_range</a> section.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; multi_del_range pegasus cloud0 cloud5 -a true -b true -s prefix -y str -n 100 -i false -r false
</code></pre></div></div>
<h3 id="incr">incr</h3>
<p>Atomic increment and decrement operations.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: incr &lt;hash_key&gt; &lt;sort_key&gt; [increment]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The operand “increment” can be either positive or negative, so a single “incr” interface can be used to achieve both atomic increment and atomic decrement. For more details, please refer to <a href="/api/single-atomic#Atomic-Increment-Decrement">Atomic Increment/Decrement</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; incr cloud0 pegasus 1
</code></pre></div></div>
<h3 id="check_and_set">check_and_set</h3>
<p>Atomic Compare-And-Swap (CAS) Operation.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: check_and_set &lt;hash_key&gt; [-c|--check_sort_key str]
[-t|--check_type not_exist|not_exist_or_empty|exist|not_empty]
[match_anywhere|match_prefix|match_postfix]
[bytes_less|bytes_less_or_equal|bytes_equal|bytes_greater_or_equal|bytes_greater]
[int_less|int_less_or_equal|int_equal|int_greater_or_equal|int_greater]
[-o|--check_operand str] [-s|--set_sort_key str] [-v|--set_value str]
[-l|--set_value_ttl_seconds num] [-r|--return_check_value]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Compare-And-Swap (CAS) is originally a term used to describe a CPU’s atomic instruction. Its purpose is to compare two values and then atomically update a location if they are equal. Please refer to <a href="/api/single-atomic#cas-operations">Atomic CAS</a>.</li>
</ul>
<p>Examples:
Like the below command checks data with hashKey “cloud.” If the value with sortKey “90” exists, it sets the value of sortKey “91” to “92” and returns the value of sortKey “90”.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; check_and_set cloud -c 90 -t exist -s 91 -v 92 -r
</code></pre></div></div>
<h3 id="check_and_mutate">check_and_mutate</h3>
<p>The extended version of the atomic CAS for more information please refer to <a href="/clients/java-client#checkandmutate">Atomic CAS Extended Version</a>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: check_and_mutate &lt;hash_key&gt; [-c|--check_sort_key str]
[-t|--check_type not_exist|not_exist_or_empty|exist|not_empty]
[match_anywhere|match_prefix|match_postfix]
[bytes_less|bytes_less_or_equal|bytes_equal|bytes_greater_or_equal|bytes_greater]
[int_less|int_less_or_equal|int_equal|int_greater_or_equal|int_greater]
[-o|--check_operand str] [-r|--return_check_value]
</code></pre></div></div>
<h3 id="exist">exist</h3>
<p>Query whether a specific piece of data exists.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: exist &lt;hash_key&gt; &lt;sort_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; exist pegasus cloud0
</code></pre></div></div>
<h3 id="count">count</h3>
<p>Retrieve the count of SortKeys under the same <strong>HashKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: count &lt;hash_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; count pegasus
</code></pre></div></div>
<h3 id="ttl">ttl</h3>
<p>Inquire about the TTL (Time To Live) duration for a specific piece of data, returning the remaining live time in seconds. If “Infinite” is returned, it indicates there is no TTL limit.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: ttl &lt;hash_key&gt; &lt;sort_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; ttl pegasus cloud
</code></pre></div></div>
<h3 id="hash">hash</h3>
<p>Retrieve the hash value of a specific piece of data and return it in integer form.
If a specific table is selected using <code class="language-plaintext highlighter-rouge">use [app_name]</code> before using this command, it will also calculate the partition_id based on the hash value of the data, and return information about the primary and secondary nodes currently serving that partition.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: hash &lt;hash_key&gt; &lt;sort_key&gt;
</code></pre></div></div>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; hash pegasus cloud
</code></pre></div></div>
<h3 id="hash_scan">hash_scan</h3>
<p>Scan the data under the same <strong>HashKey</strong> one item at a time, with the option to specify a query range and filtering criteria for the <strong>SortKey</strong>. The results will be sorted by <strong>SortKey</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: hash_scan &lt;hash_key&gt; &lt;start_sort_key&gt; &lt;stop_sort_key&gt;
[-a|--start_inclusive true|false]
[-b|--stop_inclusive true|false]
[-s|--sort_key_filter_type anywhere|prefix]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact
[-z|--value_filter_pattern str]
[-o|--output file_name]
[-n|--max_count num]
[-t|--timeout_ms num]
[-d|--detailed]
[-i|--no_value]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Parameter <code class="language-plaintext highlighter-rouge">-a|--start_inclusive</code>: Specifies whether to include StartSortKey, defaulting to true.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-b|--stop_inclusive</code>: Specifies whether to include StopSortKey, defaulting to false.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-s|--sort_key_filter_type</code>: Specifies the filtering type for SortKey, including no filtering, any position match, prefix match, and suffix match, with the default being no filtering.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-y|--sort_key_filter_pattern</code>: Specifies the filtering pattern for SortKey, where an empty string is equivalent to no filtering.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-v|--value_filter_type</code>: Specifies the value filtering type, including any position match, prefix match, suffix match, etc.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-z|--value_filter_pattern str</code>: Specifies the filtering pattern for the value, where an empty string is equivalent to no filtering.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-o|--output file_name</code>: Specifies the filename for storing the output results.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-n|--max_count num</code>: Specifies the maximum number of values to retrieve.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-t|--timeout_ms num</code>: Specifies the timeout duration for data retrieval.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-d|--detailed</code>: Outputs detailed storage information for the data, including app_id, partition_index, and server_ip.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-i|--no_value</code>: Retrieves only hash_key and sort_key without fetching the value.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; hash_scan pegasus cloud00 cloud01
</code></pre></div></div>
<h3 id="full_scan">full_scan</h3>
<p>Perform a full scan of the table, with the option to specify filtering conditions for <strong>HashKey</strong>, <strong>SortKey</strong>, and <strong>Value</strong>. Results under the same <strong>HashKey</strong> will be sorted by <strong>SortKey</strong>. There is no guaranteed order between HashKeys.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: full_scan [-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact
[-z|--value_filter_pattern str]
[-o|--output file_name]
[-n|--max_count num]
[-t|--timeout_ms num]
[-d|--detailed]
[-i|--no_value]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Please refer to the parameter explanations for more details <a href="#hash_scan">hash scan</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; full_scan
</code></pre></div></div>
<h3 id="copy_data">copy_data</h3>
<p>Insert the data from one table into another table one item at a time.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: copy_data &lt;-c|--target_cluster_name str&gt; &lt;-a|--target_app_name str&gt;
[-p|--partition num] [-b|--max_batch_count num] [-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str] [-m|--max_multi_set_concurrency]
[-o|--scan_option_batch_size] [-n|--no_overwrite] [-i|--no_value]
[-g|--geo_data] [-u|--use_multi_set]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>The source table is specified using the <code class="language-plaintext highlighter-rouge">use</code> command, and the target table is executed using the <code class="language-plaintext highlighter-rouge">-c</code> and <code class="language-plaintext highlighter-rouge">-a</code> commands. The target table can be in another cluster. For detailed usage, refer to <a href="/administration/table-migration#copy-data-migration">Table Migration#copy_data_migration</a>. You can specify filtering conditions for <strong>HashKey</strong>, <strong>SortKey</strong>, and <strong>Value</strong>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; copy_data -c ClusterB -a TableB -t 10000
</code></pre></div></div>
<h3 id="clear_data">clear_data</h3>
<p>Deleting the data from one table item by item essentially involves scanning the data and then performing a delete operation on each data item. You can specify filtering conditions for <strong>HashKey</strong>, <strong>SortKey</strong>, and <strong>Value</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: clear_data [-p|--partition num]
[-b|--max_batch_count num]
[-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str]
[-f|--force]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Parameter <code class="language-plaintext highlighter-rouge">-p|--partition num</code>: Specifies the partition to delete.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-b|--max_batch_count num</code>: Specifies the maximum number to delete at once.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-f|--force</code>: If set to true, it indicates deletion; otherwise, it cannot be deleted, and it prints a confirmation message “ERROR: be careful to clear data!!! Please specify –force if you are determined to do so.”.</li>
<li>The rest of the parameters are filtering conditions, refer to <a href="#multi_get_range">multi_get_range</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; clear_data
</code></pre></div></div>
<h3 id="count_data">count_data</h3>
<p>Count the number of data items in a table. You can specify filtering conditions for <strong>HashKey</strong>, <strong>SortKey</strong>, and <strong>Value</strong>.</p>
<p>Usage:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>USAGE: count_data [-c|--precise][-p|--partition num]
[-b|--max_batch_count num][-t|--timeout_ms num]
[-h|--hash_key_filter_type anywhere|prefix|postfix]
[-x|--hash_key_filter_pattern str]
[-s|--sort_key_filter_type anywhere|prefix|postfix|exact]
[-y|--sort_key_filter_pattern str]
[-v|--value_filter_type anywhere|prefix|postfix|exact]
[-z|--value_filter_pattern str][-d|--diff_hash_key] [-a|--stat_size]
[-n|--top_count num] [-r|--run_seconds num]
</code></pre></div></div>
<p>Explanation:</p>
<ul>
<li>Parameter <code class="language-plaintext highlighter-rouge">-c|--precise</code>: Specifies detailed data for the table.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-p|--partition</code>: Specifies the partition to delete.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-b|--max_batch_count</code>: Specifies the maximum number to delete at once.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-d|--diff_hash_key</code>: Counts the number of hashKeys.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-n|--top_count</code>: Displays only the specified number of data items.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-a|--stat_size</code>: Calculates the current size of the value in bytes.</li>
<li>Parameter <code class="language-plaintext highlighter-rouge">-r|--run_seconds num</code>: Performs statistics for the specified time duration.</li>
<li>The rest of the parameters are filtering conditions, refer to <a href="#multi_get_range">multi_get_range</a>.</li>
</ul>
<p>Examples:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>&gt;&gt;&gt; count_data
</code></pre></div></div>
<h2 id="load-balancing">Load balancing</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>set_meta_level</td>
<td>Set the cluster’s load balancing level, including stopped, blind, freezed, steady, lively. The cluster default is steady, which means no automatic load balancing; setting it to lively enables automatic load balancing.</td>
</tr>
<tr>
<td>get_meta_level</td>
<td>Retrieve the cluster’s load balancing level.</td>
</tr>
<tr>
<td>propose</td>
<td>Send partition operations, including ASSIGN_PRIMARY, ADD_SECONDARY, DOWNGRADE_TO_INACTIVE, and more.</td>
</tr>
<tr>
<td>balance</td>
<td>Send balance operations, including move_pri, copy_pri, copy_sec, and more.</td>
</tr>
</tbody>
</table>
<p>For detailed documentation on load balancing, please refer to the following resources <a href="/administration/rebalance">load balance</a>.</p>
<h2 id="data-recovery">Data recovery</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>recover</td>
<td>To initiate the data recovery process and rebuild metadata information on Zookeeper, please refer to <a href="/administration/meta-recovery">Meta recovery</a>.</td>
</tr>
<tr>
<td>ddd_diagnose</td>
<td>To use the DDD automatic diagnostic tool for recovering all backup-unavailable partitions, please refer to <a href="/administration/replica-recovery">Replica recovery</a>.</td>
</tr>
</tbody>
</table>
<h2 id="cold-backup-management">Cold backup management</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>add_backup_policy</td>
<td>Implementing a cold backup strategy.</td>
</tr>
<tr>
<td>ls_backup_policy</td>
<td>Inquiring about the cold backup strategy.</td>
</tr>
<tr>
<td>modify_backup_policy</td>
<td>Modifying the cold backup strategy.</td>
</tr>
<tr>
<td>disable_backup_policy</td>
<td>Disabling the cold backup strategy.</td>
</tr>
<tr>
<td>enable_backup_policy</td>
<td>Enabling the cold backup strategy.</td>
</tr>
<tr>
<td>restore_app</td>
<td>Restoring a table from cold backup.</td>
</tr>
<tr>
<td>query_backup_policy</td>
<td>Retrieve backup policies and the last backup information.</td>
</tr>
<tr>
<td>query_restore_status</td>
<td>Inquire about the progress of cold backup restoration.</td>
</tr>
</tbody>
</table>
<p>For detailed documentation on cold backups, please refer to <a href="/administration/cold-backup">cold backup management</a>.</p>
<h2 id="debugging-tools">Debugging tools</h2>
<table>
<thead>
<tr>
<th>Subcommands</th>
<th>Functionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>sst_dump</td>
<td>Utilize the <code class="language-plaintext highlighter-rouge">sst_dump</code> tool from RocksDB to convert binary sstable data into readable text data.</td>
</tr>
<tr>
<td>mlog_dump</td>
<td>Transform Pegasus’ binary commit log data into human-readable text data.</td>
</tr>
<tr>
<td>local_get</td>
<td>Retrieve values from the local database.</td>
</tr>
</tbody>
</table>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content is-small has-text-centered">
<div style="margin-bottom: 20px;">
<a href="http://incubator.apache.org">
<img src="/assets/images/egg-logo.png"
width="15%"
alt="Apache Incubator"/>
</a>
</div>
Copyright &copy; 2023 <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br><br>
Apache Pegasus is an effort undergoing incubation at The Apache Software Foundation (ASF),
sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
until a further review indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects. While incubation status is
not necessarily a reflection of the completeness or stability of the code, it does indicate that the
project has yet to be fully endorsed by the ASF.
<br><br>
Apache Pegasus, Pegasus, Apache, the Apache feather logo, and the Apache Pegasus project logo are either
registered trademarks or trademarks of The Apache Software Foundation in the United States and other
countries.
</div>
</div>
</footer>
</div>
<!-- right panel -->
<div class="dashboard-panel is-small is-scrollable is-hidden-mobile">
<p class="menu-label">
<span class="icon">
<i class="fa fa-bars" aria-hidden="true"></i>
</span>
Table of contents
</p>
<ul class="menu-list">
<li><a href="#obtaining-the-tool">Obtaining the tool</a></li>
<li><a href="#introduction-to-tool-usage">Introduction to Tool Usage</a>
<ul>
<li><a href="#basic-commands">Basic Commands</a>
<ul>
<li><a href="#help">help</a></li>
<li><a href="#version">version</a></li>
<li><a href="#exit">exit</a></li>
</ul>
</li>
<li><a href="#global-properties">Global properties</a>
<ul>
<li><a href="#cc">cc</a></li>
<li><a href="#use">use</a></li>
<li><a href="#escape_all">escape_all</a></li>
<li><a href="#timeout">timeout</a></li>
</ul>
</li>
<li><a href="#node-management">Node Management</a>
<ul>
<li><a href="#cluster_info">cluster_info</a></li>
<li><a href="#nodes">nodes</a></li>
<li><a href="#server_info">server_info</a></li>
<li><a href="#server_stat">server_stat</a></li>
<li><a href="#remote_command">remote_command</a></li>
<li><a href="#flush_log">flush_log</a></li>
<li><a href="#disk_replica">disk_replica</a></li>
<li><a href="#disk_capacity">disk_capacity</a></li>
</ul>
</li>
<li><a href="#table-management">Table management</a>
<ul>
<li><a href="#ls">ls</a></li>
<li><a href="#app">app</a></li>
<li><a href="#app_stat">app_stat</a></li>
<li><a href="#app_disk">app_disk</a></li>
<li><a href="#create">create</a></li>
<li><a href="#drop">drop</a></li>
<li><a href="#recall">recall</a></li>
<li><a href="#get_app_envs">get_app_envs</a></li>
<li><a href="#set_app_envs">set_app_envs</a></li>
<li><a href="#del_app_envs">del_app_envs</a></li>
<li><a href="#clear_app_envs">clear_app_envs</a></li>
<li><a href="#add_dup">add_dup</a></li>
<li><a href="#query_dup">query_dup</a></li>
<li><a href="#remove_dup">remove_dup</a></li>
<li><a href="#start_dup">start_dup</a></li>
<li><a href="#pause_dup">pause_dup</a></li>
<li><a href="#set_dup_fail_mode">set_dup_fail_mode</a></li>
<li><a href="#get_replica_count">get_replica_count</a></li>
<li><a href="#set_replica_count">set_replica_count</a></li>
</ul>
</li>
<li><a href="#data-manipulation">Data manipulation</a>
<ul>
<li><a href="#set">set</a></li>
<li><a href="#multi_set">multi_set</a></li>
<li><a href="#get">get</a></li>
<li><a href="#multi_get">multi_get</a></li>
<li><a href="#multi_get_range">multi_get_range</a></li>
<li><a href="#multi_get_sortkeys">multi_get_sortkeys</a></li>
<li><a href="#del">del</a></li>
<li><a href="#multi_del">multi_del</a></li>
<li><a href="#multi_del_range">multi_del_range</a></li>
<li><a href="#incr">incr</a></li>
<li><a href="#check_and_set">check_and_set</a></li>
<li><a href="#check_and_mutate">check_and_mutate</a></li>
<li><a href="#exist">exist</a></li>
<li><a href="#count">count</a></li>
<li><a href="#ttl">ttl</a></li>
<li><a href="#hash">hash</a></li>
<li><a href="#hash_scan">hash_scan</a></li>
<li><a href="#full_scan">full_scan</a></li>
<li><a href="#copy_data">copy_data</a></li>
<li><a href="#clear_data">clear_data</a></li>
<li><a href="#count_data">count_data</a></li>
</ul>
</li>
<li><a href="#load-balancing">Load balancing</a></li>
<li><a href="#data-recovery">Data recovery</a></li>
<li><a href="#cold-backup-management">Cold backup management</a></li>
<li><a href="#debugging-tools">Debugging tools</a></li>
</ul>
</li>
</ul>
</div>
</div>
<script src="/assets/js/app.js" type="text/javascript"></script>
<script>
docsearch({
container: '#docsearch',
appId: 'QRN30RBW0S',
indexName: 'pegasus-apache',
apiKey: 'd3a3252fa344359766707a106c4ed88f',
debug: true
});
</script>
</body>
</html>