HBase
  1. HBase
  2. HBASE-336

A simple shell for manipulating HBase tables

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      All environments

      Description

      Hbase Shell is a basic, command-line, interactive 'shell' for manipulating tables in HBase. It has support for a small set of SQL-inspired operations. Results are presented in an ASCII-table format.

      The HBase Shell aims to be to HBase what the mysql client command-line tool is to mysqld and sqlplus is to Oracle.

      1. hbase_shell_base_v13.patch
        140 kB
        stack
      2. hbase_shell_base_v12.patch
        141 kB
        Edward J. Yoon
      3. hbase_shell_base_v11.patch
        141 kB
        Edward J. Yoon
      4. hbase_shell_base_v10.patch
        141 kB
        Edward J. Yoon
      5. hbase_shell_base_v09.patch
        140 kB
        stack
      6. hbase_shell_base_v08.patch
        144 kB
        Edward J. Yoon
      7. hbase_shell_base_v07.patch
        144 kB
        Edward J. Yoon
      8. hbase_shell_base_v06.patch
        143 kB
        Edward J. Yoon
      9. hbase_shell_base_v05.patch
        149 kB
        stack
      10. hbase_shell_base_v04.patch
        62 kB
        Edward J. Yoon
      11. hbase_shell_base_v03.patch
        59 kB
        Edward J. Yoon
      12. hadoop1375-v12.patch
        2 kB
        stack
      13. jline-0.9.91.jar
        60 kB
        Edward J. Yoon

        Issue Links

          Activity

          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-Nightly #152 (See http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/152/ )
          Hide
          stack added a comment -

          Committed with below message. Thanks for the contribution Edward.

          HADOOP-1375 a simple parser for hbase
          M src/contrib/hbase/NOTICE.txt
          Add notice of udanax contributions.
          Msrc/contrib/hbase/conf/hbase-default.xml
          (hbaseshell.jline.bell.enabled): Added.
          M src/contrib/hbase/CHANGES.txt
          (hadoop-1375) Added.
          M src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html
          Add note on how to start up hbase shell
          M src/contrib/hbase/bin/hbase
          Add 'shell'. Remove 'client' (shell does what it used do and more).
          Removed all reader and logreader until better developed. Starting
          up a reader or logreader on a running hbase system could do damage).
          M src/contrib/hbase/build.xml
          Add a javacc target to generate content of shell/generated subpackage.
          A src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DeleteCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CreateCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DropCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/InsertCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CommandFactory.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ExitCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ConsoleTable.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DescCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/SelectCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/Command.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ShowCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/BasicCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpManager.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ReturnMsg.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpCommand.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj
          Added.
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Token.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/TokenMgrError.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/SimpleCharStream.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParseException.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java
          A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java
          Added javacc generated files.

          Show
          stack added a comment - Committed with below message. Thanks for the contribution Edward. HADOOP-1375 a simple parser for hbase M src/contrib/hbase/NOTICE.txt Add notice of udanax contributions. Msrc/contrib/hbase/conf/hbase-default.xml (hbaseshell.jline.bell.enabled): Added. M src/contrib/hbase/CHANGES.txt (hadoop-1375) Added. M src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html Add note on how to start up hbase shell M src/contrib/hbase/bin/hbase Add 'shell'. Remove 'client' (shell does what it used do and more). Removed all reader and logreader until better developed. Starting up a reader or logreader on a running hbase system could do damage). M src/contrib/hbase/build.xml Add a javacc target to generate content of shell/generated subpackage. A src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DeleteCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CreateCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DropCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/InsertCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CommandFactory.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ExitCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ConsoleTable.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DescCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/SelectCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/Command.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ShowCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/BasicCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpManager.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ReturnMsg.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpCommand.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj Added. A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Token.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/TokenMgrError.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/SimpleCharStream.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParseException.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java Added javacc generated files.
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-Nightly #151 (See http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/151/ )
          Show
          Hadoop QA added a comment - +1 http://issues.apache.org/jira/secure/attachment/12361538/hbase_shell_base_v13.patch applied and successfully tested against trunk revision r555114. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/393/testReport/ Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/393/console
          Hide
          Edward J. Yoon added a comment - - edited

          Yeah OK. And, I (or we) hope your continuously advice.

          Show
          Edward J. Yoon added a comment - - edited Yeah OK. And, I (or we) hope your continuously advice.
          Hide
          stack added a comment -

          Hopefully the patch will pass the hudson build and we can then commit it.

          When it goes in, I think that we should close this issue and that you should open a new issue to cover the matrix contributions you talk of in the wiki. That OK with you?

          Show
          stack added a comment - Hopefully the patch will pass the hudson build and we can then commit it. When it goes in, I think that we should close this issue and that you should open a new issue to cover the matrix contributions you talk of in the wiki. That OK with you?
          Hide
          Edward J. Yoon added a comment -

          Thank you for your assistance, Michael.
          And Thank you to each of you who responded to my query or comment in regarding to the use of this open project site.
          I will be better prepared to contribute in next issues.

          Show
          Edward J. Yoon added a comment - Thank you for your assistance, Michael. And Thank you to each of you who responded to my query or comment in regarding to the use of this open project site. I will be better prepared to contribute in next issues.
          Hide
          stack added a comment -

          Builds locally. Trying against hudson (Have just added in required jline lib in advance of this submission so patch will compile).

          Show
          stack added a comment - Builds locally. Trying against hudson (Have just added in required jline lib in advance of this submission so patch will compile).
          Hide
          stack added a comment -

          V13 removes errant hbase shell test.

          Show
          stack added a comment - V13 removes errant hbase shell test.
          Hide
          Edward J. Yoon added a comment -

          When Hbase Shell concept document in wiki and uml design document are done, you can better start.

          Show
          Edward J. Yoon added a comment - When Hbase Shell concept document in wiki and uml design document are done, you can better start.
          Hide
          boyo added a comment - - edited

          Hi, this is first time in here.

          as you know, each deamons has good points.
          I want to build the deamon for this shell.
          I'll try to build the deamon, but I am observing the architecture now.
          I think it will be needed and it will be help to improve the jobs.
          just example, the scheduling for multi tasks and huge jobs is good on this deamon.
          More to improve the work, what can I catch the points to make this deamon?

          If I do, I want to get the best choice by taking other opinions.
          I want to get your good opinions.

          Show
          boyo added a comment - - edited Hi, this is first time in here. as you know, each deamons has good points. I want to build the deamon for this shell. I'll try to build the deamon, but I am observing the architecture now. I think it will be needed and it will be help to improve the jobs. just example, the scheduling for multi tasks and huge jobs is good on this deamon. More to improve the work, what can I catch the points to make this deamon? If I do, I want to get the best choice by taking other opinions. I want to get your good opinions.
          Hide
          Edward J. Yoon added a comment -

          I attached a new patch with more testing.

          But, v11.patch could not found error.
          Please let me know what's wrong with v11 patch file.

          Show
          Edward J. Yoon added a comment - I attached a new patch with more testing. But, v11.patch could not found error. Please let me know what's wrong with v11 patch file.
          Hide
          stack added a comment -

          Edward. Your last patch does not apply and help is broken. Unless you make a new fix, I will apply v9 as soon as HADOOP-1571 is addressed.

          Show
          stack added a comment - Edward. Your last patch does not apply and help is broken. Unless you make a new fix, I will apply v9 as soon as HADOOP-1571 is addressed.
          Hide
          Edward J. Yoon added a comment -

          Re-upload the patch.
          I apologize for my carelessness.

          Show
          Edward J. Yoon added a comment - Re-upload the patch. I apologize for my carelessness.
          Hide
          Edward J. Yoon added a comment -

          >>> We need to figure out a flag for outputting data without ConsoleTable wrapping but we can do that later.

          I will try to figure out printing result format in the next HBaseShell-daemon patch.

          Show
          Edward J. Yoon added a comment - >>> We need to figure out a flag for outputting data without ConsoleTable wrapping but we can do that later. I will try to figure out printing result format in the next HBaseShell-daemon patch.
          Hide
          Edward J. Yoon added a comment -

          Thank you, Micheal.

          >>>It passes all local tests but fails building javadoc because javadoc is built with the hadoop javadoc target. It doesn't have JLine in its CLASSPATH. Let me try and make a patch for the top-level hadoop build.xml so contribs build their own javadoc. After that is in place I would like to commit v09 if you agree. There is one thing you may yet want to fix before the commit. The license header on java source says copyright Apache, not udanax. Is this what you want?

          I would like it to be apache license just like you v09 patch.
          and yes, you may commit.


          I attached a v10 patch.
          There was small modifications on help class.

          Show
          Edward J. Yoon added a comment - Thank you, Micheal. >>>It passes all local tests but fails building javadoc because javadoc is built with the hadoop javadoc target. It doesn't have JLine in its CLASSPATH. Let me try and make a patch for the top-level hadoop build.xml so contribs build their own javadoc. After that is in place I would like to commit v09 if you agree. There is one thing you may yet want to fix before the commit. The license header on java source says copyright Apache, not udanax. Is this what you want? I would like it to be apache license just like you v09 patch. and yes, you may commit. I attached a v10 patch. There was small modifications on help class.
          Hide
          stack added a comment -

          Regards, "echo 'show tables;' | hbase shell", thanks for adding this facility. Its good that the shell exits after its performed the 'show tables' command. Thats the way it should work. We need to figure out a flag for outputting data without ConsoleTable wrapping but we can do that later.

          I've attached a version9 of the patch. I spent some time banging on it and it works very nicely. I made some changes listed below.

          It passes all local tests but fails building javadoc because javadoc is built with the hadoop javadoc target. It doesn't have JLine in its CLASSPATH. Let me try and make a patch for the top-level hadoop build.xml so contribs build their own javadoc. After that is in place I would like to commit v09 if you agree. There is one thing you may yet want to fix before the commit. The license header on java source says copyright Apache, not udanax. Is this what you want?

          Here are changes:

          I removed the regionserver file edit you included by mistake (as well as the hbase-site.xml I included by mistake).

          Fixed no command returning NPE.

          Fixed print out of rows whose keys > 20 (They were being cut off if data < 20).

          Removed 'set' for now. Can do anything 'set' could do using 'insert'.

          Changed 'desc' to 'describe' – was only abbreviated command.

          I removed the author tags. Its hadoop convention. I added to NOTICES.txt that hbase includes software from udanax.

          I changed date on all licenses from 2006 to 2007 in java files.

          Various formatting changes.

          Show
          stack added a comment - Regards, "echo 'show tables;' | hbase shell", thanks for adding this facility. Its good that the shell exits after its performed the 'show tables' command. Thats the way it should work. We need to figure out a flag for outputting data without ConsoleTable wrapping but we can do that later. I've attached a version9 of the patch. I spent some time banging on it and it works very nicely. I made some changes listed below. It passes all local tests but fails building javadoc because javadoc is built with the hadoop javadoc target. It doesn't have JLine in its CLASSPATH. Let me try and make a patch for the top-level hadoop build.xml so contribs build their own javadoc. After that is in place I would like to commit v09 if you agree. There is one thing you may yet want to fix before the commit. The license header on java source says copyright Apache, not udanax. Is this what you want? Here are changes: I removed the regionserver file edit you included by mistake (as well as the hbase-site.xml I included by mistake). Fixed no command returning NPE. Fixed print out of rows whose keys > 20 (They were being cut off if data < 20). Removed 'set' for now. Can do anything 'set' could do using 'insert'. Changed 'desc' to 'describe' – was only abbreviated command. I removed the author tags. Its hadoop convention. I added to NOTICES.txt that hbase includes software from udanax. I changed date on all licenses from 2006 to 2007 in java files. Various formatting changes.
          Hide
          Edward J. Yoon added a comment -

          Just re-upload (Removing trace code)

          Show
          Edward J. Yoon added a comment - Just re-upload (Removing trace code)
          Hide
          Edward J. Yoon added a comment -
          • I added column scan
          • I changed INSERT syntax
          INSERT table_name ('columnfamily_name1:column_key[,'columnfamily_name2:column_key', ...])
          VALUES('entry1'[,'entry2', ...])
          WHERE row='row_key';
          

          Test results.

          HBase > select udanax;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | b                    | a:b                  | c                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | c                    | a:                   | b3                   |
          +------+----------------------+----------------------+----------------------+
          | 3    | c                    | a:c                  | ee                   |
          +------+----------------------+----------------------+----------------------+
          | 4    | f                    | a:c                  | test                 |
          +------+----------------------+----------------------+----------------------+
          | 5    | xanadu               | a:                   | v1                   |
          +------+----------------------+----------------------+----------------------+
          | 6    | xanadu               | b:                   | v2                   |
          +------+----------------------+----------------------+----------------------+
          
          Successfully print out the selected data.(0.12 sec)
          
          HBase > select udanax where column='a:c';
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | c                    | a:c                  | ee                   |
          +------+----------------------+----------------------+----------------------+
          | 2    | f                    | a:c                  | test                 |
          +------+----------------------+----------------------+----------------------+
          
          Successfully print out the selected data.(0.05 sec)
          
          HBase > insert udanax ('a','b') values('test1','test2') where row='hadoop';
          org.apache.hadoop.hbase.InvalidColumnNameException: a is missing the colon family/qualifier separator
          
          HBase > insert udanax ('a:','b:insert_test') values('test1','test2') where row='hadoop';
          1 row inserted successfully.(0.02 sec)
          
          HBase > select udanax;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | b                    | a:b                  | c                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | c                    | a:                   | b3                   |
          +------+----------------------+----------------------+----------------------+
          | 3    | c                    | a:c                  | ee                   |
          +------+----------------------+----------------------+----------------------+
          | 4    | f                    | a:c                  | test                 |
          +------+----------------------+----------------------+----------------------+
          | 5    | hadoop               | a:                   | test1                |
          +------+----------------------+----------------------+----------------------+
          | 6    | hadoop               | b:insert_test        | test2                |
          +------+----------------------+----------------------+----------------------+
          | 7    | xanadu               | a:                   | v1                   |
          +------+----------------------+----------------------+----------------------+
          | 8    | xanadu               | b:                   | v2                   |
          +------+----------------------+----------------------+----------------------+
          
          Successfully print out the selected data.(0.06 sec)
          
          Show
          Edward J. Yoon added a comment - I added column scan I changed INSERT syntax INSERT table_name ('columnfamily_name1:column_key[,'columnfamily_name2:column_key', ...]) VALUES('entry1'[,'entry2', ...]) WHERE row='row_key'; Test results. HBase > select udanax; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | b | a:b | c | +------+----------------------+----------------------+----------------------+ | 2 | c | a: | b3 | +------+----------------------+----------------------+----------------------+ | 3 | c | a:c | ee | +------+----------------------+----------------------+----------------------+ | 4 | f | a:c | test | +------+----------------------+----------------------+----------------------+ | 5 | xanadu | a: | v1 | +------+----------------------+----------------------+----------------------+ | 6 | xanadu | b: | v2 | +------+----------------------+----------------------+----------------------+ Successfully print out the selected data.(0.12 sec) HBase > select udanax where column='a:c'; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | c | a:c | ee | +------+----------------------+----------------------+----------------------+ | 2 | f | a:c | test | +------+----------------------+----------------------+----------------------+ Successfully print out the selected data.(0.05 sec) HBase > insert udanax ('a','b') values('test1','test2') where row='hadoop'; org.apache.hadoop.hbase.InvalidColumnNameException: a is missing the colon family/qualifier separator HBase > insert udanax ('a:','b:insert_test') values('test1','test2') where row='hadoop'; 1 row inserted successfully.(0.02 sec) HBase > select udanax; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | b | a:b | c | +------+----------------------+----------------------+----------------------+ | 2 | c | a: | b3 | +------+----------------------+----------------------+----------------------+ | 3 | c | a:c | ee | +------+----------------------+----------------------+----------------------+ | 4 | f | a:c | test | +------+----------------------+----------------------+----------------------+ | 5 | hadoop | a: | test1 | +------+----------------------+----------------------+----------------------+ | 6 | hadoop | b:insert_test | test2 | +------+----------------------+----------------------+----------------------+ | 7 | xanadu | a: | v1 | +------+----------------------+----------------------+----------------------+ | 8 | xanadu | b: | v2 | +------+----------------------+----------------------+----------------------+ Successfully print out the selected data.(0.06 sec)
          Hide
          Edward J. Yoon added a comment -

          >>> select TABLE_NAME where COLUMN='COLNAME'

          Thank you for letting me know, Stack.
          I will try to fix it tomorrow.

          This work/research has recently become my full-time job. (smile)

          Show
          Edward J. Yoon added a comment - >>> select TABLE_NAME where COLUMN='COLNAME' Thank you for letting me know, Stack. I will try to fix it tomorrow. This work/research has recently become my full-time job. (smile)
          Hide
          Edward J. Yoon added a comment -
          • I fixed them, but I couldn't stop hbaseshell from exitiing.
          BUILD SUCCESSFUL
          Total time: 48 seconds
          [udanax@localhost hadoop]# echo 'show tables;' | src/contrib/hbase/bin/hbase shell
          HBase Shell, 0.0.1 version.
          Copyright (c) 2007 by udanax, licensed to Apache Software Foundation.
          Type 'help;' for usage.
          
          HBase > show tables;
          +------+----------------------+
          | No.  | Table Name           |
          +------+----------------------+
          | 1    | udanax               |
          +------+----------------------+
          
          1 table(s) found.(0.48 sec)
          HBase >
          [udanax@localhost hadoop]#
          
          
          HBase > show tables;
          +------+----------------------+
          | No.  | Table Name           |
          +------+----------------------+
          | 1    | udanax               |
          +------+----------------------+
          
          1 table(s) found.(0.49 sec)
          HBase > select udanax where row='bb' and columm='a:';
          Missing parameters. Please check 'Select' syntax.
          
          Show
          Edward J. Yoon added a comment - I fixed them, but I couldn't stop hbaseshell from exitiing. BUILD SUCCESSFUL Total time: 48 seconds [udanax@localhost hadoop]# echo 'show tables;' | src/contrib/hbase/bin/hbase shell HBase Shell, 0.0.1 version. Copyright (c) 2007 by udanax, licensed to Apache Software Foundation. Type 'help;' for usage. HBase > show tables; +------+----------------------+ | No. | Table Name | +------+----------------------+ | 1 | udanax | +------+----------------------+ 1 table(s) found.(0.48 sec) HBase > [udanax@localhost hadoop]# HBase > show tables; +------+----------------------+ | No. | Table Name | +------+----------------------+ | 1 | udanax | +------+----------------------+ 1 table(s) found.(0.49 sec) HBase > select udanax where row='bb' and columm='a:'; Missing parameters. Please check 'Select' syntax.
          Hide
          stack added a comment -

          One last thing, can you make the below work Edward?

          $ echo 'show tables'| src/contrib/hbase/bin/hbase shell 
          HBase Shell, 0.0.1 version.
          Copyright (c) 2007 by udanax, licensed to Apache Software Foundation.
          Type 'help;' for usage.
          
          HBase > show tables
              --> Exception in thread "main" java.lang.NullPointerException
                  at org.apache.hadoop.hbase.Shell.isEndOfCommand(Shell.java:78)
                  at org.apache.hadoop.hbase.Shell.main(Shell.java:55)
          

          i.e. read from STDIN

          Show
          stack added a comment - One last thing, can you make the below work Edward? $ echo 'show tables'| src/contrib/hbase/bin/hbase shell HBase Shell, 0.0.1 version. Copyright (c) 2007 by udanax, licensed to Apache Software Foundation. Type 'help;' for usage. HBase > show tables --> Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.Shell.isEndOfCommand(Shell.java:78) at org.apache.hadoop.hbase.Shell.main(Shell.java:55) i.e. read from STDIN
          Hide
          stack added a comment -

          Edward:

          I made some edits in attached v5.

          + Moved HBaseShell from its shell subpackage up to the root of hbase and renamed it Shell.
          + Added to the bin/hbase wrapper shell a 'shell' option in place of 'client' (since the shell does all the client used to do and more). Makes it so you can start the shell by doing:

          ./bin/hbase shell
          

          + I edited the help screens fixing mid-word wraps.
          + Removed the constants interface. Defines were used once only except those that could be put closer to use into the command parent class.
          + Some code edits to get rid of redundant else branches and tests that would returned true/false

          Show
          stack added a comment - Edward: I made some edits in attached v5. + Moved HBaseShell from its shell subpackage up to the root of hbase and renamed it Shell. + Added to the bin/hbase wrapper shell a 'shell' option in place of 'client' (since the shell does all the client used to do and more). Makes it so you can start the shell by doing: ./bin/hbase shell + I edited the help screens fixing mid-word wraps. + Removed the constants interface. Defines were used once only except those that could be put closer to use into the command parent class. + Some code edits to get rid of redundant else branches and tests that would returned true/false
          Hide
          stack added a comment -

          This patch is almost there. There is just one more thing that I think you need to fix before commit.
          It should be possible to do a 'select TABLE_NAME where COLUMN='COLNAME'. This is important for
          the common case where the table is full of crawl data one column of which is the page content, anothe
          column is crawl metadata etc. It should be possible to do a select that returns all of the metadata for all rows
          (without return page content).

          Here is what happens when I try to do this now. First, I display the content of my test table:

          HBase > select z;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | a                    | z:                   | a                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | a                    | z:a                  | a                    |
          +------+----------------------+----------------------+----------------------+
          | 3    | b                    | z:b                  | b                    |
          +------+----------------------+----------------------+----------------------+
          | 4    | c                    | z:c                  | c                    |
          +------+----------------------+----------------------+----------------------+
          | 5    | d                    | x:d                  | d                    |
          +------+----------------------+----------------------+----------------------+
          
          Selected data successfully.(0.04 sec)
          

          Now I try and narrow the select to a particular column:

          HBase > select z where row='a' and columm='z:a';
          Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "columm" at line 1, column 29.
          Was expecting one of:
              <ROW> ...
              <COLUMN> ...
              <TIME> ...
              
                  at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:519)
                  at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:455)
                  at org.apache.hadoop.hbase.shell.generated.Parser.expression(Parser.java:331)
                  at org.apache.hadoop.hbase.shell.generated.Parser.WhereClause(Parser.java:309)
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:177)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:61)
          

          I get same crash if I do 'select z column="z:"'.

          Here is another crash that I wasn't able to reproduce I'd made a table 'x' with a column family of 'x:'. I then inserted a row at 'x' with a value of 'x'. I then managed to crash the shell with the below:

          HBase > set x where values('x:', 'y') where row='x';
          Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "values" at line 1, column 14.
          Was expecting one of:
              <ROW> ...
              <COLUMN> ...
              <TIME> ...
              
                  at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:519)
                  at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:455)
                  at org.apache.hadoop.hbase.shell.generated.Parser.expression(Parser.java:331)
                  at org.apache.hadoop.hbase.shell.generated.Parser.WhereClause(Parser.java:297)
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:177)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:61)
          

          I like the way you just print out the first line of an exception as in the below where I'd asked to 'select' against a non-existent table:

          HBase > select tables;
          error msg : org.apache.hadoop.hbase.NoServerForRegionException: failed to find server for tables after 5 retries
          
          Show
          stack added a comment - This patch is almost there. There is just one more thing that I think you need to fix before commit. It should be possible to do a 'select TABLE_NAME where COLUMN='COLNAME'. This is important for the common case where the table is full of crawl data one column of which is the page content, anothe column is crawl metadata etc. It should be possible to do a select that returns all of the metadata for all rows (without return page content). Here is what happens when I try to do this now. First, I display the content of my test table: HBase > select z; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | a | z: | a | +------+----------------------+----------------------+----------------------+ | 2 | a | z:a | a | +------+----------------------+----------------------+----------------------+ | 3 | b | z:b | b | +------+----------------------+----------------------+----------------------+ | 4 | c | z:c | c | +------+----------------------+----------------------+----------------------+ | 5 | d | x:d | d | +------+----------------------+----------------------+----------------------+ Selected data successfully.(0.04 sec) Now I try and narrow the select to a particular column: HBase > select z where row='a' and columm='z:a'; Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "columm" at line 1, column 29. Was expecting one of: <ROW> ... <COLUMN> ... <TIME> ... at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:519) at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:455) at org.apache.hadoop.hbase.shell.generated.Parser.expression(Parser.java:331) at org.apache.hadoop.hbase.shell.generated.Parser.WhereClause(Parser.java:309) at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:177) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:61) I get same crash if I do 'select z column="z:"'. Here is another crash that I wasn't able to reproduce I'd made a table 'x' with a column family of 'x:'. I then inserted a row at 'x' with a value of 'x'. I then managed to crash the shell with the below: HBase > set x where values('x:', 'y') where row='x'; Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "values" at line 1, column 14. Was expecting one of: <ROW> ... <COLUMN> ... <TIME> ... at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:519) at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:455) at org.apache.hadoop.hbase.shell.generated.Parser.expression(Parser.java:331) at org.apache.hadoop.hbase.shell.generated.Parser.WhereClause(Parser.java:297) at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:177) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:61) I like the way you just print out the first line of an exception as in the below where I'd asked to 'select' against a non-existent table: HBase > select tables; error msg : org.apache.hadoop.hbase.NoServerForRegionException: failed to find server for tables after 5 retries
          Hide
          Edward J. Yoon added a comment -

          is it better to follow the format of standard-sql ?

          Show
          Edward J. Yoon added a comment - is it better to follow the format of standard-sql ?
          Hide
          Edward J. Yoon added a comment -

          >>> Can you do something about the wrapping of the help output. It seems to wrap at 80 characters or so (Perhaps its just my terminal?).

          I have wrapped the output at 80 characters, which is stantard terminal size.

          Show
          Edward J. Yoon added a comment - >>> Can you do something about the wrapping of the help output. It seems to wrap at 80 characters or so (Perhaps its just my terminal?). I have wrapped the output at 80 characters, which is stantard terminal size.
          Hide
          Edward J. Yoon added a comment -

          This patch

          • adds delete and set command.
          • fixed exceptions.
          HBase > select --ROOT--;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | --META--__1          | info:regioninfo      | ID : 1               |
          +------+----------------------+----------------------+----------------------+
          | 2    | --META--__1          | info:server          | 127.0.0.1:60010      |
          +------+----------------------+----------------------+----------------------+
          | 3    | --META--__1          | info:serverstartcode | 5817593956082822558  |
          +------+----------------------+----------------------+----------------------+
          
          Selected data successfully.(0.21 sec)
          HBase > set --ROOT-- values('info:server','localhost:60010') where row='--META--__1';
          Updated successfully.(0.11 sec)
          HBase > select --ROOT--;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | --META--__1          | info:regioninfo      | ID : 1               |
          +------+----------------------+----------------------+----------------------+
          | 2    | --META--__1          | info:server          | localhost:60010      |
          +------+----------------------+----------------------+----------------------+
          | 3    | --META--__1          | info:serverstartcode | 5817593956082822558  |
          +------+----------------------+----------------------+----------------------+
          
          Selected data successfully.(0.18 sec)
          HBase > select --ROOT-- where row='--META--__1' and column='info:server';
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | --META--__1          | info:server          | localhost:60010      |
          +------+----------------------+----------------------+----------------------+
          
          Selected data successfully.(0.05 sec)
          HBase > exit;
          
          Show
          Edward J. Yoon added a comment - This patch adds delete and set command. fixed exceptions. HBase > select --ROOT--; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | --META--__1 | info:regioninfo | ID : 1 | +------+----------------------+----------------------+----------------------+ | 2 | --META--__1 | info:server | 127.0.0.1:60010 | +------+----------------------+----------------------+----------------------+ | 3 | --META--__1 | info:serverstartcode | 5817593956082822558 | +------+----------------------+----------------------+----------------------+ Selected data successfully.(0.21 sec) HBase > set --ROOT-- values('info:server','localhost:60010') where row='--META--__1'; Updated successfully.(0.11 sec) HBase > select --ROOT--; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | --META--__1 | info:regioninfo | ID : 1 | +------+----------------------+----------------------+----------------------+ | 2 | --META--__1 | info:server | localhost:60010 | +------+----------------------+----------------------+----------------------+ | 3 | --META--__1 | info:serverstartcode | 5817593956082822558 | +------+----------------------+----------------------+----------------------+ Selected data successfully.(0.18 sec) HBase > select --ROOT-- where row='--META--__1' and column='info:server'; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | --META--__1 | info:server | localhost:60010 | +------+----------------------+----------------------+----------------------+ Selected data successfully.(0.05 sec) HBase > exit;
          Hide
          stack added a comment -

          This patch is a big improvement.

          Limit is optional when invoking the create command so wrap with a square brackets in help listings. The below:

          >>> CREATE table_name COLUMNFAMILIES('cf_name1'[, 'cf_name2', ...]) LIMIT=limitNumber_of_Version;
          

          ...should be:

          >>> CREATE table_name COLUMNFAMILIES('cf_name1'[, 'cf_name2', ...]) [LIMIT=limitNumber_of_Version];
          

          If I do 'HBase > create b;' then command-prompt returns without complaint. Should complain that there are missing parameters.

          If I create a table named 'c' with a columnfamily of 'c:', I cannot do inserts:

          HBase > create c columnfamilies('c:');
          +------+----------------------+
          | No.  | ColumnFamily Name    |
          +------+----------------------+|
           1    | c                    |
          +------+----------------------+
          Successfully executed. (0.04 sec)
          HBase > insert c values('c:', 'c') row='c';
          Exception in thread "main" java.lang.Error: Missing return statement in function
           at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:183)
           at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:59)
          

          Qualifiers on select do not seem to work. Its not filitering.

          HBase > select --ROOT-- where row="--META--__1" AND column="info:server";
          

          The above returns all rows.

          Set does not seem to work:

          set --ROOT-- values('info:server', 'one.two.three:1000') where row='--META--__1';
          

          Does not change the content of the table. Nor does delete.

          Can you do something about the wrapping of the help output. It seems to wrap at 80 characters or so (Perhaps its just my terminal?).

          Show
          stack added a comment - This patch is a big improvement. Limit is optional when invoking the create command so wrap with a square brackets in help listings. The below: >>> CREATE table_name COLUMNFAMILIES('cf_name1'[, 'cf_name2', ...]) LIMIT=limitNumber_of_Version; ...should be: >>> CREATE table_name COLUMNFAMILIES('cf_name1'[, 'cf_name2', ...]) [LIMIT=limitNumber_of_Version]; If I do 'HBase > create b;' then command-prompt returns without complaint. Should complain that there are missing parameters. If I create a table named 'c' with a columnfamily of 'c:', I cannot do inserts: HBase > create c columnfamilies('c:'); +------+----------------------+ | No. | ColumnFamily Name | +------+----------------------+| 1 | c | +------+----------------------+ Successfully executed. (0.04 sec) HBase > insert c values('c:', 'c') row='c'; Exception in thread "main" java.lang.Error: Missing return statement in function at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:183) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:59) Qualifiers on select do not seem to work. Its not filitering. HBase > select --ROOT-- where row= "--META--__1" AND column= "info:server" ; The above returns all rows. Set does not seem to work: set --ROOT-- values('info:server', 'one.two.three:1000') where row='--META--__1'; Does not change the content of the table. Nor does delete. Can you do something about the wrapping of the help output. It seems to wrap at 80 characters or so (Perhaps its just my terminal?).
          Hide
          Edward J. Yoon added a comment -

          re-upload.

          Show
          Edward J. Yoon added a comment - re-upload.
          Hide
          Edward J. Yoon added a comment -

          I Fixed them.

          HBase > show tables;
          +------+----------------------+
          | No.  | Table Name           |
          +------+----------------------+
          | 1    | table_jinsuk_yun_uda |
          |      | nax                  |
          +------+----------------------+
          | 2    | udanax               |
          +------+----------------------+
          | 3    | x                    |
          +------+----------------------+
          
          Successfully executed. (0.41 sec)
          HBase > desc x;
          +------+----------------------+
          | No.  | ColumnFamily Name    |
          +------+----------------------+
          | 1    | x                    |
          +------+----------------------+
          | 2    | y                    |
          +------+----------------------+
          
          Successfully executed. (0.16 sec)
          HBase > select x;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | r1                   | x:a                  | b                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | r1                   | x:aa                 | bb                   |
          +------+----------------------+----------------------+----------------------+
          
          Successfully executed. (0.20 sec)
          HBase > select --ROOT--;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | --META--__1          | info:regioninfo      | ID : 1               |
          +------+----------------------+----------------------+----------------------+
          | 2    | --META--__1          | info:server          | 127.0.0.1:60010      |
          +------+----------------------+----------------------+----------------------+
          | 3    | --META--__1          | info:serverstartcode | 5817593956082822558  |
          +------+----------------------+----------------------+----------------------+
          
          Successfully executed. (0.17 sec)
          HBase > help insert;
          
          INSERT     - Insert command will insert one row into the table wi
                       th a value for specified column in the table.
          
          >>> INSERT table_name
          	    VALUES('columnfamily_name:column_key','entry')
              WHERE row='row_key';
          
          HBase > insert x
              --> values('y:aa','bb') where row='r2';
          values('y:aa','bb') where row='r2';
          Successfully executed. (0.19 sec)
          HBase > select x;
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | r1                   | x:a                  | b                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | r1                   | x:aa                 | bb                   |
          +------+----------------------+----------------------+----------------------+
          | 1    | r2                   | x:a                  | b                    |
          +------+----------------------+----------------------+----------------------+
          | 2    | r2                   | x:aa                 | bb                   |
          +------+----------------------+----------------------+----------------------+
          | 3    | r2                   | y:aa                 | bb                   |
          +------+----------------------+----------------------+----------------------+
          
          Successfully executed. (0.16 sec)
          HBase > select x where row='r2';
          +------+----------------------+----------------------+----------------------+
          | No.  | Row Key              | ColumnFamily:Column  | Cell Data            | 
          +------+----------------------+----------------------+----------------------+
          | 1    | r2                   | y:aa                 | bb                   |
          +------+----------------------+----------------------+----------------------+
          
          Successfully executed. (0.13 sec)
          HBase > exit;
          
          Show
          Edward J. Yoon added a comment - I Fixed them. HBase > show tables; +------+----------------------+ | No. | Table Name | +------+----------------------+ | 1 | table_jinsuk_yun_uda | | | nax | +------+----------------------+ | 2 | udanax | +------+----------------------+ | 3 | x | +------+----------------------+ Successfully executed. (0.41 sec) HBase > desc x; +------+----------------------+ | No. | ColumnFamily Name | +------+----------------------+ | 1 | x | +------+----------------------+ | 2 | y | +------+----------------------+ Successfully executed. (0.16 sec) HBase > select x; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | r1 | x:a | b | +------+----------------------+----------------------+----------------------+ | 2 | r1 | x:aa | bb | +------+----------------------+----------------------+----------------------+ Successfully executed. (0.20 sec) HBase > select --ROOT--; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | --META--__1 | info:regioninfo | ID : 1 | +------+----------------------+----------------------+----------------------+ | 2 | --META--__1 | info:server | 127.0.0.1:60010 | +------+----------------------+----------------------+----------------------+ | 3 | --META--__1 | info:serverstartcode | 5817593956082822558 | +------+----------------------+----------------------+----------------------+ Successfully executed. (0.17 sec) HBase > help insert; INSERT - Insert command will insert one row into the table wi th a value for specified column in the table. >>> INSERT table_name VALUES('columnfamily_name:column_key','entry') WHERE row='row_key'; HBase > insert x --> values('y:aa','bb') where row='r2'; values('y:aa','bb') where row='r2'; Successfully executed. (0.19 sec) HBase > select x; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | r1 | x:a | b | +------+----------------------+----------------------+----------------------+ | 2 | r1 | x:aa | bb | +------+----------------------+----------------------+----------------------+ | 1 | r2 | x:a | b | +------+----------------------+----------------------+----------------------+ | 2 | r2 | x:aa | bb | +------+----------------------+----------------------+----------------------+ | 3 | r2 | y:aa | bb | +------+----------------------+----------------------+----------------------+ Successfully executed. (0.16 sec) HBase > select x where row='r2'; +------+----------------------+----------------------+----------------------+ | No. | Row Key | ColumnFamily:Column | Cell Data | +------+----------------------+----------------------+----------------------+ | 1 | r2 | y:aa | bb | +------+----------------------+----------------------+----------------------+ Successfully executed. (0.13 sec) HBase > exit;
          Hide
          stack added a comment -

          Hey Jinsuk: Wait up on moving this issue to the 'submit patch' phase until you get a +1 from a reviewer (If you haven't read 'Contributing your work' from this http://wiki.apache.org/lucene-hadoop/HowToContribute, you should check it out).

          Here are comments on latest patch:

          + When I do 'show help;', it starts out 'SHOW - Show command will list the tables.'. So, I type 'show;' and it complains:

          HBase > show;
          Missing Parameters! Please check 'show' syntax.
          

          Fix the help or fix the 'show' command (When I do 'help show;', the help is still wrong).

          + The 'DESC' help output in same screen wraps 'columnfamilies' as do a bunch of the other descriptions on the help page.
          + I would suggest that for v1 of hbaseshell, you not complicate things by including support for SUBSTITUTE, PRINT, and STORE especially as they do not seem to work and a few commands report unimplemented. Stick w/ shell basics so we can make a commit.
          + The below is still a problem:

          HBase > create table;
          Exception in thread "main" java.lang.NullPointerException
                  at org.apache.hadoop.hbase.shell.commands.Create.checkParams(Create.java:34)
                  at org.apache.hadoop.hbase.shell.commands.Create.execute(Create.java:44)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68)
          

          as is this:

          HBase > select --ROOT--;
          Exception in thread "main" java.lang.Error: Missing return statement in function
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:200)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:65)
          

          + This doesn't work.

          HBase > create x columnfamilies('x', 'y') limit=2;
          Missing Parameters! Please check 'create' syntax.
          

          Doesn't work even if double-quotes or if families end in colons. Same 'missing parameters' message.

          Thats enough for now. Your patch is getting better on each submission. I like the addition of the unit tests, the formatting fixes, etc. I'd suggest focusing on getting a basic functionality working so we can make a commit.

          Show
          stack added a comment - Hey Jinsuk: Wait up on moving this issue to the 'submit patch' phase until you get a +1 from a reviewer (If you haven't read 'Contributing your work' from this http://wiki.apache.org/lucene-hadoop/HowToContribute , you should check it out). Here are comments on latest patch: + When I do 'show help;', it starts out 'SHOW - Show command will list the tables.'. So, I type 'show;' and it complains: HBase > show; Missing Parameters! Please check 'show' syntax. Fix the help or fix the 'show' command (When I do 'help show;', the help is still wrong). + The 'DESC' help output in same screen wraps 'columnfamilies' as do a bunch of the other descriptions on the help page. + I would suggest that for v1 of hbaseshell, you not complicate things by including support for SUBSTITUTE, PRINT, and STORE especially as they do not seem to work and a few commands report unimplemented. Stick w/ shell basics so we can make a commit. + The below is still a problem: HBase > create table; Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.shell.commands.Create.checkParams(Create.java:34) at org.apache.hadoop.hbase.shell.commands.Create.execute(Create.java:44) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68) as is this: HBase > select --ROOT--; Exception in thread "main" java.lang.Error: Missing return statement in function at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:200) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:65) + This doesn't work. HBase > create x columnfamilies('x', 'y') limit=2; Missing Parameters! Please check 'create' syntax. Doesn't work even if double-quotes or if families end in colons. Same 'missing parameters' message. Thats enough for now. Your patch is getting better on each submission. I like the addition of the unit tests, the formatting fixes, etc. I'd suggest focusing on getting a basic functionality working so we can make a commit.
          Hide
          Edward J. Yoon added a comment -

          Since i'm not a commiter, uploading patches was all i could do.
          However, i think base code for hbase shell is quite up to par,
          and it would be better if I could have it uploaded on source tree.
          That way, we can do more collaborative development for command classes.

          Please let me know your thoughts.

          Patches I submitted failed to build.
          It was clear that jj file wasn't generated,
          jline library was probably not there, either.

          Does anyone have any advice to get it fixed?

          Show
          Edward J. Yoon added a comment - Since i'm not a commiter, uploading patches was all i could do. However, i think base code for hbase shell is quite up to par, and it would be better if I could have it uploaded on source tree. That way, we can do more collaborative development for command classes. Please let me know your thoughts. – Patches I submitted failed to build. It was clear that jj file wasn't generated, jline library was probably not there, either. Does anyone have any advice to get it fixed?
          Hide
          Hadoop QA added a comment -

          -1, build or testing failed

          2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12360642/hbase_shell_base.patch against trunk revision r551039.

          Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/338/testReport/
          Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/338/console

          Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.

          Show
          Hadoop QA added a comment - -1, build or testing failed 2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12360642/hbase_shell_base.patch against trunk revision r551039. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/338/testReport/ Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/338/console Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.
          Hide
          Edward J. Yoon added a comment -

          I have submitted a patch.
          My Java code may not look as elegant as it could be for some of you
          and your help and advice will always be appreciated.

          Show
          Edward J. Yoon added a comment - I have submitted a patch. My Java code may not look as elegant as it could be for some of you and your help and advice will always be appreciated.
          Hide
          Edward J. Yoon added a comment -

          Thank you for your constructive adivce. Stack

          Since I am new to this community,
          any constructive criticism and helpful tips will always make me a better member for this community.


          I will have my coding style and various exception handlings addressed and update the fixed version.


          Also, I will update wiki page less frequently, only when most of the stuffs are prepared.
          Also, once base codes are written, I will create a new issue.

          >>> Its a pity this page wasn't added under HBase but maybe we can get a wiki administrator to move it.
          It should be okay to have it moved under HBase by then.


          Thank you and have a wonderful day. I will talk to you later.

          Show
          Edward J. Yoon added a comment - Thank you for your constructive adivce. Stack Since I am new to this community, any constructive criticism and helpful tips will always make me a better member for this community. – I will have my coding style and various exception handlings addressed and update the fixed version. – Also, I will update wiki page less frequently, only when most of the stuffs are prepared. Also, once base codes are written, I will create a new issue. >>> Its a pity this page wasn't added under HBase but maybe we can get a wiki administrator to move it. It should be okay to have it moved under HBase by then. – Thank you and have a wonderful day. I will talk to you later.
          Hide
          stack added a comment -

          Looking more at the patch. You need to remove the tabs and instead use spaces, two per tabstop. Also, check out the sun coding conventions and study hadoop code. See how it does spacings around brackets in particular (You tend to have none whereas hadoop code has one space). Given the issues outlined above, I'd suggest adding unit tests – at least for the content of your cmd subpackage. Have your unit tests pass odd parameters and see how your parse handles them.

          Show
          stack added a comment - Looking more at the patch. You need to remove the tabs and instead use spaces, two per tabstop. Also, check out the sun coding conventions and study hadoop code. See how it does spacings around brackets in particular (You tend to have none whereas hadoop code has one space). Given the issues outlined above, I'd suggest adding unit tests – at least for the content of your cmd subpackage. Have your unit tests pass odd parameters and see how your parse handles them.
          Hide
          stack added a comment -

          Hey Jinsuk:

          I'd suggest you spend might spend more time testing before you upload new patches. It didn't take me long to find the below problems:

          If I type 'help;', at end of the usage screen it says: 'Unknown command: Type 'help' for usage'. Same if I do 'help show;'.

          Does the 'show' command only work with a 'tables' argument? Seems to fail for all else. If so, I'd suggest you make the help state that it only takes table arguments explicitly (Version 2 you can add other objects to the show list).

          If I try to scan the root table, it crashes the shell:

          HBase > scan --ROOT--
              --> ;
          Exception in thread "main" java.lang.Error: Missing return statement in function
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:153)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66)
          

          I made a table named 'x' with a column family named 'one' by doing the following: "create x columnfamilies('one', 'two') limit=3;" I then tried to make use of it. Here I am trying to add a value but I have not specified a row (and I may be using the wrong quoting means):

          HBase > set x values('one:' 'x');
          Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "\'x\'" at line 1, column 22.
          Was expecting one of:
              "," ...
              ")" ...
          
                  at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:441)
                  at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:377)
                  at org.apache.hadoop.hbase.shell.generated.Parser.getLiteralValues(Parser.java:174)
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:127)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66)
          

          The shell should just complain about a missing parameter, not crash.

          Here I mistakenly add an equals after the row:

          HBase > set x values("one:", "x") where row="y";
          Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "\"one:\"" at line 1, column 15.
          Was expecting:
              <STRING_LITERAL> ...
          
                  at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:441)
                  at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:377)
                  at org.apache.hadoop.hbase.shell.generated.Parser.getStringLiteral(Parser.java:182)
                  at org.apache.hadoop.hbase.shell.generated.Parser.getLiteralValues(Parser.java:160)
                  at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:127)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66)
          

          Here is another:

          HBase > set x values('one:', 'y');
          Exception in thread "main" java.lang.NullPointerException
                  at org.apache.hadoop.hbase.shell.Parameters.getRowKey(Parameters.java:38)
                  at org.apache.hadoop.hbase.shell.cmds.Set.checkParams(Set.java:55)
                  at org.apache.hadoop.hbase.shell.cmds.Set.execute(Set.java:33)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68)
          

          And here's a couple of comments on the wiki page:

          First, nice documentation. You should add a referral to this patch at the head of your page so people are not confused when they are unable to locate HBaseShell in the src (Because patch is not yet committed).

          Its a pity this page wasn't added under HBase but maybe we can get a wiki administrator to move it.

          I'd suggest that you save up all your edits and do one commit rather than lots of little updates. A diff of changes shows on the dev list. Lots of small changes makes for lots of mail (If you haven't already, check out the 'preview' button).

          You say "Hbase Shell is an 'interpreter' (or 'shell)' to provide scalable data processing capabilities like aggregation, algebraic calculation on Hadoop + Hbase." This seems wrong. HBaseShell will not be providing 'scalable data processing'. Nor, from 'goals' will it provide 'Generic Query Model Functions' or 'Parallel Numerical Analysis ...' These seems like facilities distinct from what HBaseShell does, providing a command-line means of admining and updating hbase as the 'mysql' comand-line tool does for mysql. I'd suggest you narrow the focus of this page and just describe HBaseShell, how to invoke it and examples of what you can do at the 'HBase >' prompt. Make another page for dicussion of the matrix features you propose adding to hbase (But perhaps wait on adding this page until you have a corresponding patch with at least a skeleton of the functionality you intend to add).

          Show
          stack added a comment - Hey Jinsuk: I'd suggest you spend might spend more time testing before you upload new patches. It didn't take me long to find the below problems: If I type 'help;', at end of the usage screen it says: 'Unknown command: Type 'help' for usage'. Same if I do 'help show;'. Does the 'show' command only work with a 'tables' argument? Seems to fail for all else. If so, I'd suggest you make the help state that it only takes table arguments explicitly (Version 2 you can add other objects to the show list). If I try to scan the root table, it crashes the shell: HBase > scan --ROOT-- --> ; Exception in thread "main" java.lang.Error: Missing return statement in function at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:153) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66) I made a table named 'x' with a column family named 'one' by doing the following: "create x columnfamilies('one', 'two') limit=3;" I then tried to make use of it. Here I am trying to add a value but I have not specified a row (and I may be using the wrong quoting means): HBase > set x values('one:' 'x'); Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "\'x\'" at line 1, column 22. Was expecting one of: "," ... ")" ... at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:441) at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:377) at org.apache.hadoop.hbase.shell.generated.Parser.getLiteralValues(Parser.java:174) at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:127) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66) The shell should just complain about a missing parameter, not crash. Here I mistakenly add an equals after the row: HBase > set x values( "one:" , "x" ) where row= "y" ; Exception in thread "main" org.apache.hadoop.hbase.shell.generated.ParseException: Encountered "\" one:\"" at line 1, column 15. Was expecting: <STRING_LITERAL> ... at org.apache.hadoop.hbase.shell.generated.Parser.generateParseException(Parser.java:441) at org.apache.hadoop.hbase.shell.generated.Parser.jj_consume_token(Parser.java:377) at org.apache.hadoop.hbase.shell.generated.Parser.getStringLiteral(Parser.java:182) at org.apache.hadoop.hbase.shell.generated.Parser.getLiteralValues(Parser.java:160) at org.apache.hadoop.hbase.shell.generated.Parser.parse(Parser.java:127) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:66) Here is another: HBase > set x values('one:', 'y'); Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.shell.Parameters.getRowKey(Parameters.java:38) at org.apache.hadoop.hbase.shell.cmds.Set.checkParams(Set.java:55) at org.apache.hadoop.hbase.shell.cmds.Set.execute(Set.java:33) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68) And here's a couple of comments on the wiki page: First, nice documentation. You should add a referral to this patch at the head of your page so people are not confused when they are unable to locate HBaseShell in the src (Because patch is not yet committed). Its a pity this page wasn't added under HBase but maybe we can get a wiki administrator to move it. I'd suggest that you save up all your edits and do one commit rather than lots of little updates. A diff of changes shows on the dev list. Lots of small changes makes for lots of mail (If you haven't already, check out the 'preview' button). You say "Hbase Shell is an 'interpreter' (or 'shell)' to provide scalable data processing capabilities like aggregation, algebraic calculation on Hadoop + Hbase." This seems wrong. HBaseShell will not be providing 'scalable data processing'. Nor, from 'goals' will it provide 'Generic Query Model Functions' or 'Parallel Numerical Analysis ...' These seems like facilities distinct from what HBaseShell does, providing a command-line means of admining and updating hbase as the 'mysql' comand-line tool does for mysql. I'd suggest you narrow the focus of this page and just describe HBaseShell, how to invoke it and examples of what you can do at the 'HBase >' prompt. Make another page for dicussion of the matrix features you propose adding to hbase (But perhaps wait on adding this page until you have a corresponding patch with at least a skeleton of the functionality you intend to add).
          Hide
          Edward J. Yoon added a comment -

          Thank U stack, I Fix again.

          Show
          Edward J. Yoon added a comment - Thank U stack, I Fix again.
          Hide
          stack added a comment -

          Patch is improving.

          Here's a couple of quick issues:

          I created table named 'test'. I then tried to add some data:

          HBase > set test values('columnfamily_name:x', 'y') where row="z";
          07/06/15 16:54:24 DEBUG hbase.HClient: No servers for test. Doing a find...
          07/06/15 16:54:25 DEBUG hbase.HClient: Found 1 server(s) for location: address: 208.76.47.106:60010, regioninfo: regionname: --ROOT--__0, startKey: <>, tableDesc: {name: --ROOT--, families: {info:=(info:, max versions: 1, compression: none, in memory: false, max value length: 2147483647, bloom filter: none)}} for tablename --META--07/06/15 16:54:25 DEBUG hbase.HClient: Found 1 server(s) for location: address: 208.76.47.106:60010, regioninfo: regionname: --META--__1, startKey: <>, tableDesc: {name: --META--, families: {info:=(info:, max versions: 1, compression: none, in memory: false, max value length: 2147483647, bloom filter: none)}} for tablename test
          07/06/15 16:54:25 DEBUG hbase.HClient: Server  is serving: address: 208.76.47.106:60010, regioninfo: regionname: test__8954882840030601779, startKey: <>, tableDesc: {name: test, families: {columnfamily_name:=(columnfamily_name:, max versions: 3, compression: none, in memory: false, max value length: 2147483647, bloom filter: none)}}
          Exception in thread "main" java.lang.NullPointerException       
             at org.apache.hadoop.hbase.shell.cmds.Set.execute(Set.java:41)        
             at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68)
          

          If I do other than 'scan tables', it no longer throws an exception but the message doesn't make much sense:

          HBase > show scan;
          Missing Parameters.
          

          Perhaps just say 'unimplemented' if its not.

          Can you make it so I can scan root and meta tables?

          Your patch has odd file on the end – saveversion.sh on end – and it was made at /root rather than inside $

          {HADOOP_HOME}

          .

          Show
          stack added a comment - Patch is improving. Here's a couple of quick issues: I created table named 'test'. I then tried to add some data: HBase > set test values('columnfamily_name:x', 'y') where row= "z" ; 07/06/15 16:54:24 DEBUG hbase.HClient: No servers for test. Doing a find... 07/06/15 16:54:25 DEBUG hbase.HClient: Found 1 server(s) for location: address: 208.76.47.106:60010, regioninfo: regionname: --ROOT--__0, startKey: <>, tableDesc: {name: --ROOT--, families: {info:=(info:, max versions: 1, compression: none, in memory: false , max value length: 2147483647, bloom filter: none)}} for tablename --META--07/06/15 16:54:25 DEBUG hbase.HClient: Found 1 server(s) for location: address: 208.76.47.106:60010, regioninfo: regionname: --META--__1, startKey: <>, tableDesc: {name: --META--, families: {info:=(info:, max versions: 1, compression: none, in memory: false , max value length: 2147483647, bloom filter: none)}} for tablename test 07/06/15 16:54:25 DEBUG hbase.HClient: Server is serving: address: 208.76.47.106:60010, regioninfo: regionname: test__8954882840030601779, startKey: <>, tableDesc: {name: test, families: {columnfamily_name:=(columnfamily_name:, max versions: 3, compression: none, in memory: false , max value length: 2147483647, bloom filter: none)}} Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.shell.cmds.Set.execute(Set.java:41) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:68) If I do other than 'scan tables', it no longer throws an exception but the message doesn't make much sense: HBase > show scan; Missing Parameters. Perhaps just say 'unimplemented' if its not. Can you make it so I can scan root and meta tables? Your patch has odd file on the end – saveversion.sh on end – and it was made at /root rather than inside $ {HADOOP_HOME} .
          Hide
          Edward J. Yoon added a comment -

          Thank you,stack. i fix again.

          Show
          Edward J. Yoon added a comment - Thank you,stack. i fix again.
          Hide
          stack added a comment -

          My version of the patch, hadoop1375-v12.patch, removed parser subdir, renamed the javacc file as HBaseShell.jj from QueryParser.jj, and output all generated classes to a subdir named 'generated'. These changes are not included in your latest patch. Also there is a regression where main class is again named HbaseShell rather than HBaseShell.

          If I type in a non-command, the shell still exits:

          HBase > show;
          Exception in thread "main" java.lang.
          Error: Missing return statement in function        
          at org.apache.hadoop.hbase.shell.parser.QueryParser.parse(QueryParser.java:137)        
          at org.apache.hadoop.hbase.shell.HbaseShell.main(HbaseShell.java:65)
          

          Can you catch these exceptions and instead output a nice message, something like 'Unknown command: Type 'help' for usage' or some such thing?

          The 'show' command does not seem to always work. E.g. type 'show scan;'.

          I tried to use the scan command on the root table and got an exception: Type 'scan -ROOT-;'.

          Show
          stack added a comment - My version of the patch, hadoop1375-v12.patch, removed parser subdir, renamed the javacc file as HBaseShell.jj from QueryParser.jj, and output all generated classes to a subdir named 'generated'. These changes are not included in your latest patch. Also there is a regression where main class is again named HbaseShell rather than HBaseShell. If I type in a non-command, the shell still exits: HBase > show; Exception in thread "main" java.lang. Error: Missing return statement in function at org.apache.hadoop.hbase.shell.parser.QueryParser.parse(QueryParser.java:137) at org.apache.hadoop.hbase.shell.HbaseShell.main(HbaseShell.java:65) Can you catch these exceptions and instead output a nice message, something like 'Unknown command: Type 'help' for usage' or some such thing? The 'show' command does not seem to always work. E.g. type 'show scan;'. I tried to use the scan command on the root table and got an exception: Type 'scan - ROOT -;'.
          Hide
          Edward J. Yoon added a comment -

          Thank you very much, stack.

          > Would appreciate feedback on problems found and questions raised above when you get a chance

          I will need more time to design, implement,
          and test HBase Shell's grammar and features, and your advice and comments will always be appreciated.

          Show
          Edward J. Yoon added a comment - Thank you very much, stack. > Would appreciate feedback on problems found and questions raised above when you get a chance I will need more time to design, implement, and test HBase Shell's grammar and features, and your advice and comments will always be appreciated.
          Hide
          stack added a comment -

          Jinsuk:

          Attached is a patch that adds a javacc target, includes the hbase/lib directory in CLASSPATH building, and that no longer includes the javacc generated classes.

          The javacc target is called out of compile-contrib target. If the system property 'javacc.home' is defined, then we will generate the shell classes otherwise, its a noop.

          I took the liberty of changing packages of generated classes moving all under org.apache.hadoop.hbase.shell.generated following the top-level precedent generating hadoop org,apache.hadoop.record.compiler classes with javacc.

          I also removed NOTICES.txt. The Doug comment above seems to require that we add your copyright statement to the top-level NOTICES.txt. We can make a separate issue to do this after your shell work goes into hbase.

          Would appreciate feedback on problems found and questions raised above when you get a chance

          Show
          stack added a comment - Jinsuk: Attached is a patch that adds a javacc target, includes the hbase/lib directory in CLASSPATH building, and that no longer includes the javacc generated classes. The javacc target is called out of compile-contrib target. If the system property 'javacc.home' is defined, then we will generate the shell classes otherwise, its a noop. I took the liberty of changing packages of generated classes moving all under org.apache.hadoop.hbase.shell.generated following the top-level precedent generating hadoop org,apache.hadoop.record.compiler classes with javacc. I also removed NOTICES.txt. The Doug comment above seems to require that we add your copyright statement to the top-level NOTICES.txt. We can make a separate issue to do this after your shell work goes into hbase. Would appreciate feedback on problems found and questions raised above when you get a chance
          Hide
          Edward J. Yoon added a comment -

          jline-0.9.91.jar

          Show
          Edward J. Yoon added a comment - jline-0.9.91.jar
          Hide
          Edward J. Yoon added a comment -
          • added full table scan syntax.

          > Finally, before commit, we'll have to remove the javacc generated classes and add a javacc target to the hbase ant build file like the one in top-level hadoop build.xml - perhaps I can help with this?

          Yes, it would be great if you could add a javacc target to the ant file.
          Also, can you add jline-*.jar to the library folder, if it is okay?

          Show
          Edward J. Yoon added a comment - added full table scan syntax. > Finally, before commit, we'll have to remove the javacc generated classes and add a javacc target to the hbase ant build file like the one in top-level hadoop build.xml - perhaps I can help with this? Yes, it would be great if you could add a javacc target to the ant file. Also, can you add jline-*.jar to the library folder, if it is okay?
          Hide
          Doug Cutting added a comment -

          > Copyright Udanax....

          Copyright statements should be added to the NOTICES.txt file at the top-level.

          http://www.apache.org/legal/src-headers.html#notice
          http://www.apache.org/licenses/example-NOTICE.txt

          Show
          Doug Cutting added a comment - > Copyright Udanax.... Copyright statements should be added to the NOTICES.txt file at the top-level. http://www.apache.org/legal/src-headers.html#notice http://www.apache.org/licenses/example-NOTICE.txt
          Hide
          stack added a comment -

          Regards JLine, the author set me right. The most recent JLine release was 2007, not 2003 (as the sourceforge summary page says).

          Show
          stack added a comment - Regards JLine, the author set me right. The most recent JLine release was 2007, not 2003 (as the sourceforge summary page says).
          Hide
          stack added a comment -

          JLine looks like its a dead project with outstanding issues unaddressed by the project maintainer. But it does seem to do the basic arrow-key navigations and have an amenable license so +1 on using it for line reading (I wrote the project owner to see if I get a response.). We can make a separate issue to add support for plugging in line readers other than JLine such as the java ReadLine or bsh JConsole.

          Here are some issues w/ the latest patch:

          I like the addition of ColumnFamiliies listing to the 'TABLES' output. Perhaps add versions?

          You've lost the banner you used to print out on instantiation of the shell (i.e. "Copyright Udanax.... licensed to ASF... type 'help;' for usage", etc). Can you put it back?

          I typed in a lonely 'one' on shell setup and it exited with the below exception. Entering a command that is missing all of its required arguments will exit the shell with an ugly exception: e.g. create table;. Also, entering an empty line – i.e. a carriage-return without any text – exits the shell. Can you catch the exceptions and the empty-line printing an appropriate message and not exit the shell?

          durruti $ ./src/contrib/hbase/bin/hbase org.apache.hadoop.hbase.shell.HBaseShell
          HBase > one
          Exception in thread "main" org.apache.hadoop.hbase.shell.parser.ParseException: Encountered "<EOF>" at line 1, column 3.
          Was expecting one of:
              ";" ...
              <ID> ...
             
                  at org.apache.hadoop.hbase.shell.parser.Parser.generateParseException(Parser.java:495)
                  at org.apache.hadoop.hbase.shell.parser.Parser.jj_consume_token(Parser.java:431)
                  at org.apache.hadoop.hbase.shell.parser.Parser.errMsg(Parser.java:282)
                  at org.apache.hadoop.hbase.shell.parser.Parser.parse(Parser.java:134)
                  at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:41)
          

          I'd suggest you not include JLine classes in your patch. Rather, lets start a lib directory in hbase and put the JLine jar therein. There follows a patch to the hbase build.xml to include the lib dir at hbase compile time (if you run your HBaseShell using the hbase command as in ./src/contrib/hbase/bin/hbase org.apache.hadoop.hbase.shell.HBaseShell then the hbase lib content will be on the CLASSPATH. You will also need to change the import on your HBaseShell.

          Index: src/contrib/hbase/build.xml
          ===================================================================
          --- src/contrib/hbase/build.xml (revision 541804)
          +++ src/contrib/hbase/build.xml (working copy)
          @@ -8,6 +8,23 @@
           
             <import file="../build-contrib.xml"/>
           
          +  <!-- Override compile target to add in local lib directory
          +       Bulk of below copied from ../build-contrib.xml
          +  -->
          +  <target name="compile" depends="init">
          +    <echo message="contrib: ${name}"/>
          +    <javac
          +     encoding="${build.encoding}"
          +     srcdir="${src.dir}"
          +     includes="**/*.java"
          +     destdir="${build.classes}"
          +     debug="${javac.debug}"
          +     deprecation="${javac.deprecation}">
          +      <classpath refid="classpath"/>
          +      <classpath path="path"/>
          +    </javac>
          +  </target>
          +
             <!-- Override jar target to specify main class -->
          

          You do not say if you intend to address the item noted in the comment above in 25/May/07 11:09 AM comment starting at Would it be hard to add 'startRow' and 'endRow'...

          Finally, before commit, we'll have to remove the javacc generated classes and add a javacc target to the hbase ant build file like the one in top-level hadoop build.xml – perhaps I can help with this?

          Good stuff Edward.

          Show
          stack added a comment - JLine looks like its a dead project with outstanding issues unaddressed by the project maintainer. But it does seem to do the basic arrow-key navigations and have an amenable license so +1 on using it for line reading (I wrote the project owner to see if I get a response.). We can make a separate issue to add support for plugging in line readers other than JLine such as the java ReadLine or bsh JConsole. Here are some issues w/ the latest patch: I like the addition of ColumnFamiliies listing to the 'TABLES' output. Perhaps add versions? You've lost the banner you used to print out on instantiation of the shell (i.e. "Copyright Udanax.... licensed to ASF... type 'help;' for usage", etc). Can you put it back? I typed in a lonely 'one' on shell setup and it exited with the below exception. Entering a command that is missing all of its required arguments will exit the shell with an ugly exception: e.g. create table; . Also, entering an empty line – i.e. a carriage-return without any text – exits the shell. Can you catch the exceptions and the empty-line printing an appropriate message and not exit the shell? durruti $ ./src/contrib/hbase/bin/hbase org.apache.hadoop.hbase.shell.HBaseShell HBase > one Exception in thread "main" org.apache.hadoop.hbase.shell.parser.ParseException: Encountered "<EOF>" at line 1, column 3. Was expecting one of: ";" ... <ID> ... at org.apache.hadoop.hbase.shell.parser.Parser.generateParseException(Parser.java:495) at org.apache.hadoop.hbase.shell.parser.Parser.jj_consume_token(Parser.java:431) at org.apache.hadoop.hbase.shell.parser.Parser.errMsg(Parser.java:282) at org.apache.hadoop.hbase.shell.parser.Parser.parse(Parser.java:134) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:41) I'd suggest you not include JLine classes in your patch. Rather, lets start a lib directory in hbase and put the JLine jar therein. There follows a patch to the hbase build.xml to include the lib dir at hbase compile time (if you run your HBaseShell using the hbase command as in ./src/contrib/hbase/bin/hbase org.apache.hadoop.hbase.shell.HBaseShell then the hbase lib content will be on the CLASSPATH. You will also need to change the import on your HBaseShell. Index: src/contrib/hbase/build.xml =================================================================== --- src/contrib/hbase/build.xml (revision 541804) +++ src/contrib/hbase/build.xml (working copy) @@ -8,6 +8,23 @@ < import file= "../build-contrib.xml" /> + <!-- Override compile target to add in local lib directory + Bulk of below copied from ../build-contrib.xml + --> + <target name= "compile" depends= "init" > + <echo message= "contrib: ${name}" /> + <javac + encoding= "${build.encoding}" + srcdir= "${src.dir}" + includes= "**/*.java" + destdir= "${build.classes}" + debug= "${javac.debug}" + deprecation= "${javac.deprecation}" > + <classpath refid= "classpath" /> + <classpath path= "path" /> + </javac> + </target> + <!-- Override jar target to specify main class --> You do not say if you intend to address the item noted in the comment above in 25/May/07 11:09 AM comment starting at Would it be hard to add 'startRow' and 'endRow'... Finally, before commit, we'll have to remove the javacc generated classes and add a javacc target to the hbase ant build file like the one in top-level hadoop build.xml – perhaps I can help with this? Good stuff Edward.
          Hide
          Edward J. Yoon added a comment -
          • i decided to use jline for special key problem. (BSD License)
          Show
          Edward J. Yoon added a comment - i decided to use jline for special key problem. (BSD License)
          Hide
          stack added a comment -

          > and i can't find an API to get row set in table.
          > please, advice for me.

          In HClient there is the method: 'public HScannerInterface obtainScanner(Text[] columns, Text startRow) throws IOException'

          Pass a null to scan all rows (Looks like specifying an 'endRow' is missing).

          Looking at this more, scanners require that at least one column name is supplied. There is no means of obtaining a list of all columns in a table. So the minimum scan statement would have to be something like:

          HBase> SCAN table_name WHERE column=column_name;

          When your parser gets the above, it would presume that all rows are wanted and pass a null for the startRow to the obtainScanner in your client.

          I haven't tried it, but can I do the following?

          HBase> SCAN table_name WHERE column=column_name1 AND column=column_name2...

          In other words, can I ask for the scan to return more than one column?

          Would it be hard to add 'startRow' and 'endRow' handling to your parser so users could get a scanner over a range? Something like:

          SCAN table_name
          WHERE column="columnfamily_name:column_key"
          [AND row="row_key" | startRow="startrow_key" [AND endRow="endrow_key"]]
          [AND time="Specified_Timestamp"];
          [LIMIT=Number_of_TimeVersion];

          In "english", you can specify either an explicit row or you can specify where to start scanning with an optional endrow for where to stop.

          Good stuff Edward

          Show
          stack added a comment - > and i can't find an API to get row set in table. > please, advice for me. In HClient there is the method: 'public HScannerInterface obtainScanner(Text[] columns, Text startRow) throws IOException' Pass a null to scan all rows (Looks like specifying an 'endRow' is missing). Looking at this more, scanners require that at least one column name is supplied. There is no means of obtaining a list of all columns in a table. So the minimum scan statement would have to be something like: HBase> SCAN table_name WHERE column=column_name; When your parser gets the above, it would presume that all rows are wanted and pass a null for the startRow to the obtainScanner in your client. I haven't tried it, but can I do the following? HBase> SCAN table_name WHERE column=column_name1 AND column=column_name2... In other words, can I ask for the scan to return more than one column? Would it be hard to add 'startRow' and 'endRow' handling to your parser so users could get a scanner over a range? Something like: SCAN table_name WHERE column="columnfamily_name:column_key" [AND row="row_key" | startRow="startrow_key" [AND endRow="endrow_key"] ] [AND time="Specified_Timestamp"] ; [LIMIT=Number_of_TimeVersion] ; In "english", you can specify either an explicit row or you can specify where to start scanning with an optional endrow for where to stop. Good stuff Edward
          Hide
          Doug Cutting added a comment -

          According to http://people.apache.org/~cliffs/3party.html, the binary of a library released under Sun Public License (SPL) may be included in an Apache product.

          Show
          Doug Cutting added a comment - According to http://people.apache.org/~cliffs/3party.html , the binary of a library released under Sun Public License (SPL) may be included in an Apache product.
          Hide
          Enis Soztutar added a comment -

          With a discussion with Dogacan Guney, i have learned about BeanShell(http://www.beanshell.org/), which enables scripting and interpreter for Java. Anyway it has a command line utility(called JConsole) which seems to offer command line editing and history(http://www.beanshell.org/manual/bshmanual.html#Using_JConsole). BeanShell is dual licenced both with LGPL and Sun Developer Licence. Not an expert on licencing, i don't know if we can use it, but we can at least check the source (smile).

          Show
          Enis Soztutar added a comment - With a discussion with Dogacan Guney, i have learned about BeanShell( http://www.beanshell.org/ ), which enables scripting and interpreter for Java. Anyway it has a command line utility(called JConsole) which seems to offer command line editing and history( http://www.beanshell.org/manual/bshmanual.html#Using_JConsole ). BeanShell is dual licenced both with LGPL and Sun Developer Licence. Not an expert on licencing, i don't know if we can use it, but we can at least check the source (smile).
          Hide
          Edward J. Yoon added a comment -
          • some garbage test code was removed
          • added limit clause about time series data
            SCAN table_name
            WHERE row="row_key"
            [AND column="columnfamily_name:column_key"];
            [AND time="Specified_Timestamp"];
            [LIMIT=Number_of_TimeVersion];

          and i can't find an API to get row set in table.
          please, advice for me.

          Show
          Edward J. Yoon added a comment - some garbage test code was removed added limit clause about time series data SCAN table_name WHERE row="row_key" [AND column="columnfamily_name:column_key"] ; [AND time="Specified_Timestamp"] ; [LIMIT=Number_of_TimeVersion] ; and i can't find an API to get row set in table. please, advice for me.
          Hide
          stack added a comment -

          Regards your patch:

          + it has some pollution:

          patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/engine/Test.java
          patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/engine/TestInputFormat.java
          patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/maths/Hypotenuse.java

          + scan still requires a 'where' specifying a row:

          HBase > tables;
          Total tables : 1
          test
          HBase > scan test;
          Exception in thread "main" org.apache.hadoop.hbase.shell.ParseException: Encountered ";\n" at line 3, column 10.
          Was expecting:
          <WHERE> ...

          at org.apache.hadoop.hbase.shell.HBaseShell.generateParseException(HBaseShell.java:568)
          at org.apache.hadoop.hbase.shell.HBaseShell.jj_consume_token(HBaseShell.java:507)
          at org.apache.hadoop.hbase.shell.HBaseShell.parse(HBaseShell.java:139)
          at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:50)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.apache.hadoop.util.RunJar.main(RunJar.java:155)

          + What else did this new patch add? I'd suggest that when you upload a new patch that you add description about what the new version adds. It'll help me figure what to test.

          Show
          stack added a comment - Regards your patch: + it has some pollution: patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/engine/Test.java patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/engine/TestInputFormat.java patching file src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/maths/Hypotenuse.java + scan still requires a 'where' specifying a row: HBase > tables; Total tables : 1 test HBase > scan test; Exception in thread "main" org.apache.hadoop.hbase.shell.ParseException: Encountered ";\n" at line 3, column 10. Was expecting: <WHERE> ... at org.apache.hadoop.hbase.shell.HBaseShell.generateParseException(HBaseShell.java:568) at org.apache.hadoop.hbase.shell.HBaseShell.jj_consume_token(HBaseShell.java:507) at org.apache.hadoop.hbase.shell.HBaseShell.parse(HBaseShell.java:139) at org.apache.hadoop.hbase.shell.HBaseShell.main(HBaseShell.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.hadoop.util.RunJar.main(RunJar.java:155) + What else did this new patch add? I'd suggest that when you upload a new patch that you add description about what the new version adds. It'll help me figure what to test.
          Hide
          stack added a comment -

          Edward:

          Looks like the the java wrapper around ReadLine is a popular solution for the problem of navigating a shell command-line with arrow-keys: See groovy http://www.nofluffjuststuff.com/blogs_speaker.jsp?speakerId=18 and jython http://wiki.python.org/jython/ReadlineSetup. I tried it out and it manages the up/down and left/right for you.

          As per Owen's comment, you can't include the readline jar because of its license. I'd suggest you do as for groovy and jython, and let the user compile and install readline themselves if they want its functionality. You'll need to do a little work to allow for an alternate console (as jython does). Default readline console would be a noop that has the shell work as it currently does but then if the user sets a system property to point at an alternate implementation – e.g. a GNU ReadLine install – then you'd use it instead.

          Show
          stack added a comment - Edward: Looks like the the java wrapper around ReadLine is a popular solution for the problem of navigating a shell command-line with arrow-keys: See groovy http://www.nofluffjuststuff.com/blogs_speaker.jsp?speakerId=18 and jython http://wiki.python.org/jython/ReadlineSetup . I tried it out and it manages the up/down and left/right for you. As per Owen's comment, you can't include the readline jar because of its license. I'd suggest you do as for groovy and jython, and let the user compile and install readline themselves if they want its functionality. You'll need to do a little work to allow for an alternate console (as jython does). Default readline console would be a noop that has the shell work as it currently does but then if the user sets a system property to point at an alternate implementation – e.g. a GNU ReadLine install – then you'd use it instead.
          Hide
          Owen O'Malley added a comment -

          Actually, you need to be very careful with licensing. We can't distribute any GPL or LGPL products with Hadoop. It looks like the license on the java-readline project is LGPL.

          Show
          Owen O'Malley added a comment - Actually, you need to be very careful with licensing. We can't distribute any GPL or LGPL products with Hadoop. It looks like the license on the java-readline project is LGPL.
          Hide
          Hemanth Yamijala added a comment -

          A quick search gives the following implementation of the GNU readline functionality in Java. Maybe it will help:
          http://sourceforge.net/projects/java-readline/

          Show
          Hemanth Yamijala added a comment - A quick search gives the following implementation of the GNU readline functionality in Java. Maybe it will help: http://sourceforge.net/projects/java-readline/
          Hide
          Enis Soztutar added a comment -

          The gnu history library can be used for browsing previous commands using <up> and <down> keys.
          It can be found in http://tiswww.case.edu/php/chet/readline/history.html

          And gnu readline library can be used to edit commands as they are typed in.
          It can be found in http://tiswww.case.edu/php/chet/readline/rltop.html

          I do not know if there is any Java implementation but i bet there are (smile)

          Show
          Enis Soztutar added a comment - The gnu history library can be used for browsing previous commands using <up> and <down> keys. It can be found in http://tiswww.case.edu/php/chet/readline/history.html And gnu readline library can be used to edit commands as they are typed in. It can be found in http://tiswww.case.edu/php/chet/readline/rltop.html I do not know if there is any Java implementation but i bet there are (smile)
          Hide
          Edward J. Yoon added a comment -
          • Adding other syntax
          Show
          Edward J. Yoon added a comment - Adding other syntax
          Hide
          Edward J. Yoon added a comment -

          Java standard libraries don't provide support for intercepting keyboard input except by reading from stdin.
          so, it seems difficult to implement. (arrow keys or command historys) .

          ..... i'm still trying to find its solutions. 0

          Show
          Edward J. Yoon added a comment - Java standard libraries don't provide support for intercepting keyboard input except by reading from stdin. so, it seems difficult to implement. (arrow keys or command historys) . ..... i'm still trying to find its solutions. 0
          Hide
          stack added a comment -

          I tried the latest patch. Big improvement.

          + Looks like I now need to add a ';' to terminate statements, including help. That is intentional? If so, I'd suggest that you print out a little message on shell startup that says something like "Type 'help;' for usage".
          + Its a pain when I can't go back to make corrections in long statements using left and right arrows. Can this be fixed? Making up and down arrows work so can scroll over command history would also be great especially when its not hard to crash the shell (smile).
          + I can only scan a row at a time. Is that intentional? I'd like to be able to do 'scan TABLENAME' without having to specify a row qualifier and have it dump all rows.
          + Seems like it only outputs the most recent cell version. Is this intentional?

          Show
          stack added a comment - I tried the latest patch. Big improvement. + Looks like I now need to add a ';' to terminate statements, including help. That is intentional? If so, I'd suggest that you print out a little message on shell startup that says something like "Type 'help;' for usage". + Its a pain when I can't go back to make corrections in long statements using left and right arrows. Can this be fixed? Making up and down arrows work so can scroll over command history would also be great especially when its not hard to crash the shell (smile). + I can only scan a row at a time. Is that intentional? I'd like to be able to do 'scan TABLENAME' without having to specify a row qualifier and have it dump all rows. + Seems like it only outputs the most recent cell version. Is this intentional?
          Hide
          Edward J. Yoon added a comment - - edited
          • package name change
          Show
          Edward J. Yoon added a comment - - edited package name change
          Hide
          Edward J. Yoon added a comment -

          Thank you comments encouragement and helpful advice for me.
          i will progress steadily towards the completion of requirements.

          Show
          Edward J. Yoon added a comment - Thank you comments encouragement and helpful advice for me. i will progress steadily towards the completion of requirements.
          Hide
          stack added a comment -

          Some more comments Udanax:

          + Define to use in HRegionServer is DEFAULT_REGIONSERVER_ADDRESS, not DEFAULT_MASTER_ADDRESS
          + Above I suggest that 'parser' is confusing to folks when what your work does is add a hbase 'shell'. You should rename the 'parser' subpackage 'shell': i.e. classes should be in src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HbaseParser.java and not in src/contrib/hbase/src/java/org/apache/hadoop/hbase/parser/HbaseParser.java. Also, to align with how other classes in hbase package are named, this class should be HBaseParser, not HbaseParser – or rather, HBaseShell – and the same for HbaseParser, etc.).

          I tried the patch.

          + You should prettify the help message. Its hard to read as is w/ irregular spacing.
          + I would suggest that you use the verb 'create' instead of 'build' for table creation (to match sql, especially since you use the sql 'drop' for the antithesis). Or, at least make create a synonym for 'build'.
          + Square brackets around arguments usually indicates optional arguments in unix usage. Use angle brackets or no brackets (as bash help seems to do).
          + Is the 'where....' clause optional when scanning? Doesn't look to be going by the help output. If it is not, I'd suggest you make it so. If it is absent, all rows should be returned.
          + I do not seem to be able to navigate using arrow keys (left or right to make corrections). Would be nice if I could also to use up and down arrows to replay previous inputs (In old days with jython, this necessitated something like ReadLine: http://www.codezoo.com/pub/component/851?category=17. You might also check out how beanshell does it – it seems to do a nice job of it)

          Good stuff Udanax

          Show
          stack added a comment - Some more comments Udanax: + Define to use in HRegionServer is DEFAULT_REGIONSERVER_ADDRESS, not DEFAULT_MASTER_ADDRESS + Above I suggest that 'parser' is confusing to folks when what your work does is add a hbase 'shell'. You should rename the 'parser' subpackage 'shell': i.e. classes should be in src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HbaseParser.java and not in src/contrib/hbase/src/java/org/apache/hadoop/hbase/parser/HbaseParser.java. Also, to align with how other classes in hbase package are named, this class should be HBaseParser, not HbaseParser – or rather, HBaseShell – and the same for HbaseParser, etc.). I tried the patch. + You should prettify the help message. Its hard to read as is w/ irregular spacing. + I would suggest that you use the verb 'create' instead of 'build' for table creation (to match sql, especially since you use the sql 'drop' for the antithesis). Or, at least make create a synonym for 'build'. + Square brackets around arguments usually indicates optional arguments in unix usage. Use angle brackets or no brackets (as bash help seems to do). + Is the 'where....' clause optional when scanning? Doesn't look to be going by the help output. If it is not, I'd suggest you make it so. If it is absent, all rows should be returned. + I do not seem to be able to navigate using arrow keys (left or right to make corrections). Would be nice if I could also to use up and down arrows to replay previous inputs (In old days with jython, this necessitated something like ReadLine: http://www.codezoo.com/pub/component/851?category=17 . You might also check out how beanshell does it – it seems to do a nice job of it) Good stuff Udanax
          Hide
          Edward J. Yoon added a comment -
          • add 'help' and some syntax.
          Show
          Edward J. Yoon added a comment - add 'help' and some syntax.
          Hide
          Edward J. Yoon added a comment -
          • Add detail to exception thrown from undefined syntax.
          • Add syntax to delete table.
          Show
          Edward J. Yoon added a comment - Add detail to exception thrown from undefined syntax. Add syntax to delete table.
          Hide
          Edward J. Yoon added a comment -

          Thank you stack. i changed them.

          Show
          Edward J. Yoon added a comment - Thank you stack. i changed them.
          Hide
          Doug Cutting added a comment -

          Lucene, Nutch & Hadoop already use JavaCC, so it's accepted. It's not pretty, but usually better than writing a parser from scratch. Historically, JavaCC's license prohibited distributing it from Apache, so we established the convention of committing its output so that not all developers were forced to manually install it. JavaCC is now under a BSD license, but that convention remains.

          Show
          Doug Cutting added a comment - Lucene, Nutch & Hadoop already use JavaCC, so it's accepted. It's not pretty, but usually better than writing a parser from scratch. Historically, JavaCC's license prohibited distributing it from Apache, so we established the convention of committing its output so that not all developers were forced to manually install it. JavaCC is now under a BSD license, but that convention remains.
          Hide
          Jim Kellerman added a comment -

          Overall, I think this is a good start on a HBase shell. However I have a couple of concerns about this patch:

          • I don't think that generated files should be checked into the source tree. The output of javacc should go into
            build/src/contrib/hbase
          • I don't know how the community feels about using javacc. I'd like to get some feedback on what other developers and
            commiters think. Comments?
          Show
          Jim Kellerman added a comment - Overall, I think this is a good start on a HBase shell. However I have a couple of concerns about this patch: I don't think that generated files should be checked into the source tree. The output of javacc should go into build/src/contrib/hbase I don't know how the community feels about using javacc. I'd like to get some feedback on what other developers and commiters think. Comments?
          Hide
          stack added a comment -

          A couple of comments, Udanax:

          + Your patch looks like it provides an 'interpreter' (or 'shell)' for a small set of hbase sql-like 'commands (only you use 'scan' for 'select' and 'set' for 'update', etc.). Calling your feature a 'parser' confuses folks.
          + In such 'shell's, usually you can type a '?' or 'help' and you will get a usage that explains all the commands and options available. This is missing from your patch.
          + I'd suggest that BuildTable and Row* classes belong in same package as your javacc generated classes. Also, you have in each of these classes a method named 'test' that should be renamed as 'execute' or 'run'.
          + You could do 'new String(byteArray)' rather than call 'byteToString'
          + The below looks wrong (at a minimum its misspelled):
          + public void RowFileterIterator()

          { + }

          +

          Show
          stack added a comment - A couple of comments, Udanax: + Your patch looks like it provides an 'interpreter' (or 'shell)' for a small set of hbase sql-like 'commands (only you use 'scan' for 'select' and 'set' for 'update', etc.). Calling your feature a 'parser' confuses folks. + In such 'shell's, usually you can type a '?' or 'help' and you will get a usage that explains all the commands and options available. This is missing from your patch. + I'd suggest that BuildTable and Row* classes belong in same package as your javacc generated classes. Also, you have in each of these classes a method named 'test' that should be renamed as 'execute' or 'run'. + You could do 'new String(byteArray)' rather than call 'byteToString' + The below looks wrong (at a minimum its misspelled): + public void RowFileterIterator() { + } +
          Hide
          Edward J. Yoon added a comment -

          I have just started writing code for linear algebraic computation on Hadoop+Hbase based parallel machines.
          I think It will makes the hadoop an even better platform for scientific and advanced analytics programming.

          if i should be moving my classes to a different location, let me know how todo.

          Show
          Edward J. Yoon added a comment - I have just started writing code for linear algebraic computation on Hadoop+Hbase based parallel machines. I think It will makes the hadoop an even better platform for scientific and advanced analytics programming. if i should be moving my classes to a different location, let me know how todo.
          Hide
          Edward J. Yoon added a comment -

          Some Change.

          Show
          Edward J. Yoon added a comment - Some Change.
          Hide
          Edward J. Yoon added a comment -

          ..

          Show
          Edward J. Yoon added a comment - ..

            People

            • Assignee:
              Unassigned
              Reporter:
              Edward J. Yoon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development