hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [07/22] hbase git commit: HBASE-14767 - Remove deprecated functions from HBaseAdmin Deprecated in HBASE-12083 (1.0.0, 2.0.0, 0.99.2) - HBaseAdmin(Configuration)
Date Tue, 10 Nov 2015 19:05:50 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/08963189/src/main/asciidoc/_chapters/external_apis.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/external_apis.adoc b/src/main/asciidoc/_chapters/external_apis.adoc
index 188b10b..44603f0 100644
--- a/src/main/asciidoc/_chapters/external_apis.adoc
+++ b/src/main/asciidoc/_chapters/external_apis.adoc
@@ -675,12 +675,13 @@ This example lists HBase tables, creates a new table, and adds a row
to it.
 [source, scala]
 ----
 import org.apache.hadoop.hbase.HBaseConfiguration
-import org.apache.hadoop.hbase.client.{HBaseAdmin,HTable,Put,Get}
+import org.apache.hadoop.hbase.client.{Connection,ConnectionFactory,HBaseAdmin,HTable,Put,Get}
 import org.apache.hadoop.hbase.util.Bytes
 
 
 val conf = new HBaseConfiguration()
-val admin = new HBaseAdmin(conf)
+val connection = ConnectionFactory.createConnection(conf);
+val admin = connection.getAdmin();
 
 // list the tables
 val listtables=admin.listTables()


Mime
View raw message