code: public boolean deleteLedgerMetadata(EditLogLedgerMetadata ledger, int version)
        throws IOException {
      String ledgerPath = fullyQualifiedPathForLedger(ledger);
      try {
        zooKeeper.delete(ledgerPath, version);
        return true;
      } catch (KeeperException.NoNodeException e) {
        LOG.warn(ledgerPath + " does not exist. Returning false, ignoring " +
            e);
      } catch (KeeperException.BadVersionException e) {
        keeperException("Unable to delete " + ledgerPath + ", version does not match." +
            " Updated by another process?", e);
      } catch (KeeperException e) {
        keeperException("Unrecoverable ZooKeeper error deleting " + ledgerPath,
            e);
      } catch (InterruptedException e) {
        interruptedException("Interrupted deleting " + ledgerPath, e);
      }
      return false;
    }
docs: Removes ledger-related Metadata from BookKeeper. Does not delete
  the ledger itself.
  @param ledger The object for the ledger metadata that we want to delete
  from BookKeeper
  @param version The version of the ledger metadata (or -1 to delete any
  version). Used as a way to guard against deleting a ledger
  metadata that is being updated by another process.
  @return True if the process successfully deletes the metadata objection,
  false if it has already been deleted by another process.
  @throws IOException If there is an error communicating to ZooKeeper or if
  the metadata object has been modified within ZooKeeper
  by another process (version mis-match).