HBASE-1215 migration; metautils scan of meta region was broken; wouldn't see first row

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@796856 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-07-22 19:39:28 +00:00
parent 9037b2149a
commit 1bf0e28167
2 changed files with 9 additions and 2 deletions

View File

@ -350,6 +350,13 @@ ISerializable {
setValue(Bytes.toBytes(key), Bytes.toBytes(value));
}
/**
* @param key Key whose key and value we're to remove from HTD parameters.
*/
public void remove(final byte [] key) {
values.remove(new ImmutableBytesWritable(key));
}
/**
* @return true if all columns in the table should be read only
*/

View File

@ -427,14 +427,14 @@ public class Migrate extends Configured implements Tool {
hri.getTableDesc().setMemStoreFlushSize(catalogMemStoreFlushSize);
result = true;
}
// Remove the old MEMCACHE_FLUSHSIZE if present
hri.getTableDesc().remove(Bytes.toBytes("MEMCACHE_FLUSHSIZE"));
for (HColumnDescriptor hcd: hri.getTableDesc().getFamilies()) {
// Set block cache on all tables.
hcd.setBlockCacheEnabled(true);
// Set compression to none. Previous was 'none'. Needs to be upper-case.
// Any other compression we are turning off. Have user enable it.
hcd.setCompressionType(Algorithm.NONE);
// Remove the old MEMCACHE_FLUSHSIZE if present
hcd.remove(Bytes.toBytes("MEMCACHE_FLUSHSIZE"));
result = true;
}
return result;