You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mi...@apache.org on 2015/02/17 06:21:21 UTC

hbase git commit: HBASE-12412 update the ref guide example 2 in HBase APIs chapter with the new API modifyFamily in master

Repository: hbase
Updated Branches:
  refs/heads/master d3621d24d -> bfc2bc7fa


HBASE-12412 update the ref guide example 2 in HBase APIs chapter with the new API modifyFamily in master


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

Branch: refs/heads/master
Commit: bfc2bc7fa2101eafa8fd63a86223e1a15f74d434
Parents: d3621d2
Author: Misty Stanley-Jones <ms...@cloudera.com>
Authored: Tue Feb 10 14:38:41 2015 +1000
Committer: Misty Stanley-Jones <ms...@cloudera.com>
Committed: Tue Feb 17 15:21:12 2015 +1000

----------------------------------------------------------------------
 src/main/asciidoc/_chapters/hbase_apis.adoc | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc2bc7f/src/main/asciidoc/_chapters/hbase_apis.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/hbase_apis.adoc b/src/main/asciidoc/_chapters/hbase_apis.adoc
index d73de61..85dbad1 100644
--- a/src/main/asciidoc/_chapters/hbase_apis.adoc
+++ b/src/main/asciidoc/_chapters/hbase_apis.adoc
@@ -111,6 +111,13 @@ public static void upgradeFrom0 (Configuration config) {
     newColumn.setMaxVersions(HConstants.ALL_VERSIONS);
     admin.addColumn(tableName, newColumn);
 
+    // Update existing column family
+    HColumnDescriptor existingColumn = new HColumnDescriptor(CF_DEFAULT);
+    existingColumn.setCompactionCompressionType(Algorithm.GZ);
+    existingColumn.setMaxVersions(HConstants.ALL_VERSIONS);
+    table_assetmeta.modifyFamily(existingColumn)
+    admin.modifyTable(tableName, table_assetmeta);
+
     // Disable an existing table
     admin.disableTable(tableName);