|
@@ -7295,7 +7295,12 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
@Metric({"TotalSyncTimes",
|
|
|
"Total time spend in sync operation on various edit logs"})
|
|
|
public String getTotalSyncTimes() {
|
|
|
- return fsImage.editLog.getJournalSet().getSyncTimes();
|
|
|
+ JournalSet journalSet = fsImage.editLog.getJournalSet();
|
|
|
+ if (journalSet != null) {
|
|
|
+ return journalSet.getSyncTimes();
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|