hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject hbase git commit: HBASE-12412 update the ref guide example 2 in HBase APIs chapter with the new API modifyFamily in master
Date Tue, 17 Feb 2015 05:21:21 GMT
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 <mstanleyjones@cloudera.com>
Authored: Tue Feb 10 14:38:41 2015 +1000
Committer: Misty Stanley-Jones <mstanleyjones@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);
 


Mime
View raw message