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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1409071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uma Maheswara Rao G 2012-11-14 03:10:10 +00:00
parent a5976bee37
commit 0800aa90dd
2 changed files with 11 additions and 2 deletions

View File

@ -464,6 +464,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 @@ public long length() throws IOException {
@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 @@ public void skipTo(long txId) throws IOException {
}
}
@Override
public String toString() {
return ("BookKeeperEditLogInputStream {" + this.getName() + "}");
}
/**
* Input stream implementation which can be used by
* FSEditLogOp.Reader