<?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: Reading a Hive table while doing insert overwrite on a partition in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Reading-a-Hive-table-while-doing-insert-overwrite-on-a/m-p/220361#M182246</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/16119/viswanathkammula.html" nodeid="16119"&gt;@viswanath&lt;/A&gt;&lt;P&gt;For a partitioned table, the idea is as follows:&lt;/P&gt;&lt;P&gt;A 'S' lock on table and relevant partition is acquired when a read is being performed. For all other operations, an 'X' lock is taken on the partition. However, if the change is only applicable to the newer partitions, a 'S' lock is acquired on the table, whereas if the change is applicable to all partitions, a 'X' lock is acquired on the table. Thus, older partitions can be read and written into, while the newer partitions are being converted to RCFile. Whenever a partition is being locked in any mode, all its parents are locked in 'S' mode.&lt;/P&gt;&lt;P&gt;If you are running 'select' query on the whole of table, then it would wait for the exclusive lock.&lt;/P&gt;&lt;P&gt;For more details, refer to &lt;A href="https://cwiki.apache.org/confluence/display/Hive/Locking"&gt;link&lt;/A&gt;.&lt;/P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16119/viswanathkammula.html" nodeid="16119"&gt;&lt;/A&gt;</description>
    <pubDate>Sat, 14 Oct 2017 15:16:08 GMT</pubDate>
    <dc:creator>ssubhas</dc:creator>
    <dc:date>2017-10-14T15:16:08Z</dc:date>
  </channel>
</rss>

