diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java index 00fc1fe7fd5..be14d208ca2 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java @@ -29,6 +29,7 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.data.ByteSequence; +import org.apache.accumulo.core.fate.zookeeper.ServiceLock; import org.apache.accumulo.core.manager.state.tables.TableState; import org.apache.accumulo.core.metadata.TabletFile; import org.apache.accumulo.core.util.Halt; @@ -98,7 +99,8 @@ public CompactionStats call() { try { ret = super.call(); } catch (Exception e) { - if (tabletServer.getLock() == null || !tabletServer.getLock().verifyLockAtSource()) { + final ServiceLock tserverLock = tabletServer.getLock(); + if (tserverLock == null || !tserverLock.verifyLockAtSource()) { log.error("Minor compaction of {} has failed and TabletServer lock does not exist." + " Halting...", getExtent(), e); Halt.halt("TabletServer lock does not exist", -1);