From f9802e4cdfd81e2972101903a703248bdede436e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 2 Apr 2012 23:02:56 +0000 Subject: [PATCH] HBASE-5692 Add real action time for HLogPrettyPrinter git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1308609 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java index 0acc7cbaa66..a23e2191a18 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogPrettyPrinter.java @@ -248,6 +248,7 @@ public class HLogPrettyPrinter { WALEdit edit = entry.getEdit(); // begin building a transaction structure Map txn = key.toStringMap(); + long writeTime = key.getWriteTime(); // check output filters if (sequence >= 0 && ((Long) txn.get("sequence")) != sequence) continue; @@ -280,14 +281,14 @@ public class HLogPrettyPrinter { // Pretty output, complete with indentation by atomic action out.println("Sequence " + txn.get("sequence") + " " + "from region " + txn.get("region") + " " + "in table " - + txn.get("table")); + + txn.get("table") + " at write timestamp: " + new Date(writeTime)); for (int i = 0; i < actions.size(); i++) { Map op = actions.get(i); out.println(" Action:"); out.println(" row: " + op.get("row")); out.println(" column: " + op.get("family") + ":" + op.get("qualifier")); - out.println(" at time: " + out.println(" timestamp: " + (new Date((Long) op.get("timestamp")))); if (outputValues) out.println(" value: " + op.get("value"));