You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org> on 2011/11/09 00:01:53 UTC
[jira] [Commented] (HBASE-4554) Allow set/unset coprocessor table
attributes from shell.
[ https://issues.apache.org/jira/browse/HBASE-4554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146632#comment-13146632 ]
jiraposter@reviews.apache.org commented on HBASE-4554:
------------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2350/
-----------------------------------------------------------
(Updated 2011-11-08 23:00:41.226897)
Review request for hbase and Gary Helmling.
Changes
-------
I had an offline discussion with Ted. And he recommend to have a way to generate coprocessor key ordinal in an automatic way, so users don't have to worry about it.
The shell commands are changed to:
hbase> alter 't1', METHOD => 'table_att', \
'coprocessor'=>'hdfs:///foo.jar|com.sample.foo|1|'
hbase> describe 't1'
DESCRIPTION ENABLED
{NAME => 't1', coprocessor$1 => 'hdfs:///foo.jar|com.sample.foo| true
1|', FAMILIES => [{NAME => 'c1', BLOOMFILTER => 'NONE', REPLICAT
ION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VE
RSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false
', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'tr
ue'}]}
1 row(s) in 0.0330 seconds
hbase> alter 't1', METHOD => 'table_att', \
'coprocessor'=>'hdfs:///foo2.jar|com.sample.foo2|2|'
hbase(main):006:0> describe 't1' DESCRIPTION ENABLED
{NAME => 't1', coprocessor$2 => 'hdfs:///foo2.jar|com.sample.foo true
2|2|', coprocessor$1 => 'hdfs:///foo.jar|com.sample.foo|1|', FAM
ILIES => [{NAME => 'c1', BLOOMFILTER => 'NONE', REPLICATION_SCOP
E => '0', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIONS =
> '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCK
SIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}
1 row(s) in 0.0220 seconds
hbase> alter 't1', METHOD => 'table_att_unset', NAME => 'coprocessor$1'
Summary (updated)
-------
Features:
- Support adding table level coprocessors -- regionobserver and endpoint -- from shell.
- Support removing table attributes from shell.
Introduced shell comands:
hbase> alter 't1', METHOD => 'table_att', \
'coprocessor'=>'|org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver||'
coprocessor$1 => 'hdfs:///foo.jar|com.sample.foo|1' will be added to htd. So that cp framework can load the cp later on.
hbase> alter 't1', METHOD => 'table_att_unset', NAME => 'MAX_FILESIZE'
hbase> alter 't1', METHOD => 'table_att_unset', NAME => 'coprocessor$1'
This addresses bug HBASE-4554.
https://issues.apache.org/jira/browse/HBASE-4554
Diffs (updated)
-----
src/main/java/org/apache/hadoop/hbase/HConstants.java 76278a2
src/main/ruby/hbase/admin.rb 61e04d8
src/main/ruby/shell/commands/alter.rb ee3668d
src/test/ruby/hbase/admin_test.rb df88100
Diff: https://reviews.apache.org/r/2350/diff
Testing
-------
Test passed after applied HBase-4555 patch locally.
Thanks,
Mingjie
> Allow set/unset coprocessor table attributes from shell.
> --------------------------------------------------------
>
> Key: HBASE-4554
> URL: https://issues.apache.org/jira/browse/HBASE-4554
> Project: HBase
> Issue Type: Improvement
> Components: coprocessors
> Reporter: Mingjie Lai
> Assignee: Mingjie Lai
> Fix For: 0.92.0
>
>
> Table/region level coprocessor -- RegionObserver -- can be configured by setting a HTD's attribute which matches Coprocessor$*.
> Current shell -- alter -- cannot support to set/unset a table's arbitrary attribute. We need it in order to configure region level coprocessors to a table.
> Proposed new shell:
> {code}
> hbase shell > alter 't1', METHOD => 'table_att', COPROCESSOR$1 => 'hdfs://cp/foo.jar|org.apache.hadoop.hbase.sample|1|'
> hbase shell > describe 't1'
> {NAME => 't1', COPROCESSOR$1 => 'hdfs://cp/foo.jar|org.apache.hadoop.hbase.sample|1|', MAX_FILESIZE => '134217728', ...}
> hbase shell > alter 't1', METHOD => 'table_att_unset', COPROCESSOR$1
> hbase shell > describe 't1'
> {NAME => 't1', MAX_FILESIZE => '134217728', ...}
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira