[ 
https://issues.apache.org/jira/browse/HBASE-12867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285124#comment-14285124
 ] 

Enis Soztutar commented on HBASE-12867:
---------------------------------------

Thanks Kevin for working on this issue. 
bq. The patch adds a new command called "add_custom_peer" which takes an id, 
replicationEndpointImpl, and tableCFs.
I think we don't need to add a new command. Current add_peer command should be 
overwritable. 
bq. My understanding is that the clusterKey is only for remote clusters for 
HBase replication so for adding a custom replication endpoint the clusterKey 
can be pulled from the HBase configuration.
Yes, clusterKey is a custom form of zk quorum address + parent znode that is 
used for intercluster replication. Similar settings should be settable for a 
custom replication endpoint implementation. For example, a replication endpoint 
for SOLR might get the solr cloud URL from it's own configuration. That is why 
the ReplicationPeerConfig class has a custom {{configuration}} field. 

bq. I wasn't sure why those addPeer methods were deprecated so didn't change 
them.
They are mostly deprecated because string parsing of custom table and CFs to 
replicate is very fragile and should not be exposed to users. Rather the API 
should be a set of table and column families. If we can somehow extend that to 
the shell (using native jruby concepts) that would be awesome. 

If we can get the shell to support a hypothetical endpoint like this, it would 
be great: 
{code}
shell > add_peer 'my-peer-id', 'org.apache.hadoop.hbase.MyReplicationEndpoint', 
DATA => { "key1" => 1 }, CONFIG => { "config1" => "value1, "config2" => 
"value2" }, TABLE_CFS => { "table1', "table2", "table3 => {"cf1", "cf2"} }
{code}

Where DATA, CONFIG and TABLE_CFS are optional. 

Also, the help for add_peer mentions that the id must be a short which is not 
the case anymore. 

> Shell does not support custom replication endpoint specification
> ----------------------------------------------------------------
>
>                 Key: HBASE-12867
>                 URL: https://issues.apache.org/jira/browse/HBASE-12867
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: Jingcheng Du
>              Labels: beginner, beginners
>             Fix For: 1.0.0, 2.0.0, 1.1.0, 0.98.11
>
>         Attachments: HBASE-12867.patch
>
>
> On HBASE-12254 and also at 
> https://github.com/risdenk/hbase-custom-replication-endpoint-example 
> [~risdenk] made the following observations and suggestions regarding custom 
> replication endpoints that I think are a reasonable blueprint for improvement:
> {quote}
> I was trying out the pluggable replication endpoint feature and found the 
> following:
> - you must use the ReplicationAdmin to add the new ReplicationEndpoint
> - hbase shell add_peer command doesn't support specifying a custom class
> - hbase shell add_peer relies on the newly deprecated ReplicationAdmin 
> addPeer methods
> - ReplicationAdmin addPeer tableCfs is now a Map<TableName, ? extends 
> Collection<String>> instead of a string
> {quote}
> We should fix the add_peer command in the shell at least.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to