title: ERROR : FAILED: Error in acquiring locks: Error communicating with the metastore org.apache.hadoop.hive.ql.lockmgr.LockException
body: <p>Getting the <code>Error in acquiring locks</code>, when trying to run <strong>count(*)</strong> on partitioned tables.
  The table has 365 partitions when <strong>filtered on &lt;= 350 partitions</strong>, the queries are working fine.
  when tried to <strong>include more partitions</strong> for the query, it's failing with the error.</p>
  
  <p><strong>working on Hive-managed ACID tables, with the following default values</strong></p>
  
  <ul>
  <li>hive.support.concurrency=true //cannot make it as false, it's throwing <code>&lt;table&gt; is missing from the ValidWriteIdList config: null</code>, should be true for ACID read and write.</li>
  <li>hive.lock.manager=org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager</li>
  <li>hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</li>
  <li>hive.txn.strict.locking.mode=false</li>
  <li>hive.exec.dynamic.partition.mode=nonstrict </li>
  </ul>
  
  <p><strong>Tried increasing/decreasing values for these following with a beeline session.</strong> </p>
  
  <ul>
  <li>hive.lock.numretries</li>
  <li>hive.unlock.numretries</li>
  <li>hive.lock.sleep.between.retries</li>
  <li>hive.metastore.batch.retrieve.max={default 300} //changed to 10000</li>
  <li>hive.metastore.server.max.message.size={default 104857600} // changed to 10485760000</li>
  <li>hive.metastore.limit.partition.request={default -1} //did not change as -1 is unlimited</li>
  <li>hive.metastore.batch.retrieve.max={default 300} //changed to 10000.</li>
  <li>hive.lock.query.string.max.length={default 10000} //changed to higher value</li>
  </ul>
  
  <blockquote>
    <p>Using the HDI-4.0 interactive-query-llap cluster, the meta-store is backed by default sql-server provided along.</p>
  </blockquote>