Merge HDFS-4038. Override toString() for BookKeeperEditLogInputStream. Contributed by Vinay.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1409072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uma Maheswara Rao G 2012-11-14 03:18:32 +00:00
parent 09774b8005
commit 0ce462007e
2 changed files with 11 additions and 2 deletions

View File

@ -117,6 +117,9 @@ Release 2.0.3-alpha - Unreleased
HDFS-1322. Document umask in DistributedFileSystem#mkdirs javadocs.
(Colin Patrick McCabe via eli)
HDFS-4038. Override toString() for BookKeeperEditLogInputStream.
(Vinay via umamahesh)
OPTIMIZATIONS
BUG FIXES

View File

@ -129,8 +129,9 @@ class BookKeeperEditLogInputStream extends EditLogInputStream {
@Override
public String getName() {
return String.format("BookKeeper[%s,first=%d,last=%d]",
lh.toString(), firstTxId, lastTxId);
return String.format(
"BookKeeperLedger[ledgerId=%d,firstTxId=%d,lastTxId=%d]", lh.getId(),
firstTxId, lastTxId);
}
@Override
@ -157,6 +158,11 @@ class BookKeeperEditLogInputStream extends EditLogInputStream {
}
}
@Override
public String toString() {
return ("BookKeeperEditLogInputStream {" + this.getName() + "}");
}
/**
* Input stream implementation which can be used by
* FSEditLogOp.Reader