From f021c1345a506180b6df2e5f9ddf77f10c4b1d80 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Fri, 9 Feb 2024 13:03:20 -0500 Subject: [PATCH] Update spotless to meet JDK-21 baseline (#618) (cherry picked from commit 6c4400d573d8711ab3f71f603b9c54c4a207fa3c) Signed-off-by: Andriy Redko --- build.gradle | 17 +++++++++-------- licenses/netty-buffer-4.1.104.Final.jar.sha1 | 1 - licenses/netty-buffer-4.1.106.Final.jar.sha1 | 1 + licenses/netty-codec-4.1.104.Final.jar.sha1 | 1 - licenses/netty-codec-4.1.106.Final.jar.sha1 | 1 + .../netty-codec-http-4.1.104.Final.jar.sha1 | 1 - .../netty-codec-http-4.1.106.Final.jar.sha1 | 1 + .../netty-codec-http2-4.1.104.Final.jar.sha1 | 1 - .../netty-codec-http2-4.1.106.Final.jar.sha1 | 1 + .../netty-codec-socks-4.1.104.Final.jar.sha1 | 1 - .../netty-codec-socks-4.1.106.Final.jar.sha1 | 1 + licenses/netty-common-4.1.104.Final.jar.sha1 | 1 - licenses/netty-common-4.1.106.Final.jar.sha1 | 1 + licenses/netty-handler-4.1.104.Final.jar.sha1 | 1 - licenses/netty-handler-4.1.106.Final.jar.sha1 | 1 + .../netty-handler-proxy-4.1.104.Final.jar.sha1 | 1 - .../netty-handler-proxy-4.1.106.Final.jar.sha1 | 1 + licenses/netty-resolver-4.1.104.Final.jar.sha1 | 1 - licenses/netty-resolver-4.1.106.Final.jar.sha1 | 1 + licenses/netty-transport-4.1.104.Final.jar.sha1 | 1 - licenses/netty-transport-4.1.106.Final.jar.sha1 | 1 + ...rt-native-unix-common-4.1.104.Final.jar.sha1 | 1 - ...rt-native-unix-common-4.1.106.Final.jar.sha1 | 1 + ...nce-analyzer-commons-1.3.0-SNAPSHOT.jar.sha1 | 2 +- .../OpenSearchResources.java | 1 - .../action/PerformanceAnalyzerActionFilter.java | 1 - .../PerformanceAnalyzerActionListener.java | 1 - .../collectors/ValueCalculator.java | 1 - .../config/setting/ClusterSettingsManager.java | 2 ++ .../PerformanceAnalyzerClusterSettings.java | 1 - .../ConfigOverridesClusterSettingHandler.java | 1 - .../handler/NodeStatsSettingHandler.java | 1 - ...erformanceAnalyzerClusterSettingHandler.java | 1 - ...nceAnalyzerOverridesClusterConfigAction.java | 4 +++- .../PerformanceAnalyzerResourceProvider.java | 1 - .../whoami/TransportWhoAmIAction.java | 1 - .../http_action/whoami/WhoAmIAction.java | 1 - .../http_action/whoami/WhoAmIRequest.java | 1 - .../whoami/WhoAmIRequestBuilder.java | 1 - .../http_action/whoami/WhoAmIResponse.java | 1 - .../listener/SearchListener.java | 1 - .../PerformanceAnalyzerTransportChannel.java | 1 - ...PerformanceAnalyzerTransportInterceptor.java | 1 - .../performanceanalyzer/util/Utils.java | 1 - .../performanceanalyzer/AbstractTests.java | 1 - .../performanceanalyzer/ConfigOverridesIT.java | 1 - .../CustomMetricsLocationTestBase.java | 1 - .../PerformanceAnalyzerIntegTestBase.java | 1 - .../PerformanceAnalyzerRCAHealthCheckIT.java | 1 - .../bwc/PABackwardsCompatibilityIT.java | 1 - .../CacheConfigMetricsCollectorTests.java | 1 - .../CircuitBreakerCollectorTests.java | 1 - ...lusterApplierServiceStatsCollectorTests.java | 8 ++++++-- ...NodeStatsAllShardsMetricsCollectorTests.java | 1 - .../config/ConfigOverridesTestHelper.java | 1 - .../integ_test/CpuMetricsIT.java | 1 - .../integ_test/HeapMetricsIT.java | 1 - .../MetricCollectorIntegTestBase.java | 1 - .../integ_test/PageFaultMetricsIT.java | 1 - .../integ_test/json/JsonResponseData.java | 1 - .../integ_test/json/JsonResponseField.java | 1 - .../integ_test/json/JsonResponseNode.java | 1 - .../performanceanalyzer/util/TestUtil.java | 1 - .../performanceanalyzer/util/WaitFor.java | 1 - 64 files changed, 32 insertions(+), 60 deletions(-) delete mode 100644 licenses/netty-buffer-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-buffer-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-codec-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-codec-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-codec-http-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-codec-http-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-codec-http2-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-codec-http2-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-codec-socks-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-codec-socks-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-common-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-common-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-handler-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-handler-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-handler-proxy-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-handler-proxy-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-resolver-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-resolver-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-transport-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-transport-4.1.106.Final.jar.sha1 delete mode 100644 licenses/netty-transport-native-unix-common-4.1.104.Final.jar.sha1 create mode 100644 licenses/netty-transport-native-unix-common-4.1.106.Final.jar.sha1 diff --git a/build.gradle b/build.gradle index 118ef87b..17a87631 100644 --- a/build.gradle +++ b/build.gradle @@ -6,11 +6,11 @@ buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "2.12.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.13.0-SNAPSHOT") isSnapshot = "true" == System.getProperty("build.snapshot", "true") buildVersionQualifier = System.getProperty("build.version_qualifier", "") - default_bwc_version = System.getProperty("bwc.version", "2.10.0.0") + default_bwc_version = System.getProperty("bwc.version", "2.12.0.0") pa_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version) baseName = "paBwcCluster" @@ -48,9 +48,9 @@ buildscript { plugins { id 'java' id 'com.netflix.nebula.ospackage' version "11.6.0" - id 'com.github.spotbugs' version '5.0.13' + id 'com.github.spotbugs' version '6.0.7' id 'jacoco' - id 'com.diffplug.spotless' version '5.11.0' + id 'com.diffplug.spotless' version '6.25.0' id 'checkstyle' id 'org.ajoberstar.grgit' version '5.0.0' id 'org.gradle.test-retry' version '1.5.2' @@ -64,7 +64,7 @@ checkstyle { spotbugsMain { excludeFilter = file("checkstyle/findbugs-exclude.xml") - effort = 'max' + effort = com.github.spotbugs.snom.Effort.MAX ignoreFailures = true reports { @@ -104,7 +104,7 @@ noticeFile = rootProject.file('NOTICE.txt') spotless { java { licenseHeaderFile(file('license-header')) - googleJavaFormat('1.12.0').aosp() + googleJavaFormat('1.17.0').aosp() importOrder() removeUnusedImports() trimTrailingWhitespace() @@ -212,7 +212,7 @@ tasks.withType(JavaCompile) { } jacoco { - toolVersion = "0.8.7" + toolVersion = "0.8.11" } jacocoTestReport { @@ -295,6 +295,7 @@ dependencies { force "org.apache.commons:commons-lang3:${versions.commonslang}" force "org.slf4j:slf4j-api:2.0.0" force "org.apache.bcel:bcel:6.6.0" // This line should be removed once Spotbugs is upgraded to 4.7.4 + force "com.google.guava:guava:${guavaVersion}" } } @@ -668,7 +669,7 @@ task integTestRemote(type: RestIntegTestTask) { testClusters { "${baseName}$i" { testDistribution = "ARCHIVE" - versions = ["2.10.0-SNAPSHOT", opensearch_version] + versions = ["2.12.0-SNAPSHOT", opensearch_version] numberOfNodes = 3 plugin(provider(new Callable() { @Override diff --git a/licenses/netty-buffer-4.1.104.Final.jar.sha1 b/licenses/netty-buffer-4.1.104.Final.jar.sha1 deleted file mode 100644 index 30f215e4..00000000 --- a/licenses/netty-buffer-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -756797174b94a3aee11ce83522473f3c18287a43 \ No newline at end of file diff --git a/licenses/netty-buffer-4.1.106.Final.jar.sha1 b/licenses/netty-buffer-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..1f170375 --- /dev/null +++ b/licenses/netty-buffer-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +c5495ba59a627641b3a7c23f6bcb801874c7f7b0 \ No newline at end of file diff --git a/licenses/netty-codec-4.1.104.Final.jar.sha1 b/licenses/netty-codec-4.1.104.Final.jar.sha1 deleted file mode 100644 index 9ed9b896..00000000 --- a/licenses/netty-codec-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f51fcfd3baac88b2c0b8dc715932ad5622d17429 \ No newline at end of file diff --git a/licenses/netty-codec-4.1.106.Final.jar.sha1 b/licenses/netty-codec-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..a75ea81b --- /dev/null +++ b/licenses/netty-codec-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +025171b63aa1e7a5fd8a7e4e660d6d3110241ea7 \ No newline at end of file diff --git a/licenses/netty-codec-http-4.1.104.Final.jar.sha1 b/licenses/netty-codec-http-4.1.104.Final.jar.sha1 deleted file mode 100644 index 478e7cfb..00000000 --- a/licenses/netty-codec-http-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2db1556de1b8dc07695604bf51a0a133263ad63f \ No newline at end of file diff --git a/licenses/netty-codec-http-4.1.106.Final.jar.sha1 b/licenses/netty-codec-http-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..7f5d1adb --- /dev/null +++ b/licenses/netty-codec-http-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +21a07cdf0fc46b313fe2248f1275cdbdac0ba87b \ No newline at end of file diff --git a/licenses/netty-codec-http2-4.1.104.Final.jar.sha1 b/licenses/netty-codec-http2-4.1.104.Final.jar.sha1 deleted file mode 100644 index f0242709..00000000 --- a/licenses/netty-codec-http2-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5bb757929f7c4d1bf12740a378a99643caaad1ac \ No newline at end of file diff --git a/licenses/netty-codec-http2-4.1.106.Final.jar.sha1 b/licenses/netty-codec-http2-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..c4a0c1fa --- /dev/null +++ b/licenses/netty-codec-http2-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +41515e8c51eeaaddceabdb4f86fbc5dbfc25b70e \ No newline at end of file diff --git a/licenses/netty-codec-socks-4.1.104.Final.jar.sha1 b/licenses/netty-codec-socks-4.1.104.Final.jar.sha1 deleted file mode 100644 index 3b6cd352..00000000 --- a/licenses/netty-codec-socks-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5b126ceba61275f38297cacd5ea0cd6d3addee04 \ No newline at end of file diff --git a/licenses/netty-codec-socks-4.1.106.Final.jar.sha1 b/licenses/netty-codec-socks-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..4fc3f5c4 --- /dev/null +++ b/licenses/netty-codec-socks-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +129f9bd6aa0cf28bfd7d45a8b6a598eed9c67702 \ No newline at end of file diff --git a/licenses/netty-common-4.1.104.Final.jar.sha1 b/licenses/netty-common-4.1.104.Final.jar.sha1 deleted file mode 100644 index 1b533eea..00000000 --- a/licenses/netty-common-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ec5fc4a7c5475eb20805e14f7274aa28872b5ba1 \ No newline at end of file diff --git a/licenses/netty-common-4.1.106.Final.jar.sha1 b/licenses/netty-common-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..bda8b937 --- /dev/null +++ b/licenses/netty-common-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +132defb4689f41b51b483b7202b22b6e89fe35fd \ No newline at end of file diff --git a/licenses/netty-handler-4.1.104.Final.jar.sha1 b/licenses/netty-handler-4.1.104.Final.jar.sha1 deleted file mode 100644 index 70777be4..00000000 --- a/licenses/netty-handler-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -18c0e659950cdef5f12c36eccfa14cbd2ad2049d \ No newline at end of file diff --git a/licenses/netty-handler-4.1.106.Final.jar.sha1 b/licenses/netty-handler-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..749cc807 --- /dev/null +++ b/licenses/netty-handler-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +874c970c4ff958b1140dde52bc17e6a9e7cde662 \ No newline at end of file diff --git a/licenses/netty-handler-proxy-4.1.104.Final.jar.sha1 b/licenses/netty-handler-proxy-4.1.104.Final.jar.sha1 deleted file mode 100644 index 9d01e814..00000000 --- a/licenses/netty-handler-proxy-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -50a2d899a8f8a68daed1a9b6d7750184310cc45f \ No newline at end of file diff --git a/licenses/netty-handler-proxy-4.1.106.Final.jar.sha1 b/licenses/netty-handler-proxy-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..3dcfa7f2 --- /dev/null +++ b/licenses/netty-handler-proxy-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +bffc88b7c56d7b553453e4244247a1b0ba1fdc8a \ No newline at end of file diff --git a/licenses/netty-resolver-4.1.104.Final.jar.sha1 b/licenses/netty-resolver-4.1.104.Final.jar.sha1 deleted file mode 100644 index d7c15af9..00000000 --- a/licenses/netty-resolver-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dfa4fe5c3a6eabb7af09902eb63266829876d8a2 \ No newline at end of file diff --git a/licenses/netty-resolver-4.1.106.Final.jar.sha1 b/licenses/netty-resolver-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..bd160c07 --- /dev/null +++ b/licenses/netty-resolver-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +e185ae573db04939215f94d6ba869758dcecbde9 \ No newline at end of file diff --git a/licenses/netty-transport-4.1.104.Final.jar.sha1 b/licenses/netty-transport-4.1.104.Final.jar.sha1 deleted file mode 100644 index 5cacaf11..00000000 --- a/licenses/netty-transport-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -da7b263b6fedc5add70e78ee8927c8bd2b9bb589 \ No newline at end of file diff --git a/licenses/netty-transport-4.1.106.Final.jar.sha1 b/licenses/netty-transport-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..2dab4bff --- /dev/null +++ b/licenses/netty-transport-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +8fcca44ae16b98e15965093e7696832019fd6f27 \ No newline at end of file diff --git a/licenses/netty-transport-native-unix-common-4.1.104.Final.jar.sha1 b/licenses/netty-transport-native-unix-common-4.1.104.Final.jar.sha1 deleted file mode 100644 index 64797bf1..00000000 --- a/licenses/netty-transport-native-unix-common-4.1.104.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d4da9f7237ac3ac292891e0b2d5364acbce128cf \ No newline at end of file diff --git a/licenses/netty-transport-native-unix-common-4.1.106.Final.jar.sha1 b/licenses/netty-transport-native-unix-common-4.1.106.Final.jar.sha1 new file mode 100644 index 00000000..b4b977fd --- /dev/null +++ b/licenses/netty-transport-native-unix-common-4.1.106.Final.jar.sha1 @@ -0,0 +1 @@ +2da179bd95903f0fa73218b8f0d02690c0cfbc94 \ No newline at end of file diff --git a/licenses/performance-analyzer-commons-1.3.0-SNAPSHOT.jar.sha1 b/licenses/performance-analyzer-commons-1.3.0-SNAPSHOT.jar.sha1 index 12caa29b..eedbd5a5 100644 --- a/licenses/performance-analyzer-commons-1.3.0-SNAPSHOT.jar.sha1 +++ b/licenses/performance-analyzer-commons-1.3.0-SNAPSHOT.jar.sha1 @@ -1 +1 @@ -a7390b56028ff0ec41c0114036cec55a511bfe91 \ No newline at end of file +4b687090e06c7e28c0728fb7138628b6139dbb4a \ No newline at end of file diff --git a/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java index d6939b6e..c0540642 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java +++ b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; diff --git a/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java index 9366041d..5b5436a7 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java +++ b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.action; - import java.util.concurrent.atomic.AtomicLong; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java index 2f78dac2..0ee58410 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java +++ b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.action; - import org.opensearch.OpenSearchException; import org.opensearch.action.bulk.BulkResponse; import org.opensearch.action.search.SearchResponse; diff --git a/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java index d83ccee7..83c0e59d 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java +++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.collectors; - import org.opensearch.action.admin.indices.stats.ShardStats; @FunctionalInterface diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java index 44eb1037..934629a1 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java @@ -88,6 +88,7 @@ public void addSubscriberForStringSetting( stringSettingListenerMap.put(setting, Collections.singletonList(listener)); } } + /** Bootstraps the listeners and tries to read initial values for cluster settings. */ public void initialize() { if (!initialized) { @@ -248,6 +249,7 @@ private void callStringSettingListeners(final Setting setting, String se StatsCollector.instance().logException(OPENSEARCH_REQUEST_INTERCEPTOR_ERROR); } } + /** Class that handles response to GET /_cluster/settings */ private class ClusterSettingsResponseHandler implements ActionListener { /** diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java index 62330d9e..035817c7 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.config.setting; - import org.opensearch.common.settings.Setting; public final class PerformanceAnalyzerClusterSettings { diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java index 72bbbc69..d17a7753 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.config.setting.handler; - import com.google.common.collect.ImmutableList; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java index 3959c81f..8446fbb3 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.config.setting.handler; - import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController; import org.opensearch.performanceanalyzer.config.setting.ClusterSettingListener; import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager; diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java index bd3bd9e8..6d601643 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.config.setting.handler; - import java.util.LinkedHashMap; import java.util.Map; import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java index c1ff6e12..f13161ab 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java @@ -78,7 +78,9 @@ public List replacedRoutes() { return REPLACED_ROUTES; } - /** @return the name of this handler. */ + /** + * @return the name of this handler. + */ @Override public String getName() { return PerformanceAnalyzerOverridesClusterConfigAction.class.getSimpleName(); diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java index 5f44cce2..7fced2b6 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.config; - import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import java.io.BufferedReader; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java index 03334a94..645acb7c 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.whoami; - import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java index d5827e62..4116bd25 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.whoami; - import org.opensearch.action.ActionType; import org.opensearch.core.common.io.stream.Writeable; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java index 2849793d..39f92eea 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.whoami; - import org.opensearch.action.support.nodes.BaseNodesRequest; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java index 865a62a0..a495313a 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.whoami; - import org.opensearch.action.ActionRequestBuilder; import org.opensearch.client.ClusterAdminClient; import org.opensearch.client.OpenSearchClient; diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java index e8254fef..b7638032 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.http_action.whoami; - import java.io.IOException; import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.StreamOutput; diff --git a/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java b/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java index a7037b5e..cebc2d1f 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java +++ b/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.listener; - import org.opensearch.search.internal.SearchContext; interface SearchListener { diff --git a/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java index cc9f57a8..de442495 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java +++ b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.transport; - import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; import org.apache.logging.log4j.LogManager; diff --git a/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java index b969bdcb..33bf9d50 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java +++ b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.transport; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController; diff --git a/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java index 3c65e090..f62ce5ff 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java +++ b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.util; - import java.util.EnumSet; import java.util.HashMap; import java.util.Iterator; diff --git a/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java b/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java index 6ef1df09..a09c1df3 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import java.io.File; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.core.Filter; diff --git a/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java b/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java index 3e92e658..8896fba6 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.io.InputStreamReader; diff --git a/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java index d14d7931..3664c180 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java +++ b/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import java.io.File; import java.nio.file.Files; import java.nio.file.Path; diff --git a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java index 39624414..0b836ca7 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java +++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; diff --git a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java index 1052696b..b38e0c82 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; - import com.fasterxml.jackson.databind.JsonNode; import java.util.Iterator; import java.util.Objects; diff --git a/src/test/java/org/opensearch/performanceanalyzer/bwc/PABackwardsCompatibilityIT.java b/src/test/java/org/opensearch/performanceanalyzer/bwc/PABackwardsCompatibilityIT.java index a658c4f0..65f10497 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/bwc/PABackwardsCompatibilityIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/bwc/PABackwardsCompatibilityIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.bwc; - import java.util.List; import java.util.Map; import java.util.Set; diff --git a/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java index 94fcffb1..e42a7536 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.collectors; - import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.module.paranamer.ParanamerModule; import java.io.IOException; diff --git a/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java index c8410488..58caf39a 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.collectors; - import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.module.paranamer.ParanamerModule; import java.io.IOException; diff --git a/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java index 48c23a69..fd7cc8e7 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java @@ -73,7 +73,9 @@ public void testClusterApplierServiceStats_saveMetricValues() { @Ignore @Test public void testClusterApplierServiceStats_collectMetrics() - throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, + throws NoSuchMethodException, + IllegalAccessException, + InvocationTargetException, JsonProcessingException { System.out.println("test 1"); MetricsConfiguration.CONFIG_MAP.put( @@ -128,7 +130,9 @@ public void testClusterApplierServiceStats_collectMetrics() @SuppressWarnings("unchecked") @Test public void testClusterApplierServiceStats_collectMetricsWithPreviousClusterApplierMetrics() - throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, + throws NoSuchMethodException, + IllegalAccessException, + InvocationTargetException, JsonProcessingException { System.out.println("test 2"); MetricsConfiguration.CONFIG_MAP.put( diff --git a/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java index 9e09893a..80c0159d 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.collectors; - import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.module.paranamer.ParanamerModule; import java.io.IOException; diff --git a/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java b/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java index 4ca56f02..24d19061 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java +++ b/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.config; - import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java index e2d34106..ad6dcd7b 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test; - import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java index 708aa84b..b6740832 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test; - import java.util.List; import java.util.function.DoublePredicate; import org.apache.logging.log4j.LogManager; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java index 950bd9b9..a2313304 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test; - import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java index d14361cb..8a6d2e05 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test; - import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java index 7156301f..ce0fc7ce 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test.json; - import com.google.gson.annotations.SerializedName; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java index 0e10b76f..36f37137 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test.json; - import com.google.gson.annotations.SerializedName; /** "fields": [ { "name": "CPU_Utilization", "type": "DOUBLE" } ] */ diff --git a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java index 6568445e..9381ea27 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java +++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.integ_test.json; - import com.google.gson.annotations.SerializedName; /** "node1": { "data": { ....... }, "timestamp": 1606861740000 } */ diff --git a/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java b/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java index ff7562c6..a12b50c2 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java +++ b/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.util; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java b/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java index 46d543fb..4adb3964 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java +++ b/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer.util; - import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;