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>
54 lines
5.7 KiB
HTML
54 lines
5.7 KiB
HTML
<a name="mrs_01_24277"></a><a name="mrs_01_24277"></a>
|
|
|
|
<h1 class="topictitle1">COMPACTION</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_se3b246829d4149768297e4d1c472eeab"><h4 class="sectiontitle">Function</h4><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_a8adcf45335aa490b90f435984dbe1cbe">This command is used to convert row-based log files in MOR tables into column-based data files in parquet tables to accelerate record search.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_s1671eb7942fc4963bdf01350bb3fa47f"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_24277__en-us_topic_0000001219029259_p368114466316"><strong id="mrs_01_24277__en-us_topic_0000001219029259_b1938220233449">SCHEDULE COMPACTION</strong> on <em id="mrs_01_24277__en-us_topic_0000001219029259_i2951111583514">tableIdentifier </em>|tablelocation;</p>
|
|
<p id="mrs_01_24277__en-us_topic_0000001219029259_p16767149173519"><strong id="mrs_01_24277__en-us_topic_0000001219029259_b185842718441">SHOW COMPACTION</strong> on <em id="mrs_01_24277__en-us_topic_0000001219029259_i2263191213618">tableIdentifier </em>|tablelocation;</p>
|
|
<p id="mrs_01_24277__en-us_topic_0000001219029259_p19363131814369"><strong id="mrs_01_24277__en-us_topic_0000001219029259_b763123216445">RUN COMPACTION</strong> on<em id="mrs_01_24277__en-us_topic_0000001219029259_i9621103212365"> tableIdentifier </em>|tablelocation [at instant-time];</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_se8c89a51ff704cbf8568c24dab46efb1"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_t4fe72c117c47406da504174f64aa1549" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_r88ce278ab29947e9a817bb019e1322ef"><th align="left" class="cellrowborder" valign="top" width="23.68%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_a16956298285c4692affaac5242b12032">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="76.32%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_aaab8b5e3259f49988eabaa067b4aae3a">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_r5bb5a24bf8e5448e8ff37c26fe720684"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_a704fefb2f0924b5aa5fe933b5dedadd5">tableIdentifier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_a45f6c012ef244869bc9073b46cbeb907">Name of the Hudi table to convert log files.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24277__en-us_topic_0000001219029259_row18490572326"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24277__en-us_topic_0000001219029259_p7491157153212">tablelocation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24277__en-us_topic_0000001219029259_p64919713324">The storage path of the Hudi table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24277__en-us_topic_0000001219029259_row1129110587445"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24277__en-us_topic_0000001219029259_p1829114586440">instant-time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24277__en-us_topic_0000001219029259_p029145811447">Time to run the command. You can run the <strong id="mrs_01_24277__en-us_topic_0000001219029259_b14630519144318">show compaction</strong> command to view the <strong id="mrs_01_24277__en-us_topic_0000001219029259_b567922714316">instant-time</strong> value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_sf2d9a80e0de7460491ccd7ee39a7aa01"><h4 class="sectiontitle">Examples</h4><pre class="screen" id="mrs_01_24277__en-us_topic_0000001219029259_screen3885183161220">schedule compaction on h1;
|
|
show compaction on h1;
|
|
run compaction on h1 at 20210915170758;
|
|
|
|
schedule compaction on '/tmp/hudi/h1';
|
|
run compaction on '/tmp/hudi/h1';</pre>
|
|
</div>
|
|
<div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792787_sbdb980f99f28440d9181a194ac5f3bea"><h4 class="sectiontitle">Precautions</h4><p id="mrs_01_24277__en-us_topic_0000001219029259_p132331957163812">You need to set <strong id="mrs_01_24277__en-us_topic_0000001219029259_b11748653124310">hoodie.payload.ordering.field</strong> to the value of <strong id="mrs_01_24277__en-us_topic_0000001219029259_b4521411397">preCombineField</strong> when you use the Hudi CLI or API to trigger compaction for the Hudi table created by SQL.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_s823f2687a8cc4162854ad8fcaa12a93a"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_24277__en-us_topic_0000001219029259_en-us_topic_0265792799_a19642f6cad0c4884a78f569abd795022">You can view the result in driver logs or on the client.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24272.html">DML</a></div>
|
|
</div>
|
|
</div>
|
|
|