Two Very Useful Hive Lock Settings

hive.lock.numretries
hive.lock.sleep.between.retries

The first property indicates the number of times the client will attempt to get a lock before it gives up. The second property indicates that time interval between retries for getting locks.

You would find yourself tweaking this to suit your needs. The default value for hive.lock.sleep.between.retries is very large. This could potentially mean that your query will be forever stuck in getting the lock if your table is being constantly hit with queries.

I generally use the following settings

SET hive.lock.numretries 100;
SET hive.lock.sleep.between.retries 1;

You can set the above in your ~/.hiverc file or you can set them whenever you open a new HIve CLI client session. The following shows description of the properties.

<property>
<name>hive.lock.numretries</name>
<value>100</value>
<description>The number of times you want to try to get all the
locks</description>
</property>

<property>
<name>hive.lock.sleep.between.retries</name>
<value>60</value>
<description>The sleep time (in seconds) between various retries</description>
</property>
 
18
Kudos
 
18
Kudos

Now read this

MySQL Replication Slave Monitoring Script for Zenoss

To monitor a slave you need to check if Slave IO Thread is running (Alert when not running) Slave SQL Thread is running (Alert when not running) Seconds behind master (Alert when passes a certain threshold) Zenoss expects the output of... Continue →