saintstack commented on a change in pull request #1039: HBASE-23647: Make 
MasterRegistry the default impl.
URL: https://github.com/apache/hbase/pull/1039#discussion_r369941187
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
 ##########
 @@ -3058,6 +3061,26 @@ private void initConnection() throws IOException {
     this.asyncConnection = 
ClusterConnectionFactory.createAsyncClusterConnection(conf, null, user);
   }
 
+  /**
+   * Resets the connections so that the next time getConnection() is called, a 
new connection is
+   * created. This is needed in cases where the entire cluster / all the 
masters are shutdown and
+   * the connection is not valid anymore.
+   * TODO: There should be a more coherent way of doing this. Unfortunately 
the way tests are
+   *   written, not all start() stop() calls go through this class. Most tests 
directly operate on
+   *   the underlying mini/local hbase cluster. That makes it difficult for 
this wrapper class to
+   *   maintain the connection state automatically. Cleaning this is a much 
bigger refactor.
 
 Review comment:
   Good comment

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


With regards,
Apache Git Services

Reply via email to