bharathv commented on a change in pull request #1047: HBASE-23683 Make
HBaseInterClusterReplicationEndpoint more extensible…
URL: https://github.com/apache/hbase/pull/1047#discussion_r367551620
##########
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:
Oh I see.. I _think_ I get the problem. Basically you are just relying on
ConnectionFactory and not worried about the type it is returning. Ya,
refactoring it will be a bigger patch.
nit: How about adding a preconditions check..
Preconditions.checkState(returnedConn instanceof ClusterConnection) and back it
up with a comment why it could fail?
----------------------------------------------------------------
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