hbase git commit: HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

2018-06-01 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/master d5ea92632 -> 096866828


HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/09686682
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/09686682
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/09686682

Branch: refs/heads/master
Commit: 0968668283d9e3b23c2da8c2c4a0a77caee2e9af
Parents: d5ea926
Author: Peter Somogyi 
Authored: Fri May 25 15:03:17 2018 +0200
Committer: Peter Somogyi 
Committed: Fri Jun 1 19:17:49 2018 +0200

--
 bin/hbase   |   3 +
 .../hadoop/hbase/tool/PreUpgradeValidator.java  | 129 +++
 .../_chapters/appendix_hfile_format.adoc|   2 +-
 src/main/asciidoc/_chapters/compression.adoc|   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  22 
 src/main/asciidoc/_chapters/upgrading.adoc  |   4 +
 6 files changed, 160 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/bin/hbase
--
diff --git a/bin/hbase b/bin/hbase
index f1e2306..4f1c854 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -108,6 +108,7 @@ if [ $# = 0 ]; then
   echo "  regionsplitter  Run RegionSplitter tool"
   echo "  rowcounter  Run RowCounter tool"
   echo "  cellcounter Run CellCounter tool"
+  echo "  pre-upgrade Run Pre-Upgrade validator tool"
   echo "  CLASSNAME   Run the class named CLASSNAME"
   exit 1
 fi
@@ -471,6 +472,8 @@ elif [ "$COMMAND" = "rowcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.RowCounter'
 elif [ "$COMMAND" = "cellcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
+elif [ "$COMMAND" = "pre-upgrade" ] ; then
+  CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 else
   CLASS=$COMMAND
 fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
new file mode 100644
index 000..138af6a
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -0,0 +1,129 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.tool;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.AbstractHBaseTool;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+
+/**
+ * Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
+ * 
+ * Available validations:
+ * 
+ * all: Run all pre-upgrade validations
+ * validateDBE: Check Data Block Encoding for column families
+ * 
+ * 
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
+public class PreUpgradeValidator extends AbstractHBaseTool {
+
+  public static final String NAME = "pre-upgrade";
+  private static final Logger LOG = 
LoggerFactory.getLogger(PreUpgradeValidator.class);
+  private static final byte[] DATA_BLOCK_ENCODING = 
Bytes.toBytes("DATA_BLOCK_ENCODING");
+  private boolean validateAll;
+  private boolean validateDBE;
+
+  /**
+   * Check DataBlockEncodin

hbase git commit: HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

2018-06-01 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2 26e54e42c -> 53d29d53c


HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/53d29d53
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/53d29d53
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/53d29d53

Branch: refs/heads/branch-2
Commit: 53d29d53c4ab17543936ef6385107bad6fe585d8
Parents: 26e54e4
Author: Peter Somogyi 
Authored: Fri May 25 15:03:17 2018 +0200
Committer: Peter Somogyi 
Committed: Fri Jun 1 19:22:49 2018 +0200

--
 bin/hbase   |   3 +
 .../hadoop/hbase/tool/PreUpgradeValidator.java  | 129 +++
 .../_chapters/appendix_hfile_format.adoc|   2 +-
 src/main/asciidoc/_chapters/compression.adoc|   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  22 
 5 files changed, 156 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/53d29d53/bin/hbase
--
diff --git a/bin/hbase b/bin/hbase
index 78dbbdd..18f58c9 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -106,6 +106,7 @@ if [ $# = 0 ]; then
   echo "  regionsplitter  Run RegionSplitter tool"
   echo "  rowcounter  Run RowCounter tool"
   echo "  cellcounter Run CellCounter tool"
+  echo "  pre-upgrade Run Pre-Upgrade validator tool"
   echo "  CLASSNAME   Run the class named CLASSNAME"
   exit 1
 fi
@@ -465,6 +466,8 @@ elif [ "$COMMAND" = "rowcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.RowCounter'
 elif [ "$COMMAND" = "cellcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
+elif [ "$COMMAND" = "pre-upgrade" ] ; then
+  CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 else
   CLASS=$COMMAND
 fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/53d29d53/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
new file mode 100644
index 000..138af6a
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -0,0 +1,129 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.tool;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.AbstractHBaseTool;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+
+/**
+ * Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
+ * 
+ * Available validations:
+ * 
+ * all: Run all pre-upgrade validations
+ * validateDBE: Check Data Block Encoding for column families
+ * 
+ * 
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
+public class PreUpgradeValidator extends AbstractHBaseTool {
+
+  public static final String NAME = "pre-upgrade";
+  private static final Logger LOG = 
LoggerFactory.getLogger(PreUpgradeValidator.class);
+  private static final byte[] DATA_BLOCK_ENCODING = 
Bytes.toBytes("DATA_BLOCK_ENCODING");
+  private boolean validateAll;
+  private boolean validateDBE;
+
+  /**
+   * Check DataBlockEncodings for column families.
+   *
+   * @return DataBlock

hbase git commit: HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

2018-06-01 Thread psomogyi
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 297d52463 -> 512397220


HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/51239722
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/51239722
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/51239722

Branch: refs/heads/branch-2.0
Commit: 512397220a9bcf8a8209d53a51dd1ba3056cb63c
Parents: 297d524
Author: Peter Somogyi 
Authored: Fri May 25 15:03:17 2018 +0200
Committer: Peter Somogyi 
Committed: Fri Jun 1 19:23:40 2018 +0200

--
 bin/hbase   |   3 +
 .../hadoop/hbase/tool/PreUpgradeValidator.java  | 129 +++
 .../_chapters/appendix_hfile_format.adoc|   2 +-
 src/main/asciidoc/_chapters/compression.adoc|   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  22 
 src/main/asciidoc/_chapters/upgrading.adoc  |   4 +
 6 files changed, 160 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/51239722/bin/hbase
--
diff --git a/bin/hbase b/bin/hbase
index 78dbbdd..18f58c9 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -106,6 +106,7 @@ if [ $# = 0 ]; then
   echo "  regionsplitter  Run RegionSplitter tool"
   echo "  rowcounter  Run RowCounter tool"
   echo "  cellcounter Run CellCounter tool"
+  echo "  pre-upgrade Run Pre-Upgrade validator tool"
   echo "  CLASSNAME   Run the class named CLASSNAME"
   exit 1
 fi
@@ -465,6 +466,8 @@ elif [ "$COMMAND" = "rowcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.RowCounter'
 elif [ "$COMMAND" = "cellcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
+elif [ "$COMMAND" = "pre-upgrade" ] ; then
+  CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 else
   CLASS=$COMMAND
 fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/51239722/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
new file mode 100644
index 000..138af6a
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -0,0 +1,129 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.tool;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.AbstractHBaseTool;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+
+/**
+ * Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
+ * 
+ * Available validations:
+ * 
+ * all: Run all pre-upgrade validations
+ * validateDBE: Check Data Block Encoding for column families
+ * 
+ * 
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
+public class PreUpgradeValidator extends AbstractHBaseTool {
+
+  public static final String NAME = "pre-upgrade";
+  private static final Logger LOG = 
LoggerFactory.getLogger(PreUpgradeValidator.class);
+  private static final byte[] DATA_BLOCK_ENCODING = 
Bytes.toBytes("DATA_BLOCK_ENCODING");
+  private boolean validateAll;
+  private boolean validateDBE;
+
+  /**
+   * Check DataBloc

[03/50] [abbrv] hbase git commit: HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

2018-06-05 Thread zhangduo
HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/09686682
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/09686682
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/09686682

Branch: refs/heads/HBASE-19064
Commit: 0968668283d9e3b23c2da8c2c4a0a77caee2e9af
Parents: d5ea926
Author: Peter Somogyi 
Authored: Fri May 25 15:03:17 2018 +0200
Committer: Peter Somogyi 
Committed: Fri Jun 1 19:17:49 2018 +0200

--
 bin/hbase   |   3 +
 .../hadoop/hbase/tool/PreUpgradeValidator.java  | 129 +++
 .../_chapters/appendix_hfile_format.adoc|   2 +-
 src/main/asciidoc/_chapters/compression.adoc|   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  22 
 src/main/asciidoc/_chapters/upgrading.adoc  |   4 +
 6 files changed, 160 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/bin/hbase
--
diff --git a/bin/hbase b/bin/hbase
index f1e2306..4f1c854 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -108,6 +108,7 @@ if [ $# = 0 ]; then
   echo "  regionsplitter  Run RegionSplitter tool"
   echo "  rowcounter  Run RowCounter tool"
   echo "  cellcounter Run CellCounter tool"
+  echo "  pre-upgrade Run Pre-Upgrade validator tool"
   echo "  CLASSNAME   Run the class named CLASSNAME"
   exit 1
 fi
@@ -471,6 +472,8 @@ elif [ "$COMMAND" = "rowcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.RowCounter'
 elif [ "$COMMAND" = "cellcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
+elif [ "$COMMAND" = "pre-upgrade" ] ; then
+  CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 else
   CLASS=$COMMAND
 fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
new file mode 100644
index 000..138af6a
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -0,0 +1,129 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.tool;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.AbstractHBaseTool;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+
+/**
+ * Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
+ * 
+ * Available validations:
+ * 
+ * all: Run all pre-upgrade validations
+ * validateDBE: Check Data Block Encoding for column families
+ * 
+ * 
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
+public class PreUpgradeValidator extends AbstractHBaseTool {
+
+  public static final String NAME = "pre-upgrade";
+  private static final Logger LOG = 
LoggerFactory.getLogger(PreUpgradeValidator.class);
+  private static final byte[] DATA_BLOCK_ENCODING = 
Bytes.toBytes("DATA_BLOCK_ENCODING");
+  private boolean validateAll;
+  private boolean validateDBE;
+
+  /**
+   * Check DataBlockEncodings for column families.
+   *
+   * @return DataBlockEncoding compatible wit

[18/50] [abbrv] hbase git commit: HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

2018-06-10 Thread busbey
HBASE-20592 Create a tool to verify tables do not have prefix tree encoding

Signed-off-by: Mike Drob 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/09686682
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/09686682
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/09686682

Branch: refs/heads/HBASE-20331
Commit: 0968668283d9e3b23c2da8c2c4a0a77caee2e9af
Parents: d5ea926
Author: Peter Somogyi 
Authored: Fri May 25 15:03:17 2018 +0200
Committer: Peter Somogyi 
Committed: Fri Jun 1 19:17:49 2018 +0200

--
 bin/hbase   |   3 +
 .../hadoop/hbase/tool/PreUpgradeValidator.java  | 129 +++
 .../_chapters/appendix_hfile_format.adoc|   2 +-
 src/main/asciidoc/_chapters/compression.adoc|   2 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc|  22 
 src/main/asciidoc/_chapters/upgrading.adoc  |   4 +
 6 files changed, 160 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/bin/hbase
--
diff --git a/bin/hbase b/bin/hbase
index f1e2306..4f1c854 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -108,6 +108,7 @@ if [ $# = 0 ]; then
   echo "  regionsplitter  Run RegionSplitter tool"
   echo "  rowcounter  Run RowCounter tool"
   echo "  cellcounter Run CellCounter tool"
+  echo "  pre-upgrade Run Pre-Upgrade validator tool"
   echo "  CLASSNAME   Run the class named CLASSNAME"
   exit 1
 fi
@@ -471,6 +472,8 @@ elif [ "$COMMAND" = "rowcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.RowCounter'
 elif [ "$COMMAND" = "cellcounter" ] ; then
   CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
+elif [ "$COMMAND" = "pre-upgrade" ] ; then
+  CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
 else
   CLASS=$COMMAND
 fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/09686682/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
new file mode 100644
index 000..138af6a
--- /dev/null
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/PreUpgradeValidator.java
@@ -0,0 +1,129 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.tool;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.util.AbstractHBaseTool;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
+
+/**
+ * Tool for validating that cluster can be upgraded from HBase 1.x to 2.0
+ * 
+ * Available validations:
+ * 
+ * all: Run all pre-upgrade validations
+ * validateDBE: Check Data Block Encoding for column families
+ * 
+ * 
+ */
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
+public class PreUpgradeValidator extends AbstractHBaseTool {
+
+  public static final String NAME = "pre-upgrade";
+  private static final Logger LOG = 
LoggerFactory.getLogger(PreUpgradeValidator.class);
+  private static final byte[] DATA_BLOCK_ENCODING = 
Bytes.toBytes("DATA_BLOCK_ENCODING");
+  private boolean validateAll;
+  private boolean validateDBE;
+
+  /**
+   * Check DataBlockEncodings for column families.
+   *
+   * @return DataBlockEncoding compatible wit