YARN-9821. NM hangs at serviceStop when ATSV2 Backend Hbase is Down. Contributed by Prabhu Joseph.
This commit is contained in:
parent
387c332b64
commit
60af8793b4
|
@ -630,6 +630,15 @@ public class HBaseTimelineWriterImpl extends AbstractService implements
|
|||
*/
|
||||
@Override
|
||||
protected void serviceStop() throws Exception {
|
||||
boolean isStorageUp = true;
|
||||
try {
|
||||
storageMonitor.checkStorageIsUp();
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Failed to close the timeline tables as Hbase is down", e);
|
||||
isStorageUp = false;
|
||||
}
|
||||
|
||||
if (isStorageUp) {
|
||||
if (entityTable != null) {
|
||||
LOG.info("closing the entity table");
|
||||
// The close API performs flushing and releases any resources held
|
||||
|
@ -664,6 +673,7 @@ public class HBaseTimelineWriterImpl extends AbstractService implements
|
|||
LOG.info("closing the hbase Connection");
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
storageMonitor.stop();
|
||||
super.serviceStop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue