doc-exports/docs/css/api-ref/css_03_0089.html
Zheng, Xiu 99a2d77599 css api 23.5.1 20240520
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>
2024-06-07 17:47:08 +00:00

154 lines
11 KiB
HTML

<a name="css_03_0089"></a><a name="css_03_0089"></a>
<h1 class="topictitle1">Removing Nodes of a Specific Type</h1>
<div id="body0000001526825597"><div class="section" id="css_03_0089__section2174429172619"><h4 class="sectiontitle">Function</h4><p id="css_03_0089__p6174152920266">This API is used to remove instances of specific types and reduce instance storage capacity in a cluster.</p>
</div>
<div class="section" id="css_03_0089__section2174429142612"><h4 class="sectiontitle">Debugging</h4><p id="css_03_0089__p817513296262">You can debug this API in . Automatic authentication is supported.</p>
</div>
<div class="section" id="css_03_0089__section18175182916265"><h4 class="sectiontitle">URI</h4><p id="css_03_0089__p5175192982612">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__table1517711297269" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="css_03_0089__row81762029182620"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0089__p111772290264">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__p617782910265">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__p1817842942616">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__p1417842918268">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row11176929142614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0089__p141781329122615">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0089__p13179192942612">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0089__p517922914261">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0089__p14180529162617">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__row5176829192618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0089__p41801529142610">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0089__p518082916269">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0089__p41812029202618">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0089__p131811429182610">ID of the cluster you want to scale in</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0089__section5182132914268"><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 parameter</caption><thead align="left"><tr id="css_03_0089__row61821329152614"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="css_03_0089__p218310298263">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="css_03_0089__p218492962614">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="css_03_0089__p12184329132615">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="css_03_0089__p91849291263">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row17183102902612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="css_03_0089__p2184129122612">shrink</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="css_03_0089__p518522910267">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="css_03_0089__p61851929112616">Array of <a href="#css_03_0089__request_ShrinkNodeReq">ShrinkNodeReq</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="css_03_0089__p1185729142618">Type and quantity of nodes you want to remove</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__row151871329132614"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="css_03_0089__p1718819295262">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="css_03_0089__p1418915291267">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="css_03_0089__p1018932972612">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="css_03_0089__p16190729182620">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row1118762952616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="css_03_0089__p51906299269">reducedNodeNum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="css_03_0089__p219014292267">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="css_03_0089__p71911029142613">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="css_03_0089__p4687132720371">Number of nodes you want to remove.</p>
<p id="css_03_0089__p16971732153718">- After the scale-in, there has to be at least one node in each AZ under each node type.</p>
<p id="css_03_0089__p293154018376">- In a cross-AZ cluster, the difference between the numbers of the same type nodes in different AZs cannot exceed 1.</p>
<p id="css_03_0089__p1324344615373">- For a cluster with no 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.</p>
<p id="css_03_0089__p1419142972612">- 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.</p>
</td>
</tr>
<tr id="css_03_0089__row9187142916260"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="css_03_0089__p14191102942620">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="css_03_0089__p17192152922619">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="css_03_0089__p16192182918267">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="css_03_0089__p91921329172613">Node type.</p>
<ul id="css_03_0089__ul619272952615"><li id="css_03_0089__li8193102915267"><strong id="css_03_0089__b8679082698343">ess</strong>: data node</li><li id="css_03_0089__li17193629192611"><strong id="css_03_0089__b13107303668347">ess-cold</strong>: cold data node</li><li id="css_03_0089__li8194112942610"><strong id="css_03_0089__b4917203828348">ess-client</strong>: Client node</li><li id="css_03_0089__li219412917266"><strong id="css_03_0089__b139328609083410">ess-master</strong>: Master node</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0089__section17195129162611"><h4 class="sectiontitle">Response Parameters</h4><p id="css_03_0089__p10195929152610">None</p>
</div>
<div class="section" id="css_03_0089__section18196429162616"><h4 class="sectiontitle">Request Example</h4><pre class="screen" id="css_03_0089__screen1019822982615">{
"shrink" : [ {
"type" : "ess",
"reducedNodeNum" : 1
} ]
}</pre>
</div>
<div class="section" id="css_03_0089__section919942918267"><h4 class="sectiontitle">Response Example</h4><p id="css_03_0089__p4199112922611">None</p>
</div>
<div class="section" id="css_03_0089__section8200112917266"><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__row6201929102612"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="css_03_0089__p120382992616">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="css_03_0089__p172037292269">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0089__row13201182912613"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0089__p1520402972611">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0089__p62040292263">The request is processed.</p>
</td>
</tr>
<tr id="css_03_0089__row72019295266"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0089__p4204182913261">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0089__p920402916267">Invalid request.</p>
<p id="css_03_0089__p13205122914265">Modify the request instead of retrying.</p>
</td>
</tr>
<tr id="css_03_0089__row7201152942617"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0089__p1920513298260">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0089__p1920517299265">The request cannot be processed due to a conflict.</p>
<p id="css_03_0089__p1205102952614">This status code indicates that the resource that the client attempts to create already exists, or the request fails to be processed because of the update of the conflict request.</p>
</td>
</tr>
<tr id="css_03_0089__row17202132962610"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0089__p1920612296263">412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0089__p17206182932618">The server does not meet one of the requirements that the requester puts on 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>