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

Wellington Chevreuil edited comment on HBASE-23683 at 1/24/20 2:49 PM:
-----------------------------------------------------------------------

{quote}if they already had methods of the same signature defined but as a 
private method, or if they have the same name + args but a different return 
type.
{quote}
Ah yeah, that could be an issue. But as you mentioned, would you guys think 
it's fine to have it backported to branch-2.2?
{quote}Whats needed to finish this Wellington Chevreuil and get it into 2.3.0?
{quote}
[~stack], it's merged into master and branch-2 already. -I would like to make 
an addendum to master commit, though, as the branch-2 PR got some extra review 
suggestions only after master PR had already been approved and committed.-


was (Author: wchevreuil):
{quote}if they already had methods of the same signature defined but as a 
private method, or if they have the same name + args but a different return 
type.{quote}
Ah yeah, that could be an issue. But as you mentioned, would you guys think 
it's fine to have it backported to branch-2.2?

{quote}Whats needed to finish this Wellington Chevreuil and get it into 
2.3.0?{quote}
[~stack], it's merged into master and branch-2 already. I would like to make an 
addendum to master commit, though, as the branch-2 PR got some extra review 
suggestions only after master PR had already been approved and committed. 

> Make HBaseInterClusterReplicationEndpoint more extensible
> ---------------------------------------------------------
>
>                 Key: HBASE-23683
>                 URL: https://issues.apache.org/jira/browse/HBASE-23683
>             Project: HBase
>          Issue Type: Improvement
>          Components: Replication
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Major
>             Fix For: 3.0.0, 2.3.0
>
>
> *HBaseInterClusterReplicationEndpoint* currently creates the cluster 
> connection and sink manager instances inside its _init_ method and assigns 
> those to private class variables. Then any potential custom extension of 
> *HBaseInterClusterReplicationEndpoint* that requires custom implementations 
> of connection and/or sink manager would need to resort to _java reflection_ 
> for effectively replace those instances, such as below:
> {noformat}
> ...
>     ClusterConnection conn = (ClusterConnection)ConnectionFactory.
>       createConnection(context.getConfiguration(), 
> User.create(replicationUgi));
>     ReplicationSinkManager sinkManager = new ReplicationSinkManager(conn, 
> ctx.getPeerId(),
>       this, context.getConfiguration());
>     try {
>       Field field = this.getClass().getSuperclass().getDeclaredField("conn");
>       field.setAccessible(true);
>       field.set(this, conn);
>       field = 
> this.getClass().getSuperclass().getDeclaredField("replicationSinkMgr");
>       field.setAccessible(true);
>       field.set(this, sinkManager);
>     } catch (Exception e) {
>       throw new IOException(e);
>     }
> ...
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to