diff --git a/.gitignore b/.gitignore
index 8125a5d9..c65ee92c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@
/.idea/
/build/
*.iml
-licenses/performanceanalyzer-rca-1.3.jar.sha1s
+licenses/performanceanalyzer-rca-*
licenses/*.sha1
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 8ec814af..8e8d7aa6 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -24,4 +24,4 @@ This code of conduct applies to all spaces provided by the OpenSource project in
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
-In the event of conflict, this **Code of Conduct** supercedes the original [Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html) that this project had adopted.
+In the event of conflict, this **Code of Conduct** supercedes the original [Code of Conduct](https://opensearch.org/codeofconduct.html) that this project had adopted.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 89e871f4..a1009725 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -88,7 +88,7 @@ Looking at the existing issues is a great way to find something to contribute on
## Code of Conduct
-This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).
+This project has adopted an [Open Source Code of Conduct](https://opensearch.org/codeofconduct.html).
## Security issue notifications
diff --git a/README.md b/README.md
index d673dcda..379c0b75 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[![Java CI](https://github.com/opensearch-project/performance-analyzer/workflows/Java%20CI/badge.svg)](https://github.com/opensearch-project/performance-analyzer/actions?query=workflow%3A%22Java+CI%22)
[![CD](https://github.com/opensearch-project/performance-analyzer/workflows/CD/badge.svg)](https://github.com/opensearch-project/performance-analyzer/actions?query=workflow%3ACD)
[![codecov](https://codecov.io/gh/opensearch-project/performance-analyzer/branch/master/graph/badge.svg)](https://codecov.io/gh/opensearch-project/performance-analyzer)
-[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://opendistro.github.io/for-elasticsearch-docs/docs/pa/)
+[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://docs-beta.opensearch.org/docs/pa/)
[![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/performance-analyzer/)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
@@ -82,11 +82,11 @@ See the [design doc](https://github.com/opensearch-project/performance-analyzer-
## Documentation
-Please refer to the [technical documentation](https://opendistro.github.io/for-elasticsearch-docs/) for detailed information on installing and configuring Performance Analyzer.
+Please refer to the [technical documentation](https://docs-beta.opensearch.org/) for detailed information on installing and configuring Performance Analyzer.
## Code of Conduct
-This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).
+This project has adopted an [Open Source Code of Conduct](https://opensearch.org/codeofconduct.html).
## Security issue notifications
diff --git a/build.gradle b/build.gradle
index 7a64fd4a..8dfb92bb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -117,7 +117,7 @@ loggerUsageCheck.enabled = false
opensearchplugin {
name 'opensearch-performance-analyzer'
description 'OpenSearch Performance Analyzer Plugin'
- classname 'com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin'
+ classname 'org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin'
}
sourceCompatibility = 1.8
@@ -178,7 +178,7 @@ jacocoTestReport {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it,
include: [
- '**/com/amazon/opendistro/opensearch/performanceanalyzer/**',
+ '**/org/opensearch/performanceanalyzer/**',
],
exclude: [
'**/FaultDetectionMetricsCollector.class',
@@ -195,7 +195,7 @@ jacocoTestCoverageVerification {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it,
include: [
- '**/com/amazon/opendistro/opensearch/performanceanalyzer/**',
+ '**/org/opensearch/performanceanalyzer/**',
],
exclude: [
])
@@ -485,7 +485,7 @@ afterEvaluate {
url 'https://opendistro.github.io/for-elasticsearch/downloads.html'
summary '''
Performance Analyzer plugin for OpenSearch.
- Reference documentation can be found at https://opendistro.github.io/for-elasticsearch-docs/.
+ Reference documentation can be found at https://docs-beta.opensearch.org/.
'''.stripIndent().replace('\n', ' ').trim()
}
diff --git a/checkstyle/findbugs-exclude.xml b/checkstyle/findbugs-exclude.xml
index b10f0e9a..e137fb21 100644
--- a/checkstyle/findbugs-exclude.xml
+++ b/checkstyle/findbugs-exclude.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/gradle.properties b/gradle.properties
index 08924273..431c9c9f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -23,7 +23,7 @@ systemProp.tests.pa.port=9600
# Whether or not to use https for REST and transport clients
systemProp.tests.https=false
-# The username of the admin user (or any user able to auth requests against opendistro-security)
+# The username of the admin user (or any user able to auth requests against opensearch-security)
# NOTE: this only does something if tests.https is set to true
systemProp.tests.user=admin
# The password of the user specified above
diff --git a/pa_bin/performance-analyzer-agent b/pa_bin/performance-analyzer-agent
index 4102dd87..451fe216 100755
--- a/pa_bin/performance-analyzer-agent
+++ b/pa_bin/performance-analyzer-agent
@@ -26,7 +26,7 @@ fi
# Instead of the supervisor executing performance-analyzer-agent from the plugin location,
# we should move this to the reader. The entry-point script should be executing
# performance-analyzer-agent from the reader location.
-# We need to change this file: https://github.com/opendistro-for-elasticsearch/opendistro-build/blob/main/opensearch/docker/config/docker-entrypoint.sh
+# We need to change this file: https://github.com/opensearch-project/opensearch-build/blob/main/release/docker/config/opensearch/opensearch-docker-entrypoint.sh
if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' >/dev/null; then
export JAVA_OPTS=-Des.path.home=$OPENSEARCH_HOME\ -Dlog4j.configurationFile=$OPENSEARCH_HOME/performance-analyzer-rca-1.3.0-SNAPSHOT/pa_config/log4j2.xml
diff --git a/packaging/performance-analyzer-agent-cli b/packaging/performance-analyzer-agent-cli
index 68792e66..9b0cc7cf 100644
--- a/packaging/performance-analyzer-agent-cli
+++ b/packaging/performance-analyzer-agent-cli
@@ -4,7 +4,7 @@ PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$OPENSEARCH_HOME/plugins/opensearc
-Xms64M -Xmx64M -XX:+UseSerialGC -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:InitialCodeCacheSize=4096 \
-XX:InitialBootClassLoaderMetaspaceSize=30720 -XX:MaxRAM=400m"
-OPENSEARCH_MAIN_CLASS="com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp" \
+OPENSEARCH_MAIN_CLASS="org.opensearch.performanceanalyzer.PerformanceAnalyzerApp" \
OPENSEARCH_ADDITIONAL_CLASSPATH_DIRECTORIES=performance-analyzer-rca/lib \
OPENSEARCH_JAVA_OPTS=$PA_AGENT_JAVA_OPTS \
$OPENSEARCH_HOME/bin/opensearch-cli \
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/OpenSearchResources.java b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java
similarity index 98%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/OpenSearchResources.java
rename to src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java
index e130cf38..3e4a57c7 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/OpenSearchResources.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
import org.opensearch.client.Client;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java b/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java
similarity index 79%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java
rename to src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java
index 6d769a8b..19792fd4 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java
@@ -24,55 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
import static java.util.Collections.singletonList;
-import com.amazon.opendistro.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ClusterApplierServiceStatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.DisksCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ElectionTermCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.FaultDetectionMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.GCInfoCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.HeapMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterServiceEventMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterServiceMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterThrottlingMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MetricsPurgeActivity;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NetworkInterfaceCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsFixedShardsMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.OSMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ShardIndexingPressureMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ShardStateCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerClusterConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerOverridesClusterConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerResourceProvider;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami.TransportWhoAmIAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami.WhoAmIAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.listener.PerformanceAnalyzerSearchListener;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.EventLog;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.EventLogFileHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.transport.PerformanceAnalyzerTransportInterceptor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.Utils;
-import com.amazon.opendistro.opensearch.performanceanalyzer.writer.EventLogQueueProcessor;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -111,6 +66,51 @@
import org.opensearch.env.NodeEnvironment;
import org.opensearch.index.IndexModule;
import org.opensearch.indices.breaker.CircuitBreakerService;
+import org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter;
+import org.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
+import org.opensearch.performanceanalyzer.collectors.ClusterApplierServiceStatsCollector;
+import org.opensearch.performanceanalyzer.collectors.DisksCollector;
+import org.opensearch.performanceanalyzer.collectors.ElectionTermCollector;
+import org.opensearch.performanceanalyzer.collectors.FaultDetectionMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.GCInfoCollector;
+import org.opensearch.performanceanalyzer.collectors.HeapMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.MasterServiceEventMetrics;
+import org.opensearch.performanceanalyzer.collectors.MasterServiceMetrics;
+import org.opensearch.performanceanalyzer.collectors.MasterThrottlingMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.MetricsPurgeActivity;
+import org.opensearch.performanceanalyzer.collectors.NetworkInterfaceCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeStatsFixedShardsMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.OSMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
+import org.opensearch.performanceanalyzer.collectors.ShardIndexingPressureMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.ShardStateCollector;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
+import org.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
+import org.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
+import org.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
+import org.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
+import org.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerClusterConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerOverridesClusterConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerResourceProvider;
+import org.opensearch.performanceanalyzer.http_action.whoami.TransportWhoAmIAction;
+import org.opensearch.performanceanalyzer.http_action.whoami.WhoAmIAction;
+import org.opensearch.performanceanalyzer.listener.PerformanceAnalyzerSearchListener;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.reader_writer_shared.EventLog;
+import org.opensearch.performanceanalyzer.reader_writer_shared.EventLogFileHandler;
+import org.opensearch.performanceanalyzer.transport.PerformanceAnalyzerTransportInterceptor;
+import org.opensearch.performanceanalyzer.util.Utils;
+import org.opensearch.performanceanalyzer.writer.EventLogQueueProcessor;
import org.opensearch.plugins.ActionPlugin;
import org.opensearch.plugins.NetworkPlugin;
import org.opensearch.plugins.Plugin;
@@ -129,7 +129,7 @@ public final class PerformanceAnalyzerPlugin extends Plugin
public static final String PLUGIN_NAME = "opensearch-performance-analyzer";
private static final String ADD_FAULT_DETECTION_METHOD = "addFaultDetectionListener";
private static final String LISTENER_INJECTOR_CLASS_PATH =
- "com.amazon.opendistro.opensearch.performanceanalyzer.listener.ListenerInjector";
+ "org.opensearch.performanceanalyzer.listener.ListenerInjector";
public static final int QUEUE_PURGE_INTERVAL_MS = 1000;
private static SecurityManager sm = null;
private final PerformanceAnalyzerClusterSettingHandler perfAnalyzerClusterSettingHandler;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java
rename to src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java
index 887c489b..4ec044b2 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilter.java
@@ -24,11 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.action;
+package org.opensearch.performanceanalyzer.action;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -40,6 +38,8 @@
import org.opensearch.action.support.ActionFilter;
import org.opensearch.action.support.ActionFilterChain;
import org.opensearch.common.inject.Inject;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import org.opensearch.tasks.Task;
public class PerformanceAnalyzerActionFilter implements ActionFilter {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java
rename to src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java
index a5d85ba0..c8740163 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListener.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.action;
+package org.opensearch.performanceanalyzer.action;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.HttpDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.HttpMetric;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import org.opensearch.OpenSearchException;
import org.opensearch.action.ActionListener;
import org.opensearch.action.bulk.BulkResponse;
import org.opensearch.action.search.SearchResponse;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.HttpDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.HttpMetric;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
public class PerformanceAnalyzerActionListener
implements ActionListener, MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/RequestType.java b/src/main/java/org/opensearch/performanceanalyzer/action/RequestType.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/RequestType.java
rename to src/main/java/org/opensearch/performanceanalyzer/action/RequestType.java
index 63e88482..acaa33da 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/RequestType.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/action/RequestType.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.action;
+package org.opensearch.performanceanalyzer.action;
enum RequestType {
bulk,
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java
similarity index 91%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java
index f08963b6..571fd081 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollector.java
@@ -24,21 +24,21 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.reflect.Method;
import java.util.Objects;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
/** AdmissionControlMetricsCollector collects `UsedQuota`, `TotalQuota`, RejectionCount */
public class AdmissionControlMetricsCollector extends PerformanceAnalyzerMetricsCollector
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java
similarity index 88%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java
index ea541ac6..ee11444c 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollector.java
@@ -24,18 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
-
-import static com.amazon.opendistro.opensearch.performanceanalyzer.decisionmaker.DecisionMakerConsts.CACHE_MAX_WEIGHT;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType.FIELD_DATA_CACHE;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType.SHARD_REQUEST_CACHE;
-
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+package org.opensearch.performanceanalyzer.collectors;
+
+import static org.opensearch.performanceanalyzer.decisionmaker.DecisionMakerConsts.CACHE_MAX_WEIGHT;
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType.FIELD_DATA_CACHE;
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType.SHARD_REQUEST_CACHE;
+
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -44,6 +38,12 @@
import org.apache.commons.lang3.reflect.FieldUtils;
import org.opensearch.common.cache.Cache;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
/*
* Unlike Cache Hit, Miss, Eviction Count and Size, which is tracked on a per shard basis,
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java
similarity index 86%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java
index dd3806ef..065d4e15 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollector.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.opensearch.indices.breaker.CircuitBreakerStats;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
public class CircuitBreakerCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java
similarity index 91%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java
index 89d51e10..f395af70 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollector.java
@@ -24,19 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
-
-
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
+package org.opensearch.performanceanalyzer.collectors;
+
+
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.PropertyAccessor;
@@ -48,6 +38,16 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.cluster.service.ClusterApplierService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
public class ClusterApplierServiceStatsCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java
similarity index 82%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java
index 48922e89..805a099b 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollector.java
@@ -24,22 +24,22 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
/**
* This class starts publishing election term metric. These metric is emitted from cluster state.
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java
similarity index 88%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java
index 4c061d8d..5732ff91 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollector.java
@@ -24,19 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
-
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics.addMetricEntry;
-
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
+package org.opensearch.performanceanalyzer.collectors;
+
+import static org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics.addMetricEntry;
+
import com.fasterxml.jackson.databind.ObjectMapper;
import java.lang.reflect.Field;
import java.util.ArrayList;
@@ -45,6 +36,15 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jooq.tools.StringUtils;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
public class FaultDetectionMetricsCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
@@ -54,7 +54,7 @@ public class FaultDetectionMetricsCollector extends PerformanceAnalyzerMetricsCo
private static final int KEYS_PATH_LENGTH = 3;
private static final Logger LOG = LogManager.getLogger(FaultDetectionMetricsCollector.class);
private static final String FAULT_DETECTION_HANDLER_NAME =
- "com.amazon.opendistro.opensearch.performanceanalyzer.handler.ClusterFaultDetectionStatsHandler";
+ "org.opensearch.performanceanalyzer.handler.ClusterFaultDetectionStatsHandler";
private static final String FAULT_DETECTION_HANDLER_METRIC_QUEUE = "metricQueue";
private final ConfigOverridesWrapper configOverridesWrapper;
private final PerformanceAnalyzerController controller;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java
index f458ac92..4b019f55 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetrics.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.MasterMetricDimensions;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.MasterMetricValues;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
import com.google.common.annotations.VisibleForTesting;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -47,6 +40,13 @@
import org.opensearch.cluster.service.MasterService;
import org.opensearch.cluster.service.SourcePrioritizedRunnable;
import org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.MasterMetricDimensions;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.MasterMetricValues;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
@SuppressWarnings("unchecked")
public class MasterServiceEventMetrics extends PerformanceAnalyzerMetricsCollector
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java
similarity index 89%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java
index e55ec98f..4a659918 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetrics.java
@@ -24,21 +24,21 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingTaskDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.cluster.service.PendingClusterTask;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingTaskDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
@SuppressWarnings("unchecked")
public class MasterServiceMetrics extends PerformanceAnalyzerMetricsCollector
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java
similarity index 86%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java
index 66a4225f..c93753ae 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollector.java
@@ -24,24 +24,24 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
-
-
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
+package org.opensearch.performanceanalyzer.collectors;
+
+
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.reflect.Method;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.cluster.service.MasterService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
public class MasterThrottlingMetricsCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java
similarity index 89%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java
index 13daaae1..0bed5824 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollector.java
@@ -24,17 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.NodeDetailColumns;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.NodeRole;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.IOException;
import java.util.Iterator;
@@ -42,6 +34,14 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.NodeDetailColumns;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.NodeRole;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
public class NodeDetailsCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java
similarity index 96%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java
index c9f69000..2de63690 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollector.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.Utils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
@@ -49,6 +42,13 @@
import org.opensearch.index.shard.ShardId;
import org.opensearch.indices.IndicesService;
import org.opensearch.indices.NodeIndicesStats;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.util.Utils;
/**
* This collector collects metrics for all shards on a node in a single run. These metrics are light
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java
similarity index 96%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java
index 186830e8..e9bee018 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollector.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.Utils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.reflect.Field;
@@ -49,6 +42,13 @@
import org.opensearch.index.shard.ShardId;
import org.opensearch.indices.IndicesService;
import org.opensearch.indices.NodeIndicesStats;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.util.Utils;
/**
* This collector collects metrics for fixed number of shards on a node in a single run. These
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java
index 3e7841e2..311432b3 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollector.java
@@ -24,21 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardIndexingPressureDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardIndexingPressureValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -50,6 +38,18 @@
import org.jooq.tools.json.JSONParser;
import org.jooq.tools.json.ParseException;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardIndexingPressureDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardIndexingPressureValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
public class ShardIndexingPressureMetricsCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java
similarity index 85%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java
index 09b84c44..6e5cb9b0 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java
@@ -24,21 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
-
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_PRIMARY;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_REPLICA;
-
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
+package org.opensearch.performanceanalyzer.collectors;
+
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_PRIMARY;
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_REPLICA;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import org.apache.logging.log4j.LogManager;
@@ -49,6 +39,16 @@
import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.ExceptionsAndErrors;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
public class ShardStateCollector extends PerformanceAnalyzerMetricsCollector
implements MetricsProcessor {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java
index d4d09b20..2f9d6710 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollector.java
@@ -24,15 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -44,6 +38,12 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.common.util.concurrent.SizeBlockingQueue;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.threadpool.ThreadPoolStats.Stats;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ValueCalculator.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ValueCalculator.java
rename to src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java
index 629cb263..2e240f02 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ValueCalculator.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ValueCalculator.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import org.opensearch.action.admin.indices.stats.ShardStats;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java b/src/main/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java
index 562bd0fe..da153fd6 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerController.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config;
+package org.opensearch.performanceanalyzer.config;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatExceptionCode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
@@ -43,6 +36,13 @@
import java.util.Scanner;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin;
+import org.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
+import org.opensearch.performanceanalyzer.collectors.StatExceptionCode;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
public class PerformanceAnalyzerController {
private static final String PERFORMANCE_ANALYZER_ENABLED_CONF =
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java
index 621b0f0e..36b1fdf4 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingListener.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting;
+package org.opensearch.performanceanalyzer.config.setting;
public interface ClusterSettingListener {
/**
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java
similarity index 97%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java
index dd0e4efc..48795135 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/ClusterSettingsManager.java
@@ -24,12 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting;
+package org.opensearch.performanceanalyzer.config.setting;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatExceptionCode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -46,6 +43,9 @@
import org.opensearch.cluster.ClusterStateListener;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.collectors.StatExceptionCode;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
/**
* Class that handles updating cluster settings, and notifying the listeners when cluster settings
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java
similarity index 97%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java
index 18c99175..d64fc688 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/PerformanceAnalyzerClusterSettings.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting;
+package org.opensearch.performanceanalyzer.config.setting;
import org.opensearch.common.settings.Setting;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java
index 21aefa79..5008033a 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandler.java
@@ -24,14 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
+package org.opensearch.performanceanalyzer.config.setting.handler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
import com.google.common.collect.ImmutableList;
import java.io.IOException;
import java.util.ArrayList;
@@ -42,6 +37,11 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.common.settings.Setting;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
public class ConfigOverridesClusterSettingHandler implements ClusterSettingListener {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java
similarity index 79%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java
index 39f9727e..c45ec3af 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandler.java
@@ -24,13 +24,13 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
+package org.opensearch.performanceanalyzer.config.setting.handler;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings.PA_NODE_STATS_SETTING;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
+import org.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
public class NodeStatsSettingHandler implements ClusterSettingListener {
private final PerformanceAnalyzerController controller;
@@ -52,7 +52,8 @@ public NodeStatsSettingHandler(
* @param value The desired num of shards value for node stats.
*/
public void updateNodeStatsSetting(final int value) {
- clusterSettingsManager.updateSetting(PA_NODE_STATS_SETTING, value);
+ clusterSettingsManager.updateSetting(
+ PerformanceAnalyzerClusterSettings.PA_NODE_STATS_SETTING, value);
}
/**
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java
similarity index 87%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java
rename to src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java
index e2609737..9b4ac29b 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandler.java
@@ -24,27 +24,32 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
+package org.opensearch.performanceanalyzer.config.setting.handler;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings.COMPOSITE_PA_SETTING;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingListener;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
+import org.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
public class PerformanceAnalyzerClusterSettingHandler implements ClusterSettingListener {
private static final int BIT_ONE = 1;
private static final int CLUSTER_SETTING_DISABLED_VALUE = 0;
private static final int ENABLED_VALUE = 1;
private static final int MAX_ALLOWED_BIT_POS =
- Math.min(PerformanceAnalyzerFeatureBits.values().length, Integer.SIZE - 1);
- private static final int RCA_ENABLED_BIT_POS = PerformanceAnalyzerFeatureBits.RCA_BIT.ordinal();
- private static final int PA_ENABLED_BIT_POS = PerformanceAnalyzerFeatureBits.PA_BIT.ordinal();
+ Math.min(
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits.values()
+ .length,
+ Integer.SIZE - 1);
+ private static final int RCA_ENABLED_BIT_POS =
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits.RCA_BIT.ordinal();
+ private static final int PA_ENABLED_BIT_POS =
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits.PA_BIT.ordinal();
private static final int LOGGING_ENABLED_BIT_POS =
- PerformanceAnalyzerFeatureBits.LOGGING_BIT.ordinal();
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits.LOGGING_BIT.ordinal();
private static final int BATCH_METRICS_ENABLED_BIT_POS =
- PerformanceAnalyzerFeatureBits.BATCH_METRICS_BIT.ordinal();
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits.BATCH_METRICS_BIT
+ .ordinal();
private final PerformanceAnalyzerController controller;
private final ClusterSettingsManager clusterSettingsManager;
@@ -71,7 +76,8 @@ public PerformanceAnalyzerClusterSettingHandler(
*/
public void updatePerformanceAnalyzerSetting(final boolean state) {
final Integer settingIntValue = getPASettingValueFromState(state);
- clusterSettingsManager.updateSetting(COMPOSITE_PA_SETTING, settingIntValue);
+ clusterSettingsManager.updateSetting(
+ PerformanceAnalyzerClusterSettings.COMPOSITE_PA_SETTING, settingIntValue);
}
/**
@@ -81,7 +87,8 @@ public void updatePerformanceAnalyzerSetting(final boolean state) {
*/
public void updateLoggingSetting(final boolean state) {
final Integer settingIntValue = getLoggingSettingValueFromState(state);
- clusterSettingsManager.updateSetting(COMPOSITE_PA_SETTING, settingIntValue);
+ clusterSettingsManager.updateSetting(
+ PerformanceAnalyzerClusterSettings.COMPOSITE_PA_SETTING, settingIntValue);
}
/**
@@ -91,7 +98,8 @@ public void updateLoggingSetting(final boolean state) {
*/
public void updateRcaSetting(final boolean state) {
final Integer settingIntValue = getRcaSettingValueFromState(state);
- clusterSettingsManager.updateSetting(COMPOSITE_PA_SETTING, settingIntValue);
+ clusterSettingsManager.updateSetting(
+ PerformanceAnalyzerClusterSettings.COMPOSITE_PA_SETTING, settingIntValue);
}
/**
@@ -101,7 +109,8 @@ public void updateRcaSetting(final boolean state) {
*/
public void updateBatchMetricsSetting(final boolean state) {
final Integer settingIntValue = getBatchMetricsSettingValueFromState(state);
- clusterSettingsManager.updateSetting(COMPOSITE_PA_SETTING, settingIntValue);
+ clusterSettingsManager.updateSetting(
+ PerformanceAnalyzerClusterSettings.COMPOSITE_PA_SETTING, settingIntValue);
}
/**
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java
index 785dedda..d277aabb 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java
@@ -24,14 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -42,6 +39,9 @@
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
+import org.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.RestController;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java
similarity index 97%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java
index e5325544..a49fcd21 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java
@@ -24,13 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -40,6 +38,8 @@
import org.opensearch.common.inject.Inject;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.RestController;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java
index 76d2129e..9b5c3c55 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java
@@ -24,15 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
@@ -43,6 +39,10 @@
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.RestController;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java
similarity index 98%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java
index 7f31ab06..abd7369f 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java
@@ -24,10 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableSet;
import java.io.BufferedReader;
@@ -52,6 +51,7 @@
import org.opensearch.client.node.NodeClient;
import org.opensearch.common.inject.Inject;
import org.opensearch.common.settings.Settings;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.RestController;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java
similarity index 92%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java
index ceee497d..b1f56690 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/TransportWhoAmIAction.java
@@ -24,15 +24,15 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
import org.opensearch.action.ActionListener;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.action.support.HandledTransportAction;
import org.opensearch.common.inject.Inject;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
import org.opensearch.tasks.Task;
import org.opensearch.transport.TransportService;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java
index ea9574c2..f5ebc859 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIAction.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
import org.opensearch.action.ActionType;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java
index 4083c6ce..69246025 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequest.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
import org.opensearch.action.support.nodes.BaseNodesRequest;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java
similarity index 94%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java
index ab9160ca..b8f9cc62 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
import org.opensearch.action.ActionRequestBuilder;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java
rename to src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java
index e84a4cd3..c1069979 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIResponse.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
import java.io.IOException;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/NoOpSearchListener.java b/src/main/java/org/opensearch/performanceanalyzer/listener/NoOpSearchListener.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/NoOpSearchListener.java
rename to src/main/java/org/opensearch/performanceanalyzer/listener/NoOpSearchListener.java
index 7ba004d4..d2cc5008 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/NoOpSearchListener.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/listener/NoOpSearchListener.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.listener;
+package org.opensearch.performanceanalyzer.listener;
class NoOpSearchListener implements SearchListener {
@Override
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java b/src/main/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java
rename to src/main/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java
index f562089d..57086ab3 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListener.java
@@ -24,20 +24,20 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.listener;
+package org.opensearch.performanceanalyzer.listener;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatExceptionCode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CommonDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CommonMetric;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.index.shard.SearchOperationListener;
+import org.opensearch.performanceanalyzer.collectors.StatExceptionCode;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CommonDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CommonMetric;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
import org.opensearch.search.internal.SearchContext;
public class PerformanceAnalyzerSearchListener
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListener.java b/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java
similarity index 95%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListener.java
rename to src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java
index 078f3247..2e6ad5ed 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListener.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/listener/SearchListener.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.listener;
+package org.opensearch.performanceanalyzer.listener;
import org.opensearch.search.internal.SearchContext;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java
similarity index 93%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java
rename to src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java
index 82a8ac48..b977cbd7 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannel.java
@@ -24,18 +24,18 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.transport;
+package org.opensearch.performanceanalyzer.transport;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardBulkDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardBulkMetric;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardBulkDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardBulkMetric;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.metrics.ThreadIDUtil;
import org.opensearch.transport.TransportChannel;
import org.opensearch.transport.TransportResponse;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java
similarity index 91%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java
rename to src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java
index d818f6ff..189d020d 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportInterceptor.java
@@ -24,12 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.transport;
+package org.opensearch.performanceanalyzer.transport;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.transport.TransportInterceptor;
import org.opensearch.transport.TransportRequest;
import org.opensearch.transport.TransportRequestHandler;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java
similarity index 92%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java
rename to src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java
index 79cd9fb0..0541cfb5 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandler.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.transport;
+package org.opensearch.performanceanalyzer.transport;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatExceptionCode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import com.google.common.annotations.VisibleForTesting;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.action.bulk.BulkShardRequest;
import org.opensearch.action.support.replication.TransportReplicationAction.ConcreteShardRequest;
+import org.opensearch.performanceanalyzer.collectors.StatExceptionCode;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.tasks.Task;
import org.opensearch.transport.TransportChannel;
import org.opensearch.transport.TransportRequest;
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/Utils.java b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java
similarity index 75%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/Utils.java
rename to src/main/java/org/opensearch/performanceanalyzer/util/Utils.java
index 32dbb481..7d5e53c4 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/Utils.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java
@@ -24,26 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.util;
+package org.opensearch.performanceanalyzer.util;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ClusterApplierServiceStatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ElectionTermCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.FaultDetectionMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterServiceEventMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterServiceMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.MasterThrottlingMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsFixedShardsMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ShardIndexingPressureMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ShardStateCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Iterator;
@@ -56,6 +39,23 @@
import org.opensearch.index.shard.IndexShardState;
import org.opensearch.index.shard.ShardId;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
+import org.opensearch.performanceanalyzer.collectors.ClusterApplierServiceStatsCollector;
+import org.opensearch.performanceanalyzer.collectors.ElectionTermCollector;
+import org.opensearch.performanceanalyzer.collectors.FaultDetectionMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.MasterServiceEventMetrics;
+import org.opensearch.performanceanalyzer.collectors.MasterServiceMetrics;
+import org.opensearch.performanceanalyzer.collectors.MasterThrottlingMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeStatsFixedShardsMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.ShardIndexingPressureMetricsCollector;
+import org.opensearch.performanceanalyzer.collectors.ShardStateCollector;
+import org.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
public class Utils {
diff --git a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java b/src/main/java/org/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java
similarity index 90%
rename from src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java
rename to src/main/java/org/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java
index d4c8b95c..1887c740 100644
--- a/src/main/java/com/amazon/opendistro/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java
+++ b/src/main/java/org/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java
@@ -24,17 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.writer;
+package org.opensearch.performanceanalyzer.writer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.EventLogFileHandler;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CancellationException;
@@ -45,6 +37,14 @@
import java.util.concurrent.TimeUnit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.reader_writer_shared.EventLogFileHandler;
public class EventLogQueueProcessor {
private static final Logger LOG = LogManager.getLogger(EventLogQueueProcessor.class);
diff --git a/src/main/resources/plugin-descriptor.properties b/src/main/resources/plugin-descriptor.properties
index c09b831f..4a6ec464 100644
--- a/src/main/resources/plugin-descriptor.properties
+++ b/src/main/resources/plugin-descriptor.properties
@@ -27,13 +27,13 @@
description=Performance Analyzer Plugin
#
# 'version': plugin's version
-version=7.10.2
+version=1.0.0.0-beta1
#
# 'name': the plugin name
name=performance-analyzer
#
# 'classname': the name of the class to load, fully-qualified.
-classname=com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin
+classname=org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin
#
# 'java.version' version of java the code is built against
# use the system property java.specification.version
@@ -42,4 +42,4 @@ classname=com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyz
java.version=1.8
#
# 'opensearch.version' version of opensearch compiled against
-opensearch.version=7.10.2
+opensearch.version=1.0.0-beta1
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/AbstractTests.java b/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java
similarity index 96%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/AbstractTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java
index 9e0012ab..a8276467 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/AbstractTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/AbstractTests.java
@@ -24,10 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.Utils;
import java.io.File;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.Filter;
@@ -42,6 +41,7 @@
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
+import org.opensearch.performanceanalyzer.util.Utils;
@Ignore
public class AbstractTests {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ConfigOverridesIT.java b/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java
similarity index 93%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ConfigOverridesIT.java
rename to src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java
index 5b635d05..3b34339e 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ConfigOverridesIT.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/ConfigOverridesIT.java
@@ -24,11 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.WaitFor;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.InputStreamReader;
@@ -40,10 +38,11 @@
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.apache.http.HttpStatus;
-import org.junit.Assert;
import org.junit.Test;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
+import org.opensearch.performanceanalyzer.util.WaitFor;
public class ConfigOverridesIT extends PerformanceAnalyzerIntegTestBase {
private static final String CONFIG_OVERRIDES_ENDPOINT =
@@ -69,7 +68,7 @@ public void testSimpleOverride() throws Exception {
try {
final Response response = client().performRequest(postRequest);
- Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
+ assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
} catch (Exception e) {
logger.error("Encountered exception", e);
fail("Failed to set overrides");
@@ -110,7 +109,7 @@ public void testCompositeOverrides() throws Exception {
try {
final Response response = client().performRequest(postRequest);
- Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
+ assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
} catch (Exception e) {
logger.error("Encountered exception:", e);
fail("Failed to set overrides");
@@ -121,8 +120,7 @@ public void testCompositeOverrides() throws Exception {
final Request getRequest = new Request(METHOD_GET, CONFIG_OVERRIDES_ENDPOINT);
try {
final Response response = client().performRequest(getRequest);
- Assert.assertEquals(
- HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
+ assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
JsonObject jsonResponse =
(JsonObject)
JsonParser.parseReader(
@@ -174,8 +172,7 @@ public void testCompositeOverrides() throws Exception {
final Request getRequest = new Request(METHOD_GET, CONFIG_OVERRIDES_ENDPOINT);
try {
final Response response = client().performRequest(getRequest);
- Assert.assertEquals(
- HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
+ assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
JsonObject jsonResponse =
(JsonObject)
JsonParser.parseReader(
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java
similarity index 91%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java
rename to src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java
index 0b57e65e..22754121 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/CustomMetricsLocationTestBase.java
@@ -24,15 +24,15 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.Before;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
public class CustomMetricsLocationTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ITConfig.java b/src/test/java/org/opensearch/performanceanalyzer/ITConfig.java
similarity index 98%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ITConfig.java
rename to src/test/java/org/opensearch/performanceanalyzer/ITConfig.java
index 2307c026..8b1d61d6 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/ITConfig.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/ITConfig.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
public class ITConfig {
// Whether or not to use https clients for the integration tests
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java
similarity index 93%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java
rename to src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java
index 42f70e78..964eb3a0 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerIntegTestBase.java
@@ -24,12 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.WaitFor;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
@@ -64,6 +61,9 @@
import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.common.util.concurrent.ThreadContext;
+import org.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
+import org.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
+import org.opensearch.performanceanalyzer.util.WaitFor;
import org.opensearch.test.rest.OpenSearchRestTestCase;
public abstract class PerformanceAnalyzerIntegTestBase extends OpenSearchRestTestCase {
@@ -272,9 +272,15 @@ public void ensurePaAndRcaEnabled() throws Exception {
Assert.assertTrue(
"PA and RCA are not enabled on the target cluster!",
PerformanceAnalyzerClusterSettingHandler.checkBit(
- state, PerformanceAnalyzerFeatureBits.PA_BIT.ordinal())
+ state,
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits
+ .PA_BIT
+ .ordinal())
&& PerformanceAnalyzerClusterSettingHandler.checkBit(
- state, PerformanceAnalyzerFeatureBits.RCA_BIT.ordinal()));
+ state,
+ PerformanceAnalyzerClusterSettings.PerformanceAnalyzerFeatureBits
+ .RCA_BIT
+ .ordinal()));
}
@After
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java
similarity index 89%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java
index 2b8a8bb1..eabfd7ee 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java
@@ -24,17 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerClusterConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerOverridesClusterConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerResourceProvider;
-import com.amazon.opendistro.opensearch.performanceanalyzer.transport.PerformanceAnalyzerTransportInterceptor;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope;
import java.nio.file.Paths;
@@ -60,6 +53,13 @@
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
+import org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter;
+import org.opensearch.performanceanalyzer.config.setting.PerformanceAnalyzerClusterSettings;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerClusterConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerOverridesClusterConfigAction;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerResourceProvider;
+import org.opensearch.performanceanalyzer.transport.PerformanceAnalyzerTransportInterceptor;
import org.opensearch.plugins.ActionPlugin.ActionHandler;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java
similarity index 96%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java
rename to src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java
index 1a49f3a1..98b88b40 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerRCAHealthCheckIT.java
@@ -24,10 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer;
+package org.opensearch.performanceanalyzer;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.WaitFor;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.Iterator;
import java.util.Objects;
@@ -38,6 +37,7 @@
import org.junit.Test;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
+import org.opensearch.performanceanalyzer.util.WaitFor;
public class PerformanceAnalyzerRCAHealthCheckIT extends PerformanceAnalyzerIntegTestBase {
@Test
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java b/src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java
similarity index 94%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java
index 66b9908a..d7b5db51 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionFilterTests.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.action;
+package org.opensearch.performanceanalyzer.action;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
@@ -32,7 +32,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@@ -43,6 +42,7 @@
import org.opensearch.action.bulk.BulkRequest;
import org.opensearch.action.search.SearchRequest;
import org.opensearch.action.support.ActionFilterChain;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.tasks.Task;
public class PerformanceAnalyzerActionFilterTests {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java b/src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java
similarity index 92%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java
index 1f0c1f5c..edcdea0e 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/action/PerformanceAnalyzerActionListenerTests.java
@@ -24,16 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.action;
+package org.opensearch.performanceanalyzer.action;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@@ -43,6 +39,10 @@
import org.opensearch.action.ActionResponse;
import org.opensearch.action.bulk.BulkResponse;
import org.opensearch.action.search.SearchResponse;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.rest.RestStatus;
@SuppressWarnings("unchecked")
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java
similarity index 82%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java
index b566e246..11b54ec4 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/AdmissionControlMetricsCollectorTests.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
public class AdmissionControlMetricsCollectorTests extends CustomMetricsLocationTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java
similarity index 74%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java
index 1b52af8b..588654aa 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/CacheConfigMetricsCollectorTests.java
@@ -24,17 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector.CacheMaxSizeStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
import java.io.IOException;
@@ -44,6 +36,13 @@
import org.junit.Before;
import org.junit.Test;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheType;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.OpenSearchSingleNodeTestCase;
public class CacheConfigMetricsCollectorTests extends OpenSearchSingleNodeTestCase {
@@ -92,24 +91,26 @@ public void testCollectMetrics() throws IOException {
createIndex(TEST_INDEX);
collector.collectMetrics(startTimeInMills);
- List metrics = readMetrics();
+ List metrics = readMetrics();
assertEquals(2, metrics.size());
- CacheMaxSizeStatus filedDataCache = metrics.get(0);
- CacheMaxSizeStatus shardRequestCache = metrics.get(1);
+ CacheConfigMetricsCollector.CacheMaxSizeStatus filedDataCache = metrics.get(0);
+ CacheConfigMetricsCollector.CacheMaxSizeStatus shardRequestCache = metrics.get(1);
assertEquals(CacheType.FIELD_DATA_CACHE.toString(), filedDataCache.getCacheType());
assertEquals(CacheType.SHARD_REQUEST_CACHE.toString(), shardRequestCache.getCacheType());
}
- private List readMetrics() throws IOException {
+ private List readMetrics() throws IOException {
List metrics = TestUtil.readEvents();
assert metrics.size() == 1;
ObjectMapper objectMapper = new ObjectMapper().registerModule(new ParanamerModule());
- List list = new ArrayList<>();
+ List list = new ArrayList<>();
String[] jsonStrs = metrics.get(0).value.split("\n");
assert jsonStrs.length == 3;
for (int i = 1; i < 3; i++) {
- list.add(objectMapper.readValue(jsonStrs[i], CacheMaxSizeStatus.class));
+ list.add(
+ objectMapper.readValue(
+ jsonStrs[i], CacheConfigMetricsCollector.CacheMaxSizeStatus.class));
}
return list;
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java
similarity index 79%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java
index 7d172c0e..5f860085 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/CircuitBreakerCollectorTests.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector.CircuitBreakerStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
import java.io.IOException;
@@ -44,6 +37,12 @@
import org.junit.Test;
import org.opensearch.common.breaker.CircuitBreaker;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.OpenSearchSingleNodeTestCase;
public class CircuitBreakerCollectorTests extends OpenSearchSingleNodeTestCase {
@@ -93,7 +92,7 @@ public void testGetMetricsPath() {
public void testCollectMetrics() throws IOException {
createIndex(TEST_INDEX);
collector.collectMetrics(startTimeInMills);
- List metrics = readMetrics();
+ List metrics = readMetrics();
assertEquals(5, metrics.size());
assertEquals(CircuitBreaker.REQUEST, metrics.get(0).getType());
assertEquals(CircuitBreaker.FIELDDATA, metrics.get(1).getType());
@@ -102,15 +101,17 @@ public void testCollectMetrics() throws IOException {
assertEquals(CircuitBreaker.PARENT, metrics.get(4).getType());
}
- private List readMetrics() throws IOException {
+ private List readMetrics() throws IOException {
List metrics = TestUtil.readEvents();
assert metrics.size() == 1;
ObjectMapper objectMapper = new ObjectMapper().registerModule(new ParanamerModule());
String[] jsonStrs = metrics.get(0).value.split("\n");
assert jsonStrs.length == 6;
- List list = new ArrayList<>();
+ List list = new ArrayList<>();
for (int i = 1; i < 6; i++) {
- list.add(objectMapper.readValue(jsonStrs[i], CircuitBreakerStatus.class));
+ list.add(
+ objectMapper.readValue(
+ jsonStrs[i], CircuitBreakerCollector.CircuitBreakerStatus.class));
}
return list;
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java
similarity index 93%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java
index 8aa0694f..cb617268 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ClusterApplierServiceStatsCollectorTests.java
@@ -24,19 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.lang.reflect.InvocationTargetException;
@@ -49,6 +41,14 @@
import org.mockito.Mockito;
import org.opensearch.cluster.service.ClusterApplierService;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java
similarity index 84%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java
index c421d3a0..c4503fe2 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ElectionTermCollectorTests.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -32,15 +32,6 @@
import static org.junit.Assert.fail;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ElectionTermValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.After;
import org.junit.Before;
@@ -48,6 +39,15 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ElectionTermValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.ClusterServiceUtils;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java
similarity index 84%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java
index f2b61457..c8335fba 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/FaultDetectionMetricsCollectorTests.java
@@ -24,21 +24,21 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.mockito.Mockito;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
public class FaultDetectionMetricsCollectorTests extends CustomMetricsLocationTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/JsonKeyTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/JsonKeyTests.java
similarity index 73%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/JsonKeyTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/JsonKeyTests.java
index 8e937150..798e8ed1 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/JsonKeyTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/JsonKeyTests.java
@@ -24,34 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertTrue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector.CacheMaxSizeStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector.CircuitBreakerStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.HeapMetricsCollector.HeapStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector.NodeStatsMetricsAllShardsPerCollectionStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsFixedShardsMetricsCollector.NodeStatsMetricsFixedShardsPerCollectionStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector.ThreadPoolStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.DiskDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.DiskValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.HeapDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.HeapValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.IPDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.IPValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.TCPDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.TCPValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricValue;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.reflect.Field;
@@ -60,6 +36,25 @@
import java.util.Set;
import java.util.function.Function;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.collectors.HeapMetricsCollector.HeapStatus;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CacheConfigValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.DiskDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.DiskValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.HeapDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.HeapValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.IPDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.IPValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.TCPDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.TCPValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ThreadPoolValue;
+import org.opensearch.performanceanalyzer.metrics.MetricDimension;
+import org.opensearch.performanceanalyzer.metrics.MetricValue;
/**
* Writer serialize a java bean to a /dev/shm/performanceanalyzer file using a collector's instance
@@ -94,12 +89,12 @@ public class JsonKeyTests {
@Test
public void testJsonKeyNames() throws NoSuchFieldException, SecurityException {
verifyMethodWithJsonKeyNames(
- CacheMaxSizeStatus.class,
+ CacheConfigMetricsCollector.CacheMaxSizeStatus.class,
CacheConfigDimension.values(),
CacheConfigValue.values(),
getMethodJsonProperty);
verifyMethodWithJsonKeyNames(
- CircuitBreakerStatus.class,
+ CircuitBreakerCollector.CircuitBreakerStatus.class,
CircuitBreakerDimension.values(),
CircuitBreakerValue.values(),
getMethodJsonProperty);
@@ -121,17 +116,19 @@ public void testJsonKeyNames() throws NoSuchFieldException, SecurityException {
IPValue.values(),
getMethodJsonProperty);
verifyMethodWithJsonKeyNames(
- ThreadPoolStatus.class,
+ ThreadPoolMetricsCollector.ThreadPoolStatus.class,
ThreadPoolDimension.values(),
ThreadPoolValue.values(),
getMethodJsonProperty);
verifyMethodWithJsonKeyNames(
- NodeStatsMetricsAllShardsPerCollectionStatus.class,
+ NodeStatsAllShardsMetricsCollector.NodeStatsMetricsAllShardsPerCollectionStatus
+ .class,
new MetricDimension[] {},
ShardStatsValue.values(),
getMethodJsonProperty);
verifyMethodWithJsonKeyNames(
- NodeStatsMetricsFixedShardsPerCollectionStatus.class,
+ NodeStatsFixedShardsMetricsCollector.NodeStatsMetricsFixedShardsPerCollectionStatus
+ .class,
new MetricDimension[] {},
ShardStatsValue.values(),
getMethodJsonProperty);
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java
similarity index 90%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java
index d83c6eb0..81eccdd8 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceEventMetricsTests.java
@@ -24,19 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.apache.commons.lang3.SystemUtils;
import org.junit.After;
@@ -47,6 +40,13 @@
import org.opensearch.cluster.service.SourcePrioritizedRunnable;
import org.opensearch.common.Priority;
import org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.ClusterServiceUtils;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java
similarity index 87%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java
index 238852f1..b46c1d90 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterServiceMetricsTests.java
@@ -24,25 +24,25 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.MasterPendingValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.ClusterServiceUtils;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
similarity index 81%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
index b552c2fd..8f9f7882 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
@@ -24,21 +24,21 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.mockito.Mockito;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
public class MasterThrottlingMetricsCollectorTests extends CustomMetricsLocationTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java
similarity index 80%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java
index d1c5a143..a6e96ad7 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeDetailsCollectorTests.java
@@ -24,19 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeDetailsCollector.NodeDetailsStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.NodeRole;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
import java.io.IOException;
@@ -50,6 +41,14 @@
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.NodeRole;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.ClusterServiceUtils;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.threadpool.TestThreadPool;
@@ -116,7 +115,7 @@ public void testGetMetricsPath() {
public void testCollectMetrics() throws IOException {
long startTimeInMills = 1153721339;
collector.collectMetrics(startTimeInMills);
- NodeDetailsStatus nodeDetailsStatus = readMetrics();
+ NodeDetailsCollector.NodeDetailsStatus nodeDetailsStatus = readMetrics();
assertEquals(NODE_ID, nodeDetailsStatus.getID());
assertEquals("0.0.0.0", nodeDetailsStatus.getHostAddress());
@@ -124,12 +123,12 @@ public void testCollectMetrics() throws IOException {
assertTrue(nodeDetailsStatus.getIsMasterNode());
}
- private NodeDetailsStatus readMetrics() throws IOException {
+ private NodeDetailsCollector.NodeDetailsStatus readMetrics() throws IOException {
List metrics = TestUtil.readEvents();
assert metrics.size() == 1;
ObjectMapper objectMapper = new ObjectMapper().registerModule(new ParanamerModule());
String[] jsonStrs = metrics.get(0).value.split("\n");
assert jsonStrs.length == 4;
- return objectMapper.readValue(jsonStrs[3], NodeDetailsStatus.class);
+ return objectMapper.readValue(jsonStrs[3], NodeDetailsCollector.NodeDetailsStatus.class);
}
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java
similarity index 79%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java
index 29ede68f..f32e329f 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsAllShardsMetricsCollectorTests.java
@@ -24,16 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeStatsAllShardsMetricsCollector.NodeStatsMetricsAllShardsPerCollectionStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
import java.io.IOException;
@@ -43,6 +36,12 @@
import org.junit.Before;
import org.junit.Test;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.OpenSearchSingleNodeTestCase;
public class NodeStatsAllShardsMetricsCollectorTests extends OpenSearchSingleNodeTestCase {
@@ -108,10 +107,12 @@ public void testCollectMetrics() throws IOException {
startTimeInMills += 500;
nodeStatsAllShardsMetricsCollector.collectMetrics(startTimeInMills);
- List metrics = readMetrics();
+ List
+ metrics = readMetrics();
assertEquals(2, metrics.size());
- NodeStatsMetricsAllShardsPerCollectionStatus diffMetricValue = metrics.get(1);
+ NodeStatsAllShardsMetricsCollector.NodeStatsMetricsAllShardsPerCollectionStatus
+ diffMetricValue = metrics.get(1);
assertEquals(0, diffMetricValue.getFieldDataEvictions());
assertEquals(0, diffMetricValue.getFieldDataInBytes());
assertEquals(0, diffMetricValue.getQueryCacheHitCount());
@@ -123,18 +124,22 @@ public void testCollectMetrics() throws IOException {
assertEquals(0, diffMetricValue.getRequestCacheMissCount());
}
- private List readMetrics() throws IOException {
+ private List
+ readMetrics() throws IOException {
List metrics = TestUtil.readEvents();
assert metrics.size() == 2;
ObjectMapper objectMapper = new ObjectMapper().registerModule(new ParanamerModule());
- List list = new ArrayList<>();
+ List list =
+ new ArrayList<>();
for (int i = 0; i < 2; i++) {
String[] jsonStrs = metrics.get(0).value.split("\n");
assert jsonStrs.length == 2;
list.add(
objectMapper.readValue(
- jsonStrs[1], NodeStatsMetricsAllShardsPerCollectionStatus.class));
+ jsonStrs[1],
+ NodeStatsAllShardsMetricsCollector
+ .NodeStatsMetricsAllShardsPerCollectionStatus.class));
}
return list;
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java
similarity index 90%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java
index 473104c3..bf8fafb8 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/NodeStatsFixedShardsMetricsCollectorTests.java
@@ -24,18 +24,10 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.After;
import org.junit.Before;
@@ -43,6 +35,14 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardStatsValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.test.OpenSearchSingleNodeTestCase;
public class NodeStatsFixedShardsMetricsCollectorTests extends OpenSearchSingleNodeTestCase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java
similarity index 82%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java
index 97195450..abebe154 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ShardIndexingPressureMetricsCollectorTests.java
@@ -24,25 +24,25 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.powermock.core.classloader.annotations.PrepareForTest;
@PrepareForTest(Class.class)
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java
similarity index 86%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java
index 753a24e2..09092be7 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollectorTests.java
@@ -24,22 +24,14 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_PRIMARY;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_REPLICA;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_PRIMARY;
+import static org.opensearch.performanceanalyzer.metrics.AllMetrics.ShardType.SHARD_REPLICA;
import static org.opensearch.test.OpenSearchTestCase.settings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.carrotsearch.randomizedtesting.RandomizedRunner;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
@@ -59,6 +51,14 @@
import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.settings.Settings;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
@RunWith(RandomizedRunner.class)
public class ShardStateCollectorTests {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/StatsTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/StatsTests.java
similarity index 99%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/StatsTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/StatsTests.java
index d537f274..9494b233 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/StatsTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/StatsTests.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java b/src/test/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java
similarity index 86%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java
index a53c076b..35146997 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/collectors/ThreadPoolMetricsCollectorTests.java
@@ -24,17 +24,11 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.collectors;
+package org.opensearch.performanceanalyzer.collectors;
import static org.junit.Assert.assertEquals;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ThreadPoolMetricsCollector.ThreadPoolStatus;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.paranamer.ParanamerModule;
import java.io.IOException;
@@ -44,6 +38,11 @@
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.threadpool.ThreadPoolStats;
@@ -95,7 +94,7 @@ public void testCollectMetrics() throws IOException {
long startTimeInMills = 1453724339;
Mockito.when(mockThreadPool.stats()).thenReturn(generateThreadPoolStat(2));
threadPoolMetricsCollector.collectMetrics(startTimeInMills);
- ThreadPoolStatus threadPoolStatus = readMetrics();
+ ThreadPoolMetricsCollector.ThreadPoolStatus threadPoolStatus = readMetrics();
assertEquals(0, threadPoolStatus.getRejected());
startTimeInMills += 5000;
@@ -135,12 +134,13 @@ private ThreadPoolStats generateThreadPoolStat(long rejected) {
return new ThreadPoolStats(stats);
}
- private ThreadPoolStatus readMetrics() throws IOException {
+ private ThreadPoolMetricsCollector.ThreadPoolStatus readMetrics() throws IOException {
List metrics = TestUtil.readEvents();
assert metrics.size() == 1;
ObjectMapper objectMapper = new ObjectMapper().registerModule(new ParanamerModule());
String[] jsonStrs = metrics.get(0).value.split("\n");
assert jsonStrs.length == 2;
- return objectMapper.readValue(jsonStrs[1], ThreadPoolStatus.class);
+ return objectMapper.readValue(
+ jsonStrs[1], ThreadPoolMetricsCollector.ThreadPoolStatus.class);
}
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java b/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java
similarity index 95%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java
rename to src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java
index 39f29a2b..b7612a55 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/config/ConfigOverridesTestHelper.java
@@ -24,14 +24,14 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config;
+package org.opensearch.performanceanalyzer.config;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Arrays;
import java.util.List;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
public class ConfigOverridesTestHelper {
private static final ObjectMapper MAPPER = new ObjectMapper();
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java b/src/test/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java
similarity index 79%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java
index 9a181373..b543f6cd 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/config/PerformanceAnalyzerControllerTests.java
@@ -24,18 +24,18 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config;
+package org.opensearch.performanceanalyzer.config;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController.DEFAULT_NUM_OF_SHARDS_PER_COLLECTION;
import static org.junit.Assert.assertEquals;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
import java.nio.file.Paths;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.opensearch.common.settings.Settings;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.collectors.ScheduledMetricCollectorsExecutor;
public class PerformanceAnalyzerControllerTests {
private static final int NUM_OF_SHARDS_PER_COLLECTION = 1;
@@ -53,8 +53,9 @@ public void init() {
@Test
public void testGetNodeStatsShardsPerCollection() {
- assertEquals(
- DEFAULT_NUM_OF_SHARDS_PER_COLLECTION, controller.getNodeStatsShardsPerCollection());
+ Assert.assertEquals(
+ PerformanceAnalyzerController.DEFAULT_NUM_OF_SHARDS_PER_COLLECTION,
+ controller.getNodeStatsShardsPerCollection());
controller.updateNodeStatsShardsPerCollection(NUM_OF_SHARDS_PER_COLLECTION);
assertEquals(NUM_OF_SHARDS_PER_COLLECTION, controller.getNodeStatsShardsPerCollection());
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java
similarity index 80%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java
index 44bf1d84..46d9df75 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/ConfigOverridesClusterSettingHandlerTests.java
@@ -24,32 +24,28 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
-
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.ACTION1;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.ACTION2;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR1;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR2;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR3;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR4;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER1;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER2;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER3;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER4;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA1;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA2;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA3;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA4;
+package org.opensearch.performanceanalyzer.config.setting.handler;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.ACTION1;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.ACTION2;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR1;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR2;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR3;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.COLLECTOR4;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER1;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER2;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER3;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.DECIDER4;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA1;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA2;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA3;
+import static org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper.RCA4;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
@@ -61,6 +57,10 @@
import org.mockito.Captor;
import org.mockito.Mock;
import org.opensearch.common.settings.Setting;
+import org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
public class ConfigOverridesClusterSettingHandlerTests {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java
similarity index 87%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java
index 427557cd..70991f2c 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/NodeStatsSettingHandlerTests.java
@@ -24,18 +24,18 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
+package org.opensearch.performanceanalyzer.config.setting.handler;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
public class NodeStatsSettingHandlerTests {
private NodeStatsSettingHandler handler;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java
similarity index 93%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java
index 570a53cb..3eb637ef 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/config/setting/handler/PerformanceAnalyzerClusterSettingHandlerTests.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler;
+package org.opensearch.performanceanalyzer.config.setting.handler;
import static org.junit.Assert.assertEquals;
import static org.mockito.MockitoAnnotations.initMocks;
import static org.powermock.api.mockito.PowerMockito.when;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
public class PerformanceAnalyzerClusterSettingHandlerTests {
private static final Boolean DISABLED_STATE = Boolean.FALSE;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java
similarity index 93%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java
index 2b0c5700..2100ee66 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java
@@ -24,16 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -53,6 +49,10 @@
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.setting.ClusterSettingsManager;
+import org.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
+import org.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler.Route;
import org.opensearch.rest.RestRequest;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java
similarity index 98%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java
index 05aaa785..04263c3d 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java
@@ -24,13 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -51,6 +50,7 @@
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler.Route;
import org.opensearch.rest.RestRequest;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java
similarity index 90%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java
index a868b699..a321a064 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java
@@ -24,16 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
-import static com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerOverridesClusterConfigAction.PA_CONFIG_OVERRIDES_PATH;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -53,6 +49,9 @@
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
+import org.opensearch.performanceanalyzer.config.ConfigOverridesTestHelper;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.config.setting.handler.ConfigOverridesClusterSettingHandler;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler.Route;
import org.opensearch.rest.RestRequest.Method;
@@ -124,7 +123,7 @@ public void testGetName() {
public void testWithGetMethod() throws IOException {
final FakeRestRequest fakeRestRequest =
buildRequest(
- PA_CONFIG_OVERRIDES_PATH,
+ PerformanceAnalyzerOverridesClusterConfigAction.PA_CONFIG_OVERRIDES_PATH,
Method.GET,
ConfigOverridesTestHelper.getValidConfigOverridesJson());
final FakeRestChannel channel = new FakeRestChannel(fakeRestRequest, true, 10);
@@ -136,7 +135,7 @@ public void testWithGetMethod() throws IOException {
public void testWithPostMethod() throws IOException {
final FakeRestRequest fakeRestRequest =
buildRequest(
- PA_CONFIG_OVERRIDES_PATH,
+ PerformanceAnalyzerOverridesClusterConfigAction.PA_CONFIG_OVERRIDES_PATH,
Method.POST,
ConfigOverridesTestHelper.getValidConfigOverridesJson());
final FakeRestChannel channel = new FakeRestChannel(fakeRestRequest, true, 10);
@@ -152,7 +151,7 @@ public void testWithPostMethod() throws IOException {
public void testWithUnsupportedMethod() throws IOException {
final FakeRestRequest fakeRestRequest =
buildRequest(
- PA_CONFIG_OVERRIDES_PATH,
+ PerformanceAnalyzerOverridesClusterConfigAction.PA_CONFIG_OVERRIDES_PATH,
Method.PUT,
ConfigOverridesTestHelper.getValidConfigOverridesJson());
final FakeRestChannel channel = new FakeRestChannel(fakeRestRequest, true, 10);
@@ -164,7 +163,7 @@ public void testWithUnsupportedMethod() throws IOException {
public void testWithInvalidOverrides() throws IOException {
final FakeRestRequest fakeRestRequest =
buildRequest(
- PA_CONFIG_OVERRIDES_PATH,
+ PerformanceAnalyzerOverridesClusterConfigAction.PA_CONFIG_OVERRIDES_PATH,
Method.POST,
ConfigOverridesTestHelper.getInvalidConfigOverridesJson());
final FakeRestChannel channel = new FakeRestChannel(fakeRestRequest, true, 10);
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java
similarity index 98%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java
index 0b02f7e1..4c18f991 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProviderTests.java
@@ -24,13 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config;
+package org.opensearch.performanceanalyzer.http_action.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
@@ -42,6 +41,7 @@
import org.mockito.Mockito;
import org.opensearch.common.bytes.BytesReference;
import org.opensearch.common.settings.Settings;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestRequest;
import org.powermock.api.mockito.PowerMockito;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java
similarity index 92%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java
rename to src/test/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java
index 71fbf1c6..d3c1a5b7 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmITests.java
@@ -24,15 +24,15 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.http_action.whoami;
+package org.opensearch.performanceanalyzer.http_action.whoami;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
import java.io.IOException;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@@ -42,6 +42,7 @@
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.indices.IndicesService;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
import org.opensearch.tasks.Task;
import org.opensearch.transport.TransportService;
@@ -72,7 +73,7 @@ public void testDoExecute() {
WhoAmIRequestBuilder builder = new WhoAmIRequestBuilder(null);
transportWhoAmIAction.doExecute(task, new WhoAmIRequest(), listener);
verify(listener).onResponse(any());
- assertEquals(indicesService, OpenSearchResources.INSTANCE.getIndicesService());
+ Assert.assertEquals(indicesService, OpenSearchResources.INSTANCE.getIndicesService());
}
@Test
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java b/src/test/java/org/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java
similarity index 91%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java
index 3f299c4e..cc89351d 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/hwnet/CollectMetricsTests.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.hwnet;
+package org.opensearch.performanceanalyzer.hwnet;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singleton;
@@ -32,29 +32,6 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
-import com.amazon.opendistro.opensearch.performanceanalyzer.AbstractTests;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OSMetricsGeneratorFactory;
-import com.amazon.opendistro.opensearch.performanceanalyzer.OpenSearchResources;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NetInterfaceSummary;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NetworkE2ECollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NetworkInterfaceCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.IPDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.IPValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.NodeDetailColumns;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.TCPDimension;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.TCPValue;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsProcessor;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics_generator.IPMetricsGenerator;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics_generator.TCPMetricsGenerator;
-import com.amazon.opendistro.opensearch.performanceanalyzer.os.OSGlobals;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.JsonConverter;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
@@ -82,6 +59,29 @@
import org.opensearch.indices.breaker.AllCircuitBreakerStats;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.CircuitBreakerStats;
+import org.opensearch.performanceanalyzer.AbstractTests;
+import org.opensearch.performanceanalyzer.OSMetricsGeneratorFactory;
+import org.opensearch.performanceanalyzer.OpenSearchResources;
+import org.opensearch.performanceanalyzer.collectors.CircuitBreakerCollector;
+import org.opensearch.performanceanalyzer.collectors.NetInterfaceSummary;
+import org.opensearch.performanceanalyzer.collectors.NetworkE2ECollector;
+import org.opensearch.performanceanalyzer.collectors.NetworkInterfaceCollector;
+import org.opensearch.performanceanalyzer.collectors.NodeDetailsCollector;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.CircuitBreakerValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.IPDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.IPValue;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.NodeDetailColumns;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.TCPDimension;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.TCPValue;
+import org.opensearch.performanceanalyzer.metrics.MetricsProcessor;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.metrics_generator.IPMetricsGenerator;
+import org.opensearch.performanceanalyzer.metrics_generator.TCPMetricsGenerator;
+import org.opensearch.performanceanalyzer.os.OSGlobals;
+import org.opensearch.performanceanalyzer.util.JsonConverter;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java
similarity index 84%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java
index e07fdb04..cce1031c 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/CpuMetricsIT.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test;
+package org.opensearch.performanceanalyzer.integ_test;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseField.Type.Constants;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.OSMetrics;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseField;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.OSMetrics;
public class CpuMetricsIT extends MetricCollectorIntegTestBase {
@@ -76,7 +76,8 @@ private void validatePerNodeCPUMetric(JsonResponseNode responseNode) throws Exce
Assert.assertEquals(1, responseData.getFieldDimensionSize());
Assert.assertEquals(
OSMetrics.CPU_UTILIZATION.toString(), responseData.getField(0).getName());
- Assert.assertEquals(Constants.DOUBLE, responseData.getField(0).getType());
+ Assert.assertEquals(
+ JsonResponseField.Type.Constants.DOUBLE, responseData.getField(0).getType());
Assert.assertEquals(1, responseData.getRecordSize());
Assert.assertTrue(
responseData.getRecordAsDouble(0, OSMetrics.CPU_UTILIZATION.toString()) > 0);
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java
similarity index 90%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java
index c0f132b6..a8747a64 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/HeapMetricsIT.java
@@ -24,13 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test;
+package org.opensearch.performanceanalyzer.integ_test;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseField;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
import java.util.List;
import java.util.function.DoublePredicate;
import org.apache.logging.log4j.LogManager;
@@ -38,6 +34,10 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseField;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
/**
* All the heap tests check the metrics are within a range. We can't check for absolute values as
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java
similarity index 92%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java
index 3ab3c01e..601721a2 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/MetricCollectorIntegTestBase.java
@@ -24,11 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test;
+package org.opensearch.performanceanalyzer.integ_test;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerIntegTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
@@ -43,6 +41,8 @@
import org.junit.Assert;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerIntegTestBase;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
public class MetricCollectorIntegTestBase extends PerformanceAnalyzerIntegTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java
similarity index 90%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java
index 18047ea0..294d5886 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/PageFaultMetricsIT.java
@@ -24,17 +24,17 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test;
+package org.opensearch.performanceanalyzer.integ_test;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseField.Type.Constants;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics.OSMetrics;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseData;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseField;
+import org.opensearch.performanceanalyzer.integ_test.json.JsonResponseNode;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics.OSMetrics;
public class PageFaultMetricsIT extends MetricCollectorIntegTestBase {
@@ -123,7 +123,8 @@ private void validateMajorPageFaultMetric(JsonResponseNode responseNode) throws
Assert.assertEquals(1, responseData.getFieldDimensionSize());
Assert.assertEquals(
OSMetrics.PAGING_MAJ_FLT_RATE.toString(), responseData.getField(0).getName());
- Assert.assertEquals(Constants.DOUBLE, responseData.getField(0).getType());
+ Assert.assertEquals(
+ JsonResponseField.Type.Constants.DOUBLE, responseData.getField(0).getType());
Assert.assertEquals(1, responseData.getRecordSize());
Assert.assertTrue(
responseData.getRecordAsDouble(0, OSMetrics.PAGING_MAJ_FLT_RATE.toString()) >= 0);
@@ -139,7 +140,8 @@ private void validateMinorPageFaultMetric(JsonResponseNode responseNode) throws
Assert.assertEquals(1, responseData.getFieldDimensionSize());
Assert.assertEquals(
OSMetrics.PAGING_MIN_FLT_RATE.toString(), responseData.getField(0).getName());
- Assert.assertEquals(Constants.DOUBLE, responseData.getField(0).getType());
+ Assert.assertEquals(
+ JsonResponseField.Type.Constants.DOUBLE, responseData.getField(0).getType());
Assert.assertEquals(1, responseData.getRecordSize());
Assert.assertTrue(
responseData.getRecordAsDouble(0, OSMetrics.PAGING_MIN_FLT_RATE.toString()) >= 0);
@@ -155,7 +157,8 @@ private void validatePagingRSSMetric(JsonResponseNode responseNode) throws Excep
JsonResponseData responseData = responseNode.getData();
Assert.assertEquals(1, responseData.getFieldDimensionSize());
Assert.assertEquals(OSMetrics.PAGING_RSS.toString(), responseData.getField(0).getName());
- Assert.assertEquals(Constants.DOUBLE, responseData.getField(0).getType());
+ Assert.assertEquals(
+ JsonResponseField.Type.Constants.DOUBLE, responseData.getField(0).getType());
Assert.assertEquals(1, responseData.getRecordSize());
Assert.assertTrue(responseData.getRecordAsDouble(0, OSMetrics.PAGING_RSS.toString()) > 0);
}
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java
similarity index 91%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java
index b8b128b9..f102fb3d 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseData.java
@@ -24,10 +24,9 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json;
+package org.opensearch.performanceanalyzer.integ_test.json;
-import com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json.JsonResponseField.Type.Constants;
import com.google.gson.annotations.SerializedName;
/**
@@ -88,7 +87,7 @@ public String getRecord(int index, String fieldName) throws Exception {
public Double getRecordAsDouble(int index, String fieldName) throws Exception {
String recordStr = getRecord(index, fieldName);
JsonResponseField field = getField(index);
- if (!field.getType().equals(Constants.DOUBLE)) {
+ if (!field.getType().equals(JsonResponseField.Type.Constants.DOUBLE)) {
throw new IllegalArgumentException();
}
return Double.parseDouble(recordStr);
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java
similarity index 96%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java
index 34902f2c..507a8f65 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseField.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json;
+package org.opensearch.performanceanalyzer.integ_test.json;
import com.google.gson.annotations.SerializedName;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java
similarity index 95%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java
rename to src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java
index 7d48cbaf..a0357353 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/integ_test/json/JsonResponseNode.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.integ_test.json;
+package org.opensearch.performanceanalyzer.integ_test.json;
import com.google.gson.annotations.SerializedName;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java b/src/test/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java
similarity index 92%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java
index 2cf5a147..fc5a0ac1 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/listener/PerformanceAnalyzerSearchListenerTests.java
@@ -24,22 +24,13 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.listener;
+package org.opensearch.performanceanalyzer.listener;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatExceptionCode;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.StatsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.jvm.ThreadList;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.AllMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.util.TestUtil;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.lang3.SystemUtils;
@@ -50,6 +41,15 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.opensearch.index.shard.ShardId;
+import org.opensearch.performanceanalyzer.collectors.StatExceptionCode;
+import org.opensearch.performanceanalyzer.collectors.StatsCollector;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.jvm.ThreadList;
+import org.opensearch.performanceanalyzer.metrics.AllMetrics;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.util.TestUtil;
import org.opensearch.search.internal.SearchContext;
import org.opensearch.search.internal.ShardSearchRequest;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListenerTests.java b/src/test/java/org/opensearch/performanceanalyzer/listener/SearchListenerTests.java
similarity index 91%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListenerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/listener/SearchListenerTests.java
index 71dec465..3f431461 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/listener/SearchListenerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/listener/SearchListenerTests.java
@@ -24,18 +24,18 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.listener;
+package org.opensearch.performanceanalyzer.listener;
import static org.junit.Assert.assertEquals;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PluginSettings;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mock;
+import org.opensearch.performanceanalyzer.CustomMetricsLocationTestBase;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.config.PluginSettings;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
@Ignore
public class SearchListenerTests extends CustomMetricsLocationTestBase {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java b/src/test/java/org/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java
similarity index 86%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java
index 529a9ba1..c3f8d4ff 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandlerTests.java
@@ -24,21 +24,21 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared;
+package org.opensearch.performanceanalyzer.reader_writer_shared;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.collectors.HeapMetricsCollector;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
-import com.amazon.opendistro.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.writer.EventLogQueueProcessor;
import java.io.File;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
+import org.opensearch.performanceanalyzer.collectors.HeapMetricsCollector;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
+import org.opensearch.performanceanalyzer.http_action.config.PerformanceAnalyzerConfigAction;
+import org.opensearch.performanceanalyzer.metrics.MetricsConfiguration;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.writer.EventLogQueueProcessor;
public class EventLogFileHandlerTests {
@Mock private PerformanceAnalyzerController mockController;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java b/src/test/java/org/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java
similarity index 96%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java
index 22c150c3..c97269fb 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/sqlite/PerformanceAnalyzerSqliteTests.java
@@ -24,16 +24,16 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.sqlite;
+package org.opensearch.performanceanalyzer.sqlite;
import static org.junit.Assert.assertEquals;
-import com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import org.junit.Test;
+import org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin;
public class PerformanceAnalyzerSqliteTests {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java b/src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java
similarity index 97%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java
index 404b14c3..77e2860f 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportChannelTests.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.transport;
+package org.opensearch.performanceanalyzer.transport;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.verify;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java b/src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java
similarity index 95%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java
rename to src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java
index 7a51402e..abf9448e 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/transport/PerformanceAnalyzerTransportRequestHandlerTests.java
@@ -24,13 +24,12 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.transport;
+package org.opensearch.performanceanalyzer.transport;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
-import com.amazon.opendistro.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.apache.commons.lang3.SystemUtils;
import org.junit.Before;
import org.junit.Test;
@@ -40,6 +39,7 @@
import org.opensearch.action.bulk.BulkShardRequest;
import org.opensearch.action.support.replication.TransportReplicationAction.ConcreteShardRequest;
import org.opensearch.index.shard.ShardId;
+import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.tasks.Task;
import org.opensearch.transport.TransportChannel;
import org.opensearch.transport.TransportRequest;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/CopyTestResource.java b/src/test/java/org/opensearch/performanceanalyzer/util/CopyTestResource.java
similarity index 97%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/CopyTestResource.java
rename to src/test/java/org/opensearch/performanceanalyzer/util/CopyTestResource.java
index 43990b03..ae6e186f 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/CopyTestResource.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/util/CopyTestResource.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.util;
+package org.opensearch.performanceanalyzer.util;
import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/TestUtil.java b/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java
similarity index 85%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/TestUtil.java
rename to src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java
index 6dac4763..177d34ec 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/TestUtil.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/util/TestUtil.java
@@ -24,14 +24,14 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.util;
+package org.opensearch.performanceanalyzer.util;
-import com.amazon.opendistro.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
-import com.amazon.opendistro.opensearch.performanceanalyzer.reader_writer_shared.Event;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.opensearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
+import org.opensearch.performanceanalyzer.reader_writer_shared.Event;
public class TestUtil {
public static List readEvents() {
diff --git a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/WaitFor.java b/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java
similarity index 96%
rename from src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/WaitFor.java
rename to src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java
index 6723e9d7..b5bbc7d2 100644
--- a/src/test/java/com/amazon/opendistro/opensearch/performanceanalyzer/util/WaitFor.java
+++ b/src/test/java/org/opensearch/performanceanalyzer/util/WaitFor.java
@@ -24,7 +24,7 @@
* permissions and limitations under the License.
*/
-package com.amazon.opendistro.opensearch.performanceanalyzer.util;
+package org.opensearch.performanceanalyzer.util;
import java.util.concurrent.Callable;