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 Tue, 04 Dec 2007 08:08:16 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:
change the delete statement.

------------------------------------------------------------------------------
  
  ||<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 INTO table_name (colmn_name, ...)[[BR]]{{{
   }}}VALUES ('value', ...)[[BR]]{{{    }}}WHERE row = 'row-key'[[BR]]{{{    }}}[TIMESTAMP
'timestamp'];''-~ ||
- ||Delete ||'''Delete''' command deletes specified rows in table. [[BR]][[BR]]~-''DELETE
{ column_name, [, column_name] ... | *}[[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}WHERE
row = 'row-key';''-~ ||
+ ||Delete ||'''Delete''' command deletes specified rows in table. [[BR]][[BR]]~-''DELETE
{ column_name, [, column_name] ... | COLUMNFAMILIES(column_family[, column_family] ... | *}
[[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}[WHERE row = 'row-key'];''-~ ||
  ||Select ||<99%>'''Select''' command retrieves rows from a table.[[BR]][[BR]]~-''SELECT
{ column_name [, column_name] ... | * }[[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}[WHERE
row = 'row-key' | STARTING FROM 'row-key'][[BR]]{{{    }}}[NUM_VERSIONS = version_count][[BR]]{{{
   }}}[TIMESTAMP 'timestamp'][[BR]]{{{    }}}[LIMIT = row_count][[BR]]{{{    }}}[INTO FILE
'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{     }}}column_family_name[[BR]]{{{
   }}}| column_family_name:column_label_name''-~ ||
  
  
@@ -189, +189 @@

  hql > INSERT INTO movieLog_table (year:, length:, inColor:, studioName:, 'vote:user name',
producer:, 'actor:hero')
    --> VALUES ('1977', '124', 'true', 'Fox', '5', 'George Lucas', 'Mark Hamill')
    --> WHERE row='Star Wars';
+ }}}
+ 
+ === Delete data in a table ===
+ {{{
+ hql > help delete;
+ DELETE    Delete table data
+ 
+ Syntax:
+ DELETE { column_name, [, column_name] ... | COLUMNFAMILIES(column_family[, column_family]
... | *} 
+         FROM table_name
+         [WHERE row = 'row-key'];
+ }}}
+ 
+  * Asterisk (*) will be delete the all in table.
+  * COLUMNFAMILIES(column_family list) will be delete the all columns in columnfamily.
+  * Specified column_name will be delete the specified column data.
+ 
+ {{{
+ hql > DELETE actor:hero FROM movieLog_table;
+ hql > DELETE actor:hero FROM movieLog_table WHERE row='Star Wars';
+ hql > DELETE * FROM movieLog_table;
  }}}
  
  === How to use external jars in Hbase Shell ===

Mime
View raw message