wchevreuil commented on a change in pull request #1047: HBASE-23683 Make 
HBaseInterClusterReplicationEndpoint more extensible…
URL: https://github.com/apache/hbase/pull/1047#discussion_r367349645
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
 ##########
 @@ -133,12 +152,12 @@ public void init(Context context) throws IOException {
     // TODO: This connection is replication specific or we should make it 
particular to
     // replication and make replication specific settings such as compression 
or codec to use
     // passing Cells.
-    this.conn = (ClusterConnection) 
ConnectionFactory.createConnection(this.conf);
+    this.conn = (ClusterConnection) createConnection(this.conf);
 
 Review comment:
   > what does your use case look like here where you have an override that 
does a generic Connection rather than (some type of) ClusterConnection?
   
   I have a _HBaseInterClusterReplicationEndpoint_ extension where I'm still 
using _ConnectionFactory_ for creating connections, but I use different factory 
method than what is used by _HBaseInterClusterReplicationEndpoint_. I don't 
really care about which connection implementation the factory is returning, I 
just rely on whatever is the default (in 2.x, it's _ClusterConnection_). I 
noticed, though, that default connection type changed between 2.x and 3.0, from 
_ClusterConnection_ to _AsycnClusterConnection_. So, if we keep _create_ 
methods referencing generic _Connection_ only, I won't need to change my 
_HBaseInterClusterReplicationEndpoint_ extension if I upgrade to hbase 3.x 
(provided, of course, that _HBaseInterClusterReplicationEndpoint.conn_ variable 
also changes to same default returned by  _ConnectionFactory_).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to