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/HbaseShell ------------------------------------------------------------------------------ ||HELP ||<99%>'''Help''' command provides information about the use of shell script.[[BR]][[BR]]~-''HELP [function_name];''-~ || ||SHOW ||<99%>'''Show''' command will list the tables.[[BR]][[BR]]~-''SHOW tables;''-~ || ||DESC ||'''Desc''' command will provides information about the columnfamilies in a table.[[BR]][[BR]]~-''DESC table_name;''-~ || - ||CREATE ||'''Create''' command will create a new table.[[BR]][[BR]]~-''CREATE table_name[[BR]]COLUMNFAMILIES('columnfamily_name1'[, 'columnfamily_name2', ...])[[BR]]LIMIT=limitNumber_of_Version;''-~ || + ||CREATE ||'''Create''' command will create a new table.[[BR]][[BR]]~-''CREATE table_name[[BR]]COLUMNFAMILIES('columnfamily_name1'[, 'columnfamily_name2', ...])[[BR]][LIMIT=limitNumber_of_Version];''-~ || ||DROP ||'''Drop''' command will droping columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP table_name1[, table_name2, ...] or columnfamily_name1[, columnfamily_name2, ...];''-~ || - ||SUBSTITUTE[[BR]] || '''Substitute''' query to [A~Z][[BR]][[BR]]~-''X = SELECT table_name;''-~|| + ||SUBSTITUTE[[BR]] || '''Substitute''' query to [A~Z][[BR]][[BR]]~-''X = MAPSET('table_name', 'columnfamily_name');''-~|| + ||MAPSET || '''Map Set''' || + ||ARRAY || '''Array''' || + ||MATRIX || '''Matrix''' || + ||VECTOR || '''Vector''' || - ||PRINT ||'''Print''' command will print a results to the console output. [[BR]][[BR]]~-''A = array([1, 2, 3]);[[BR]]PRINT A;[[BR]]B = SELECT table_name WHERE row='row_key';[[BR]]PRINT B;''-~ || + ||PRINT ||'''Print''' command will print a results to the console output. [[BR]][[BR]]~-''A = ARRAY([1, 2, 3]);[[BR]]PRINT A;[[BR]]B = SELECT table_name WHERE row='row_key';[[BR]]PRINT B;''-~ || ||STORE ||'''STORE''' command will store results to specified table. [[BR]][[BR]]~-''M = matrix('table_name','columnfamily_name');[[BR]]A = array([[1, 2],[3, 4]]); //In this case, Key should be an integer index. [[BR]]STORE A TO M run_style;[[BR]]B = SELECT table_name WHERE row='row_key';[[BR]]STORE B TO ('table_name','columnfamily_name1'[, 'columnfamily_name2']) run_style;''-~ || ||EXIT ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ || And, Commands to manually manipulate data on more detailed parts. @@ -64, +68 @@ ||INSERT ||<99%>'''Insert''' command will insert one row into the table with a value for specified column in the table.[[BR]][[BR]]~-''INSERT table_name[[BR]] VALUES('columnfamily_name:column_key','entry')[[BR]]WHERE row='row_key';''-~ || ||SET ||'''SET''' command will change the values. [[BR]][[BR]]~-''SET table_name[[BR]] VALUES('columnfamily_name:column_key','entry')[[BR]]WHERE row='row_key' AND time='Specified_Timestamp';''-~ || ||DELETE ||'''Delete''' command will delete 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 will 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];''-~ || === Relational Algebra Operators === + Set Operations.. - ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' || + ||<bgcolor="#ececec">'''Operators''' ||<bgcolor="#ececec">'''Explanation''' || - ||SELECT ||<99%>'''Select''' command will 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];''-~ || + ||UNION||<99%>'''Union''' AâªB contains all the elements of A and it contains all the elements of B.|| + ||INTERSECTION||<99%>'''Intersection''' Aâ©B is a subset of A and it is a subset of B.|| + ||DIFFERENCE||<99%>'''Difference''' of A and B (A-B).|| + A = MAPSET(table_T, columnfamily_A);[[BR]] + B = MAPSET(table_T, columnfamily_B);[[BR]] + C = A.Union(B);[[BR]] + C = A.Intersection(B);[[BR]] + C = A.Difference(B); + + ||<bgcolor="#ececec">'''Operators''' ||<bgcolor="#ececec">'''Explanation''' || + ||PROJECTION||<99%>...|| + ||SELECTION||<99%>...|| + ||PRODUCT||<99%>...|| + ||RENAMING||<99%>...|| + ||GROUPING||<99%>...|| + ||SORT||<99%>...|| + + + A.Projection('year','length');[[BR]] + A.Selection('length' > 100); === Aggregation Functions === - Generic one dimensional counting?? + ||<bgcolor="#ececec">'''Functions''' ||<bgcolor="#ececec">'''Explanation''' || - ||SUM ||<99%>'''SUM''' command will 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];''-~ || - - - ... - ||<bgcolor="#ececec">'''Function''' ||<bgcolor="#ececec">'''Explanation''' || - ||... ||<99%>... || + ||AVG ||<99%>...|| - + ||SUM ||<99%>...|| + ||COUNT ||<99%>...|| + ||MIN ||<99%>...|| + ||MAX ||<99%>...|| The Matrix commands are used to store a 2D array of numerical data values. [[BR]]A number of routines are provided to manipulate the matrix object directly, illustrated below by simple examples. @@ -96, +119 @@ === Special functions === .. - ---- = Example Of Hbase Shell Use = == Basic Usage ==