You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/01/15 19:41:35 UTC

[GitHub] [hbase] wchevreuil commented on a change in pull request #1047: HBASE-23683 Make HBaseInterClusterReplicationEndpoint more extensible…

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

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
 ##########
 @@ -114,6 +114,25 @@
   private boolean dropOnDeletedTables;
   private boolean isSerial = false;
 
+  /*
+   * Some implementations of HBaseInterClusterReplicationEndpoint may require instantiate different
+   * Connection implementations, or initialize it in a different way, so defining createConnection
+   * as protected for possible overridings.
+   */
+  protected Connection createConnection(Configuration conf) throws IOException {
+    return ConnectionFactory.createConnection(conf);
+  }
+
+  /*
+   * Some implementations of HBaseInterClusterReplicationEndpoint may require instantiate different
+   * ReplicationSinkManager implementations, or initialize it in a different way,
+   * so defining createReplicationSinkManager as protected for possible overridings.
+   */
+  protected ReplicationSinkManager createReplicationSinkManager(Connection conn) {
+    return new ReplicationSinkManager((ClusterConnection) conn, this.ctx.getPeerId(),
 
 Review comment:
   Compilation fails without this cast, as ReplicationSinkManager expects ClusterConnection.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services