hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Trivial Update of "Hbase/FAQ" by JimKellerman
Date Mon, 15 Oct 2007 18:17:51 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.

The following page has been changed by JimKellerman:
http://wiki.apache.org/lucene-hadoop/Hbase/FAQ

The comment on the change is:
escape camel case words so they are not interpreted as wiki words

------------------------------------------------------------------------------
  [[Anchor(2)]]
  '''1. [#1 Can someone give an example of basic API-usage going against hbase?]'''
  
- The two main client-side entry points are [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/javadoc/org/apache/hadoop/hbase/HBaseAdmin.html
H!BaseAdmin] and [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/javadoc/org/apache/hadoop/hbase/HTable.html
H!Table].  Use H!BaseAdmin to create, drop, list, enable and disable tables.  Use it also
to add and drop table column families.  For adding, updating and deleting data, use HTable.
 Here is some pseudo code absent error checking, imports, etc., that creates a table, adds
data, does a fetch of just-added data and then deletes the table.
+ The two main client-side entry points are [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/javadoc/org/apache/hadoop/hbase/HBaseAdmin.html
HBaseAdmin] and [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/javadoc/org/apache/hadoop/hbase/HTable.html
HTable].  Use H!BaseAdmin to create, drop, list, enable and disable tables.  Use it also to
add and drop table column families.  For adding, updating and deleting data, use HTable. 
Here is some pseudo code absent error checking, imports, etc., that creates a table, adds
data, does a fetch of just-added data and then deletes the table.
  
  {{{// First get a conf object.  This will read in the configuration
  // that is out in your hbase-*.xml files such as location of the
@@ -35, +35 @@

  // Delete the table.
  admin.deleteTable(desc.getName());}}}
  
- For further examples, check out the hbase unit tests.  These are probably your best source
for sample code.  Start with the code in org.apache.hadoop.hbase.TestHBaseCluster.  It does
a general table setup and then performs various client operations on the created table: loading,
scanning, deleting, etc.
+ For further examples, check out the hbase unit tests.  These are probably your best source
for sample code.  Start with the code in org.apache.hadoop.hbase.TestH!BaseCluster.  It does
a general table setup and then performs various client operations on the created table: loading,
scanning, deleting, etc.
  
  Don't forget your client will need a running hbase instance to connect to (See the ''Getting
Started'' section toward the end of this 
  [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/javadoc/org/apache/hadoop/hbase/package-summary.html#package_description
Hbase Package Summary] page). 

Mime
View raw message