This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit d41fe2aa8ecd9fe44fdd064f11405e44fed72d3c Merge: 8e61e21 850157e Author: Alex Petrov <oleksandr.pet...@gmail.com> AuthorDate: Mon Dec 14 14:34:35 2020 +0100 Merge branch 'cassandra-3.11' into trunk build.xml | 2 +- .../distributed/impl/AbstractCluster.java | 9 + .../cassandra/distributed/impl/Instance.java | 7 + .../distributed/impl/InstanceMetrics.java | 183 +++++++++++++++++++++ .../cassandra/distributed/test/MetricsTest.java | 48 ++++++ 5 files changed, 248 insertions(+), 1 deletion(-) diff --cc build.xml index d8d4bb7,c0bf626..f72f54f --- a/build.xml +++ b/build.xml @@@ -586,13 -412,19 +586,13 @@@ <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations" version="2.9.10"/> <dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/> <dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/> - <dependency groupId="com.github.jbellis" artifactId="jamm" version="0.3.0"/> - - <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.7"> - <exclusion groupId="org.slf4j" artifactId="slf4j-log4j12"/> - <exclusion groupId="junit" artifactId="junit"/> - </dependency> - <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.11"/> - <dependency groupId="org.apache.thrift" artifactId="libthrift" version="0.9.2"> - <exclusion groupId="commons-logging" artifactId="commons-logging"/> - </dependency> - <dependency groupId="junit" artifactId="junit" version="4.6" /> + <dependency groupId="com.github.jbellis" artifactId="jamm" version="${jamm.version}"/> + <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.26"/> + <dependency groupId="junit" artifactId="junit" version="4.12" /> <dependency groupId="org.mockito" artifactId="mockito-core" version="3.2.4" /> + <dependency groupId="org.quicktheories" artifactId="quicktheories" version="0.25" /> + <dependency groupId="com.google.code.java-allocation-instrumenter" artifactId="java-allocation-instrumenter" version="${allocation-instrumenter.version}" /> - <dependency groupId="org.apache.cassandra" artifactId="dtest-api" version="0.0.6" /> + <dependency groupId="org.apache.cassandra" artifactId="dtest-api" version="0.0.7" /> <dependency groupId="org.reflections" artifactId="reflections" version="0.9.12" /> <dependency groupId="org.apache.rat" artifactId="apache-rat" version="0.10"> <exclusion groupId="commons-lang" artifactId="commons-lang"/> diff --cc test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java index 1ae594f,c802a10..0eea077 --- a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java @@@ -65,8 -63,10 +65,9 @@@ import org.apache.cassandra.distributed import org.apache.cassandra.distributed.api.LogAction; import org.apache.cassandra.distributed.api.NodeToolResult; import org.apache.cassandra.distributed.api.TokenSupplier; -import org.apache.cassandra.distributed.shared.AbstractBuilder; import org.apache.cassandra.distributed.shared.InstanceClassLoader; import org.apache.cassandra.distributed.shared.MessageFilters; + import org.apache.cassandra.distributed.shared.Metrics; import org.apache.cassandra.distributed.shared.NetworkTopology; import org.apache.cassandra.distributed.shared.Shared; import org.apache.cassandra.distributed.shared.ShutdownException; @@@ -253,9 -225,17 +254,17 @@@ public abstract class AbstractCluster< if (!isShutdown && delegate != null) return delegate().liveMemberCount(); - throw new IllegalStateException("Cannot get live member count on shutdown instance"); + throw new IllegalStateException("Cannot get live member count on shutdown instance: " + config.num()); } + public Metrics metrics() + { + if (isShutdown) + throw new IllegalStateException(); + + return delegate.metrics(); + } + public NodeToolResult nodetoolResult(boolean withNotifications, String... commandAndArgs) { return delegate().nodetoolResult(withNotifications, commandAndArgs); diff --cc test/distributed/org/apache/cassandra/distributed/impl/Instance.java index 8dd13d7,e43fe0c..a4163a1 --- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java @@@ -81,6 -79,8 +81,7 @@@ import org.apache.cassandra.distributed import org.apache.cassandra.distributed.api.SimpleQueryResult; import org.apache.cassandra.distributed.mock.nodetool.InternalNodeProbe; import org.apache.cassandra.distributed.mock.nodetool.InternalNodeProbeFactory; -import org.apache.cassandra.distributed.shared.NetworkTopology; + import org.apache.cassandra.distributed.shared.Metrics; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.gms.VersionedValue; @@@ -92,15 -91,12 +93,16 @@@ import org.apache.cassandra.io.sstable. import org.apache.cassandra.io.util.DataInputBuffer; import org.apache.cassandra.io.util.DataOutputBuffer; import org.apache.cassandra.io.util.FileUtils; +import org.apache.cassandra.locator.InetAddressAndPort; + import org.apache.cassandra.metrics.CassandraMetricsRegistry; -import org.apache.cassandra.net.IMessageSink; -import org.apache.cassandra.net.MessageIn; -import org.apache.cassandra.net.MessageOut; +import org.apache.cassandra.net.Message; import org.apache.cassandra.net.MessagingService; -import org.apache.cassandra.schema.LegacySchemaMigrator; +import org.apache.cassandra.net.NoPayload; +import org.apache.cassandra.net.Verb; +import org.apache.cassandra.schema.MigrationManager; +import org.apache.cassandra.schema.Schema; +import org.apache.cassandra.schema.SchemaConstants; +import org.apache.cassandra.service.ActiveRepairService; import org.apache.cassandra.service.CassandraDaemon; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.DefaultFSErrorHandler; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org