ifesdjeen commented on code in PR #2318:
URL: https://github.com/apache/cassandra/pull/2318#discussion_r1202412387


##########
src/java/org/apache/cassandra/utils/MBeanWrapper.java:
##########
@@ -36,23 +42,36 @@
  */
 public interface MBeanWrapper
 {
-    static final Logger logger = LoggerFactory.getLogger(MBeanWrapper.class);
+    Logger logger = LoggerFactory.getLogger(MBeanWrapper.class);
 
-    static final MBeanWrapper instance = create();
+    MBeanWrapper instance = create();
 
     static MBeanWrapper create()
+    {
+        // If we're running in the in-jvm dtest environment, always use the 
delegating
+        // mbean wrapper even if we start off with no-op, so it can be 
switched later
+        if (IS_IN_JVM_DTEST.getBoolean())
+            return new DelegatingMbeanWrapper(getmBeanWrapper());
+
+        return getmBeanWrapper();
+    }
+
+    static MBeanWrapper getmBeanWrapper()
     {
         if (ORG_APACHE_CASSANDRA_DISABLE_MBEAN_REGISTRATION.getBoolean())
             return new NoOpMBeanWrapper();
 
         String klass = MBEAN_REGISTRATION_CLASS.getString();
         if (klass == null)
-            return new PlatformMBeanWrapper();
+            if (IS_IN_JVM_DTEST.getBoolean())

Review Comment:
   nit: brackets for the outer if



##########
src/java/org/apache/cassandra/config/CassandraRelevantProperties.java:
##########
@@ -247,6 +247,8 @@
     INTERNODE_EVENT_THREADS("cassandra.internode-event-threads"),
     IO_NETTY_EVENTLOOP_THREADS("io.netty.eventLoopThreads"),
     
IO_NETTY_TRANSPORT_ESTIMATE_SIZE_ON_SUBMIT("io.netty.transport.estimateSizeOnSubmit"),
+    /** This property indicates if the code is running under the in-jvm dtest 
framework */
+    IS_IN_JVM_DTEST("org.apache.cassandra.is_in_jvm_dtest"),

Review Comment:
   similar to howe have have `test` prefix, should we have a `dtest` prefix?



##########
test/distributed/org/apache/cassandra/distributed/impl/Instance.java:
##########
@@ -759,6 +789,170 @@ else if (cluster instanceof Cluster)
         initialized = true;
     }
 
+    private void startJmx() throws InterruptedException

Review Comment:
   this is more of a nit than an actual comment, but do you think it would be 
possible to move JMX-related initializers to their own class? I know we already 
got the jmx util class in .15, but we could also have one cassandra-locally. 
Most other initializations live in messaging, gossip, commit log, and other 
subsystems. I understand this is not necessarily matching a pattern here, but 
maybe we we could have a class under /impl/ 



##########
.build/build-resolver.xml:
##########
@@ -57,7 +57,7 @@
             <remoterepo id="resolver-central" 
url="${artifact.remoteRepository.central}"/>
             <remoterepo id="resolver-apache" 
url="${artifact.remoteRepository.apache}"/>
             <!-- Snapshots are not allowed, but for feature branches they may 
be needed, so uncomment the below to allow snapshots to work -->
-            <!-- <remoterepo id="resolver-apache-snapshot" 
url="https://repository.apache.org/content/repositories/snapshots"; 
releases="false" snapshots="true" updates="always" checksums="fail" /> -->
+            <remoterepo id="resolver-apache-snapshot" 
url="https://repository.apache.org/content/repositories/snapshots"; 
releases="false" snapshots="true" updates="always" checksums="fail" />

Review Comment:
   Just to make sure we do not forget, this should be reverted before commit.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to