HBase REST:声明一个协处理器
我很难通过HBase REST创建带有协处理器的HBase表 hbase\u table\u ttt.xml:HBase REST:声明一个协处理器,hbase,stargate,Hbase,Stargate,我很难通过HBase REST创建带有协处理器的HBase表 hbase\u table\u ttt.xml: <?xml version="1.0" encoding="UTF-8" ?> <TableSchema name="ttt" coprocessor="hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|"> <ColumnSchema name="d" BLOCKCAC
<?xml version="1.0" encoding="UTF-8" ?>
<TableSchema name="ttt" coprocessor="hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|">
<ColumnSchema name="d" BLOCKCACHE="true" VERSIONS="1" IN_MEMORY="true"/>
</TableSchema>
在禁用协处理器的情况下,生成以下架构:
'ttt', {METHOD => 'table_att', CONFIG => {'coprocessor' => 'hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|'}},
{NAME => 'd', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '65536',
IN_MEMORY => 'true', ENCODE_ON_DISK => 'true', BLOCKCACHE=>'true'}
'ttt', {METHOD => 'table_att', coprocessor$1 => 'hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|'},
{NAME => 'd', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '65536',
IN_MEMORY => 'true', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true'}
同时,hbase shell
命令:
create 'ttt', 'd'
disable 'ttt'
alter 'ttt', METHOD => 'table_att', 'coprocessor'=>'hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|'
enable 'ttt'
结果为启用了协处理器的架构:
'ttt', {METHOD => 'table_att', CONFIG => {'coprocessor' => 'hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|'}},
{NAME => 'd', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '65536',
IN_MEMORY => 'true', ENCODE_ON_DISK => 'true', BLOCKCACHE=>'true'}
'ttt', {METHOD => 'table_att', coprocessor$1 => 'hdfs:///my_coprocessor-1.0.jar|com.mycompany.MyCoprocessor|1001|'},
{NAME => 'd', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '65536',
IN_MEMORY => 'true', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true'}
问题:
- 如何在hbase\u table\u ttt.xml文件中正确注册协处理器