On Tue, Mar 6, 2012 at 9:30 PM, Mahdi Negahi <[email protected]> wrote:
>
>
>
>
> Dear All friends
>
> thanks for ur response. I just explain the installation of Hbase steps that I
> do.
>
> 1- download Hbase-0.92.0 and untar it.
>
> 2- move it to /usr/lib by this command
>
> sudo mv hbase-0.92.0 /usr/lib
>
> 3- open conf/hbase-site.xml file and put following address on it.
>
> <property>
> <name>hbase.rootdir</name>
> <value>file:///usr/lib/hbase-0.92.0/data</value>
> </property>
>
>
> 4. Open Ubuntu Software Center and search "java" and install OpenJDK Java 7
> Runtime
>
> 5- open hbase-env.sh and change JAVA_HOME to following address
>
> /usr/lib/jvm/default-java
>
> 6- run this command ./bin/start-hbase.sh
>
> 7- run this command ./bin/start-hbase.sh
>
>
> every is ok but when I run this command "list" I see this error :
>
>
> ERROR: undefined method `map' for nil:NilClass
That's a bug I found as well when there is no first table
(in the ruby code). If you wanted to fix it, apply this patch:
diff --git a/lib/ruby/hbase/admin.rb b/lib/ruby/hbase/admin.rb
index 375f878..fa8f879 100644
--- a/lib/ruby/hbase/admin.rb
+++ b/lib/ruby/hbase/admin.rb
@@ -39,7 +39,7 @@ module Hbase
#----------------------------------------------------------------------------------------------
# Returns a list of tables in hbase
def list
- @admin.listTables.map { |t| t.getNameAsString }
+ Array(@admin.listTables).map { |t| t.getNameAsString }
end
#----------------------------------------------------------------------------------------------
The workaround for now is:
First create a table and only then run list:
./bin/hbase shell
...
1.9.3-p0 :004 > create 'test', 'cf'
0 row(s) in 1.0820 seconds
1.9.3-p0 :005 > list
TABLE
test
HTH,
Peter