Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
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>
2022-12-09 14:55:21 +00:00

22 lines
3.0 KiB
HTML

<a name="mrs_01_1651"></a><a name="mrs_01_1651"></a>
<h1 class="topictitle1">What Should I Do If I Fail to Create Tables Due to the FAILED_OPEN State of Regions?</h1>
<div id="body1596003894612"><div class="section" id="mrs_01_1651__s2a605a8fe4cd4207b41144ff2ab21174"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1651__a57384355d2184e24a25193cb1e7b9071">What should I do if I fail to create tables due to the FAILED_OPEN state of Regions?</p>
</div>
<div class="section" id="mrs_01_1651__sc486a66886be439a994a1a41a19b3e11"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1651__af7ec8a3f8fcf4ddc982653e1d0940a19">If a network, HDFS, or Active HMaster fault occurs during the creation of tables, some Regions may fail to go online and therefore enter the FAILED_OPEN state. In this case, tables fail to be created.</p>
<p id="mrs_01_1651__a090b02316d75426cbb9e439f31c432bd">The tables that fail to be created due to the preceding mentioned issue cannot be repaired. To solve this problem, perform the following operations to delete and re-create the tables:</p>
<p id="mrs_01_1651__a9427a5dad34d4b03830e32381f5f3af6"></p>
<ol id="mrs_01_1651__oe8363b5b70ef40a0af13dac9028bb3d8"><li id="mrs_01_1651__l64f625e394ce4954b75265931f0a5117">Run the following command on the cluster client to repair the state of the tables:<p id="mrs_01_1651__acc918c837e864b3091004054fb3749de"><a name="mrs_01_1651__l64f625e394ce4954b75265931f0a5117"></a><a name="l64f625e394ce4954b75265931f0a5117"></a><b><span class="cmdname" id="mrs_01_1651__ca1650773542040aea85eb655dc072eb4">hbase hbck -fixTableStates</span></b></p>
</li><li id="mrs_01_1651__l04402e18a29c4bd592b818b35e843105">Enter the HBase shell and run the following commands to delete the tables that fail to be created:<p id="mrs_01_1651__a56983952b1ed499dbf2a782a6575d56e"><a name="mrs_01_1651__l04402e18a29c4bd592b818b35e843105"></a><a name="l04402e18a29c4bd592b818b35e843105"></a><i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1651__c75031b0007594e36b50522129984f6c4">truncate</span></b></i> <i><span class="varname" id="mrs_01_1651__vcaa39393abc34140ae99dc2582bb762a">'&lt;table_name&gt;'</span></i></p>
<p id="mrs_01_1651__a3a699c4b3dac4162974effb05227da03"><i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1651__cc058c5a664654aeab1ca9033faab7b0f">disable</span></b></i> <i><span class="varname" id="mrs_01_1651__v9e364edcf3454524911b6894f6c6eab9">'&lt;table_name&gt;'</span></i></p>
<p id="mrs_01_1651__a34e8216d58844069b2fa58dbe382d7e0"><i><b><span class="cmdname" style="font-family:Arial" id="mrs_01_1651__c32ce78d325364103b0db155a5867976b">drop</span></b></i> <i><span class="varname" id="mrs_01_1651__v5c8d51f19b414bb68b56bd4312728dd7">'&lt;table_name&gt;'</span></i></p>
</li><li id="mrs_01_1651__l991e572a09c743c4a7a2874c60b6112d">Create the tables using the recreation command.</li></ol>
</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>