HBASE-13206 Fix TableLock tableName log format

This commit is contained in:
Matteo Bertozzi 2015-03-11 18:27:18 +00:00
parent 9087febd21
commit b5bfbc8a9f
2 changed files with 8 additions and 4 deletions

View File

@ -240,8 +240,10 @@ public abstract class TableLockManager {
return;
}
LOG.debug("Table is locked by " +
String.format("[tableName=%s, lockOwner=%s, threadId=%s, " +
"purpose=%s, isShared=%s, createTime=%s]", Bytes.toString(data.getTableName().toByteArray()),
String.format("[tableName=%s:%s, lockOwner=%s, threadId=%s, " +
"purpose=%s, isShared=%s, createTime=%s]",
data.getTableName().getNamespace().toStringUtf8(),
data.getTableName().getQualifier().toStringUtf8(),
ProtobufUtil.toServerName(data.getLockOwner()), data.getThreadId(),
data.getPurpose(), data.getIsShared(), data.getCreateTime()));
}

View File

@ -59,8 +59,10 @@ public class TableLockChecker {
String msg = "Table lock acquire attempt found:";
if (data != null) {
msg = msg +
String.format("[tableName=%s, lockOwner=%s, threadId=%s, " +
"purpose=%s, isShared=%s, createTime=%s]", Bytes.toString(data.getTableName().toByteArray()),
String.format("[tableName=%s:%s, lockOwner=%s, threadId=%s, " +
"purpose=%s, isShared=%s, createTime=%s]",
data.getTableName().getNamespace().toStringUtf8(),
data.getTableName().getQualifier().toStringUtf8(),
ProtobufUtil.toServerName(data.getLockOwner()), data.getThreadId(),
data.getPurpose(), data.getIsShared(), data.getCreateTime());
}