HBASE-4127 Don't modify table's name away in HBaseAdmin
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1149764 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
25c43285bd
commit
81897bd47f
|
@ -168,6 +168,7 @@ Release 0.91.0 - Unreleased
|
|||
cannot be changed (fulin wang via Ted Yu)
|
||||
HBASE-4118 method regionserver.MemStore#updateColumnValue: the check for
|
||||
qualifier and family is missing (N Keywal via Ted Yu)
|
||||
HBASE-4127 Don't modify table's name away in HBaseAdmin
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.HRegionInfo;
|
|||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.Server;
|
||||
import org.apache.hadoop.hbase.master.MasterServices;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
|
||||
public class ModifyTableHandler extends TableEventHandler {
|
||||
private final HTableDescriptor htd;
|
||||
|
@ -35,6 +36,10 @@ public class ModifyTableHandler extends TableEventHandler {
|
|||
final MasterServices masterServices) throws IOException {
|
||||
super(EventType.C_M_MODIFY_TABLE, tableName, server, masterServices);
|
||||
this.htd = htd;
|
||||
if (!Bytes.equals(tableName, htd.getName())) {
|
||||
throw new IOException("TableDescriptor name & tableName must match: "
|
||||
+ htd.getNameAsString() + " vs " + Bytes.toString(tableName));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,4 +57,4 @@ public class ModifyTableHandler extends TableEventHandler {
|
|||
}
|
||||
return getClass().getSimpleName() + "-" + name + "-" + getSeqid() + "-" + tableNameStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue