Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14510

Can not set coprocessor from Shell after HBASE-14224

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      I was able to set coprocessors for table by shell normally, but it didn't worked now.
      Here's the shell output (omit really jar path and coprocessor classname):

      HBase Shell; enter 'help<RETURN>' for list of supported commands.
      Type "exit<RETURN>" to leave the HBase Shell
      Version 1.3.0-SNAPSHOT, 642273bc2a5a415eba6f1592a439a6b2b53a70a9, Tue Sep 29 15:58:28 CST 2015
      
      hbase(main):001:0> describe 'test'
      Table test is ENABLED
      test
      COLUMN FAMILIES DESCRIPTION
      {NAME => 'f', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => 'FOREVER', KEEP_DELETED_CELLS => 'FALSE', B
      LOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}
      1 row(s) in 0.4370 seconds
      
      hbase(main):002:0> alter 'test', 'coprocessor'=>'hdfs:///some.jar|com.somepackage.SomeObserver|1001'
      Updating all regions with the new schema...
      1/1 regions updated.
      Done.
      0 row(s) in 1.9760 seconds
      
      hbase(main):003:0> describe 'test'
      Table test is ENABLED
      test, {TABLE_ATTRIBUTES => {coprocessor$1 => '|hdfs:///some.jar|com.somepackage.SomeObserver|1001|1073741823|'}
      COLUMN FAMILIES DESCRIPTION
      {NAME => 'f', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => 'FOREVER', KEEP_DELETED_CELLS => 'FALSE', B
      LOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}
      1 row(s) in 0.0180 seconds
      

      I checked the recent commits and found HBASE-14224 is related to. It's an important improvement, but made a mistake in alter() of admin.rb, line 587. As the value is coprocess spec string but not only class name, here should use htd.setCoprocessorWithSpec instead of htd.setCoprocessor.

      Attachments

        1. HBASE-14510.patch
          2 kB
          Yerui Sun

        Activity

          People

            sunyerui Yerui Sun
            sunyerui Yerui Sun
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: