Re: undefined method `internal_command' for Shell::Formatter::Console
Ok thanks for the clarification. I tried that (removing ruby but not yet re-installing it) and I got the same error message. On Thu, Apr 25, 2013 at 5:02 PM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi Robin, No, the idea is to run yum remove, and then test the HBase sheel. Don't run yum install ruby until we get that fixed. I want to see if your installed very of Ruby can cause the issue. The it was refering to the Ruby package. JM 2013/4/25 Robin Gowin landr...@gmail.com: To be more explicit: I'm running CentOS release 6.4 in a vm on Mac OSx 10.6 I ran yum remove ruby and then yum install ruby (inside the vm). Is that what you meant? Also I put in some simple print statements in several of the ruby scripts called by the hbase shell, and they are getting executed. (for example: admin.rb, hbase.rb, and table.rb) (I wasn't sure what it referred to in your email) Robin On Thu, Apr 25, 2013 at 3:58 PM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: No, don't re-install it ;) Remove it and retry. To make sure it's not using any lib anywhere else... JM 2013/4/25 Robin Gowin landr...@gmail.com: I removed ruby and reinstalled it; same results. On Thu, Apr 25, 2013 at 11:59 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Is it easy for you to de-install it and re-install it? If so, would you mind giving it a try?
Re: undefined method `internal_command' for Shell::Formatter::Console
Hi JM, Thank you for following up! No, the issue still exists. I have temporarily abandoned jruby for this project, and am using curl and REST for the time being. Since it's working properly for you and others, I suspect that it's either a version mismatch or an installation problem or some configuration issue. If you have time, I'm willing to continue debugging. Robin On Thu, Apr 25, 2013 at 9:24 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi Robin, Were you finally able to find the issue? JM 2013/4/18 Robin Gowin landr...@gmail.com: same results with @null (i had earlier tried nil, same thing) hbase(main):045:0 uu = @hbase.table('robin1', @null) = Hbase::Table - robin1 hbase(main):046:0 uu.scan(ss) NoMethodError: undefined method `internal_command' for nil:NilClass One thing I'm curious about - might not matter - the output of my @hbase.table command looks like this = Hbase::Table - robin1 but the output of yours (and what is in the book) looks like this = #Hbase::Table:0x3a8cbb70 On Thu, Apr 18, 2013 at 12:17 PM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Interesting... I tried the same locally and it's working fine for me. hbase(main):010:0 uu = @hbase.table('TestAcidGuarantees', @formatter) = #Hbase::Table:0x3a8cbb70 @table=#Java::OrgApacheHadoopHbaseClient::HTable:0x6d65d417 hbase(main):011:0 ss = {COLUMNS = ['A']} = {COLUMNS=[A]} hbase(main):012:0 uu.scan(ss) = {test_row_0={A:col0=timestamp=1366299718358, value=\\x14\\xC2\\xF0\\x0 I did a cutpaste from what you sent and only changed the table name. Can you try with @null instead of @formatter? JM 2013/4/18 Robin Gowin landr...@gmail.com Hi Jean-Marc, Thanks for your quick reply. Yes I am trying to do something like that. For brevity I combined everything into one jruby command. My command can be split into two and I get the same error. For example, this shows a similar problem using the scan method: hbase(main):041:0 uu = @hbase.table('robin1', @formatter) = Hbase::Table - robin1 hbase(main):042:0 ss = {COLUMNS = ['cf1']} = {COLUMNS=[cf1]} hbase(main):043:0 uu.scan(ss) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d hbase(main):044:0 scan 'robin1', ss ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.0460 seconds On Thu, Apr 18, 2013 at 11:54 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi Robin, I'm not sure about your command line (@hbase.table('robin1',@formatter).scan({'COLUMNS' = ['cf1']})) Are you trying do to something like that? scan 'robin1', {COLUMNS = ['cf1']} JM 2013/4/18 Robin Gowin landr...@gmail.com This feels like a stupid mistake I'm making somewhere but I searched for quite a while and did not find any evidence that anybody else reported this problem. I'm trying to use hbase shell to call the 'scan()' method and I keep getting the same error message. A regular scan of the table works fine. I'd appreciate any assistance. hbase(main):005:0 scan 'robin1' ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.1290 seconds hbase(main):007:0 @hbase.table('robin1', @formatter).scan({'COLUMNS' = ['cf1']}) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d this method appears to exist [cloudera@localhost test]$ grep internal_command /usr/lib/hbase/lib/ruby/shell.rb internal_command(command, :command, *args) def internal_command(command, method_name= :command, *args
Re: undefined method `internal_command' for Shell::Formatter::Console
I looked at that thread and I do have ruby installed but I don't think that is the problem, unless maybe there is a version mismatch? I wasn't sure if jruby needs to be installed and if so what its command line is. Here's the relevant versions as far as I can tell. The problem still exists. [cloudera@localhost ~]$ ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] [cloudera@localhost ~]$ irb -v irb 0.9.5(05/04/13) [cloudera@localhost ~]$ hbase -version java version 1.6.0_31 Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [cloudera@localhost ~]$ which rvm /usr/bin/which: no rvm in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/sbin:/usr/java/jdk1.6.0_31/bin:/home/cloudera/bin:/sbin:/usr/java/jdk1.6.0_31/bin) [cloudera@localhost ~]$ which jruby /usr/bin/which: no jruby in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/sbin:/usr/java/jdk1.6.0_31/bin:/home/cloudera/bin:/sbin:/usr/java/jdk1.6.0_31/bin) Robin On Thu, Apr 25, 2013 at 9:40 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Something I thought about is that you might have a Ruby lib installed somewhere else that the shell is using. Someone faced something similar recently Take a look at this thread: http://mail-archives.apache.org/mod_mbox/hbase-user/201304.mbox/%3CEE737D80-45B4-4A33-817D-28ED9C1CB0AE%40gmail.com%3E Can you see if you have something like that in your system? JM
Re: undefined method `internal_command' for Shell::Formatter::Console
I removed ruby and reinstalled it; same results. On Thu, Apr 25, 2013 at 11:59 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Is it easy for you to de-install it and re-install it? If so, would you mind giving it a try? 2013/4/25 Robin Gowin landr...@gmail.com: I looked at that thread and I do have ruby installed but I don't think that is the problem, unless maybe there is a version mismatch? I wasn't sure if jruby needs to be installed and if so what its command line is. Here's the relevant versions as far as I can tell. The problem still exists. [cloudera@localhost ~]$ ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] [cloudera@localhost ~]$ irb -v irb 0.9.5(05/04/13) [cloudera@localhost ~]$ hbase -version java version 1.6.0_31 Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [cloudera@localhost ~]$ which rvm /usr/bin/which: no rvm in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/sbin:/usr/java/jdk1.6.0_31/bin:/home/cloudera/bin:/sbin:/usr/java/jdk1.6.0_31/bin) [cloudera@localhost ~]$ which jruby /usr/bin/which: no jruby in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/sbin:/usr/java/jdk1.6.0_31/bin:/home/cloudera/bin:/sbin:/usr/java/jdk1.6.0_31/bin) Robin On Thu, Apr 25, 2013 at 9:40 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Something I thought about is that you might have a Ruby lib installed somewhere else that the shell is using. Someone faced something similar recently Take a look at this thread: http://mail-archives.apache.org/mod_mbox/hbase-user/201304.mbox/%3CEE737D80-45B4-4A33-817D-28ED9C1CB0AE%40gmail.com%3E Can you see if you have something like that in your system? JM
Re: undefined method `internal_command' for Shell::Formatter::Console
To be more explicit: I'm running CentOS release 6.4 in a vm on Mac OSx 10.6 I ran yum remove ruby and then yum install ruby (inside the vm). Is that what you meant? Also I put in some simple print statements in several of the ruby scripts called by the hbase shell, and they are getting executed. (for example: admin.rb, hbase.rb, and table.rb) (I wasn't sure what it referred to in your email) Robin On Thu, Apr 25, 2013 at 3:58 PM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: No, don't re-install it ;) Remove it and retry. To make sure it's not using any lib anywhere else... JM 2013/4/25 Robin Gowin landr...@gmail.com: I removed ruby and reinstalled it; same results. On Thu, Apr 25, 2013 at 11:59 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Is it easy for you to de-install it and re-install it? If so, would you mind giving it a try?
undefined method `internal_command' for Shell::Formatter::Console
This feels like a stupid mistake I'm making somewhere but I searched for quite a while and did not find any evidence that anybody else reported this problem. I'm trying to use hbase shell to call the 'scan()' method and I keep getting the same error message. A regular scan of the table works fine. I'd appreciate any assistance. hbase(main):005:0 scan 'robin1' ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.1290 seconds hbase(main):007:0 @hbase.table('robin1', @formatter).scan({'COLUMNS' = ['cf1']}) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d this method appears to exist [cloudera@localhost test]$ grep internal_command /usr/lib/hbase/lib/ruby/shell.rb internal_command(command, :command, *args) def internal_command(command, method_name= :command, *args) info about my environment: [cloudera@localhost test]$ hbase version 13/04/18 11:17:33 INFO util.VersionInfo: HBase 0.94.2-cdh4.2.0 13/04/18 11:17:33 INFO util.VersionInfo: Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.94.2-cdh4.2.0 -r Unknown 13/04/18 11:17:33 INFO util.VersionInfo: Compiled by jenkins on Fri Feb 15 11:51:18 PST 2013 [cloudera@localhost test]$ java -version java version 1.6.0_31 Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [cloudera@localhost test]$ hadoop version Hadoop 2.0.0-cdh4.2.0 Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hadoop-2.0.0-cdh4.2.0/src/hadoop-common-project/hadoop-common -r 8bce4bd28a464e0a92950c50ba01a9deb1d85686 Compiled by jenkins on Fri Feb 15 11:13:32 PST 2013 From source with checksum 3eefc211a14ac7b6e764d6ded2eeeb26 [cloudera@localhost test]$ uname -a Linux localhost.localdomain 2.6.32-220.23.1.el6.x86_64 #1 SMP Mon Jun 18 18:58:52 BST 2012 x86_64 x86_64 x86_64 GNU/Linux Robin Gowin PS: I found this email list from the book HBase In Action
Re: undefined method `internal_command' for Shell::Formatter::Console
Hi Jean-Marc, Thanks for your quick reply. Yes I am trying to do something like that. For brevity I combined everything into one jruby command. My command can be split into two and I get the same error. For example, this shows a similar problem using the scan method: hbase(main):041:0 uu = @hbase.table('robin1', @formatter) = Hbase::Table - robin1 hbase(main):042:0 ss = {COLUMNS = ['cf1']} = {COLUMNS=[cf1]} hbase(main):043:0 uu.scan(ss) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d hbase(main):044:0 scan 'robin1', ss ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.0460 seconds On Thu, Apr 18, 2013 at 11:54 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi Robin, I'm not sure about your command line (@hbase.table('robin1',@formatter).scan({'COLUMNS' = ['cf1']})) Are you trying do to something like that? scan 'robin1', {COLUMNS = ['cf1']} JM 2013/4/18 Robin Gowin landr...@gmail.com This feels like a stupid mistake I'm making somewhere but I searched for quite a while and did not find any evidence that anybody else reported this problem. I'm trying to use hbase shell to call the 'scan()' method and I keep getting the same error message. A regular scan of the table works fine. I'd appreciate any assistance. hbase(main):005:0 scan 'robin1' ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.1290 seconds hbase(main):007:0 @hbase.table('robin1', @formatter).scan({'COLUMNS' = ['cf1']}) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d this method appears to exist [cloudera@localhost test]$ grep internal_command /usr/lib/hbase/lib/ruby/shell.rb internal_command(command, :command, *args) def internal_command(command, method_name= :command, *args) info about my environment: [cloudera@localhost test]$ hbase version 13/04/18 11:17:33 INFO util.VersionInfo: HBase 0.94.2-cdh4.2.0 13/04/18 11:17:33 INFO util.VersionInfo: Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.94.2-cdh4.2.0 -r Unknown 13/04/18 11:17:33 INFO util.VersionInfo: Compiled by jenkins on Fri Feb 15 11:51:18 PST 2013 [cloudera@localhost test]$ java -version java version 1.6.0_31 Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [cloudera@localhost test]$ hadoop version Hadoop 2.0.0-cdh4.2.0 Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hadoop-2.0.0-cdh4.2.0/src/hadoop-common-project/hadoop-common -r 8bce4bd28a464e0a92950c50ba01a9deb1d85686 Compiled by jenkins on Fri Feb 15 11:13:32 PST 2013 From source with checksum 3eefc211a14ac7b6e764d6ded2eeeb26 [cloudera@localhost test]$ uname -a Linux localhost.localdomain 2.6.32-220.23.1.el6.x86_64 #1 SMP Mon Jun 18 18:58:52 BST 2012 x86_64 x86_64 x86_64 GNU/Linux Robin Gowin PS: I found this email list from the book HBase In Action
Re: undefined method `internal_command' for Shell::Formatter::Console
same results with @null (i had earlier tried nil, same thing) hbase(main):045:0 uu = @hbase.table('robin1', @null) = Hbase::Table - robin1 hbase(main):046:0 uu.scan(ss) NoMethodError: undefined method `internal_command' for nil:NilClass One thing I'm curious about - might not matter - the output of my @hbase.table command looks like this = Hbase::Table - robin1 but the output of yours (and what is in the book) looks like this = #Hbase::Table:0x3a8cbb70 On Thu, Apr 18, 2013 at 12:17 PM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Interesting... I tried the same locally and it's working fine for me. hbase(main):010:0 uu = @hbase.table('TestAcidGuarantees', @formatter) = #Hbase::Table:0x3a8cbb70 @table=#Java::OrgApacheHadoopHbaseClient::HTable:0x6d65d417 hbase(main):011:0 ss = {COLUMNS = ['A']} = {COLUMNS=[A]} hbase(main):012:0 uu.scan(ss) = {test_row_0={A:col0=timestamp=1366299718358, value=\\x14\\xC2\\xF0\\x0 I did a cutpaste from what you sent and only changed the table name. Can you try with @null instead of @formatter? JM 2013/4/18 Robin Gowin landr...@gmail.com Hi Jean-Marc, Thanks for your quick reply. Yes I am trying to do something like that. For brevity I combined everything into one jruby command. My command can be split into two and I get the same error. For example, this shows a similar problem using the scan method: hbase(main):041:0 uu = @hbase.table('robin1', @formatter) = Hbase::Table - robin1 hbase(main):042:0 ss = {COLUMNS = ['cf1']} = {COLUMNS=[cf1]} hbase(main):043:0 uu.scan(ss) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d hbase(main):044:0 scan 'robin1', ss ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.0460 seconds On Thu, Apr 18, 2013 at 11:54 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi Robin, I'm not sure about your command line (@hbase.table('robin1',@formatter).scan({'COLUMNS' = ['cf1']})) Are you trying do to something like that? scan 'robin1', {COLUMNS = ['cf1']} JM 2013/4/18 Robin Gowin landr...@gmail.com This feels like a stupid mistake I'm making somewhere but I searched for quite a while and did not find any evidence that anybody else reported this problem. I'm trying to use hbase shell to call the 'scan()' method and I keep getting the same error message. A regular scan of the table works fine. I'd appreciate any assistance. hbase(main):005:0 scan 'robin1' ROW COLUMN+CELL myrow1 column=cf1:q1, timestamp=1366046037514, value=value2 myrow1 column=cf1:q2, timestamp=1366046489446, value=value2b myrow1 column=cf1:q2b, timestamp=1366046497799, value=value2bb myrow2 column=cf1:q2b, timestamp=1366046731281, value=value2bbce myrow2 column=cf1:q2be, timestamp=1366046748001, value=value2bbce 2 row(s) in 0.1290 seconds hbase(main):007:0 @hbase.table('robin1', @formatter).scan({'COLUMNS' = ['cf1']}) NoMethodError: undefined method `internal_command' for #Shell::Formatter::Console:0x15f6ae4d this method appears to exist [cloudera@localhost test]$ grep internal_command /usr/lib/hbase/lib/ruby/shell.rb internal_command(command, :command, *args) def internal_command(command, method_name= :command, *args) info about my environment: [cloudera@localhost test]$ hbase version 13/04/18 11:17:33 INFO util.VersionInfo: HBase 0.94.2-cdh4.2.0 13/04/18 11:17:33 INFO util.VersionInfo: Subversion file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.94.2-cdh4.2.0 -r Unknown 13/04/18 11:17:33 INFO util.VersionInfo: Compiled by jenkins on Fri Feb 15 11:51:18 PST 2013 [cloudera@localhost test]$ java -version java version 1.6.0_31 Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode) [cloudera@localhost test]$ hadoop version Hadoop 2.0.0-cdh4.2.0 Subversion