<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HIVE: No Cleanup working after Compaction: in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/318031#M227387</link>
    <description>&lt;P&gt;Were you able to have Hive clean up the obsolete files? Just checking in.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 16:17:13 GMT</pubDate>
    <dc:creator>aakulov</dc:creator>
    <dc:date>2021-06-09T16:17:13Z</dc:date>
    <item>
      <title>HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317486#M227184</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have run manually minor and major compaction. Table data is referring to the new delta and base folder but the old delta and base folders are not removing and it consumes the hive storage. Moreover, No running job is referring to this table.&lt;BR /&gt;&lt;/SPAN&gt;Queries:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;create table compaction_check.check_file(name string, age int);
insert into compaction_check.check_file values('user 1', 10),('user 2', 20),('user 3', 30);
insert into compaction_check.check_file values('user 4', 10),('user 5', 30),('user 6', 15);
ALTER TABLE compaction_check.check_file COMPACT 'major';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Check input files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;select distinct INPUT__FILE__NAME FROM compaction_check.check_file;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-06-01 at 20.19.12.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31388i448EFBEDFB297A61/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-01 at 20.19.12.png" alt="Screenshot 2021-06-01 at 20.19.12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Actual table directory :&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-06-01 at 20.18.29.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31389i6448FE1D1C0B942B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-01 at 20.18.29.png" alt="Screenshot 2021-06-01 at 20.18.29.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why stale the base and delta folders are not removed?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 14:43:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317486#M227184</guid>
      <dc:creator>sujonict07</dc:creator>
      <dc:date>2021-06-01T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317502#M227196</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please provide the output of&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SHOW TBLPROPERTIES compaction_check.check_file;&lt;/LI-CODE&gt;&lt;P&gt;Also, which version of CDH/HDP or CDP are you using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 17:45:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317502#M227196</guid>
      <dc:creator>aakulov</dc:creator>
      <dc:date>2021-06-01T17:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317517#M227206</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/74887"&gt;@aakulov&lt;/a&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am using Cloudera 7.1.3 and HIVE version: 3.1.3&lt;BR /&gt;&lt;BR /&gt;Table TBLPROPERTIES Output:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-06-02 at 9.27.06 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31395i81413BC1BCDC2A0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-02 at 9.27.06 AM.png" alt="Screenshot 2021-06-02 at 9.27.06 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Thanks in Advance.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 04:21:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317517#M227206</guid>
      <dc:creator>sujonict07</dc:creator>
      <dc:date>2021-06-02T04:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317567#M227229</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Base on the output, looks like the table itself is using the default compaction settings. That's good. Next place to check is the global Hive parameters and their values. Note that some of these settings are turned off by default (e.g. hive.compactor.initiator.on = false). See documentation below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/cdp-private-cloud-base/7.1.3/managing-hive/topics/hive-compact-properties.html" target="_blank"&gt;https://docs.cloudera.com/cdp-private-cloud-base/7.1.3/managing-hive/topics/hive-compact-properties.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 14:45:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317567#M227229</guid>
      <dc:creator>aakulov</dc:creator>
      <dc:date>2021-06-02T14:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317626#M227253</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/74887"&gt;@aakulov&lt;/a&gt;,&lt;BR /&gt;In my Hive Configuration,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;hive.compactor.initiator.on = Enabled&lt;/LI-CODE&gt;&lt;P&gt;Here is the screenshot of Hive and hiveServer2 configurations:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-06-03 at 3.32.45 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31406i0A55F5EF515BE77D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-03 at 3.32.45 PM.png" alt="Screenshot 2021-06-03 at 3.32.45 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-06-03 at 3.33.24 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31405iBA08034C9C79728E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-03 at 3.33.24 PM.png" alt="Screenshot 2021-06-03 at 3.33.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, Is there anything else that I have to check or configure to remove the older base and delta folders?&lt;BR /&gt;&lt;BR /&gt;Thank you again, Alex.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 09:56:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317626#M227253</guid>
      <dc:creator>sujonict07</dc:creator>
      <dc:date>2021-06-03T09:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317645#M227265</link>
      <description>&lt;P&gt;Ok, after you execute COMPACT on your table. Can you also run:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SHOW COMPACTIONS;&lt;/LI-CODE&gt;&lt;P&gt;To see what state the compaction operation ends up in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another place to look is in the HMS logs. Search for your table name and see what compaction events have and have not occurred for your table. Please provide pertinent log lines here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also check to see if you have this parameter in hive-site.xml:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hive.metastore.housekeeping.threads.on==true&lt;/LI-CODE&gt;&lt;P&gt;This is responsible for timing out stale transactions on the table. If it's not on, stale transactions are never cleaned up and, as a consequence, Hive does not remove the old delta files. If you make a change to this value, you'll need to restart the stale service.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:49:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/317645#M227265</guid>
      <dc:creator>aakulov</dc:creator>
      <dc:date>2021-06-03T13:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: HIVE: No Cleanup working after Compaction:</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/318031#M227387</link>
      <description>&lt;P&gt;Were you able to have Hive clean up the obsolete files? Just checking in.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 16:17:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HIVE-No-Cleanup-working-after-Compaction/m-p/318031#M227387</guid>
      <dc:creator>aakulov</dc:creator>
      <dc:date>2021-06-09T16:17:13Z</dc:date>
    </item>
  </channel>
</rss>

