Skip to content

admin-shell doesnt work bigtable-hbase-2x-hadoop #2866

Closed
@igorbernstein2

Description

@igorbernstein2

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:

  1. download hbase-2.2.6-client-bin.tar.gz
  2. Add bigtable-hbase-2.x-hadoop-1.19.0.jar into the lib/
  3. 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>
  1. Add .jrubyrc with
log.exceptions=true
log.exceptions=true
log.backtraces=true
log.callers=true
errno.backtrace=true
  1. run ./bin/hbase shell
  2. try creating a table: create 'test', 'cf'

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigtableIssues related to the googleapis/java-bigtable-hbase API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions