phrocker commented on a change in pull request #7:
URL: https://github.com/apache/hbase-native-client/pull/7#discussion_r440118820
##########
File path: src/hbase/test-util/mini-cluster.cc
##########
@@ -93,7 +97,8 @@ MiniCluster::~MiniCluster() {
}
void MiniCluster::Setup() {
Review comment:
I think MiniCluster's usage should be declarative. If it is instantiated
it will be used. As it stands, the JVM creation and assignment is performed
lazily, but as you pointed out, it creates a state management issue. If we
declare a MiniCluster I think we should create the JVM and class/method objects
in the constructor. This will allow the destructor to destroy the java
MiniCluster. Is there a case where MiniCluster is created without the Java
based mini cluster being used?
I may be missing something..but it seems that the code would be simplified
if Setup is always performed in the constructor and StopCluster is always
performed in the destructor. I would assume that stopMiniCluster can be called
in Java no matter the state of the mini cluster.
----------------------------------------------------------------
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]