public BookKeeperEditLogOutputStream(LedgerHandle ledger, String parentPath,
NameNodeMetrics metrics) throws IOException {
super();
this.ledger = ledger;
doubleBuf = new EditsDoubleBuffer(FSEditLog.sizeFlushBuffer);
outputStream = new BookKeeperJournalOutputStream(ledger);
if (metrics != null) { // Metrics is non-null only when used inside name node
String metricsName = "sync_bk_" + parentPath + "_edit";
MetricsBase retrMetrics = metrics.registry.get(metricsName);
if (retrMetrics != null) {