| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>Pegasus | Remote Commands</title> |
| <link rel="stylesheet" href="/zh/assets/css/app.css"> |
| <link rel="shortcut icon" href="/zh/assets/images/favicon.ico"> |
| <link rel="stylesheet" href="/zh/assets/css/utilities.min.css"> |
| <link rel="stylesheet" href="/zh/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>Remote Commands | Pegasus</title> |
| <meta name="generator" content="Jekyll v4.3.2" /> |
| <meta property="og:title" content="Remote Commands" /> |
| <meta property="og:locale" content="en_US" /> |
| <meta name="description" content="功能目标" /> |
| <meta property="og:description" content="功能目标" /> |
| <meta property="og:site_name" content="Pegasus" /> |
| <meta property="og:type" content="article" /> |
| <meta property="article:published_time" content="2023-11-23T14:57:08+00:00" /> |
| <meta name="twitter:card" content="summary" /> |
| <meta property="twitter:title" content="Remote Commands" /> |
| <script type="application/ld+json"> |
| {"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2023-11-23T14:57:08+00:00","datePublished":"2023-11-23T14:57:08+00:00","description":"功能目标","headline":"Remote Commands","mainEntityOfPage":{"@type":"WebPage","@id":"/administration/remote-commands"},"url":"/administration/remote-commands"}</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="/zh/"> |
| <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">Pegasus产品文档</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/docs/downloads" |
| class=""> |
| 下载 |
| </a> |
| </li> |
| |
| </ul> |
| |
| <p class="menu-label">编译构建</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/docs/build/compile-by-docker" |
| class=""> |
| 使用Docker完成编译(推荐) |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/docs/build/compile-from-source" |
| class=""> |
| 从源码编译 |
| </a> |
| </li> |
| |
| </ul> |
| |
| <p class="menu-label">客户端库</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/clients/java-client" |
| class=""> |
| Java客户端 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/clients/cpp-client" |
| class=""> |
| C++客户端 |
| </a> |
| </li> |
| |
| <li> |
| <a href="https://github.com/apache/incubator-pegasus/tree/master/go-client" |
| class=""> |
| Golang客户端 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/clients/python-client" |
| class=""> |
| Python客户端 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/clients/node-client" |
| class=""> |
| NodeJS客户端 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/clients/scala-client" |
| class=""> |
| Scala客户端 |
| </a> |
| </li> |
| |
| </ul> |
| |
| <p class="menu-label">生态工具</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/docs/tools/shell" |
| class=""> |
| Pegasus Shell 工具 |
| </a> |
| </li> |
| |
| <li> |
| <a href="https://github.com/pegasus-kv/admin-cli" |
| class=""> |
| 集群管理命令行 |
| </a> |
| </li> |
| |
| <li> |
| <a href="https://github.com/pegasus-kv/pegic" |
| class=""> |
| 数据访问命令行 |
| </a> |
| </li> |
| |
| </ul> |
| |
| <p class="menu-label">用户接口</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/api/ttl" |
| class=""> |
| TTL |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/api/single-atomic" |
| class=""> |
| 单行原子操作 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/api/redis" |
| class=""> |
| Redis适配 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/api/geo" |
| class=""> |
| GEO支持 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/api/http" |
| class=""> |
| HTTP接口 |
| </a> |
| </li> |
| |
| </ul> |
| |
| <p class="menu-label">高效运维</p> |
| <ul class="menu-list"> |
| |
| <li> |
| <a href="/zh/administration/deployment" |
| class=""> |
| 集群部署 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/config" |
| class=""> |
| 配置说明 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/rebalance" |
| class=""> |
| 负载均衡 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/monitoring" |
| class=""> |
| 可视化监控 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/rolling-update" |
| class=""> |
| 集群升级 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/scale-in-out" |
| class=""> |
| 集群扩容缩容 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/resource-management" |
| class=""> |
| 资源管理 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/cold-backup" |
| class=""> |
| 冷备份 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/meta-recovery" |
| class=""> |
| 元数据恢复 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/replica-recovery" |
| class=""> |
| Replica数据恢复 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/zk-migration" |
| class=""> |
| Zookeeper迁移 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/table-migration" |
| class=""> |
| Table迁移 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/table-soft-delete" |
| class=""> |
| Table软删除 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/table-env" |
| class=""> |
| Table环境变量 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/remote-commands" |
| class="is-active"> |
| 远程命令 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/partition-split" |
| class=""> |
| Partition-Split |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/duplication" |
| class=""> |
| 跨机房同步 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/compression" |
| class=""> |
| 数据压缩 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/throttling" |
| class=""> |
| 流量控制 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/experiences" |
| class=""> |
| 运维经验 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/manual-compact" |
| class=""> |
| Manual Compact功能 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/usage-scenario" |
| class=""> |
| Usage Scenario功能 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/bad-disk" |
| class=""> |
| 坏盘检修 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/whitelist" |
| class=""> |
| 白名单 |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/backup-request" |
| class=""> |
| Backup Request |
| </a> |
| </li> |
| |
| <li> |
| <a href="/zh/administration/hotspot-detection" |
| class=""> |
| 热点检测 |
| </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="/zh/" 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.--> |
| |
| <!--If you don't want a url to be relativized, you can add a space explicitly into the href to |
| prevents a url from being relativized by polyglot.--> |
| <a class="button is-light is-outlined is-inverted" href=" /administration/remote-commands"><strong>En</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> |
| Pegasus产品文档 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/docs/downloads" |
| class="navbar-item "> |
| 下载 |
| </a> |
| |
| </div> |
| </div> |
| |
| <!--dropdown--> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a href="" |
| class="navbar-link "> |
| <span> |
| 编译构建 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/docs/build/compile-by-docker" |
| class="navbar-item "> |
| 使用Docker完成编译(推荐) |
| </a> |
| |
| <a href="/zh/docs/build/compile-from-source" |
| class="navbar-item "> |
| 从源码编译 |
| </a> |
| |
| </div> |
| </div> |
| |
| <!--dropdown--> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a href="" |
| class="navbar-link "> |
| <span> |
| 客户端库 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/clients/java-client" |
| class="navbar-item "> |
| Java客户端 |
| </a> |
| |
| <a href="/zh/clients/cpp-client" |
| class="navbar-item "> |
| C++客户端 |
| </a> |
| |
| <a href="https://github.com/apache/incubator-pegasus/tree/master/go-client" |
| class="navbar-item "> |
| Golang客户端 |
| </a> |
| |
| <a href="/zh/clients/python-client" |
| class="navbar-item "> |
| Python客户端 |
| </a> |
| |
| <a href="/zh/clients/node-client" |
| class="navbar-item "> |
| NodeJS客户端 |
| </a> |
| |
| <a href="/zh/clients/scala-client" |
| class="navbar-item "> |
| Scala客户端 |
| </a> |
| |
| </div> |
| </div> |
| |
| <!--dropdown--> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a href="" |
| class="navbar-link "> |
| <span> |
| 生态工具 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/docs/tools/shell" |
| class="navbar-item "> |
| Pegasus Shell 工具 |
| </a> |
| |
| <a href="https://github.com/pegasus-kv/admin-cli" |
| class="navbar-item "> |
| 集群管理命令行 |
| </a> |
| |
| <a href="https://github.com/pegasus-kv/pegic" |
| class="navbar-item "> |
| 数据访问命令行 |
| </a> |
| |
| </div> |
| </div> |
| |
| <!--dropdown--> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a href="" |
| class="navbar-link "> |
| <span> |
| 用户接口 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/api/ttl" |
| class="navbar-item "> |
| TTL |
| </a> |
| |
| <a href="/zh/api/single-atomic" |
| class="navbar-item "> |
| 单行原子操作 |
| </a> |
| |
| <a href="/zh/api/redis" |
| class="navbar-item "> |
| Redis适配 |
| </a> |
| |
| <a href="/zh/api/geo" |
| class="navbar-item "> |
| GEO支持 |
| </a> |
| |
| <a href="/zh/api/http" |
| class="navbar-item "> |
| HTTP接口 |
| </a> |
| |
| </div> |
| </div> |
| |
| <!--dropdown--> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a href="" |
| class="navbar-link "> |
| <span> |
| 高效运维 |
| </span> |
| </a> |
| <div class="navbar-dropdown"> |
| |
| <a href="/zh/administration/deployment" |
| class="navbar-item "> |
| 集群部署 |
| </a> |
| |
| <a href="/zh/administration/config" |
| class="navbar-item "> |
| 配置说明 |
| </a> |
| |
| <a href="/zh/administration/rebalance" |
| class="navbar-item "> |
| 负载均衡 |
| </a> |
| |
| <a href="/zh/administration/monitoring" |
| class="navbar-item "> |
| 可视化监控 |
| </a> |
| |
| <a href="/zh/administration/rolling-update" |
| class="navbar-item "> |
| 集群升级 |
| </a> |
| |
| <a href="/zh/administration/scale-in-out" |
| class="navbar-item "> |
| 集群扩容缩容 |
| </a> |
| |
| <a href="/zh/administration/resource-management" |
| class="navbar-item "> |
| 资源管理 |
| </a> |
| |
| <a href="/zh/administration/cold-backup" |
| class="navbar-item "> |
| 冷备份 |
| </a> |
| |
| <a href="/zh/administration/meta-recovery" |
| class="navbar-item "> |
| 元数据恢复 |
| </a> |
| |
| <a href="/zh/administration/replica-recovery" |
| class="navbar-item "> |
| Replica数据恢复 |
| </a> |
| |
| <a href="/zh/administration/zk-migration" |
| class="navbar-item "> |
| Zookeeper迁移 |
| </a> |
| |
| <a href="/zh/administration/table-migration" |
| class="navbar-item "> |
| Table迁移 |
| </a> |
| |
| <a href="/zh/administration/table-soft-delete" |
| class="navbar-item "> |
| Table软删除 |
| </a> |
| |
| <a href="/zh/administration/table-env" |
| class="navbar-item "> |
| Table环境变量 |
| </a> |
| |
| <a href="/zh/administration/remote-commands" |
| class="navbar-item is-active"> |
| 远程命令 |
| </a> |
| |
| <a href="/zh/administration/partition-split" |
| class="navbar-item "> |
| Partition-Split |
| </a> |
| |
| <a href="/zh/administration/duplication" |
| class="navbar-item "> |
| 跨机房同步 |
| </a> |
| |
| <a href="/zh/administration/compression" |
| class="navbar-item "> |
| 数据压缩 |
| </a> |
| |
| <a href="/zh/administration/throttling" |
| class="navbar-item "> |
| 流量控制 |
| </a> |
| |
| <a href="/zh/administration/experiences" |
| class="navbar-item "> |
| 运维经验 |
| </a> |
| |
| <a href="/zh/administration/manual-compact" |
| class="navbar-item "> |
| Manual Compact功能 |
| </a> |
| |
| <a href="/zh/administration/usage-scenario" |
| class="navbar-item "> |
| Usage Scenario功能 |
| </a> |
| |
| <a href="/zh/administration/bad-disk" |
| class="navbar-item "> |
| 坏盘检修 |
| </a> |
| |
| <a href="/zh/administration/whitelist" |
| class="navbar-item "> |
| 白名单 |
| </a> |
| |
| <a href="/zh/administration/backup-request" |
| class="navbar-item "> |
| Backup Request |
| </a> |
| |
| <a href="/zh/administration/hotspot-detection" |
| class="navbar-item "> |
| 热点检测 |
| </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.--> |
| |
| <!--If you don't want a url to be relativized, you can add a space explicitly into the href to |
| prevents a url from being relativized by polyglot.--> |
| <a class="button is-light is-outlined is-inverted" href=" /administration/remote-commands"><strong>En</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">远程命令</p> |
| </div> |
| </section> |
| <section class="section" style="padding-top: 2rem;"> |
| <div class="content"> |
| <h1 id="功能目标">功能目标</h1> |
| |
| <p>Pegasus基于rDSN框架构建,可以利用到rDSN框架的很多有用的功能,远程命令就是其中一个。</p> |
| |
| <p>rDSN框架通过RPC对外提供服务,除了开发者注册的用于业务逻辑的RPC服务,还提供了内建的RPC服务<code class="language-plaintext highlighter-rouge">RPC_CLI_CLI_CALL</code>,接口定义如下:</p> |
| <pre><code class="language-idl">struct command |
| { |
| 1:string cmd; |
| 2:list<string> arguments; |
| } |
| |
| service cli |
| { |
| string call(1:command c); |
| } |
| </code></pre> |
| <p>RPC的请求参数为command结构体,指定远程命令的<code class="language-plaintext highlighter-rouge">cmd</code>和<code class="language-plaintext highlighter-rouge">arguments</code>;RPC的返回结果是<code class="language-plaintext highlighter-rouge">string</code>。</p> |
| |
| <p>开发者可以注册各种远程命令,对远程命令处理并返回结果。你可以通过shell的<code class="language-plaintext highlighter-rouge">remote_command</code>接口向Pegasus的进程发送远程命令,以执行某些操作。</p> |
| |
| <p>通过远程命令执行操作有这些好处:</p> |
| <ul> |
| <li>直接。命令直接发给目标进程。</li> |
| <li>快速生效。命令一般都是立即执行。</li> |
| <li>开发简单。注册和开发过程都很容易。</li> |
| </ul> |
| |
| <h1 id="支持命令">支持命令</h1> |
| |
| <p>Pegasus不同角色的进程支持不同的远程命令。但是collector没有监听端口,所以不支持远程命令。</p> |
| |
| <h2 id="rdsn内建命令">rdsn内建命令</h2> |
| |
| <table> |
| <thead> |
| <tr> |
| <th>命令</th> |
| <th>功能</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>engine</td> |
| <td>获取rdsn框架引擎的信息,主要是包含哪些线程池、每个线程池有多少个线程</td> |
| </tr> |
| <tr> |
| <td>system.queue</td> |
| <td>获取各线程池执行队列的排队长度</td> |
| </tr> |
| <tr> |
| <td>server-info</td> |
| <td>获取进程的基本信息,包括版本号、启动时间,对应shell的<code class="language-plaintext highlighter-rouge">server_info</code>子命令</td> |
| </tr> |
| <tr> |
| <td>server-stat</td> |
| <td>获取进程的简要统计信息,包括get/put等操作的QPS和延迟、机器的内存和存储使用情况,对应shell的<code class="language-plaintext highlighter-rouge">server_stat</code>子命令</td> |
| </tr> |
| <tr> |
| <td>task-code</td> |
| <td>获取该进程注册的task code列表</td> |
| </tr> |
| <tr> |
| <td>flush_log</td> |
| <td>将最近缓冲区中的日志数据刷出到日志文件中,对应shell的<code class="language-plaintext highlighter-rouge">flush_log</code>子命令</td> |
| </tr> |
| <tr> |
| <td>reset-log-start-level</td> |
| <td>动态修改日志的级别</td> |
| </tr> |
| <tr> |
| <td>perf-counters</td> |
| <td>获取最近一个统计周期内的perf counter数据</td> |
| </tr> |
| <tr> |
| <td>config-dump</td> |
| <td>获取该进程启动时的配置文件的信息</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <h2 id="meta-server">meta-server</h2> |
| |
| <table> |
| <thead> |
| <tr> |
| <th>命令</th> |
| <th>功能</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>meta.lb.assign_delay_ms</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">replica_assign_delay_ms_for_dropouts</code></td> |
| </tr> |
| <tr> |
| <td>meta.lb.assign_secondary_black_list</td> |
| <td>动态修改<code class="language-plaintext highlighter-rouge">add_secondary</code>操作的黑名单,名单中的节点在负载均衡中不再分派replica</td> |
| </tr> |
| <tr> |
| <td>meta.lb.balancer_in_turn</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">balancer_in_turn</code>,控制负载均衡app时是one-by-one执行还是并行执行</td> |
| </tr> |
| <tr> |
| <td>meta.lb.only_primary_balancer</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">only_primary_balancer</code>,控制负载均衡时是否只要求各机器的primary replica个数达到平衡</td> |
| </tr> |
| <tr> |
| <td>meta.lb.only_move_primary</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">only_move_primary</code>,控制负载均衡时是否只做primary replica迁移,不做replica数据拷贝</td> |
| </tr> |
| <tr> |
| <td>meta.lb.add_secondary_enable_flow_control</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">add_secondary_enable_flow_control</code>,控制负载均衡时是否对<code class="language-plaintext highlighter-rouge">add_secondary</code>操作进行流控</td> |
| </tr> |
| <tr> |
| <td>meta.lb.add_secondary_max_count_for_one_node</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">add_secondary_max_count_for_one_node</code>,控制负载均衡时如果进行流控,单个机器最多并发执行<code class="language-plaintext highlighter-rouge">add_secondary</code>操作的个数</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <h2 id="replica-server">replica-server</h2> |
| |
| <table> |
| <thead> |
| <tr> |
| <th>命令</th> |
| <th>功能</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>replica.kill_partition</td> |
| <td>将指定的replica关闭,停止提供服务</td> |
| </tr> |
| <tr> |
| <td>replica.deny-client</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">deny_client_on_start</code>,控制是否拒绝客户端的读写请求</td> |
| </tr> |
| <tr> |
| <td>replica.verbose-client-log</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">verbose_client_log_on_start</code>,控制回复客户端的请求时是否打印ERROR日志</td> |
| </tr> |
| <tr> |
| <td>replica.verbose-commit-log</td> |
| <td>动态修改配置<code class="language-plaintext highlighter-rouge">verbose_commit_log_on_start</code>,控制在提交写请求时是否打印DEBUG日志</td> |
| </tr> |
| <tr> |
| <td>replica.trigger-checkpoint</td> |
| <td>对指定的replica手动触发<code class="language-plaintext highlighter-rouge">async_checkpoint</code>操作</td> |
| </tr> |
| <tr> |
| <td>replica.query-compact</td> |
| <td>对指定的replica查询其执行<a href="manual-compact">Manual-Compact</a>操作的状态</td> |
| </tr> |
| <tr> |
| <td>replica.query-app-envs</td> |
| <td>对指定的replica查询其当前的<a href="table-env">Table环境变量</a></td> |
| </tr> |
| <tr> |
| <td>useless-dir-reserve-seconds</td> |
| <td>动态修改无用文件夹的保留时间,方便快速释放存储空间,从1.11.3版本开始支持,参见<a href="#resource-management#垃圾文件夹管理">垃圾文件夹管理</a></td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <h1 id="如何使用">如何使用</h1> |
| |
| <p>通过shell的<code class="language-plaintext highlighter-rouge">remote_command</code>子命令,可以向指定的一个或者多个进程发送远程命令。用法:</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...] <command> |
| [arguments...] |
| </code></pre></div></div> |
| <p>其中需要通过<code class="language-plaintext highlighter-rouge">-t</code>或者<code class="language-plaintext highlighter-rouge">-l</code>来指定目标进程:</p> |
| <ul> |
| <li><code class="language-plaintext highlighter-rouge">-t</code>:只向指定角色的所有进程发送。</li> |
| <li><code class="language-plaintext highlighter-rouge">-l</code>:只向指定的地址发送,可以通过列表指定多个地址。</li> |
| </ul> |
| |
| <p>如果你不知道目标进程支持哪些远程命令,可以发送<code class="language-plaintext highlighter-rouge">help</code>命令查看,譬如:</p> |
| <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>>>> remote_command -l 127.0.0.1:34801 help |
| COMMAND: help |
| |
| CALL [user-specified] [127.0.0.1:34801] succeed: help|Help|h|H [command] - display help information |
| repeat|Repeat|r|R interval_seconds max_count command - execute command periodically |
| engine - get engine internal information |
| system.queue - get queue internal information |
| server-info - query server information |
| server-stat - query selected perf counters |
| task-code - query task code containing any given keywords |
| flush-log - flush log to stderr or log file |
| reset-log-start-level - reset the log start level |
| perf-counters - query perf counters, supporting filter by POSIX basic regular expressions |
| profile|Profile|p|P - performance profiling |
| profiler data - get appointed data, using by pjs |
| profiler.query|pq - query profiling data, output in json format |
| config-dump - dump configuration |
| replica.kill_partition [app_id [partition_index]] |
| replica.deny-client <true|false> |
| replica.verbose-client-log <true|false> |
| replica.verbose-commit-log <true|false> |
| replica.trigger-checkpoint [id1,id2,...] (where id is 'app_id' or 'app_id.partition_id') |
| replica.query-compact [id1,id2,...] (where id is 'app_id' or 'app_id.partition_id') |
| replica.query-app-envs [id1,id2,...] (where id is 'app_id' or 'app_id.partition_id') |
| |
| |
| Succeed count: 1 |
| Failed count: 0 |
| </code></pre></div></div> |
| |
| <p>如果指定多个进程,就会并发地向所有进程发送命令,等待命令的返回结果,然后打印出来。</p> |
| |
| </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 © 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> |
| 本页导航 |
| </p> |
| <ul class="menu-list"> |
| <li><a href="#功能目标">功能目标</a></li> |
| <li><a href="#支持命令">支持命令</a> |
| <ul> |
| <li><a href="#rdsn内建命令">rdsn内建命令</a></li> |
| <li><a href="#meta-server">meta-server</a></li> |
| <li><a href="#replica-server">replica-server</a></li> |
| </ul> |
| </li> |
| <li><a href="#如何使用">如何使用</a></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> |