<?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: msck repair table bad behaviour in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/msck-repair-table-bad-behaviour/m-p/34547#M10110</link>
    <description>&lt;P&gt;I resolved the problem on my own, I just want to point out that this strange behaviour was due to some incorrectness on data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;At some point in time, partitioned data went from "table_folder/one_partition/another_partition" to "table_foldere/another_partition/one_partition"&lt;/P&gt;&lt;P&gt;This caused the msck repair command to fail, only aligning metastore data to the latter partition type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I don't know what caused the inversion, I asked the dev team and they also don't know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, fixing this problem (by recreating the table with the partition order in the correct way) let msck repair to work correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;Omar&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2015 11:20:00 GMT</pubDate>
    <dc:creator>omaritec</dc:creator>
    <dc:date>2015-11-30T11:20:00Z</dc:date>
    <item>
      <title>msck repair table bad behaviour</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/msck-repair-table-bad-behaviour/m-p/33830#M10109</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My client is asking me a way to backup hive tables on tape.&amp;nbsp;I know, this is not "big-data style". This is mandatory for them so I need to accomodate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found out a way to do this, but the procedure implies, when restoring, this procedure:&lt;/P&gt;&lt;P&gt;- create the table using the DDL previously backed up via "show create table" statement;&lt;/P&gt;&lt;P&gt;- mv the files to the warehouse dir/db/table just created;&lt;/P&gt;&lt;P&gt;- run msck repair table on that table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command works without error, however I found out that the original table has got about 111 million records, and the target only has got 37 millions.&lt;/P&gt;&lt;P&gt;I compared the hdfs size of the folder and they are the same.&lt;/P&gt;&lt;P&gt;I compared the number of partitions of the table and they are the same.&lt;/P&gt;&lt;P&gt;I tried to run msck repair once again (just in case), but the result doesn't change.&lt;/P&gt;&lt;P&gt;So I think the problem must be in the msck command: files are in place, but somehow it skips some in fixing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Bye&lt;/P&gt;&lt;P&gt;Omar&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:48:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/msck-repair-table-bad-behaviour/m-p/33830#M10109</guid>
      <dc:creator>omaritec</dc:creator>
      <dc:date>2022-09-16T09:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: msck repair table bad behaviour</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/msck-repair-table-bad-behaviour/m-p/34547#M10110</link>
      <description>&lt;P&gt;I resolved the problem on my own, I just want to point out that this strange behaviour was due to some incorrectness on data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;At some point in time, partitioned data went from "table_folder/one_partition/another_partition" to "table_foldere/another_partition/one_partition"&lt;/P&gt;&lt;P&gt;This caused the msck repair command to fail, only aligning metastore data to the latter partition type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I don't know what caused the inversion, I asked the dev team and they also don't know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, fixing this problem (by recreating the table with the partition order in the correct way) let msck repair to work correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;Omar&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 11:20:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/msck-repair-table-bad-behaviour/m-p/34547#M10110</guid>
      <dc:creator>omaritec</dc:creator>
      <dc:date>2015-11-30T11:20:00Z</dc:date>
    </item>
  </channel>
</rss>

