Repository: hbase Updated Branches: refs/heads/hbase-11339 e5d385077 -> 686e1e5bc
HBASE-11968 If MOB is enabled, it should make sure hfile v3 is being used. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/686e1e5b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/686e1e5b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/686e1e5b Branch: refs/heads/hbase-11339 Commit: 686e1e5bc5a12172276ca3881e240e905829ad64 Parents: e5d3850 Author: anoopsjohn <[email protected]> Authored: Sun Sep 14 14:21:00 2014 +0530 Committer: anoopsjohn <[email protected]> Committed: Sun Sep 14 14:21:00 2014 +0530 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/regionserver/HRegion.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/686e1e5b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index c87c12b..22b090f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -109,6 +109,7 @@ import org.apache.hadoop.hbase.io.HeapSize; import org.apache.hadoop.hbase.io.TimeRange; import org.apache.hadoop.hbase.io.hfile.BlockCache; import org.apache.hadoop.hbase.io.hfile.CacheConfig; +import org.apache.hadoop.hbase.io.hfile.HFile; import org.apache.hadoop.hbase.ipc.CallerDisconnectedException; import org.apache.hadoop.hbase.ipc.RpcCallContext; import org.apache.hadoop.hbase.ipc.RpcServer; @@ -3554,6 +3555,12 @@ public class HRegion implements HeapSize { // , Writable{ protected HStore instantiateHStore(final HColumnDescriptor family) throws IOException { if (MobUtils.isMobFamily(family)) { + if (HFile.getFormatVersion(this.conf) < HFile.MIN_FORMAT_VERSION_WITH_TAGS) { + throw new IOException("A minimum HFile version of " + + HFile.MIN_FORMAT_VERSION_WITH_TAGS + + " is required for MOB feature. Consider setting " + HFile.FORMAT_VERSION_KEY + + " accordingly."); + } return new HMobStore(this, family, this.conf); } return new HStore(this, family, this.conf);
