Closed
Description
create 'test', 'cf'
returns a ERROR: Not implemented
error
With jruby configured to dump stacktraces via .jrubrc:
log.exceptions=true
log.exceptions=true
log.backtraces=true
log.callers=true
errno.backtrace=true
I see:
2021-03-03T13:10:45.563-05:00 [main] INFO TraceType : Backtrace generated:
getHbck at org/apache/hadoop/hbase/client/Connection.java:210
invoke0 at jdk/internal/reflect/NativeMethodAccessorImpl.java:-2
invoke at jdk/internal/reflect/NativeMethodAccessorImpl.java:62
invoke at jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43
invoke at java/lang/reflect/Method.java:566
invokeDirectWithExceptionHandling at org/jruby/javasupport/JavaMethod.java:438
invokeDirect at org/jruby/javasupport/JavaMethod.java:302
initialize at /Users/igorbernstein/Downloads/hbase-2.2.6-client/lib/ruby/hbase/admin.rb:40
newInstance at org/jruby/RubyClass.java:1001
call at org/jruby/RubyClass$INVOKER$i$newInstance.gen:-1
admin at /Users/igorbernstein/Downloads/hbase-2.2.6-client/lib/ruby/hbase/hbase.rb:50
admin at /Users/igorbernstein/Downloads/hbase-2.2.6-client/lib/ruby/shell.rb:87
admin at /Users/igorbernstein/Downloads/hbase-2.2.6-client/lib/ruby/shell/commands.rb:77
command at /Users/igorbernstein/Downloads/hbase-2.2.6-client/lib/ruby/shell/commands/create.rb:67
Which points to this line:
https://github.com/apache/hbase/blob/rel/2.2.6/hbase-shell/src/main/ruby/hbase/admin.rb#L40
Which calls getHbck(), which we dont currently implement in BigtableConnection
.
It seems like the feature was introduced after hbase 2.2.0 in this PR:
apache/hbase#425
To reproduce:
- download hbase-2.2.6-client-bin.tar.gz
- Add bigtable-hbase-2.x-hadoop-1.19.0.jar into the lib/
- Update conf/hbase-site.xml to include:
<property>
<name>hbase.client.connection.impl</name>
<value>com.google.cloud.bigtable.hbase2_x.BigtableConnection</value>
</property>
<property>
<name>google.bigtable.project.id</name>
<value>MY-PROJECT</value>
</property>
<property>
<name>google.bigtable.namespace.warnings</name>
<value>true</value>
</property>
<property>
<name>google.bigtable.instance.id</name>
<value>MY-INSTANCE</value>
</property>
<property>
<name>hbase.client.async.connection.impl</name>
<value>org.apache.hadoop.hbase.client.BigtableAsyncConnection</value>
</property>
<property>
<name>hbase.client.registry.impl</name>
<value>org.apache.hadoop.hbase.client.BigtableAsyncRegistry</value>
</property>
- Add
.jrubyrc
with
log.exceptions=true
log.exceptions=true
log.backtraces=true
log.callers=true
errno.backtrace=true
- run
./bin/hbase shell
- try creating a table:
create 'test', 'cf'