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>
16 lines
1.6 KiB
HTML
16 lines
1.6 KiB
HTML
<a name="mrs_01_2309"></a><a name="mrs_01_2309"></a>
|
|
|
|
<h1 class="topictitle1">Why Cannot Data Be Queried After the MapReduce Engine Is Switched After the Tez Engine Is Used to Execute Union-related Statements?</h1>
|
|
<div id="body1600052907096"><div class="section" id="mrs_01_2309__s00057ad6e9d340e7ac85cc8cab57b5b8"><h4 class="sectiontitle">Question</h4><p id="mrs_01_2309__ab205ccde787940e3a698bda21dcfb0b1">Hive uses the Tez engine to execute union-related statements to write data. After Hive is switched to the MapReduce engine for query, no data is found.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_2309__s09d91bfe41564a339cdf23a7fdda4275"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_2309__a4b762bfc15934cfb99747c295dc76fe1">When Hive uses the Tez engine to execute the union-related statement, the generated output file is stored in the <strong id="mrs_01_2309__b2301349511">HIVE_UNION_SUBDIR</strong> directory. After Hive is switched back to the MapReduce engine, files in the directory are not read by default. Therefore, data in the <strong id="mrs_01_2309__b429231065117">HIVE_UNION_SUBDIR</strong> directory is not read.</p>
|
|
<p id="mrs_01_2309__p1890511104410">In this case, you can set <strong id="mrs_01_2309__b6566172011518">mapreduce.input.fileinputformat.input.dir.recursive</strong> to <strong id="mrs_01_2309__b6136222135112">true</strong> to enable union optimization and determine whether to read data in the directory.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1752.html">Common Issues About Hive</a></div>
|
|
</div>
|
|
</div>
|
|
|