From d4c8e65d0ca8743ef945ba6c9cf77ccf713899e6 Mon Sep 17 00:00:00 2001 From: Khushboo Rajput <59671881+khushbr@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:22:05 -0700 Subject: [PATCH] Refactor for depreceation of MasterService (#527) * Refactor for depreceation of MasterService Signed-off-by: Khushboo Rajput * Adding license and notice txt for bcprov-jdk15to18 Signed-off-by: Khushboo Rajput --------- Signed-off-by: Khushboo Rajput --- licenses/bcprov-jdk15to18-LICENSE.txt | 8 ++++++++ licenses/bcprov-jdk15to18-NOTICE.txt | 0 .../performance-analyzer-commons-1.0.0-SNAPSHOT.jar.sha1 | 2 +- .../collectors/ClusterManagerServiceEventMetrics.java | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 licenses/bcprov-jdk15to18-LICENSE.txt create mode 100644 licenses/bcprov-jdk15to18-NOTICE.txt diff --git a/licenses/bcprov-jdk15to18-LICENSE.txt b/licenses/bcprov-jdk15to18-LICENSE.txt new file mode 100644 index 00000000..c46e6aa1 --- /dev/null +++ b/licenses/bcprov-jdk15to18-LICENSE.txt @@ -0,0 +1,8 @@ +LICENSE +Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/bcprov-jdk15to18-NOTICE.txt b/licenses/bcprov-jdk15to18-NOTICE.txt new file mode 100644 index 00000000..e69de29b diff --git a/licenses/performance-analyzer-commons-1.0.0-SNAPSHOT.jar.sha1 b/licenses/performance-analyzer-commons-1.0.0-SNAPSHOT.jar.sha1 index 3e2317ed..6b958715 100644 --- a/licenses/performance-analyzer-commons-1.0.0-SNAPSHOT.jar.sha1 +++ b/licenses/performance-analyzer-commons-1.0.0-SNAPSHOT.jar.sha1 @@ -1 +1 @@ -50c9a65da3acb24e94c6dbb5e2afda2d7dd536ad \ No newline at end of file +0f872542fa9a89746f0cd60fc465c33537d41701 \ No newline at end of file diff --git a/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java index c314b6be..c90c02ab 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java +++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java @@ -188,8 +188,10 @@ void generateFinishMetrics(long startTime) { // - Separated to have a unit test; and catch any code changes around this field Field getClusterManagerServiceTPExecutorField() throws NoSuchFieldException { + // Currently ClusterManagerService extends MasterService, remove getSuperClass(), + // once MasterService contents are moved and class is removed. Field threadPoolExecutorField = - ClusterManagerService.class.getDeclaredField("threadPoolExecutor"); + ClusterManagerService.class.getSuperclass().getDeclaredField("threadPoolExecutor"); threadPoolExecutorField.setAccessible(true); return threadPoolExecutorField; }