diff --git a/client/benchmark/README.md b/client/benchmark/README.md index 2562a139bec..ae39f373d80 100644 --- a/client/benchmark/README.md +++ b/client/benchmark/README.md @@ -1,8 +1,8 @@ ### Steps to execute the benchmark 1. Build `client-benchmark-noop-api-plugin` with `./gradlew :client:client-benchmark-noop-api-plugin:assemble` -2. Install it on the target host with `bin/elasticsearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip`. -3. Start Elasticsearch on the target host (ideally *not* on the machine +2. Install it on the target host with `bin/opensearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip`. +3. Start OpenSearch on the target host (ideally *not* on the machine that runs the benchmarks) 4. Run the benchmark with ``` @@ -21,7 +21,7 @@ In general, you should define a few GC-related settings `-Xms8192M -Xmx8192M -XX #### Bulk indexing -Download benchmark data from http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames and decompress them. +Download benchmark data from http://benchmarks.opensearch.org.s3.amazonaws.com/corpora/geonames and decompress them. Example invocation: @@ -36,7 +36,7 @@ The parameters are all in the `'`s and are in order: * Client type: Use either "rest" or "transport" * Benchmark type: Use either "bulk" or "search" -* Benchmark target host IP (the host where Elasticsearch is running) +* Benchmark target host IP (the host where OpenSearch is running) * full path to the file that should be bulk indexed * name of the index * name of the (sole) type in the index @@ -56,7 +56,7 @@ The parameters are in order: * Client type: Use either "rest" or "transport" * Benchmark type: Use either "bulk" or "search" -* Benchmark target host IP (the host where Elasticsearch is running) +* Benchmark target host IP (the host where OpenSearch is running) * name of the index * a search request body (remember to escape double quotes). The `TransportClientBenchmark` uses `QueryBuilders.wrapperQuery()` internally which automatically adds a root key `query`, so it must not be present in the command line parameter. * A comma-separated list of target throughput rates diff --git a/client/benchmark/build.gradle b/client/benchmark/build.gradle index 0f9ec487f5d..25dc4d878ed 100644 --- a/client/benchmark/build.gradle +++ b/client/benchmark/build.gradle @@ -17,16 +17,16 @@ * under the License. */ -apply plugin: 'elasticsearch.build' +apply plugin: 'opensearch.build' apply plugin: 'application' -group = 'org.elasticsearch.client' +group = 'org.opensearch.client' // Not published so no need to assemble assemble.enabled = true archivesBaseName = 'client-benchmarks' -mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain' +mainClassName = 'org.opensearch.client.benchmark.BenchmarkMain' // never try to invoke tests on the benchmark project - there aren't any test.enabled = false @@ -35,7 +35,7 @@ dependencies { api 'org.apache.commons:commons-math3:3.2' api project(":client:rest") - // bottleneck should be the client, not Elasticsearch + // bottleneck should be the client, not OpenSearch api project(path: ':client:client-benchmark-noop-api-plugin') // for transport client api project(":server") diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/AbstractBenchmark.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/AbstractBenchmark.java similarity index 95% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/AbstractBenchmark.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/AbstractBenchmark.java index fe38c180ce5..69f622c1dea 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/AbstractBenchmark.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/AbstractBenchmark.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark; +package org.opensearch.client.benchmark; -import org.elasticsearch.client.benchmark.ops.bulk.BulkBenchmarkTask; -import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor; -import org.elasticsearch.client.benchmark.ops.search.SearchBenchmarkTask; -import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor; +import org.opensearch.client.benchmark.ops.bulk.BulkBenchmarkTask; +import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor; +import org.opensearch.client.benchmark.ops.search.SearchBenchmarkTask; +import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor; import org.elasticsearch.common.SuppressForbidden; import java.io.Closeable; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkMain.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkMain.java similarity index 89% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkMain.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkMain.java index 317f0bf4797..466a3fcc856 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkMain.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkMain.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark; +package org.opensearch.client.benchmark; -import org.elasticsearch.client.benchmark.rest.RestClientBenchmark; -import org.elasticsearch.client.benchmark.transport.TransportClientBenchmark; +import org.opensearch.client.benchmark.rest.RestClientBenchmark; +import org.opensearch.client.benchmark.transport.TransportClientBenchmark; import org.elasticsearch.common.SuppressForbidden; import java.util.Arrays; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkRunner.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkRunner.java similarity index 92% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkRunner.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkRunner.java index dfb1984f4f0..b32c0876bdd 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkRunner.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkRunner.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark; +package org.opensearch.client.benchmark; -import org.elasticsearch.client.benchmark.metrics.Metrics; -import org.elasticsearch.client.benchmark.metrics.MetricsCalculator; -import org.elasticsearch.client.benchmark.metrics.Sample; -import org.elasticsearch.client.benchmark.metrics.SampleRecorder; +import org.opensearch.client.benchmark.metrics.Metrics; +import org.opensearch.client.benchmark.metrics.MetricsCalculator; +import org.opensearch.client.benchmark.metrics.Sample; +import org.opensearch.client.benchmark.metrics.SampleRecorder; import org.elasticsearch.common.SuppressForbidden; import java.util.Arrays; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkTask.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkTask.java similarity index 89% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkTask.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkTask.java index 5aabd0e1940..463b5dbe8fc 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkTask.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/BenchmarkTask.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark; +package org.opensearch.client.benchmark; -import org.elasticsearch.client.benchmark.metrics.SampleRecorder; +import org.opensearch.client.benchmark.metrics.SampleRecorder; public interface BenchmarkTask { void setUp(SampleRecorder sampleRecorder) throws Exception; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Metrics.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Metrics.java similarity index 97% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Metrics.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Metrics.java index e099c531db1..66f62de95d4 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Metrics.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Metrics.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.metrics; +package org.opensearch.client.benchmark.metrics; public final class Metrics { public final String operation; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/MetricsCalculator.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/MetricsCalculator.java similarity index 98% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/MetricsCalculator.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/MetricsCalculator.java index a0be3d901d3..20a17346113 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/MetricsCalculator.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/MetricsCalculator.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.metrics; +package org.opensearch.client.benchmark.metrics; import org.apache.commons.math3.stat.StatUtils; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Sample.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Sample.java similarity index 97% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Sample.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Sample.java index 114baa55334..70a1d4c4d4a 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/Sample.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/Sample.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.metrics; +package org.opensearch.client.benchmark.metrics; public final class Sample { private final String operation; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/SampleRecorder.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/SampleRecorder.java similarity index 96% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/SampleRecorder.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/SampleRecorder.java index 63e1627f045..39bfaea97aa 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/metrics/SampleRecorder.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/metrics/SampleRecorder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.metrics; +package org.opensearch.client.benchmark.metrics; import java.util.ArrayList; import java.util.Collections; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java similarity index 96% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java index a875d2ec1e9..c81ea7344a5 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkBenchmarkTask.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.ops.bulk; +package org.opensearch.client.benchmark.ops.bulk; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import org.elasticsearch.OpenSearchException; -import org.elasticsearch.client.benchmark.BenchmarkTask; -import org.elasticsearch.client.benchmark.metrics.Sample; -import org.elasticsearch.client.benchmark.metrics.SampleRecorder; +import org.opensearch.client.benchmark.BenchmarkTask; +import org.opensearch.client.benchmark.metrics.Sample; +import org.opensearch.client.benchmark.metrics.SampleRecorder; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkRequestExecutor.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkRequestExecutor.java similarity index 94% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkRequestExecutor.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkRequestExecutor.java index be95153132f..f24ce67525e 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/bulk/BulkRequestExecutor.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/bulk/BulkRequestExecutor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.ops.bulk; +package org.opensearch.client.benchmark.ops.bulk; import java.util.List; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchBenchmarkTask.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchBenchmarkTask.java similarity index 92% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchBenchmarkTask.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchBenchmarkTask.java index 4f370a520af..6bab0177087 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchBenchmarkTask.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchBenchmarkTask.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.ops.search; +package org.opensearch.client.benchmark.ops.search; -import org.elasticsearch.client.benchmark.BenchmarkTask; -import org.elasticsearch.client.benchmark.metrics.Sample; -import org.elasticsearch.client.benchmark.metrics.SampleRecorder; +import org.opensearch.client.benchmark.BenchmarkTask; +import org.opensearch.client.benchmark.metrics.Sample; +import org.opensearch.client.benchmark.metrics.SampleRecorder; import java.util.concurrent.TimeUnit; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchRequestExecutor.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchRequestExecutor.java similarity index 94% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchRequestExecutor.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchRequestExecutor.java index abdfecf73c6..82c0c620110 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/ops/search/SearchRequestExecutor.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/ops/search/SearchRequestExecutor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.ops.search; +package org.opensearch.client.benchmark.ops.search; public interface SearchRequestExecutor { boolean search(String source); diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/rest/RestClientBenchmark.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/rest/RestClientBenchmark.java similarity index 94% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/rest/RestClientBenchmark.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/rest/RestClientBenchmark.java index 4700e178521..7e8ff42f899 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/rest/RestClientBenchmark.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/rest/RestClientBenchmark.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.rest; +package org.opensearch.client.benchmark.rest; import org.apache.http.HttpHeaders; import org.apache.http.HttpHost; @@ -26,9 +26,9 @@ import org.elasticsearch.OpenSearchException; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.RestClient; -import org.elasticsearch.client.benchmark.AbstractBenchmark; -import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor; -import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor; +import org.opensearch.client.benchmark.AbstractBenchmark; +import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor; +import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor; import java.io.IOException; import java.util.Collections; diff --git a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/transport/TransportClientBenchmark.java b/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java similarity index 95% rename from client/benchmark/src/main/java/org/elasticsearch/client/benchmark/transport/TransportClientBenchmark.java rename to client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java index 57700e792d1..fdf31394ea4 100644 --- a/client/benchmark/src/main/java/org/elasticsearch/client/benchmark/transport/TransportClientBenchmark.java +++ b/client/benchmark/src/main/java/org/opensearch/client/benchmark/transport/TransportClientBenchmark.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.benchmark.transport; +package org.opensearch.client.benchmark.transport; import org.elasticsearch.OpenSearchException; import org.elasticsearch.action.bulk.BulkRequest; @@ -24,9 +24,9 @@ import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.benchmark.AbstractBenchmark; -import org.elasticsearch.client.benchmark.ops.bulk.BulkRequestExecutor; -import org.elasticsearch.client.benchmark.ops.search.SearchRequestExecutor; +import org.opensearch.client.benchmark.AbstractBenchmark; +import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor; +import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress;