doc-exports/docs/css/api-ref/css_03_0089.html
Zheng, Xiu bf0cbd66f9 CSS API 22.4.1 Version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2023-04-12 00:11:02 +00:00

149 lines
11 KiB
HTML

<a name="css_03_0089"></a><a name="css_03_0089"></a>
<h1 class="topictitle1">Scaling In Nodes of a Specific Type</h1>
<div id="body0000001526825597"><div class="section" id="css_03_0089__section1171503616312"><h4 class="sectiontitle">Function</h4><p id="css_03_0089__p17151836183118">This API is used to remove instances of different types and reduce instance storage capacity in a cluster.</p>
</div>
<div class="section" id="css_03_0089__section371763619316"><h4 class="sectiontitle">URI</h4><p id="css_03_0089__p671803623117">POST /v1.0/extend/{project_id}/clusters/{cluster_id}/role/shrink</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0089__table3720936133111" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="css_03_0089__row16719113613114"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0089__p14721136153117">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0089__p6721133619317">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0089__p472216365315">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0089__p12723136113111">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row87195367311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0089__p12723193693111">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0089__p772453611312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0089__p172563673111">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0089__p372517367315">Project ID. For details, see <a href="css_03_0071.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
<tr id="css_03_0089__row57199366314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0089__p9726936143111">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0089__p272683617316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0089__p77271368312">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0089__p11728936163116">ID of the cluster you want to scale in.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0089__section1572883633117"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0089__request_ShrinkClusterReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="css_03_0089__row16729736203116"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="css_03_0089__p1973033611312">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="css_03_0089__p473173618318">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="css_03_0089__p773233620317">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="css_03_0089__p3733143683115">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row87291936103119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="css_03_0089__p173413663112">shrink</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="css_03_0089__p107372367316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="css_03_0089__p273823615314">Array of <a href="#css_03_0089__request_ShrinkNodeReq">ShrinkNodeReq</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="css_03_0089__p14739183653120">Type and quantity of nodes you want to remove from a cluster.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="css_03_0089__request_ShrinkNodeReq"></a><a name="request_ShrinkNodeReq"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0089__request_ShrinkNodeReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ShrinkNodeReq</caption><thead align="left"><tr id="css_03_0089__row1074073673117"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0089__p137411536133110">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="css_03_0089__p20742193633112">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="css_03_0089__p8742153619317">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="css_03_0089__p187432364316">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row13740163612317"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0089__p167430367311">reducedNodeNum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0089__p1874416363310">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0089__p19744436143120">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0089__p13805587380">Number of nodes you want to remove from a cluster.</p>
<ul id="css_03_0089__ul1367437401"><li id="css_03_0089__li8336247134013">After the scale-in, there has to be at least one node in each AZ under each node type.</li><li id="css_03_0089__li1393316502408">In a cross-AZ cluster, the difference between the numbers of the same type nodes in different AZs cannot exceed 1.</li><li id="css_03_0089__li17611438405">For a cluster without master nodes, the number of removed data nodes (including cold data nodes and other types of nodes) in a scale-in must be fewer than half of the original data node number, and the number of remaining data nodes after a scale-in must be greater than the maximum number of index replicas.For a cluster with master nodes, the number of removed master nodes in a scale-in must be fewer than half of the original master node number. After scale-in, there has to be an odd number of master nodes, and there has to be at least three of them.</li></ul>
</td>
</tr>
<tr id="css_03_0089__row20740036203116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0089__p47451236123119">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0089__p1274612366312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0089__p1874603619318">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0089__p2747736193115">Node type.</p>
<ul id="css_03_0089__ul1474853610313"><li id="css_03_0089__li27484364312"><strong id="css_03_0089__b57507362315">ess</strong>: data node</li><li id="css_03_0089__li1750133620314"><strong id="css_03_0089__b1275119365313">ess-cold</strong>: cold data node</li><li id="css_03_0089__li1475193611319"><strong id="css_03_0089__b177525363317">ess-client</strong>: client node</li><li id="css_03_0089__li137522361316"><strong id="css_03_0089__b13752113613119">ess-master</strong>: master node</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0089__section15753173610313"><h4 class="sectiontitle">Response Parameters</h4><p id="css_03_0089__p975403603114">None</p>
</div>
<div class="section" id="css_03_0089__section1375493653110"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="css_03_0089__screen3755103613111">{
"shrink" : [ {
"type" : "ess",
"reducedNodeNum" : 1
} ]
}</pre>
</div>
<div class="section" id="css_03_0089__section5758183620317"><h4 class="sectiontitle">Example Responses</h4><p id="css_03_0089__p2075933612312">None</p>
</div>
<div class="section" id="css_03_0089__section475933619311"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0089__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="css_03_0089__row37607368314"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="css_03_0089__p107611836113114">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="css_03_0089__p1876263613316">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row87601836153110"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0089__p07621536123113">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0089__p14763193663116">Request succeeded.</p>
</td>
</tr>
<tr id="css_03_0089__row5761183653112"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0089__p9764143673118">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0089__p20765103643111">Invalid request.</p>
<p id="css_03_0089__p1076563613313">Modify the request before retry.</p>
</td>
</tr>
<tr id="css_03_0089__row1676120362314"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0089__p1576603619316">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0089__p576712366318">The request could not be completed due to a conflict with the current state of the resource.</p>
<p id="css_03_0089__p67671436113117">The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict.</p>
</td>
</tr>
<tr id="css_03_0089__row87611336123112"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0089__p17676361318">412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0089__p1676873613310">The server did not meet one of the preconditions contained in the request.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0008.html">Cluster Management APIs</a></div>
</div>
</div>