You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/10/11 22:16:46 UTC

hbase git commit: HBASE-16622 Fix some issues with the HBase reference guide

Repository: hbase
Updated Branches:
  refs/heads/master 7b0acc292 -> 6b346ad04


HBASE-16622 Fix some issues with the HBase reference guide


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

Branch: refs/heads/master
Commit: 6b346ad046439e0b59cc4067a43208ab87cb173b
Parents: 7b0acc2
Author: Michael Stack <st...@apache.org>
Authored: Tue Oct 11 15:16:19 2016 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Tue Oct 11 15:16:19 2016 -0700

----------------------------------------------------------------------
 src/main/asciidoc/_chapters/developer.adoc  | 2 +-
 src/main/asciidoc/_chapters/hbase_apis.adoc | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6b346ad0/src/main/asciidoc/_chapters/developer.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/developer.adoc b/src/main/asciidoc/_chapters/developer.adoc
index ad9f3f4..f064cb6 100644
--- a/src/main/asciidoc/_chapters/developer.adoc
+++ b/src/main/asciidoc/_chapters/developer.adoc
@@ -108,7 +108,7 @@ We encourage you to have this formatter in place in eclipse when editing HBase c
 . In Preferences, Go to `Java->Code Style->Formatter`.
 . Click btn:[Import] and browse to the location of the _hbase_eclipse_formatter.xml_ file, which is in the _dev-support/_ directory.
   Click btn:[Apply].
-. Still in Preferences, click .
+. Still in Preferences, click `Java->Editor->Save Actions`.
   Be sure the following options are selected:
 +
 * Perform the selected actions on save

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b346ad0/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 6d2777b..f27c9dc 100644
--- a/src/main/asciidoc/_chapters/hbase_apis.adoc
+++ b/src/main/asciidoc/_chapters/hbase_apis.adoc
@@ -43,8 +43,6 @@ See <<external_apis>> for more information.
 ----
 package com.example.hbase.admin;
 
-package util;
-
 import java.io.IOException;
 
 import org.apache.hadoop.conf.Configuration;
@@ -77,7 +75,7 @@ public class Example {
          Admin admin = connection.getAdmin()) {
 
       HTableDescriptor table = new HTableDescriptor(TableName.valueOf(TABLE_NAME));
-      table.addFamily(new HColumnDescriptor(CF_DEFAULT).setCompressionType(Algorithm.SNAPPY));
+      table.addFamily(new HColumnDescriptor(CF_DEFAULT).setCompressionType(Algorithm.NONE));
 
       System.out.print("Creating table. ");
       createOrOverwrite(admin, table);
@@ -90,12 +88,12 @@ public class Example {
          Admin admin = connection.getAdmin()) {
 
       TableName tableName = TableName.valueOf(TABLE_NAME);
-      if (admin.tableExists(tableName)) {
+      if (!admin.tableExists(tableName)) {
         System.out.println("Table does not exist.");
         System.exit(-1);
       }
 
-      HTableDescriptor table = new HTableDescriptor(tableName);
+      HTableDescriptor table = admin.getTableDescriptor(tableName);
 
       // Update existing table
       HColumnDescriptor newColumn = new HColumnDescriptor("NEWCF");