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/HbaseShell" by udanax
Date Thu, 23 Aug 2007 09:22:38 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 udanax:
http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell

The comment on the change is:
add a dfs command

------------------------------------------------------------------------------
  
  You will be presented with the following prompt:
  
- {{{HBase Shell, 0.0.1 version.
+ {{{Hbase Shell, 0.0.1 version.
  Copyright (c) 2007 by udanax, licensed to Apache Software Foundation.
  Type 'help;' for usage.
  
- HBase >}}}
+ Hbase >}}}
  
  All commands are terminated with a semi-colon: e.g. Type 'help;' to see list of available
commands.
  
@@ -38, +38 @@

  
  ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||Help ||<99%>'''Help''' command provides information about the use of shell script.[[BR]][[BR]]~-''HELP
[function_name];''-~ ||
- ||Show ||<99%>'''Show''' command lists tables ''or files (DFS)''.[[BR]][[BR]]~-''SHOW
tables[ or files];''-~ ||
+ ||Show ||<99%>'''Show''' command lists tables.[[BR]][[BR]]~-''SHOW tables;''-~ ||
  ||Describe ||'''Describe''' command provides information about the columnfamilies in a table.[[BR]][[BR]]~-''DESC
table_name;''-~ ||
+ ||DFS ||<99%>'''DFS''' command using Hadoop FsShell operations.[[BR]][[BR]]~-''DFS
-copyFromLocal /home/source_files.dat /dfs/target_folder;''-~ ||
+ ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ ||
+ ||Exit ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ ||
+ 
+ And, Commands to manually manipulate data on more detailed parts.
+ 
+ ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||Create ||'''Create''' command creates a new table.[[BR]][[BR]]~-''CREATE table_name[[BR]]COLUMNFAMILIES('columnfamily_name1'[,
'columnfamily_name2', ...])[[BR]][LIMIT=limitNumber_of_Version];''-~ ||
  ||Drop ||'''Drop''' command drops columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP
table_name1[, table_name2, ...] or columnfamily_name1[, columnfamily_name2, ...];''-~ ||
- ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ ||
- ||Exit ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ ||
- And, Commands to manually manipulate data on more detailed parts.
- ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||Insert ||<99%>'''Insert''' command inserts one row into the table with a value for
specified column in the table.[[BR]][[BR]]~-''INSERT table_name ('columnfamily_name1:column_key'[,
'columnfamily_name2:column_key', ...])[[BR]] VALUESVALUES ('entry1'[, 'entry2', ...])[[BR]]WHERE
row='row_key';''-~ ||
  ||Delete ||'''Delete''' command deletes specified rows in table. [[BR]][[BR]]~-''DELETE
table_name[[BR]]WHERE row='row_key'[[BR]][AND column='columnfamily_name:column_key'];''-~
||
  ||Select ||<99%>'''Select''' command retrieves rows from a table.[[BR]][[BR]]~-''SELECT
table_name[[BR]][WHERE row='row_key'][[BR]][AND column='columnfamily_name:column_key'];[[BR]][AND
time='Specified_Timestamp'];[[BR]][LIMIT=Number_of_Version];''-~ ||
@@ -55, +58 @@

  == Create the table in a HBase ==
  
  {{{
- HBase > CREATE movieLog_table
+ Hbase > CREATE movieLog_table
      --> COLUMNFAMILIES('year', 'length', 'inColor', 'studioName', 'vote', 'producer')
      --> LIMIT=1; 
  
- HBase > CREATE movieStar_table
+ Hbase > CREATE movieStar_table
      --> COLUMNFAMILIES('biography', 'filmography', 'gender', 'birthDate')
      --> LIMIT=1;
  }}}
  
  == Insert data into a table ==
  {{{
- HBase > INSERT movieLog_table ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1',
'producer:')
+ Hbase > INSERT movieLog_table ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1',
'producer:')
      --> VALUES ('1977', '124', 'true', 'Fox', '5', 'George Lucas')
      --> WHERE row='Star Wars';
  
  
- HBase > INSERT movieStar_table ('biography:', 'filmography:Star Wars', 'gender:', 'birthDate:')
+ Hbase > INSERT movieStar_table ('biography:', 'filmography:Star Wars', 'gender:', 'birthDate:')
-     --> VALUES ('blah~', 'starring', 'male', 'March 31, 1971')
+     --> VALUES ('blah blah', 'starring', 'male', 'March 31, 1971')
      --> WHERE row='Ewan Gordon Mc.Gregor'; 
  }}}
  
  == Show all data in a table ==
  {{{
- HBase > SELECT movieLog_table;
+ Hbase > SELECT movieLog_table;
  }}}
  
  ||Row Key ||<-12>Column Families ||
@@ -91, +94 @@

  || || || || || || || || || || vote:''user_3'' || 4 || || ||
  
  {{{
- HBase > SELECT movieStar_table;
+ Hbase > SELECT movieStar_table;
  }}}
  
  ||Row Key ||<-8>Column Families ||

Mime
View raw message