hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/HBaseIntegration" by JohnSichi
Date Thu, 04 Mar 2010 20:27:52 GMT
Dear Wiki user,

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

The "Hive/HBaseIntegration" page has been changed by JohnSichi.
http://wiki.apache.org/hadoop/Hive/HBaseIntegration?action=diff&rev1=9&rev2=10

--------------------------------------------------

  CREATE TABLE hbase_table_1(key int, value string) 
  STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
  WITH SERDEPROPERTIES (
- "hbase.columns.mapping" = "cf:string",
+ "hbase.columns.mapping" = "cf1:val",
  "hbase.table.name" = "xyz"
  );
  }}}
@@ -55, +55 @@

  within HBase.  If not specified, then the Hive and HBase table names
  will be identical.
  
+ After executing the command above, you should be able to see the new table in the HBase
shell:
+ 
+ {{{
+ $ hbase shell
+ HBase Shell; enter 'help<RETURN>' for list of supported commands.
+ Version: 0.20.3, r902334, Mon Jan 25 13:13:08 PST 2010
+ hbase(main):001:0> list
+ xyz                                                                                    
                      
+ 1 row(s) in 0.0530 seconds
+ hbase(main):002:0> describe 'xyz'
+ DESCRIPTION                                                             ENABLED        
                      
+  {NAME => 'xyz', FAMILIES => [{NAME => 'cf1', COMPRESSION => 'NONE', VE true
                                 
+  RSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY =>    
                                  
+   'false', BLOCKCACHE => 'true'}]}                                                  
                         
+ 1 row(s) in 0.0220 seconds
+ }}}
+ 
  If instead you want to give Hive access to an existing HBase table,
  use CREATE EXTERNAL TABLE:
  
@@ -62, +79 @@

  CREATE EXTERNAL TABLE hbase_table_2(key int, value string) 
  STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
  WITH SERDEPROPERTIES (
- "hbase.columns.mapping" = "cf:string",
+ "hbase.columns.mapping" = "cf1:val",
  "hbase.table.name" = "some_existing_table"
  );
  }}}

Mime
View raw message