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/06/15 11:42:08 UTC

[GitHub] [hbase-native-client] phrocker commented on a change in pull request #7: HBASE-24538: Simplify the lifecycle of mini cluster

phrocker commented on a change in pull request #7:
URL: https://github.com/apache/hbase-native-client/pull/7#discussion_r440115909



##########
File path: src/hbase/test-util/mini-cluster.cc
##########
@@ -306,3 +289,14 @@ jclass hbase::MiniCluster::FindClassAndGetGlobalRef(const char *cls_name) {
   env_->DeleteLocalRef(local_ref);
   return static_cast<jclass>(global_ref);
 }
+
+void hbase::MiniCluster::StopCluster() {
+  CHECK_NOTNULL(env_);
+  lock_guard<mutex> lock(lock_);

Review comment:
       Unless I'm missing something ( usually am ), If we move assignment of testing_util_class to the constructor we shouldn't need a mutex and we shouldn't need to check if htu exists. This would allow StopCluster to be used in the destructor safely. 




----------------------------------------------------------------
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