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>
52 lines
5.1 KiB
HTML
52 lines
5.1 KiB
HTML
<a name="mrs_01_1448"></a><a name="mrs_01_1448"></a>
|
|
|
|
<h1 class="topictitle1">CLEAN FILES</h1>
|
|
<div id="body1595920214923"><div class="section" id="mrs_01_1448__s1bff0a7d17294b7c9a4d8b14e8601197"><h4 class="sectiontitle">Function</h4><p id="mrs_01_1448__a9223a77ed9c14fbf8640d6a14af972d7">After the <strong id="mrs_01_1448__b16992722121416">DELETE SEGMENT</strong> command is executed, the deleted segments are marked as the <strong id="mrs_01_1448__b14268143317148">delete</strong> state. After the segments are merged, the status of the original segments changes to <strong id="mrs_01_1448__b42316409144">compacted</strong>. The data files of these segments are not physically deleted. If you want to forcibly delete these files, run the <strong id="mrs_01_1448__b728614115159"><b><span class="cmdname" id="mrs_01_1448__cmdname11921142162012">CLEAN FILES</span></b></strong> command.</p>
|
|
<p id="mrs_01_1448__a21ad5a6db51f4e1885c8e260fb1c5174">However, running this command may result in a query command execution failure.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1448__sa0d70a9905b24a49879dd24428cbead1"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_1448__a94820938e4b843e69c8085207eee23ee"><b><span class="cmdname" id="mrs_01_1448__cmdname456712692017">CLEAN FILES FOR TABLE</span></b><i><span class="varname" id="mrs_01_1448__v118b908727a8457da510d88b26734095"> [db_name.]table_name</span></i> ;</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1448__sd87f361fc80e4564add00f51b8e47e76"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1448__tdd0dbdd0de23449d865179baf9886fc7" frame="border" border="1" rules="all"><caption><b>Table 1 </b>CLEAN FILES FOR TABLE parameters</caption><thead align="left"><tr id="mrs_01_1448__ree642220a49d4ec1b38f612f8938f30d"><th align="left" class="cellrowborder" valign="top" width="22.18%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_1448__a90b34ad5d9564bf5b2219865451e5cb8">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="77.82%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_1448__a4d187fae84c24db8a122afdbcd95248d">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1448__r8098e65e043843d1a4bc8faba97d334f"><td class="cellrowborder" valign="top" width="22.18%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1448__a4d6381ea14f44db2b6ea972271c17819">db_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.82%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1448__a75bf89decea146cb926e9415571d51c0">Database name. It consists of letters, digits, and underscores (_).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1448__r82b27f43c8d34a21bcedc391d22f8c0e"><td class="cellrowborder" valign="top" width="22.18%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1448__afc9efd85874b44879197466a5aa865ad">table_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.82%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1448__a99cee7a5dcc3449aa9d003fa898b9468">Name of the database table. It consists of letters, digits, and underscores (_).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1448__s575a6ce1a8aa4407a594d74790fd6534"><h4 class="sectiontitle">Precautions</h4><p id="mrs_01_1448__a1ca30f71c2e14ffdb5dca6ffa9cf29f7">None</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1448__s41bcdb01f192483080b3d37ba63c062b"><h4 class="sectiontitle">Examples</h4><p id="mrs_01_1448__p28581651141512">Add Carbon configuration parameters.</p>
|
|
<pre class="screen" id="mrs_01_1448__screen3868201717162">carbon.clean.file.force.allowed = true</pre>
|
|
<p id="mrs_01_1448__p19316121944"><strong id="mrs_01_1448__b54774717279">create table carbon01(a int,b string,c string) stored as carbondata;</strong></p>
|
|
<p id="mrs_01_1448__p1020020421940"><strong id="mrs_01_1448__b19501197202714">insert into table carbon01 select 1,'a','aa';</strong></p>
|
|
<p id="mrs_01_1448__p1755115541845"><strong id="mrs_01_1448__b250213710278">insert into table carbon01 select 2,'b','bb';</strong></p>
|
|
<p id="mrs_01_1448__p2036056058"><strong id="mrs_01_1448__b18503472270">delete from table carbon01 where segment.id in (0);</strong></p>
|
|
<p id="mrs_01_1448__p22161037951"><strong id="mrs_01_1448__b1650410719276">show segments for table carbon01;</strong></p>
|
|
<p id="mrs_01_1448__aca788e58f51045a294af41a24c9f8439"><strong id="mrs_01_1448__b1431533682719">CLEAN FILES FOR TABLE carbon01 options('force'='true');</strong></p>
|
|
<p id="mrs_01_1448__p960725717515"><strong id="mrs_01_1448__b5236153942715">show segments for table carbon01;</strong></p>
|
|
<p id="mrs_01_1448__af1ff962328424a39a35ffff3c5c28092">In this example, all the segments marked as <strong id="mrs_01_1448__b773663017158">deleted </strong> and <strong id="mrs_01_1448__b1340912941617">compacted</strong> are physically deleted.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1448__s86230c3b0c57425c939df39a1b1a0115"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_1448__a28169de0f4cb405690357b16d5027435">Success or failure will be recorded in the driver logs.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1437.html">DML</a></div>
|
|
</div>
|
|
</div>
|
|
|