HBASE-2231 Compaction events should be written to HLog; LOGGING ADDENDUM
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1485873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13084de405
commit
8bc438abde
|
@ -39,7 +39,8 @@ import org.apache.hadoop.hbase.ServerName;
|
||||||
import org.apache.hadoop.hbase.protobuf.generated.WALProtos.CompactionDescriptor;
|
import org.apache.hadoop.hbase.protobuf.generated.WALProtos.CompactionDescriptor;
|
||||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||||
import org.apache.hadoop.hbase.util.FSUtils;
|
import org.apache.hadoop.hbase.util.FSUtils;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
|
||||||
|
import com.google.protobuf.TextFormat;
|
||||||
|
|
||||||
public class HLogUtil {
|
public class HLogUtil {
|
||||||
static final Log LOG = LogFactory.getLog(HLogUtil.class);
|
static final Log LOG = LogFactory.getLog(HLogUtil.class);
|
||||||
|
@ -262,6 +263,8 @@ public class HLogUtil {
|
||||||
WALEdit e = WALEdit.createCompaction(c);
|
WALEdit e = WALEdit.createCompaction(c);
|
||||||
log.append(info, c.getTableName().toByteArray(), e,
|
log.append(info, c.getTableName().toByteArray(), e,
|
||||||
EnvironmentEdgeManager.currentTimeMillis(), htd);
|
EnvironmentEdgeManager.currentTimeMillis(), htd);
|
||||||
LOG.info("Appended compaction marker " + c);
|
if (LOG.isTraceEnabled()) {
|
||||||
|
LOG.trace("Appended compaction marker " + TextFormat.shortDebugString(c));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue