You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java
+42-32Lines changed: 42 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -630,39 +630,49 @@ public void flush() throws IOException {
630
630
*/
631
631
@Override
632
632
protectedvoidserviceStop() throwsException {
633
-
if (entityTable != null) {
634
-
LOG.info("closing the entity table");
635
-
// The close API performs flushing and releases any resources held
636
-
entityTable.close();
633
+
booleanisStorageUp = true;
634
+
try {
635
+
storageMonitor.checkStorageIsUp();
636
+
} catch (IOExceptione) {
637
+
LOG.warn("Failed to close the timeline tables as Hbase is down", e);
638
+
isStorageUp = false;
637
639
}
638
-
if (appToFlowTable != null) {
639
-
LOG.info("closing the app_flow table");
640
-
// The close API performs flushing and releases any resources held
641
-
appToFlowTable.close();
642
-
}
643
-
if (applicationTable != null) {
644
-
LOG.info("closing the application table");
645
-
applicationTable.close();
646
-
}
647
-
if (flowRunTable != null) {
648
-
LOG.info("closing the flow run table");
649
-
// The close API performs flushing and releases any resources held
650
-
flowRunTable.close();
651
-
}
652
-
if (flowActivityTable != null) {
653
-
LOG.info("closing the flowActivityTable table");
654
-
// The close API performs flushing and releases any resources held
655
-
flowActivityTable.close();
656
-
}
657
-
if (subApplicationTable != null) {
658
-
subApplicationTable.close();
659
-
}
660
-
if (domainTable != null) {
661
-
domainTable.close();
662
-
}
663
-
if (conn != null) {
664
-
LOG.info("closing the hbase Connection");
665
-
conn.close();
640
+
641
+
if (isStorageUp) {
642
+
if (entityTable != null) {
643
+
LOG.info("closing the entity table");
644
+
// The close API performs flushing and releases any resources held
645
+
entityTable.close();
646
+
}
647
+
if (appToFlowTable != null) {
648
+
LOG.info("closing the app_flow table");
649
+
// The close API performs flushing and releases any resources held
650
+
appToFlowTable.close();
651
+
}
652
+
if (applicationTable != null) {
653
+
LOG.info("closing the application table");
654
+
applicationTable.close();
655
+
}
656
+
if (flowRunTable != null) {
657
+
LOG.info("closing the flow run table");
658
+
// The close API performs flushing and releases any resources held
659
+
flowRunTable.close();
660
+
}
661
+
if (flowActivityTable != null) {
662
+
LOG.info("closing the flowActivityTable table");
663
+
// The close API performs flushing and releases any resources held
0 commit comments