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 void flush() throws IOException {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStop() throws Exception {
|
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) {
|
if (entityTable != null) {
|
||||||
LOG.info("closing the entity table");
|
LOG.info("closing the entity table");
|
||||||
// The close API performs flushing and releases any resources held
|
// The close API performs flushing and releases any resources held
|
||||||
@ -664,6 +673,7 @@ protected void serviceStop() throws Exception {
|
|||||||
LOG.info("closing the hbase Connection");
|
LOG.info("closing the hbase Connection");
|
||||||
conn.close();
|
conn.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
storageMonitor.stop();
|
storageMonitor.stop();
|
||||||
super.serviceStop();
|
super.serviceStop();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user