<?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: Is there any Impala SQL command which can remove table from Impala, not from Hive? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35821#M14011</link>
    <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me repeat what you explained to make sure if I understand correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are saying that if I run `INVALIDATE METADATA &lt;U&gt;Table1&lt;/U&gt;;`&lt;/P&gt;&lt;P&gt;The cached metadata for &lt;U&gt;Table1&lt;/U&gt; in catalogd will be replaced with the metadata of &amp;nbsp;a 'dummy' table which uses insignificant&amp;nbsp;amount of memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In another words, catalogd releases memory used for the full metadata of&amp;nbsp;Table1.&lt;/P&gt;&lt;P&gt;And, the full metadata of Table1 will be loaded when the table is accssed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I knew that `&lt;SPAN&gt;INVALIDATE METADATA&lt;/SPAN&gt;`marks the metadata for Table1 as stable.&lt;/P&gt;&lt;P&gt;However, I didn't know that the command replaces the cached metadata. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am&amp;nbsp;I understanding what you explained correctly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="search-term"&gt;"INVALIDATE&lt;/SPAN&gt; METADATA causes the metadata for that table to be marked as stale, and reloaded the next time the table is referenced."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- from &lt;A href="http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/impala_invalidate_metadata.html" target="_self"&gt;http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/impala_invalidate_metadata.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2016 07:31:59 GMT</pubDate>
    <dc:creator>thewayofthinkin</dc:creator>
    <dc:date>2016-01-05T07:31:59Z</dc:date>
    <item>
      <title>Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35814#M14009</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems the memory used by catalogd depends on these based on the comment here.&lt;/P&gt;&lt;P&gt;( &lt;A href="https://community.cloudera.com/t5/Interactive-Short-cycle-SQL/How-to-predict-how-much-memory-catalogd-needs/m-p/35735#U35735" target="_self"&gt;https://community.cloudera.com/t5/Interactive-Short-cycle-SQL/How-to-predict-how-much-memory-catalogd-needs/m-p/35735#U35735&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;- the number of HDFS files and blocks&lt;/P&gt;&lt;P&gt;- the number of databases, tables, and partitions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This could mean that by removing unncessary tables from Impala, but not from Hive it can reduce memory usage in catalogd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any Impala SQL command which&amp;nbsp;can remove tables from Impala, not from Hive?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:55:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35814#M14009</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2022-09-16T09:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35818#M14010</link>
      <description>&lt;P&gt;Since both Impala's and Hive's Metadata are backed by the Hive Metastore, you cannot completely remove a table from only one or the other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default, Impala loads the metadata of tables lazily, i.e., only when a table is accessed in Impala. After the initial loading, the table metadata is cached in the catalogd and impalads.&lt;/P&gt;&lt;P&gt;If your goal is to reduce the memory burden on the catalogd, then you can call "invalidate metadata &amp;lt;table_name&amp;gt;" in Impala on those tables you want to "remove" from Impala. This will replace the full metadata for that table with a "dummy" table entry which uses an insignificant amount of memory. However, if you access that table again in Impala, then the metadata will be loaded again. So as long as you don't access those tables whose metadata has not been loaded, you are not using much memory.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 06:43:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35818#M14010</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2016-01-05T06:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35821#M14011</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me repeat what you explained to make sure if I understand correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are saying that if I run `INVALIDATE METADATA &lt;U&gt;Table1&lt;/U&gt;;`&lt;/P&gt;&lt;P&gt;The cached metadata for &lt;U&gt;Table1&lt;/U&gt; in catalogd will be replaced with the metadata of &amp;nbsp;a 'dummy' table which uses insignificant&amp;nbsp;amount of memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In another words, catalogd releases memory used for the full metadata of&amp;nbsp;Table1.&lt;/P&gt;&lt;P&gt;And, the full metadata of Table1 will be loaded when the table is accssed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I knew that `&lt;SPAN&gt;INVALIDATE METADATA&lt;/SPAN&gt;`marks the metadata for Table1 as stable.&lt;/P&gt;&lt;P&gt;However, I didn't know that the command replaces the cached metadata. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am&amp;nbsp;I understanding what you explained correctly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="search-term"&gt;"INVALIDATE&lt;/SPAN&gt; METADATA causes the metadata for that table to be marked as stale, and reloaded the next time the table is referenced."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- from &lt;A href="http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/impala_invalidate_metadata.html" target="_self"&gt;http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/impala_invalidate_metadata.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 07:31:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35821#M14011</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2016-01-05T07:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35852#M14012</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran `INVALIDATE MEATADATA &lt;U&gt;Table1&lt;/U&gt;`, but it doesn't like `catalogd` releases memory.&lt;/P&gt;&lt;P&gt;Table1 I used for testing has 26k partitions and the size is 4.1T ( 12.2T ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also did one more testing, restarting `catalogd`.&lt;/P&gt;&lt;P&gt;Before restarting `catalogd`, the memorey usage was 25G VIRT and 13G RES.&lt;/P&gt;&lt;P&gt;After restarting, the memory usage of `catalogd` became 10G VIRT and less than 1G RES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, I accessed the &lt;U&gt;Table1&lt;/U&gt; and I could see that `catalogd` started using more memory.&lt;/P&gt;&lt;P&gt;I guess it might be because `catalogd` started caching the full metadata for &lt;U&gt;Table1&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comment?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 19:38:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35852#M14012</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2016-01-05T19:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35859#M14013</link>
      <description>&lt;P&gt;That's strange and somewhat unexpected. My suggestion is not exactly a tested scenario and more of a side effect of our implementation of "invalidate metadata", so maybe there are issues I am not thinking of that would prevent the objects being cleanup up by the Java GC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After doing the "invalidate metadata", are you sure the table is not being accessed? To verify the state of metadata loading you can go to the catalogd Web UI (default port 25020) and inspect the contents of your table metadata via the /catalog tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure that you are starting the catalogd with&amp;nbsp;--load_catalog_in_background=false, but I assume that's already the case since it's the default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, upon first access of a table, the catalogd will load and cache the metadata for that table.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 23:00:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35859#M14013</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2016-01-05T23:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35860#M14014</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After executing `INVALIDATE METADATA Table1`, I checkd catalogd UI to see what's been cached.&lt;/P&gt;&lt;P&gt;Like you mentioned before the cached metadata for Table1 is replaced with a `dummy` table like this.&lt;/P&gt;&lt;PRE&gt;TCatalogObject {
  01: type (i32) = 3,
  02: catalog_version (i64) = 733,
  05: table (struct) = TTable {
    01: db_name (string) = "default",
    02: tbl_name (string) = "Table1",
    04: id (i32) = 730,
  },
}&lt;/PRE&gt;&lt;P&gt;However, it didn't contribute to reducing memory &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And, Yes, catalogd starts&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;`--load_catalog_in_background=false`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 23:13:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35860#M14014</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2016-01-05T23:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35865#M14015</link>
      <description>&lt;P&gt;Sorry to hear it did not help to reduce the memory consumption. I'm not really sure why that would be the case.&amp;nbsp;If you want to investigate further, I'd recommend getting heap dumps of the Java process before and after the "invalidate metadata" to see where the memory is going.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 00:14:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35865#M14015</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2016-01-06T00:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35866#M14016</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No problem at all. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At least, I learned that&amp;nbsp;the metadata of Table1 in catalogd is replaced to the metadata of a `dummy` table. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, I don't know much about investigating Heap memory in Java process.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, since I always do sth before asking further questions I did some investigation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I googled and found a command like `jmap`. ( I'm not sure&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;if this is the right one )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;`jmap` requires PID of java process, but I don't know which PID I need to use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;( on my machines there are several Java processes like HBase, MR2, etc. )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to try `jmap`, I used the PID of `catalogd` and checked before/after&amp;nbsp;&lt;/P&gt;&lt;P&gt;`INVALIDATE METADATA Table1` and `SELECT * FROM Table1 WHERE&amp;nbsp;yearmonth=201512 LIMIT&amp;nbsp;1`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;./jmap -heap 4713&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing right way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 01:27:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35866#M14016</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2016-01-06T01:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35873#M14017</link>
      <description>&lt;P&gt;Correct, you can use jmap to get heapdumps and jhat or other heap dump analysis tools to read&amp;nbsp;the dumps. I'd recommend trying a few heap analysis tools to see which one you like.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 08:15:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35873#M14017</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2016-01-06T08:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any Impala SQL command which can remove table from Impala, not from Hive?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35897#M14018</link>
      <description>thx &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 06 Jan 2016 16:49:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-any-Impala-SQL-command-which-can-remove-table-from/m-p/35897#M14018</guid>
      <dc:creator>thewayofthinkin</dc:creator>
      <dc:date>2016-01-06T16:49:51Z</dc:date>
    </item>
  </channel>
</rss>

