[SPARK-2485][SQL] Lock usage of hive client.

Better safe... fixed.