Yang, Tong 3f5759eed2 MRS comp-lts 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>
2023-01-19 17:08:45 +00:00

19 lines
3.9 KiB
HTML

<a name="mrs_01_0968"></a><a name="mrs_01_0968"></a>
<h1 class="topictitle1">Inserting Data to a Directory That Does Not Exist</h1>
<div id="body8662426"><div class="section" id="mrs_01_0968__en-us_topic_0000001219230609_section883415117430"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0968__en-us_topic_0000001219230609_p786961194311">This function applies to Hive.</p>
<p id="mrs_01_0968__en-us_topic_0000001219230609_p1786981124314">With this function enabled, run the <strong id="mrs_01_0968__en-us_topic_0000001219230609_b786991113437">insert overwrite directory </strong><em id="mrs_01_0968__en-us_topic_0000001219230609_i15830528195016">/path1/path2/path3</em>... command to write a subdirectory. The permission of the <em id="mrs_01_0968__en-us_topic_0000001219230609_i157819601717">/path1/path2</em> directory is 700, and the owner is the current user. If the <em id="mrs_01_0968__en-us_topic_0000001219230609_i18536241178">/path3</em> directory does not exist, it is automatically created and data is written successfully.</p>
<p id="mrs_01_0968__en-us_topic_0000001219230609_p8869511174313">This function is supported when <strong id="mrs_01_0968__en-us_topic_0000001219230609_b19565740161716">hive.server2.enable.doAs</strong> is set to <strong id="mrs_01_0968__en-us_topic_0000001219230609_b195661340151711">true</strong> in earlier versions. This version supports the function when <strong id="mrs_01_0968__en-us_topic_0000001219230609_b1856624091719">hive.server2.enable.doAs</strong> is set to <strong id="mrs_01_0968__en-us_topic_0000001219230609_b4566340111718">false</strong>.</p>
<div class="note" id="mrs_01_0968__en-us_topic_0000001219230609_note1183517111434"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_0968__en-us_topic_0000001219230609_p168697110432">The parameter adjustment of this function is the same as that of the custom parameters added in <a href="mrs_01_0967.html">Writing a Directory into Hive with the Old Data Removed to the Recycle Bin</a>.</p>
</div></div>
</div>
<div class="section" id="mrs_01_0968__en-us_topic_0000001219230609_section283671184312"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_0968__en-us_topic_0000001219230609_ol181811550174911"><li id="mrs_01_0968__en-us_topic_0000001219230609_li874802051810"><span>Log in to FusionInsight Manager. For details, see <a href="mrs_01_2124.html">Accessing FusionInsight Manager</a>. Choose <strong id="mrs_01_0968__en-us_topic_0000001219230609_b67021829125520">Cluster</strong> &gt; <strong id="mrs_01_0968__en-us_topic_0000001219230609_b16119139114512">Services</strong> &gt; <strong id="mrs_01_0968__en-us_topic_0000001219230609_b812113392454">Hive</strong> &gt; <strong id="mrs_01_0968__en-us_topic_0000001219230609_b1012353964520">Configurations</strong> &gt; <strong id="mrs_01_0968__en-us_topic_0000001219230609_b9125153974515">All Configurations</strong>.</span></li><li id="mrs_01_0968__en-us_topic_0000001219230609_li051003218413"><span>Choose <strong id="mrs_01_0968__en-us_topic_0000001219230609_b1737983404210">HiveServer(Role)</strong> &gt; <strong id="mrs_01_0968__en-us_topic_0000001219230609_b837943464212">Customization</strong>, add a customized parameter to the <strong id="mrs_01_0968__en-us_topic_0000001219230609_b173791134184213">hive-site.xml</strong> parameter file, set <strong id="mrs_01_0968__en-us_topic_0000001219230609_b3380103416420">Name</strong> to <strong id="mrs_01_0968__en-us_topic_0000001219230609_b1338033411428">hive.overwrite.directory.move.trash</strong>, and set <strong id="mrs_01_0968__en-us_topic_0000001219230609_b1738014349428">Value</strong> to <strong id="mrs_01_0968__en-us_topic_0000001219230609_b23801334124217">true</strong>. Restart all Hive instances after the modification.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0581.html">Using Hive</a></div>
</div>
</div>