This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new c886653 HIVE-23591: When Worker fails to connect to metastore it
should wait before retrying (Peter Vary reviewed by Laszlo Pinter)
c886653 is described below
commit c886653c4ccde30ba6eb37f72e8bc6e47da48669
Author: Peter Vary <[email protected]>
AuthorDate: Wed Jun 3 09:22:27 2020 +0200
HIVE-23591: When Worker fails to connect to metastore it should wait before
retrying (Peter Vary reviewed by Laszlo Pinter)
---
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
index a67db8e..75941b3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
@@ -394,7 +394,12 @@ public class Worker extends RemoteCompactorThread
implements MetaStoreThread {
long compactorTxnId = NOT_SET;
try {
if (msc == null) {
- msc = HiveMetaStoreUtils.getHiveMetastoreClient(conf);
+ try {
+ msc = HiveMetaStoreUtils.getHiveMetastoreClient(conf);
+ } catch (Exception e) {
+ LOG.error("Failed to connect to HMS", e);
+ return false;
+ }
}
ci =
CompactionInfo.optionalCompactionInfoStructToInfo(msc.findNextCompact(workerName));
LOG.debug("Processing compaction request " + ci);