blob: e5b99ff8bfe3e60e219f81d9fd7c7a68b9ec623e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pegasus | Http</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>Http | Pegasus</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Http" />
<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="Http" />
<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":"Http","mainEntityOfPage":{"@type":"WebPage","@id":"/api/http"},"url":"/api/http"}</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="is-active">
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="">
远程命令
</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=" /api/http"><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 is-active">
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 ">
远程命令
</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=" /api/http"><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">HTTP接口</p>
</div>
</section>
<section class="section" style="padding-top: 2rem;">
<div class="content">
<h2 id="功能介绍">功能介绍</h2>
<p>Pegasus为MetaServer,ReplicaServer和Collector都提供了HTTP接口,用于查看集群相关信息,查询服务状态等。</p>
<p><strong>注意</strong></p>
<ul>
<li>由于最新数据由主MetaServer维护,当访问备用MetaServer的元数据查询接口时,会自动重定向至主MetaServer对应的接口。
举个例子,假设 <code class="language-plaintext highlighter-rouge">127.0.0.1:34601</code><code class="language-plaintext highlighter-rouge">127.0.0.1:34602</code> 分别是主备MetaServer,访问 <code class="language-plaintext highlighter-rouge">127.0.0.1:34602/meta/cluster</code>
会自动跳转到 <code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/cluster</code></li>
</ul>
<h2 id="接口介绍">接口介绍</h2>
<p>所有接口均返回JSON格式。使用浏览器查看JSON时,建议使用<a href="https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa">Chrome插件json-formatter</a>以优化阅读体验。</p>
<h3><code class="language-plaintext highlighter-rouge">/</code></h3>
<p><strong>功能:</strong> 主页面,获取所有接口的使用帮助</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"/"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/app"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/app?app_name=temp"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/app/duplication"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/app/duplication?name=&lt;app_name&gt;"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/app_envs"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/app_envs?name=temp"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/apps"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/apps"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/backup_policy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/backup_policy"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/cluster"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/cluster"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/meta/nodes"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/meta/nodes"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/perfCounter"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/perfCounter?name={perf_counter_name}"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/pprof/cmdline"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/pprof/cmdline"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/pprof/growth"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/pprof/growth"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/pprof/heap"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/pprof/heap"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/pprof/profile"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/pprof/profile"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/pprof/symbol"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/pprof/symbol"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/recentStartTime"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/recentStartTime"</span><span class="p">,</span><span class="w">
</span><span class="nl">"/version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ip:port/version"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="version"><code class="language-plaintext highlighter-rouge">/version</code></h3>
<p><strong>功能:</strong> 获取应用的版本</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/version</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"GitCommit"</span><span class="p">:</span><span class="w"> </span><span class="s2">"cf428dc0ef995b961809df860e783417de7757fc"</span><span class="p">,</span><span class="w">
</span><span class="nl">"Version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.12.SNAPSHOT"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="recentstarttime"><code class="language-plaintext highlighter-rouge">/recentStartTime</code></h3>
<p><strong>功能:</strong> 获取进程启动时间</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/recentStartTime</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"RecentStartTime"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2019-08-14 00:22:00"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="pprofprofile"><code class="language-plaintext highlighter-rouge">/pprof/profile</code></h3>
<p><strong>功能:</strong> 获取server的cpu采样</p>
<p><strong>示例1:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/pprof/profile?seconds=10</code></p>
<p><strong>返回:</strong> profile文件</p>
<p><strong>示例2:</strong> 推荐使用google/pprof Web UI</p>
<p><code class="language-plaintext highlighter-rouge">pprof --http=:8080 http://127.0.0.1:34801/pprof/heap</code></p>
<h3 id="pprofsymbol"><code class="language-plaintext highlighter-rouge">/pprof/symbol</code></h3>
<p><strong>功能:</strong> 获取symbol信息</p>
<p><strong>示例1:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/pprof/symbol</code></p>
<p><strong>返回:</strong> 非post请求,返回symbol个数</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>num_symbols: 46225
</code></pre></div></div>
<p><strong>示例2:</strong><code class="language-plaintext highlighter-rouge">curl 127.0.0.1:34801/pprof/symbol -X POST -d "123455"</code></p>
<p><strong>返回:</strong> post请求,返回输入地址对应的symbol</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>0x00123455 boost::asio::detail::keyword_tss_ptr
</code></pre></div></div>
<h3 id="pprofheap"><code class="language-plaintext highlighter-rouge">/pprof/heap</code></h3>
<p><strong>功能:</strong> 获取server的内存采样</p>
<p><strong>示例1:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/pprof/heap</code></p>
<p><strong>返回:</strong> heap profile文本</p>
<p><strong>示例2:</strong> 推荐使用google/pprof Web UI</p>
<p><code class="language-plaintext highlighter-rouge">pprof --http=:8080 http://127.0.0.1:34801/pprof/heap</code></p>
<p><strong>注意:</strong> 需在被采样server所在机器设置环境变量<code class="language-plaintext highlighter-rouge">TCMALLOC_SAMPLE_PARAMETER</code></p>
<h3 id="pprofcmdline"><code class="language-plaintext highlighter-rouge">/pprof/cmdline</code></h3>
<p><strong>功能:</strong> 获取/proc/self/cmdline内容</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/pprof/cmdline</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">/somepath/pegasus/onebox/replica</span><span class="mi">1</span><span class="err">/pegasus_server</span><span class="w">
</span><span class="err">config.ini</span><span class="w">
</span><span class="err">-app_list</span><span class="w">
</span><span class="err">replica</span><span class="w">
</span></code></pre></div></div>
<h3 id="pprofgrowth"><code class="language-plaintext highlighter-rouge">/pprof/growth</code></h3>
<p><strong>功能:</strong> 获取growth profile</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34801/pprof/growth</code></p>
<p><strong>返回:</strong> growth profile文本</p>
<h3 id="metaappnameapp_name"><code class="language-plaintext highlighter-rouge">/meta/app?name=&lt;app_name&gt;</code></h3>
<p><strong>功能:</strong> 获取某个表的基本信息。</p>
<p><strong>参数:</strong></p>
<ul>
<li>name: 待查的表名</li>
<li>detail:是否打印详细信息</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/app?name=stat&amp;detail</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"general"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"app_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"stat"</span><span class="p">,</span><span class="w">
</span><span class="nl">"max_replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"healthy"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"fully_healthy_partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"read_unhealthy_partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"unhealthy_partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"write_unhealthy_partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"nodes"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"127.0.0.1:34801"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"node"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34801"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"127.0.0.1:34802"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"node"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34802"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"total"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"node"</span><span class="p">:</span><span class="w"> </span><span class="s2">"total"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"replicas"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"ballot"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"pidx"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34801"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2/3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondaries"</span><span class="p">:</span><span class="w"> </span><span class="s2">"[127.0.0.1:34802]"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"ballot"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"pidx"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34802"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2/3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondaries"</span><span class="p">:</span><span class="w"> </span><span class="s2">"[127.0.0.1:34801]"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"ballot"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"pidx"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34801"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2/3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondaries"</span><span class="p">:</span><span class="w"> </span><span class="s2">"[127.0.0.1:34802]"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"ballot"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"pidx"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34802"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2/3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondaries"</span><span class="p">:</span><span class="w"> </span><span class="s2">"[127.0.0.1:34801]"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="metaapps"><code class="language-plaintext highlighter-rouge">/meta/apps</code></h3>
<p><strong>功能:</strong> 获取所有表的列表。</p>
<p><strong>参数:</strong></p>
<ul>
<li>detail:是否打印详细信息</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/apps?detail</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"general_info"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"app_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"stat"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"pegasus"</span><span class="p">,</span><span class="w">
</span><span class="nl">"create_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2019-08-15 12:34:15.000"</span><span class="p">,</span><span class="w">
</span><span class="nl">"drop_expire"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">,</span><span class="w">
</span><span class="nl">"drop_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">,</span><span class="w">
</span><span class="nl">"envs_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"is_stateful"</span><span class="p">:</span><span class="w"> </span><span class="s2">"true"</span><span class="p">,</span><span class="w">
</span><span class="nl">"partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"AVAILABLE"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"app_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"temp"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"pegasus"</span><span class="p">,</span><span class="w">
</span><span class="nl">"create_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2019-08-15 12:34:15.000"</span><span class="p">,</span><span class="w">
</span><span class="nl">"drop_expire"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">,</span><span class="w">
</span><span class="nl">"drop_time"</span><span class="p">:</span><span class="w"> </span><span class="s2">"-"</span><span class="p">,</span><span class="w">
</span><span class="nl">"envs_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"is_stateful"</span><span class="p">:</span><span class="w"> </span><span class="s2">"true"</span><span class="p">,</span><span class="w">
</span><span class="nl">"partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"AVAILABLE"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"healthy_info"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"app_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"stat"</span><span class="p">,</span><span class="w">
</span><span class="nl">"fully_healthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"read_unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="p">,</span><span class="w">
</span><span class="nl">"write_unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"4"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"app_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"app_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"temp"</span><span class="p">,</span><span class="w">
</span><span class="nl">"fully_healthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"partition_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8"</span><span class="p">,</span><span class="w">
</span><span class="nl">"read_unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8"</span><span class="p">,</span><span class="w">
</span><span class="nl">"write_unhealthy"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"fully_healthy_app_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"read_unhealthy_app_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total_app_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"unhealthy_app_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"write_unhealthy_app_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="metacluster"><code class="language-plaintext highlighter-rouge">/meta/cluster</code></h3>
<p><strong>功能:</strong> 获取集群基本信息。</p>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/cluster</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"balance_operation_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"move_pri=0,copy_pri=0,copy_sec=0,total=0"</span><span class="p">,</span><span class="w">
</span><span class="nl">"meta_function_level"</span><span class="p">:</span><span class="w"> </span><span class="s2">"steady"</span><span class="p">,</span><span class="w">
</span><span class="nl">"meta_servers"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34601,127.0.0.1:34602,127.0.0.1:34603"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary_meta_server"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34601"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary_replica_count_stddev"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.00"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total_replica_count_stddev"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.00"</span><span class="p">,</span><span class="w">
</span><span class="nl">"zookeeper_hosts"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:22181"</span><span class="p">,</span><span class="w">
</span><span class="nl">"zookeeper_root"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/pegasus/onebox/127.0.0.1"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="metanodes"><code class="language-plaintext highlighter-rouge">/meta/nodes</code></h3>
<p><strong>功能:</strong> 获取replica节点列表,以IP地址表示各个节点,并输出基本信息。</p>
<p><strong>参数:</strong></p>
<ul>
<li>detail:是否打印详细信息</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/nodes?detail</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"details"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"127.0.0.1:34801"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34801"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"6"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"12"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondary_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"6"</span><span class="p">,</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ALIVE"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"127.0.0.1:34802"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"127.0.0.1:34802"</span><span class="p">,</span><span class="w">
</span><span class="nl">"primary_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"6"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"12"</span><span class="p">,</span><span class="w">
</span><span class="nl">"secondary_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"6"</span><span class="p">,</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ALIVE"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"alive_node_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"total_node_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"unalive_node_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="metaapp_envsnameapp_name"><code class="language-plaintext highlighter-rouge">/meta/app_envs?name=&lt;app_name&gt;</code></h3>
<p><strong>功能:</strong> 获取某个表的所有环境变量。</p>
<p><strong>参数:</strong></p>
<ul>
<li>name: 待查的表名</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34601/meta/app_envs?name=temp</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"replica.enable_slow_query_log"</span><span class="p">:</span><span class="w"> </span><span class="s2">"true"</span><span class="p">,</span><span class="w">
</span><span class="nl">"replica.slow_query_threshold"</span><span class="p">:</span><span class="w"> </span><span class="s2">"20"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="metaappduplicationnameapp_name"><code class="language-plaintext highlighter-rouge">/meta/app/duplication?name=&lt;app_name&gt;</code></h3>
<p><strong>功能:</strong> 查询某个表的热备份情况</p>
<p><strong>添加自</strong>:版本 2.0.0</p>
<p><strong>参数:</strong></p>
<ul>
<li>name: 待查的表名</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">http://0.0.0.0:34602/meta/app/duplication?name=temp</code></p>
<p><strong>返回:</strong></p>
<ul>
<li><code class="language-plaintext highlighter-rouge">create_ts</code>:热备份的创建时间</li>
<li><code class="language-plaintext highlighter-rouge">dupid</code>:热备份的ID</li>
<li><code class="language-plaintext highlighter-rouge">not_confirmed_mutations_num</code>:各个分片当前有多少数据写尚未复制到目的集群,并且进度被同步至MetaServer</li>
<li><code class="language-plaintext highlighter-rouge">remote</code>:热备份远端集群的名字</li>
<li><code class="language-plaintext highlighter-rouge">status</code>:当前热备份的状态</li>
</ul>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"create_ts"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2020-03-09 18:13:50"</span><span class="p">,</span><span class="w">
</span><span class="nl">"dupid"</span><span class="p">:</span><span class="w"> </span><span class="mi">1583748830</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_confirmed_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"0"</span><span class="p">:</span><span class="w"> </span><span class="mi">4964</span><span class="p">,</span><span class="w">
</span><span class="nl">"1"</span><span class="p">:</span><span class="w"> </span><span class="mi">5144</span><span class="p">,</span><span class="w">
</span><span class="nl">"2"</span><span class="p">:</span><span class="w"> </span><span class="mi">5123</span><span class="p">,</span><span class="w">
</span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="mi">5148</span><span class="p">,</span><span class="w">
</span><span class="nl">"4"</span><span class="p">:</span><span class="w"> </span><span class="mi">5208</span><span class="p">,</span><span class="w">
</span><span class="nl">"5"</span><span class="p">:</span><span class="w"> </span><span class="mi">5289</span><span class="p">,</span><span class="w">
</span><span class="nl">"6"</span><span class="p">:</span><span class="w"> </span><span class="mi">5253</span><span class="p">,</span><span class="w">
</span><span class="nl">"7"</span><span class="p">:</span><span class="w"> </span><span class="mi">5148</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"remote"</span><span class="p">:</span><span class="w"> </span><span class="s2">"onebox2"</span><span class="p">,</span><span class="w">
</span><span class="nl">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DS_PAUSE"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"appid"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<h3 id="perfcounternameperf_counter_name"><code class="language-plaintext highlighter-rouge">/perfCounter?name=&lt;perf_counter_name&gt;</code></h3>
<p><strong>功能:</strong> 获取某个perf counter的详细信息。如果perf counter名字中含有特殊字符时,需要先对其进行uri编码。</p>
<p><strong>参数:</strong></p>
<ul>
<li>name: 待查的perf counter名字</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">127.0.0.1:34101/perfCounter?name=collector*app.pegasus*app.stat.read_qps%23_all_</code></p>
<p><strong>返回:</strong></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"collector*app.pegasus*app.stat.read_qps#_all_"</span><span class="p">,</span><span class="w">
</span><span class="nl">"value"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.00"</span><span class="p">,</span><span class="w">
</span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"NUMBER"</span><span class="p">,</span><span class="w">
</span><span class="nl">"description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"statistic the read_qps of app _all_"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
<p><strong>NOTE:</strong> http中的字符<code class="language-plaintext highlighter-rouge">#</code>代表锚,是一种特殊字符,所以对于perf counter名字中包含’#’字符的需要转换成<code class="language-plaintext highlighter-rouge">%23</code></p>
<h3 id="replicaduplicationappidappid"><code class="language-plaintext highlighter-rouge">/replica/duplication?appid=&lt;appid&gt;</code></h3>
<p><strong>功能:</strong> 查询ReplicaServer上某个表各个分片的热备份情况。</p>
<p><strong>添加自</strong>:版本 2.0.0</p>
<p><strong>参数:</strong></p>
<ul>
<li>appid: 待查的表的ID</li>
</ul>
<p><strong>示例:</strong><code class="language-plaintext highlighter-rouge">http://127.0.0.1:34801/replica/duplication?appid=2</code></p>
<p><strong>返回:</strong></p>
<ul>
<li><code class="language-plaintext highlighter-rouge">duplicating</code>:表示该分片是否正在运行热备份</li>
<li><code class="language-plaintext highlighter-rouge">not_confirmed_mutations_num</code>:当前有多少数据写尚未复制到目的集群,并且进度被同步至MetaServer</li>
<li><code class="language-plaintext highlighter-rouge">not_duplicated_mutations_num</code>:当前有多少数据写尚未复制到目的集群</li>
</ul>
<p><strong>NOTE:</strong><code class="language-plaintext highlighter-rouge">not_duplicated_mutations_num &lt;= not_confirmed_mutations_num</code></p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="nl">"1583820008"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"2.1"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"duplicating"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_confirmed_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_duplicated_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2.3"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"duplicating"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_confirmed_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_duplicated_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2.4"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"duplicating"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_confirmed_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_duplicated_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="nl">"2.7"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"duplicating"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_confirmed_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w">
</span><span class="nl">"not_duplicated_mutations_num"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>
</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>
本页导航
</p>
<ul class="menu-list">
<li><a href="#功能介绍">功能介绍</a></li>
<li><a href="#接口介绍">接口介绍</a>
<ul>
<li><a href="#">/</a></li>
<li><a href="#version">/version</a></li>
<li><a href="#recentstarttime">/recentStartTime</a></li>
<li><a href="#pprofprofile">/pprof/profile</a></li>
<li><a href="#pprofsymbol">/pprof/symbol</a></li>
<li><a href="#pprofheap">/pprof/heap</a></li>
<li><a href="#pprofcmdline">/pprof/cmdline</a></li>
<li><a href="#pprofgrowth">/pprof/growth</a></li>
<li><a href="#metaappnameapp_name">/meta/app?name=&lt;app_name&gt;</a></li>
<li><a href="#metaapps">/meta/apps</a></li>
<li><a href="#metacluster">/meta/cluster</a></li>
<li><a href="#metanodes">/meta/nodes</a></li>
<li><a href="#metaapp_envsnameapp_name">/meta/app_envs?name=&lt;app_name&gt;</a></li>
<li><a href="#metaappduplicationnameapp_name">/meta/app/duplication?name=&lt;app_name&gt;</a></li>
<li><a href="#perfcounternameperf_counter_name">/perfCounter?name=&lt;perf_counter_name&gt;</a></li>
<li><a href="#replicaduplicationappidappid">/replica/duplication?appid=&lt;appid&gt;</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>