forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
48 lines
5.5 KiB
HTML
48 lines
5.5 KiB
HTML
<a name="mrs_01_1639"></a><a name="mrs_01_1639"></a>
|
|
|
|
<h1 class="topictitle1">Why Does a Client Keep Failing to Connect to a Server for a Long Time?</h1>
|
|
<div id="body1596003893195"><div class="section" id="mrs_01_1639__sd82b9c0c037247aabb5321a1e7ed18be"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1639__a6e1b845967784fd494252d8a2ced08d1">A HBase server is faulty and cannot provide services. In this case, when a table operation is performed on the HBase client, why is the operation suspended and no response is received for a long time?</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1639__s96332255f086429687d761527a1e431a"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1639__acb0c1255808d42819e3929f7d4690019"><strong id="mrs_01_1639__b112001031141417">Problem Analysis</strong></p>
|
|
<p id="mrs_01_1639__a50577e7015a74525b2014bee146b329b">When the HBase server malfunctions, the table operation request from the HBase client is tried for several times and times out. The default timeout value is <strong id="mrs_01_1639__b1521463371412">Integer.MAX_VALUE (2147483647 ms)</strong>. The table operation request is retired constantly during such a long period of time and is suspended at last. </p>
|
|
<p id="mrs_01_1639__a66e8e2cf3b0140caadb514f273624a38"><strong id="mrs_01_1639__b7516160181517">Solution</strong></p>
|
|
<p id="mrs_01_1639__ad39f292fa4ac42f5817ca91bf7511422">The HBase client provides two configuration items to configure the retry and timeout of the client. <a href="#mrs_01_1639__te9ce661d0c4a4745b801616b66b97321">Table 1</a> describes them.</p>
|
|
<p id="mrs_01_1639__p194961522134110">Set the following parameters in the <strong id="mrs_01_1639__b92840315158"><em id="mrs_01_1639__i1559619167154">Client installation path</em></strong><strong id="mrs_01_1639__b4284113110153">/HBase/hbase/conf/hbase-site.xml</strong> configuration file:</p>
|
|
|
|
<div class="tablenoborder"><a name="mrs_01_1639__te9ce661d0c4a4745b801616b66b97321"></a><a name="te9ce661d0c4a4745b801616b66b97321"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1639__te9ce661d0c4a4745b801616b66b97321" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Configuration parameters of retry and timeout</caption><thead align="left"><tr id="mrs_01_1639__r93caa06c3ffc4370b3538f052d469fad"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.7.2.4.1.1"><p id="mrs_01_1639__ac6f4c11f4ba84786af84013b0b53dfc0">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.7.2.4.1.2"><p id="mrs_01_1639__afee33631874f4ebaa64b2c7efc48a88e">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.7.2.4.1.3"><p id="mrs_01_1639__ab0e10dd3cdb0495d8dc80fdb3a72b8f7">Default Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1639__rbb676fbe2cf8415aaff080b37af0c569"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.1 "><p id="mrs_01_1639__ae9c5a4e7663649168028f5a9c97f75b9">hbase.client.operation.timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.2 "><p id="mrs_01_1639__ad2b8fb519e3a4857a746e8d7ff8d6dfc">Client operation timeout period You need to manually add the information to the configuration file.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.3 "><p id="mrs_01_1639__af7c5218fecb745878bef6ff3281ac778">2147483647 ms</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1639__r94e7da39cfa244b2813db784f10e63fa"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.1 "><p id="mrs_01_1639__a3a8b2826616f4f099814b372b84c6c14">hbase.client.retries.number</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.2 "><p id="mrs_01_1639__p174516569318">Maximum retry times supported by all retryable operations.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.7.2.4.1.3 "><p id="mrs_01_1639__a388c42b0afe94979ae41e4a7e8e61ac4">35</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1639__a1ba9f57525e84056a222530742ace420"><a href="#mrs_01_1639__fc7b1b6a1826d4b98bb68d1fd842512cb">Figure 1</a> describes the working principles of retry and timeout.</p>
|
|
<div class="fignone" id="mrs_01_1639__fc7b1b6a1826d4b98bb68d1fd842512cb"><a name="mrs_01_1639__fc7b1b6a1826d4b98bb68d1fd842512cb"></a><a name="fc7b1b6a1826d4b98bb68d1fd842512cb"></a><span class="figcap"><b>Figure 1 </b>Process for HBase client operation retry timeout</span><br><span><img id="mrs_01_1639__i9da21f8daf1841deb2171654782ac889" src="en-us_image_0000001296090588.jpg"></span></div>
|
|
<p id="mrs_01_1639__a01aafa740d014a2b98f35d1108b763cf">The process indicates that a suspension occurs if the preceding parameters are not configured based on site requirements. It is recommended that a proper timeout period be set based on scenarios. If the operation takes a long time, set a long timeout period. If the operation takes a shot time, set a short timeout period. The number of retries can be set to <span class="parmvalue" id="mrs_01_1639__parmvalue125605301917"><b>(hbase.client.retries.number)*60*1000(ms)</b></span>. The timeout period can be slightly greater than <span class="parmname" id="mrs_01_1639__parmname1864818514194"><b>hbase.client.operation.timeout</b></span>. </p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1638.html">Common Issues About HBase</a></div>
|
|
</div>
|
|
</div>
|
|
|