<?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 hive compaction stuck in initiated state in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/hive-compaction-stuck-in-initiated-state/m-p/370691#M240798</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using hive 3.1.2 with hadoop 3.3.5. I manually trigger minor compaction but it's stuck in initiated state. I can't find any documentation on how to configure for workers. I read somewhere it is automatical when you set hive.txn.manager to&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;org&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;apache&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;hadoop&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;hive&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;ql&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;lockmgr&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;DbTxnManager and&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;hive&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;support&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;concurrency to true. I have also set below parameters but it is still stuck in initiated state.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;$ hive -e 'show compactions' 2&amp;gt;/dev/null&lt;BR /&gt;CompactionId Database Table Partition Type State Worker Start Time Duration(ms) HadoopJobId&lt;BR /&gt;1 default employee_trans --- MINOR initiated --- --- --- ---&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;hive.compactor.abortedtxn.threshold=200&lt;BR /&gt;hive.compactor.check.interval=100s&lt;BR /&gt;hive.compactor.cleaner.run.interval=500ms&lt;BR /&gt;hive.compactor.compact.insert.only=true&lt;BR /&gt;hive.compactor.delta.num.threshold=2&lt;BR /&gt;hive.compactor.delta.pct.threshold=0.1&lt;BR /&gt;hive.compactor.history.reaper.interval=2m&lt;BR /&gt;hive.compactor.history.retention.attempted=2&lt;BR /&gt;hive.compactor.history.retention.failed=3&lt;BR /&gt;hive.compactor.history.retention.succeeded=3&lt;BR /&gt;hive.compactor.initiator.failed.compacts.threshold=5&lt;BR /&gt;hive.compactor.initiator.on=true&lt;BR /&gt;hive.compactor.max.num.delta=100&lt;BR /&gt;hive.compactor.worker.threads=2&lt;BR /&gt;hive.compactor.worker.timeout=400s&lt;BR /&gt;hive.metastore.thrift.compact.protocol.enabled=false&lt;BR /&gt;hive.test.fail.compaction=false&lt;BR /&gt;&lt;BR /&gt;$ hdfs dfs -ls /user/hive/warehouse/employee_trans;&lt;BR /&gt;Found 10 items&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:02 /user/hive/warehouse/employee_trans/delta_0000001_0000001_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:09 /user/hive/warehouse/employee_trans/delta_0000002_0000002_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:09 /user/hive/warehouse/employee_trans/delta_0000003_0000003_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:10 /user/hive/warehouse/employee_trans/delta_0000004_0000004_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:13 /user/hive/warehouse/employee_trans/delta_0000005_0000005_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:13 /user/hive/warehouse/employee_trans/delta_0000006_0000006_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:14 /user/hive/warehouse/employee_trans/delta_0000007_0000007_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:15 /user/hive/warehouse/employee_trans/delta_0000008_0000008_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:15 /user/hive/warehouse/employee_trans/delta_0000009_0000009_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:16 /user/hive/warehouse/employee_trans/delta_0000010_0000010_0000&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2023 03:22:09 GMT</pubDate>
    <dc:creator>mwblee</dc:creator>
    <dc:date>2023-05-15T03:22:09Z</dc:date>
    <item>
      <title>hive compaction stuck in initiated state</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-compaction-stuck-in-initiated-state/m-p/370691#M240798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using hive 3.1.2 with hadoop 3.3.5. I manually trigger minor compaction but it's stuck in initiated state. I can't find any documentation on how to configure for workers. I read somewhere it is automatical when you set hive.txn.manager to&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;org&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;apache&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;hadoop&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;hive&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;ql&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;lockmgr&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;DbTxnManager and&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;hive&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;support&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;concurrency to true. I have also set below parameters but it is still stuck in initiated state.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;$ hive -e 'show compactions' 2&amp;gt;/dev/null&lt;BR /&gt;CompactionId Database Table Partition Type State Worker Start Time Duration(ms) HadoopJobId&lt;BR /&gt;1 default employee_trans --- MINOR initiated --- --- --- ---&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;hive.compactor.abortedtxn.threshold=200&lt;BR /&gt;hive.compactor.check.interval=100s&lt;BR /&gt;hive.compactor.cleaner.run.interval=500ms&lt;BR /&gt;hive.compactor.compact.insert.only=true&lt;BR /&gt;hive.compactor.delta.num.threshold=2&lt;BR /&gt;hive.compactor.delta.pct.threshold=0.1&lt;BR /&gt;hive.compactor.history.reaper.interval=2m&lt;BR /&gt;hive.compactor.history.retention.attempted=2&lt;BR /&gt;hive.compactor.history.retention.failed=3&lt;BR /&gt;hive.compactor.history.retention.succeeded=3&lt;BR /&gt;hive.compactor.initiator.failed.compacts.threshold=5&lt;BR /&gt;hive.compactor.initiator.on=true&lt;BR /&gt;hive.compactor.max.num.delta=100&lt;BR /&gt;hive.compactor.worker.threads=2&lt;BR /&gt;hive.compactor.worker.timeout=400s&lt;BR /&gt;hive.metastore.thrift.compact.protocol.enabled=false&lt;BR /&gt;hive.test.fail.compaction=false&lt;BR /&gt;&lt;BR /&gt;$ hdfs dfs -ls /user/hive/warehouse/employee_trans;&lt;BR /&gt;Found 10 items&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:02 /user/hive/warehouse/employee_trans/delta_0000001_0000001_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:09 /user/hive/warehouse/employee_trans/delta_0000002_0000002_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:09 /user/hive/warehouse/employee_trans/delta_0000003_0000003_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:10 /user/hive/warehouse/employee_trans/delta_0000004_0000004_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:13 /user/hive/warehouse/employee_trans/delta_0000005_0000005_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:13 /user/hive/warehouse/employee_trans/delta_0000006_0000006_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:14 /user/hive/warehouse/employee_trans/delta_0000007_0000007_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:15 /user/hive/warehouse/employee_trans/delta_0000008_0000008_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:15 /user/hive/warehouse/employee_trans/delta_0000009_0000009_0000&lt;BR /&gt;drwxr-xr-x - hadoop supergroup 0 2023-05-11 09:16 /user/hive/warehouse/employee_trans/delta_0000010_0000010_0000&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 03:22:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-compaction-stuck-in-initiated-state/m-p/370691#M240798</guid>
      <dc:creator>mwblee</dc:creator>
      <dc:date>2023-05-15T03:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: hive compaction stuck in initiated state</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-compaction-stuck-in-initiated-state/m-p/371229#M240926</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/83200"&gt;@mwblee&lt;/a&gt;&amp;nbsp;I am not sure if you are using any Cloudera Hive distribution, if you are, consider upgrading to latest CDP version where we have fixed many issues around compactor initiator/worker/cleaner.&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. For initiator:&amp;nbsp; upstream Jiras -&amp;nbsp;&lt;SPAN&gt;HIVE-21917,&amp;nbsp;HIVE-22568,&amp;nbsp;HIVE-22081&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For this specific issue, you may check take a look at multiple factors, such as Hive metastore being overloaded, slow/large(certain txn&amp;nbsp;related tables) metastore database.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may enable DEBUG logging in Hive metastore, and this will provide more information on why/where the compactor is stuck. If you are using opensource Hive, upgrade to Hive 4.x; you will have much better experience w.r.t. compaction.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 06:37:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-compaction-stuck-in-initiated-state/m-p/371229#M240926</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2023-05-21T06:37:31Z</dc:date>
    </item>
  </channel>
</rss>

