geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [geode] branch feature/Micrometer updated: Hopefully final commit for now...
Date Fri, 14 Sep 2018 17:59:34 GMT
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/Micrometer
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/Micrometer by this push:
     new 52a1490  Hopefully final commit for now...
52a1490 is described below

commit 52a1490b90e87214e5fbe74df781d03dc00e0c31
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
AuthorDate: Fri Sep 14 10:59:12 2018 -0700

    Hopefully final commit for now...
---
 .../bean/stats/CacheServerStatsJUnitTest.java      |  7 ++++---
 .../tier/sockets/command/ExecuteFunction66.java    | 24 ++++++++++++++++------
 .../statistics/AbstractStatisticsFactory.java      |  5 +++--
 .../statistics/GFSStatisticsFactoryImpl.java       | 14 +++++++++++++
 geode-core/src/main/kotlin/Client.kt               | 19 +++++++++++++----
 geode-core/src/main/kotlin/Locator.kt              | 14 +++++++++++++
 geode-core/src/main/kotlin/Server.kt               | 21 +++++++++++++++----
 .../sockets/command/ExecuteFunction66Test.java     | 11 +++++++++-
 .../internal/statistics/TestStatisticsManager.java |  3 +--
 .../java/org/apache/geode/test/fake/Fakes.java     |  6 ++++++
 .../internal/filesystem/FileSystemStats.java       |  2 +-
 .../lucene/internal/LuceneIndexStatsJUnitTest.java |  2 ++
 .../filesystem/FileSystemStatsJUnitTest.java       |  2 ++
 .../function/MicrometerFunctionServiceStats.kt     | 14 +++++++++++++
 .../micrometer/impl/MicrometerStatisticsManager.kt |  6 +++---
 .../common/statistics/factory/StatsFactory.java    |  5 ++---
 16 files changed, 126 insertions(+), 29 deletions(-)

diff --git a/geode-core/src/integrationTest/java/org/apache/geode/management/bean/stats/CacheServerStatsJUnitTest.java
b/geode-core/src/integrationTest/java/org/apache/geode/management/bean/stats/CacheServerStatsJUnitTest.java
index a55b513..fd699f7 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/management/bean/stats/CacheServerStatsJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/management/bean/stats/CacheServerStatsJUnitTest.java
@@ -21,8 +21,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.server.ServerLoad;
-import org.apache.geode.internal.cache.tier.sockets.CacheServerStatsImpl;
 import org.apache.geode.management.internal.beans.CacheServerBridge;
+import org.apache.geode.stats.common.internal.cache.tier.sockets.CacheServerStats;
+import org.apache.geode.stats.common.statistics.factory.StatsFactory;
 import org.apache.geode.test.junit.categories.JMXTest;
 
 @Category({JMXTest.class})
@@ -30,10 +31,10 @@ public class CacheServerStatsJUnitTest extends MBeanStatsTestCase {
 
   private CacheServerBridge bridge;
 
-  private CacheServerStatsImpl cacheServerStats;
+  private CacheServerStats cacheServerStats;
 
   public void init() {
-    cacheServerStats = new CacheServerStatsImpl("Test Sock Name");
+    cacheServerStats = StatsFactory.createStatsImpl(CacheServerStats.class, "Test Sock Name");
 
     bridge = new CacheServerBridge();
     bridge.addCacheServerStats(cacheServerStats);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
index 35dba94..4bace01 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
@@ -85,14 +85,14 @@ public class ExecuteFunction66 extends BaseCommand {
   public void cmdExecute(final Message clientMessage, final ServerConnection serverConnection,
       final SecurityService securityService, long start) throws IOException {
     Object function = null;
-    Object args = null;
+    Object args;
     MemberMappedArgument memberMappedArg = null;
-    String[] groups = null;
+    String[] groups;
     byte hasResult = 0;
-    byte functionState = 0;
+    byte functionState;
     boolean isReexecute = false;
-    boolean allMembers = false;
-    boolean ignoreFailedMembers = false;
+    boolean allMembers;
+    boolean ignoreFailedMembers;
     int functionTimeout = ConnectionImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
     try {
       byte[] bytes = clientMessage.getPart(0).getSerializedForm();
@@ -154,8 +154,20 @@ public class ExecuteFunction66 extends BaseCommand {
     }
 
     // Execute function on the cache
+    executeFunctionOnCache(clientMessage, serverConnection, securityService, function, args,
+        memberMappedArg, groups, hasResult, functionState, isReexecute, allMembers,
+        ignoreFailedMembers,
+        functionTimeout);
+  }
+
+  private void executeFunctionOnCache(Message clientMessage, ServerConnection serverConnection,
+      SecurityService securityService, Object function, Object args,
+      MemberMappedArgument memberMappedArg, String[] groups,
+      byte hasResult, byte functionState, boolean isReexecute,
+      boolean allMembers, boolean ignoreFailedMembers,
+      int functionTimeout) throws IOException {
     try {
-      Function<?> functionObject = null;
+      Function<?> functionObject;
       if (function instanceof String) {
         functionObject = FunctionService.getFunction((String) function);
         if (functionObject == null) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
index 98718d8..383753f 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java
@@ -46,14 +46,15 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory,
St
   private final StatisticsTypeFactory statisticsTypeFactory;
   private final long startTime;
 
-  public AbstractStatisticsFactory(StatisticsFactory statisticsFactory, long id, String name,
+  public AbstractStatisticsFactory(StatisticsTypeFactory statisticsTypeFactory, long id,
+      String name,
       long startTime) {
     this.id = id;
     this.name = name;
     this.startTime = startTime;
 
     this.statsListUniqueIdLock = new Object();
-    this.statisticsTypeFactory = statisticsFactory;
+    this.statisticsTypeFactory = statisticsTypeFactory;
   }
 
   public void close() {}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/GFSStatisticsFactoryImpl.java
b/geode-core/src/main/java/org/apache/geode/internal/statistics/GFSStatisticsFactoryImpl.java
index 2decfed..62ebb31 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/GFSStatisticsFactoryImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/GFSStatisticsFactoryImpl.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
 package org.apache.geode.internal.statistics;
 
 import java.io.IOException;
diff --git a/geode-core/src/main/kotlin/Client.kt b/geode-core/src/main/kotlin/Client.kt
index 0e1bcd6..cc728fc 100644
--- a/geode-core/src/main/kotlin/Client.kt
+++ b/geode-core/src/main/kotlin/Client.kt
@@ -1,9 +1,20 @@
-import org.apache.geode.cache.CacheFactory
-import org.apache.geode.cache.RegionShortcut
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+
 import org.apache.geode.cache.client.ClientCacheFactory
 import org.apache.geode.cache.client.ClientRegionShortcut
-import org.apache.geode.distributed.ConfigurationProperties
-import java.io.File
 import java.util.*
 import java.util.stream.IntStream
 
diff --git a/geode-core/src/main/kotlin/Locator.kt b/geode-core/src/main/kotlin/Locator.kt
index 665cbed..ca133f7 100644
--- a/geode-core/src/main/kotlin/Locator.kt
+++ b/geode-core/src/main/kotlin/Locator.kt
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
 import org.apache.geode.distributed.ConfigurationProperties
 import org.apache.geode.distributed.LocatorLauncher
 
diff --git a/geode-core/src/main/kotlin/Server.kt b/geode-core/src/main/kotlin/Server.kt
index 5fae9fe..bfdcd98 100644
--- a/geode-core/src/main/kotlin/Server.kt
+++ b/geode-core/src/main/kotlin/Server.kt
@@ -1,9 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
 import org.apache.geode.cache.CacheFactory
 import org.apache.geode.cache.RegionShortcut
 import org.apache.geode.distributed.ConfigurationProperties
 import java.io.File
 import java.util.*
-import java.util.stream.IntStream
 
 fun main(args: Array<String>) {
     val properties = Properties().apply {
@@ -15,9 +28,9 @@ fun main(args: Array<String>) {
         setProperty(ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false")
     }
     val cache = CacheFactory(properties).create()
-    cache.addCacheServer().apply{
-        port=0
-        bindAddress="localhost"
+    cache.addCacheServer().apply {
+        port = 0
+        bindAddress = "localhost"
     }.start()
 
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
index fc234c2..20698e5 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66Test.java
@@ -56,6 +56,7 @@ import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
 import org.apache.geode.internal.security.AuthorizeRequest;
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
 import org.apache.geode.management.internal.security.ResourcePermissions;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.test.junit.categories.ClientServerTest;
@@ -119,11 +120,19 @@ public class ExecuteFunction66Test {
     this.executeFunction66 = new ExecuteFunction66();
     MockitoAnnotations.initMocks(this);
 
+    final InternalDistributedSystem internalDistributedSystem =
+        mock(InternalDistributedSystem.class);
+    final InternalDistributedSystemStats internalDistributedSystemStats =
+        mock(InternalDistributedSystemStats.class);
+    when(InternalDistributedSystem.getAnyInstance()).thenReturn(internalDistributedSystem);
+    when(internalDistributedSystem.getInternalDistributedSystemStats())
+        .thenReturn(internalDistributedSystemStats);
+
     when(this.authzRequest.executeFunctionAuthorize(eq(FUNCTION_ID), eq(null), eq(null),
eq(null),
         eq(OPTIMIZE_FOR_WRITE))).thenReturn(this.executeFunctionOperationContext);
 
     when(this.cache.getCancelCriterion()).thenReturn(mock(CancelCriterion.class));
-    when(this.cache.getDistributedSystem()).thenReturn(mock(InternalDistributedSystem.class));
+    when(this.cache.getDistributedSystem()).thenReturn(internalDistributedSystem);
     when(this.cache.getResourceManager()).thenReturn(this.internalResourceManager);
     when(this.cache.getInternalResourceManager()).thenReturn(this.internalResourceManager);
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
index c49418c..15851ba 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/TestStatisticsManager.java
@@ -16,7 +16,6 @@ package org.apache.geode.internal.statistics;
 
 import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
 import org.apache.geode.stats.common.statistics.Statistics;
-import org.apache.geode.stats.common.statistics.StatisticsFactory;
 import org.apache.geode.stats.common.statistics.StatisticsType;
 
 /**
@@ -26,7 +25,7 @@ public class TestStatisticsManager extends AbstractStatisticsFactory
     implements StatisticsManager, OsStatisticsFactory {
 
   public TestStatisticsManager(final long id, final String name, final long startTime) {
-    super((StatisticsFactory) new StatisticsTypeFactoryImpl(), id, name, startTime);
+    super(new StatisticsTypeFactoryImpl(), id, name, startTime);
   }
 
   @Override
diff --git a/geode-junit/src/main/java/org/apache/geode/test/fake/Fakes.java b/geode-junit/src/main/java/org/apache/geode/test/fake/Fakes.java
index be83561..5f201d3 100644
--- a/geode-junit/src/main/java/org/apache/geode/test/fake/Fakes.java
+++ b/geode-junit/src/main/java/org/apache/geode/test/fake/Fakes.java
@@ -37,10 +37,12 @@ import org.apache.geode.distributed.internal.membership.InternalDistributedMembe
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.TXManagerImpl;
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.statistics.InternalDistributedSystemStats;
 import org.apache.geode.pdx.PdxInstanceFactory;
 import org.apache.geode.pdx.internal.TypeRegistry;
 import org.apache.geode.stats.common.internal.cache.CachePerfStats;
 import org.apache.geode.stats.common.statistics.Statistics;
+import org.apache.geode.stats.common.statistics.StatisticsFactory;
 
 /**
  * Factory methods for fake objects for use in test.
@@ -101,6 +103,10 @@ public class Fakes {
     when(system.getClock()).thenReturn(clock);
     when(system.getLogWriter()).thenReturn(logger);
     when(system.getSecurityService()).thenReturn(mock(SecurityService.class));
+    when(system.getInternalDistributedSystemStats())
+        .thenReturn(mock(InternalDistributedSystemStats.class));
+    when(system.getInternalDistributedSystemStats().getStatisticsFactory()).thenReturn(mock(
+        StatisticsFactory.class));
     when(system.getInternalDistributedSystemStats().getStatisticsFactory()
         .createAtomicStatistics(any(), any(), anyLong()))
             .thenReturn(stats);
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
index f720b4c..f9ab11c 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStats.java
@@ -50,7 +50,7 @@ public class FileSystemStats {
             factory.createIntCounter("fileRenames", "Number of files renamed", "files"),
             factory.createIntGauge("files", "Number of files on this member", "files"),
             factory.createIntGauge("chunks", "Number of file chunks on this member", "chunks"),
-            factory.createLongGauge("bytes", "Number of bytes on this member", "bytes"),});
+            factory.createLongGauge("bytes", "Number of bytes on this member", "bytes")});
 
     readBytesId = statsType.nameToId("readBytes");
     writtenBytesId = statsType.nameToId("writtenBytes");
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
index 0f19582..3a64ffb 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/LuceneIndexStatsJUnitTest.java
@@ -44,7 +44,9 @@ public class LuceneIndexStatsJUnitTest {
   @Before
   public void createStats() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
+    StatisticsType statsType = mock(StatisticsType.class);
     statistics = mock(Statistics.class);
+    when(statsFactory.createType(any(), any(), any())).thenReturn(statsType);
     when(statsFactory.createAtomicStatistics(any(), anyString())).thenReturn(statistics);
     stats = new LuceneIndexStats(statsFactory, "region-index");
 
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
index 955bcc6..48b9a76 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemStatsJUnitTest.java
@@ -41,7 +41,9 @@ public class FileSystemStatsJUnitTest {
   @Before
   public void createStats() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
+    StatisticsType statsType = mock(StatisticsType.class);
     statistics = mock(Statistics.class);
+    when(statsFactory.createType(any(), any(), any())).thenReturn(statsType);
     when(statsFactory.createAtomicStatistics(any(), anyString())).thenReturn(statistics);
     stats = new FileSystemStats(statsFactory, "stats");
 
diff --git a/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/function/MicrometerFunctionServiceStats.kt
b/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/function/MicrometerFunctionServiceStats.kt
index 8adfed3..42668a8 100644
--- a/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/function/MicrometerFunctionServiceStats.kt
+++ b/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/function/MicrometerFunctionServiceStats.kt
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
 package org.apache.geode.statistics.function
 
 import org.apache.geode.internal.cache.execute.FunctionServiceStats
diff --git a/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/impl/MicrometerStatisticsManager.kt
b/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/impl/MicrometerStatisticsManager.kt
index 3f280e5..53d8fb3 100644
--- a/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/impl/MicrometerStatisticsManager.kt
+++ b/geode-micrometer-stats/src/main/kotlin/org/apache/geode/statistics/internal/micrometer/impl/MicrometerStatisticsManager.kt
@@ -113,9 +113,9 @@ object MicrometerStatisticsManager : StatisticsManager {
 
     private fun createCompositeRegistry(): CompositeMeterRegistry {
         val compositeMeterRegistry = CompositeMeterRegistry(Clock.SYSTEM)
-//        compositeMeterRegistry.add(createInfluxDB())
+        compositeMeterRegistry.add(createInfluxDB())
 //        compositeMeterRegistry.add(createPrometheus())
-        compositeMeterRegistry.add(createJMX())
+//        compositeMeterRegistry.add(createJMX())
         return compositeMeterRegistry
     }
 
@@ -131,7 +131,7 @@ object MicrometerStatisticsManager : StatisticsManager {
     private fun createInfluxDB(): InfluxMeterRegistry {
         val config = object : InfluxConfig {
             override fun step(): Duration = Duration.ofSeconds(10)
-            override fun db(): String = "mydb3"
+            override fun db(): String = "mydb4"
             override fun get(k: String): String? = null
         }
         return InfluxMeterRegistry(config, Clock.SYSTEM)
diff --git a/geode-stats-common/src/main/java/org/apache/geode/stats/common/statistics/factory/StatsFactory.java
b/geode-stats-common/src/main/java/org/apache/geode/stats/common/statistics/factory/StatsFactory.java
index 85b4900..fcc034e 100644
--- a/geode-stats-common/src/main/java/org/apache/geode/stats/common/statistics/factory/StatsFactory.java
+++ b/geode-stats-common/src/main/java/org/apache/geode/stats/common/statistics/factory/StatsFactory.java
@@ -58,11 +58,10 @@ public class StatsFactory {
 
     /* don't exclude Object.class */
     Reflections reflections = new Reflections(new ConfigurationBuilder()
-        .setScanners(new SubTypesScanner(false /* don't exclude Object.class */),
-            new ResourcesScanner())
+        .setScanners(new SubTypesScanner(false /* don't exclude Object.class */))
         .setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))
         .filterInputsBy(new FilterBuilder()
-            .includePackage("org.apache.geode..*").excludePackage("org.springframework..*")));
+            .includePackage("org.apache.geode..*")));
     this.selectedStatsImplementor = selectedStatsImplementor;
     this.statisticsFactory = statisticsFactory;
     initializeStatsImplementations(reflections);


Mime
View raw message