From 170476f5599e778e27b84d0a02fcd047b6e70d25 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 12:53:04 +0200 Subject: [PATCH 01/21] RemoveUnusedPrivateMethods --- build.gradle | 47 ++++++++++-- gradle.properties | 2 + gradle/formatting.gradle | 3 - gradle/rewrite.gradle | 74 +++++++++++++++++++ gradle/rewrite.yml | 13 ++++ .../task/commons/clients/TaskListRequest.java | 10 --- .../tier/TieredSpilloverCacheTests.java | 11 --- .../documentation/ReindexDocumentationIT.java | 1 - .../flight/bootstrap/FlightClientManager.java | 5 -- .../store/disk/EhCacheDiskCacheTests.java | 29 -------- .../shiro/ShiroIdentityPluginTests.java | 1 - ...ardOperationFailedExceptionProtoUtils.java | 2 - ...ardOperationFailedExceptionProtoUtils.java | 2 - .../decider/DiskThresholdDeciderIT.java | 6 -- .../RemoteIndexPrimaryRelocationIT.java | 2 - .../remotestore/RemoteIndexRecoveryIT.java | 1 - .../RemoteStoreClusterStateRestoreIT.java | 4 - ...tReplicationWithRemoteStorePressureIT.java | 2 - .../search/searchafter/SearchAfterIT.java | 24 ------ .../snapshots/DeleteSnapshotIT.java | 1 - .../RemoteIndexSnapshotStatusApiIT.java | 1 - .../snapshots/SystemRepositoryIT.java | 2 - .../cluster/node/info/NodesInfoRequest.java | 13 ---- .../cluster/node/stats/NodesStatsRequest.java | 11 --- .../action/index/MappingUpdatedAction.java | 15 ---- .../allocator/BalancedShardsAllocator.java | 1 - .../io/VersionedCodecStreamWrapper.java | 10 --- .../org/opensearch/env/NodeEnvironment.java | 12 --- .../gateway/ShardsBatchGatewayAllocator.java | 12 --- .../remote/RemoteClusterStateService.java | 23 ------ .../startree/builder/BaseStarTreeBuilder.java | 12 --- .../remote/RemoteStorePressureSettings.java | 4 - .../snapshots/SnapshotShardsService.java | 11 --- .../opensearch/transport/TransportLogger.java | 14 ---- .../cluster/node/DiscoveryNodesTests.java | 14 ---- .../allocation/BalanceConfigurationTests.java | 23 ------ .../RemoteShardsBalancerBaseTestCase.java | 8 -- .../RemoteShardsRebalanceShardsTests.java | 12 --- ...eStoreMigrationAllocationDeciderTests.java | 4 - .../RemoteRoutingTableServiceTests.java | 9 --- .../PrimaryShardBatchAllocatorTests.java | 7 -- .../RemoteClusterStateServiceTests.java | 24 ------ .../StarTreeBuilderMergeFlowTests.java | 41 ---------- .../RestCatSegmentReplicationActionTests.java | 5 -- .../DerivedFieldFetchAndHighlightTests.java | 15 ---- .../search/geo/GeoShapeQueryTests.java | 2 - .../blobstore/BlobStoreTestUtil.java | 22 ------ .../test/rest/OpenSearchRestTestCase.java | 24 ------ 48 files changed, 128 insertions(+), 463 deletions(-) create mode 100644 gradle/rewrite.gradle create mode 100644 gradle/rewrite.yml diff --git a/build.gradle b/build.gradle index c4c2b0a3f5407..10a6f521c41e9 100644 --- a/build.gradle +++ b/build.gradle @@ -28,25 +28,22 @@ * under the License. */ -import java.nio.charset.StandardCharsets; -import java.io.ByteArrayOutputStream; import com.avast.gradle.dockercompose.tasks.ComposePull import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin import org.apache.tools.ant.taskdefs.condition.Os +import org.gradle.plugins.ide.eclipse.model.AccessRule +import org.gradle.plugins.ide.eclipse.model.SourceFolder import org.opensearch.gradle.BuildPlugin +import org.opensearch.gradle.CheckCompatibilityTask import org.opensearch.gradle.Version import org.opensearch.gradle.VersionProperties import org.opensearch.gradle.info.BuildParams import org.opensearch.gradle.plugin.PluginBuildPlugin import org.opensearch.gradle.tar.SymbolicLinkPreservingTar -import org.gradle.plugins.ide.eclipse.model.AccessRule -import org.gradle.plugins.ide.eclipse.model.EclipseJdt -import org.gradle.plugins.ide.eclipse.model.SourceFolder -import org.gradle.api.Project; -import org.gradle.process.ExecResult; -import org.opensearch.gradle.CheckCompatibilityTask + +import java.nio.charset.StandardCharsets import static org.opensearch.gradle.util.GradleUtils.maybeConfigure @@ -55,6 +52,7 @@ plugins { id 'opensearch.docker-support' id 'opensearch.global-build-info' id "com.diffplug.spotless" version "6.25.0" apply false + id "org.openrewrite.rewrite" version "7.11.0" apply false id "org.gradle.test-retry" version "1.6.2" apply false id "test-report-aggregation" id 'jacoco-report-aggregation' @@ -65,6 +63,7 @@ apply from: 'gradle/runtime-jdk-provision.gradle' apply from: 'gradle/ide.gradle' apply from: 'gradle/forbidden-dependencies.gradle' apply from: 'gradle/formatting.gradle' +apply from: 'gradle/rewrite.gradle' apply from: 'gradle/local-distribution.gradle' apply from: 'gradle/run.gradle' apply from: 'gradle/missing-javadoc.gradle' @@ -76,7 +75,39 @@ allprojects { version = VersionProperties.getOpenSearch() description = "OpenSearch subproject ${project.path}" } +allprojects { + configurations.all { + resolutionStrategy { + // Force specific versions for conflicting dependencies + force( + 'org.jetbrains:annotations:26.0.2', + 'org.apache.commons:commons-text:1.13.1', + 'com.fasterxml.jackson:jackson-bom:2.17.3', + 'org.ow2.asm:asm:9.8', + 'org.ow2.asm:asm-util:9.8', + 'org.ow2.asm:asm-tree:9.8', + 'org.openrewrite.recipe:rewrite-java-dependencies:1.37.0', // Add this + 'com.google.errorprone:error_prone_annotations:2.36.0' // Add this (using the higher version) + ) + // Prefer newer versions for Jackson modules + eachDependency { details -> + if (details.requested.group.startsWith('com.fasterxml.jackson')) { + details.useVersion '2.17.3' + } + // Add these additional rules if needed + if (details.requested.group == 'org.openrewrite.recipe' && + details.requested.name == 'rewrite-java-dependencies') { + details.useVersion '1.37.0' + } + if (details.requested.group == 'com.google.errorprone' && + details.requested.name == 'error_prone_annotations') { + details.useVersion '2.36.0' + } + } + } + } +} configure(allprojects - project(':distribution:archives:integ-test-zip')) { project.pluginManager.withPlugin('nebula.maven-base-publish') { if (project.pluginManager.hasPlugin('opensearch.build') == false) { diff --git a/gradle.properties b/gradle.properties index 47c3efdfbd2a0..f4be5224d4cd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,8 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true +# https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 +org.gradle.workers.max=2 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ diff --git a/gradle/formatting.gradle b/gradle/formatting.gradle index 45d63fd43e875..ad8b1725244e0 100644 --- a/gradle/formatting.gradle +++ b/gradle/formatting.gradle @@ -65,7 +65,6 @@ allprojects { // non-standard places target '**/*.java' - removeUnusedImports() importOrder( 'de.thetaphi', 'com.carrotsearch', @@ -83,7 +82,6 @@ allprojects { ) eclipse().withP2Mirrors(Map.of("https://download.eclipse.org/", "https://mirror.umd.edu/eclipse/")).configFile rootProject.file('buildSrc/formatterConfig.xml') - trimTrailingWhitespace() endWithNewline() custom 'Refuse wildcard imports', { @@ -103,7 +101,6 @@ allprojects { targetExclude '**/simple-bulk11.json', '**/simple-msearch5.json' - trimTrailingWhitespace() endWithNewline() } } diff --git a/gradle/rewrite.gradle b/gradle/rewrite.gradle new file mode 100644 index 0000000000000..bdc5fb8379f41 --- /dev/null +++ b/gradle/rewrite.gradle @@ -0,0 +1,74 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.opensearch.gradle.BuildPlugin + +/** + * # - org.openrewrite.staticanalysis.ModifierOrder + # + # - org.openrewrite.java.format.RemoveTrailingWhitespace + # - org.openrewrite.java.recipes.JavaRecipeBestPractices + # - org.openrewrite.java.recipes.RecipeNullabilityBestPractices + # - org.openrewrite.java.recipes.RecipeTestingBestPractices + # - org.openrewrite.staticanalysis.EqualsAvoidsNull + # - org.openrewrite.staticanalysis.JavaApiBestPractices + # - org.openrewrite.staticanalysis.MissingOverrideAnnotation + # - org.openrewrite.staticanalysis.RemoveUnusedLocalVariables + # - org.openrewrite.staticanalysis.RemoveUnusedPrivateFields + # - org.openrewrite.staticanalysis.StringLiteralEquality + # - org.openrewrite.staticanalysis.WrappingAndBraces + # - org.openrewrite.text.EndOfLineAtEndOfFile + */ +allprojects { + plugins.withType(BuildPlugin).whenPluginAdded { + project.apply plugin: "org.openrewrite.rewrite" + rewrite { + activeRecipe("org.opensearch.openrewrite.recipe.CodeCleanup") + configFile = file("$rootDir/gradle/rewrite.yml") + exclusions.add("**OpenSearchTestCaseTests.java") + exclusions.add("**AbstractBenchmark.java") + exclusions.add("**ScriptClassPathResolutionContext.java") + exclusions.add("**StarTreeMapper.java") + failOnDryRunResults = true + } + repositories { + mavenCentral() + } + dependencies { + rewrite("org.openrewrite.recipe:rewrite-rewrite:0.9.0") + rewrite("org.openrewrite.recipe:rewrite-static-analysis:2.12.0") + } + tasks { + rewriteDryRun { + dependsOn(check) + } + } + } +} diff --git a/gradle/rewrite.yml b/gradle/rewrite.yml new file mode 100644 index 0000000000000..2a726b4917eb6 --- /dev/null +++ b/gradle/rewrite.yml @@ -0,0 +1,13 @@ +type: specs.openrewrite.org/v1beta/recipe +name: org.opensearch.openrewrite.recipe.CodeCleanup +displayName: CodeCleanup +description: Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions. +recipeList: + - org.openrewrite.java.RemoveUnusedImports + - org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods +# - org.openrewrite.java.format.RemoveTrailingWhitespace +# - org.openrewrite.staticanalysis.EmptyBlock +# - org.openrewrite.staticanalysis.RemoveCallsToSystemGc +# - org.openrewrite.staticanalysis.RemoveUnusedLocalVariables +# - org.openrewrite.staticanalysis.RemoveUnusedPrivateFields +# - org.openrewrite.staticanalysis.UnnecessaryThrows diff --git a/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java b/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java index 625e15dfb3b6d..64c414a20867c 100644 --- a/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java +++ b/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java @@ -71,16 +71,6 @@ public TaskListRequest taskType(TaskStatus... taskStatus) { return this; } - /** - * Update worker node to filter with in the request - * @param workerNode WorkerNode - * @return ListTaskRequest - */ - private TaskListRequest workerNode(WorkerNode workerNode) { - this.workerNodes = workerNode; - return this; - } - /** * Update page number to start with when fetching the list of tasks * @param startPageNumber startPageNumber diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java index 2dc115b73c378..eb7f46e648516 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java @@ -2600,17 +2600,6 @@ private TieredSpilloverCache getTieredSpilloverCache( return builder.build(); } - private TieredSpilloverCache initializeTieredSpilloverCache( - int keyValueSize, - int diskCacheSize, - RemovalListener, String> removalListener, - Settings settings, - long diskDeliberateDelay - - ) { - return initializeTieredSpilloverCache(keyValueSize, diskCacheSize, removalListener, settings, diskDeliberateDelay, null, 256); - } - private TieredSpilloverCache initializeTieredSpilloverCache( int keyValueSize, int diskCacheSize, diff --git a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java index 9bc97d0213e73..288b7e370c647 100644 --- a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java +++ b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java @@ -61,7 +61,6 @@ import org.opensearch.tasks.TaskInfo; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.transport.client.Client; -import org.hamcrest.Matcher; import org.junit.Before; import java.util.Arrays; diff --git a/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java b/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java index c81f4d3c270e7..6fb320aba0334 100644 --- a/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java +++ b/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java @@ -35,7 +35,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -247,10 +246,6 @@ private static boolean isValidNode(DiscoveryNode node) { return node != null && !node.getVersion().before(MIN_SUPPORTED_VERSION) && FeatureFlags.isEnabled(ARROW_STREAMS_SETTING); } - private Set getCurrentClusterNodes() { - return Objects.requireNonNull(clientConfig.clusterService).state().nodes().getNodes().keySet(); - } - @VisibleForTesting Map getFlightClients() { return flightClients; diff --git a/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java b/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java index 3b3c5fd82f87f..b7428a69704aa 100644 --- a/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java +++ b/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java @@ -1264,35 +1264,6 @@ PersistentCacheManager buildCacheManager() { } } - private EhcacheDiskCache.Builder createDummyBuilder(String storagePath) throws IOException { - Settings settings = Settings.builder().build(); - MockRemovalListener removalListener = new MockRemovalListener<>(); - ToLongBiFunction, String> weigher = getWeigher(); - try (NodeEnvironment env = newNodeEnvironment(settings)) { - if (storagePath == null || storagePath.isBlank()) { - storagePath = env.nodePaths()[0].path.toString() + "/request_cache"; - } - return (EhcacheDiskCache.Builder) new EhcacheDiskCache.Builder().setThreadPoolAlias( - "ehcacheTest" - ) - .setIsEventListenerModeSync(true) - .setStoragePath(storagePath) - .setKeyType(String.class) - .setValueType(String.class) - .setKeySerializer(new StringSerializer()) - .setDiskCacheAlias("test1") - .setValueSerializer(new StringSerializer()) - .setDimensionNames(List.of(dimensionName)) - .setCacheType(CacheType.INDICES_REQUEST_CACHE) - .setSettings(settings) - .setExpireAfterAccess(TimeValue.MAX_VALUE) - .setMaximumWeightInBytes(CACHE_SIZE_IN_BYTES) - .setRemovalListener(removalListener) - .setWeigher(weigher) - .setStatsTrackingEnabled(false); - } - } - private List getRandomDimensions(List dimensionNames) { Random rand = Randomness.get(); int bound = 3; diff --git a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java index a15538e48bd66..e89737ae6adb7 100644 --- a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java +++ b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java @@ -17,7 +17,6 @@ import java.util.List; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThrows; diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java index 929eb3b19d646..bdabec9dc28a0 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java @@ -8,8 +8,6 @@ package org.opensearch.plugin.transport.grpc.proto.response.exceptions; import org.opensearch.core.action.ShardOperationFailedException; -import org.opensearch.core.xcontent.ToXContent; -import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ObjectMap; /** diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java index c5a26930d9300..40edb78374579 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java @@ -11,8 +11,6 @@ import org.opensearch.action.support.replication.ReplicationResponse; import org.opensearch.core.action.ShardOperationFailedException; import org.opensearch.core.action.support.DefaultShardOperationFailedException; -import org.opensearch.core.xcontent.ToXContent; -import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ShardFailure; import org.opensearch.snapshots.SnapshotShardFailure; diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java index 912c48d7bbdfe..f428eeace7410 100644 --- a/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java @@ -503,12 +503,6 @@ public void testDiskMonitorResetLastRuntimeMilliSecOnlyInFirstCall() throws Exce }, 30L, TimeUnit.SECONDS); } - private String populateNode(final String dataNodeName) throws Exception { - final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT); - createAndPopulateIndex(indexName, dataNodeName); - return indexName; - } - private void createIndex(String indexName, String nodeName, boolean isWarmIndex) throws Exception { final Settings.Builder indexSettingBuilder = Settings.builder() .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0) diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java index 67316ed0e6e6b..b518cc7f7bab6 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java @@ -16,8 +16,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexPrimaryRelocationIT extends IndexPrimaryRelocationIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java index 1961b0fa43705..0f0bbe7dcab4b 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java @@ -26,7 +26,6 @@ import java.nio.file.Path; import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_CHUNK_SIZE_SETTING; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexRecoveryIT extends IndexRecoveryIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java index e2fada2e3496c..69e45e41bd843 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java @@ -83,10 +83,6 @@ protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), true).build(); } - private void addNewNodes(int dataNodeCount, int clusterManagerNodeCount) { - internalCluster().startNodes(dataNodeCount + clusterManagerNodeCount); - } - private Map initialTestSetup(int shardCount, int replicaCount, int dataNodeCount, int clusterManagerNodeCount) { prepareCluster(clusterManagerNodeCount, dataNodeCount, INDEX_NAME, replicaCount, shardCount); Map indexStats = indexData(1, false, INDEX_NAME); diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java index 6cfc76b7e3223..ab133c28e1ef7 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java @@ -16,8 +16,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - /** * This class executes the SegmentReplicationPressureIT suite with remote store integration enabled. */ diff --git a/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java index 89c73d2e59485..3f8e14d116a73 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java @@ -398,28 +398,4 @@ private void createIndexMappingsFromObjectType(String indexName, List ty indexRequestBuilder.setMapping(mappings.toArray(new String[0])).get(); ensureGreen(); } - - // Convert Integer, Short, Byte and Boolean to Int in order to match the conversion done - // by the internal hits when populating the sort values. - private List convertSortValues(List sortValues) { - List converted = new ArrayList<>(); - for (int i = 0; i < sortValues.size(); i++) { - Object from = sortValues.get(i); - if (from instanceof Short) { - converted.add(((Short) from).intValue()); - } else if (from instanceof Byte) { - converted.add(((Byte) from).intValue()); - } else if (from instanceof Boolean) { - boolean b = (boolean) from; - if (b) { - converted.add(1); - } else { - converted.add(0); - } - } else { - converted.add(from); - } - } - return converted; - } } diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java index ee4622a7d0f40..6894b4c7f3654 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java @@ -35,7 +35,6 @@ import static org.opensearch.index.remote.RemoteStoreEnums.DataCategory.SEGMENTS; import static org.opensearch.index.remote.RemoteStoreEnums.DataType.LOCK_FILES; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.comparesEqualTo; import static org.hamcrest.Matchers.is; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java index e84de36df2fca..60dc20aeceac8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java @@ -51,7 +51,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.snapshots.SnapshotsService.MAX_SHARDS_ALLOWED_IN_STATUS_API; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java index bb5cc89d4e1d5..cb2a408877013 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java @@ -17,8 +17,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class SystemRepositoryIT extends AbstractSnapshotIntegTestCase { protected Path absolutePath; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java index 17b633c533218..b95ad18471d0e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java @@ -146,19 +146,6 @@ public NodesInfoRequest removeMetric(String metric) { return this; } - /** - * Helper method for adding and removing metrics. Used when deserializing - * a NodesInfoRequest from an ordered list of booleans. - * - * @param addMetric Whether or not to include a metric. - * @param metricName Name of the metric to include or remove. - */ - private void optionallyAddMetric(boolean addMetric, String metricName) { - if (addMetric) { - requestedMetrics.add(metricName); - } - } - @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java index db45d19dcdcb0..2392f28e6bbcb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java @@ -172,17 +172,6 @@ public NodesStatsRequest removeMetric(String metric) { return this; } - /** - * Helper method for adding metrics during deserialization. - * @param includeMetric Whether or not to include a metric. - * @param metricName Name of the metric to add. - */ - private void optionallyAddMetric(boolean includeMetric, String metricName) { - if (includeMetric) { - requestedMetrics.add(metricName); - } - } - @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); diff --git a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java index 2caea2a8431a4..438597030c5ca 100644 --- a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java @@ -32,7 +32,6 @@ package org.opensearch.cluster.action.index; -import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.mapping.put.AutoPutMappingAction; import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest; import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; @@ -44,7 +43,6 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.RunOnce; -import org.opensearch.common.util.concurrent.UncategorizedExecutionException; import org.opensearch.core.action.ActionListener; import org.opensearch.core.index.Index; import org.opensearch.core.xcontent.MediaTypeRegistry; @@ -150,19 +148,6 @@ protected void sendUpdateMapping(Index index, Mapping mappingUpdate, ActionListe ); } - // todo: this explicit unwrap should not be necessary, but is until guessRootCause is fixed to allow wrapped non-es exception. - private static Exception unwrapException(Exception cause) { - return cause instanceof OpenSearchException ? unwrapEsException((OpenSearchException) cause) : cause; - } - - private static RuntimeException unwrapEsException(OpenSearchException esEx) { - Throwable root = esEx.unwrapCause(); - if (root instanceof RuntimeException) { - return (RuntimeException) root; - } - return new UncategorizedExecutionException("Failed execution", root); - } - /** * An adjustable semaphore * diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index bd5b694f4fe41..42218310a3a12 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -66,7 +66,6 @@ import java.util.Map; import java.util.Set; -import static org.opensearch.cluster.action.shard.ShardStateAction.FOLLOW_UP_REROUTE_PRIORITY_SETTING; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_REBALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.INDEX_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; diff --git a/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java b/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java index b62ae1f1d3956..c2efb897f8749 100644 --- a/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java +++ b/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java @@ -13,7 +13,6 @@ import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.codecs.CodecUtil; import org.apache.lucene.index.CorruptIndexException; -import org.apache.lucene.store.ChecksumIndexInput; import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexOutput; @@ -97,15 +96,6 @@ private int checkHeader(IndexInput indexInput) throws IOException { return CodecUtil.checkHeader(indexInput, this.codec, minVersion, this.currentVersion); } - /** - * Reads footer from file input stream containing checksum. - * The {@link IndexInput#getFilePointer()} should be at the footer start position. - * @param indexInput file input stream - */ - private void checkFooter(ChecksumIndexInput indexInput) throws IOException { - CodecUtil.checkFooter(indexInput); - } - /** * Writes header with {@code this.codec} and {@code this.currentVersion} to the file output stream * @param indexOutput file output stream diff --git a/server/src/main/java/org/opensearch/env/NodeEnvironment.java b/server/src/main/java/org/opensearch/env/NodeEnvironment.java index 4e284f1fe5c3e..a6e6679b9e272 100644 --- a/server/src/main/java/org/opensearch/env/NodeEnvironment.java +++ b/server/src/main/java/org/opensearch/env/NodeEnvironment.java @@ -677,18 +677,6 @@ public void deleteIndexDirectoryUnderLock(Index index, IndexSettings indexSettin } } - private void deleteIndexFileCacheDirectory(Index index) { - final Path indexCachePath = fileCacheNodePath().fileCachePath.resolve(index.getUUID()); - logger.trace("deleting index {} file cache directory, path: [{}]", index, indexCachePath); - if (Files.exists(indexCachePath)) { - try { - IOUtils.rm(indexCachePath); - } catch (IOException e) { - logger.error(() -> new ParameterizedMessage("Failed to delete cache path for index {}", index), e); - } - } - } - /** * Tries to lock all local shards for the given index. If any of the shard locks can't be acquired * a {@link ShardLockObtainFailedException} is thrown and all previously acquired locks are released. diff --git a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java index ce14cb3442f75..d72716a461389 100644 --- a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java +++ b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java @@ -43,7 +43,6 @@ import org.opensearch.indices.store.ShardAttributes; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata; -import org.opensearch.indices.store.TransportNodesListShardStoreMetadataHelper; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataHelper.StoreFilesMetadata; import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry; @@ -838,17 +837,6 @@ protected void removeShard(ShardId shardId) { this.batchInfo.remove(shardId); } - private TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata buildEmptyReplicaShardResponse() { - return new TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata( - new TransportNodesListShardStoreMetadataHelper.StoreFilesMetadata( - null, - Store.MetadataSnapshot.EMPTY, - Collections.emptyList() - ), - null - ); - } - private void removeFromBatch(ShardRouting shard) { removeShard(shard.shardId()); clearShardFromCache(shard.shardId()); diff --git a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java index c68cce4034716..943f5becc528a 100644 --- a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java +++ b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java @@ -1948,13 +1948,6 @@ public void setRemoteStateReadTimeout(TimeValue remoteStateReadTimeout) { this.remoteStateReadTimeout = remoteStateReadTimeout; } - private BlobStoreTransferService getBlobStoreTransferService() { - if (blobStoreTransferService == null) { - blobStoreTransferService = new BlobStoreTransferService(getBlobStore(), threadpool); - } - return blobStoreTransferService; - } - Set getAllClusterUUIDs(String clusterName) throws IOException { Map clusterUUIDMetadata = clusterUUIDContainer(blobStoreRepository, clusterName).children(); if (clusterUUIDMetadata == null) { @@ -1963,22 +1956,6 @@ Set getAllClusterUUIDs(String clusterName) throws IOException { return Collections.unmodifiableSet(clusterUUIDMetadata.keySet()); } - private Map getLatestManifestForAllClusterUUIDs(String clusterName, Set clusterUUIDs) { - Map manifestsByClusterUUID = new HashMap<>(); - for (String clusterUUID : clusterUUIDs) { - try { - Optional manifest = getLatestClusterMetadataManifest(clusterName, clusterUUID); - manifest.ifPresent(clusterMetadataManifest -> manifestsByClusterUUID.put(clusterUUID, clusterMetadataManifest)); - } catch (Exception e) { - throw new IllegalStateException( - String.format(Locale.ROOT, "Exception in fetching manifest for clusterUUID: %s", clusterUUID), - e - ); - } - } - return manifestsByClusterUUID; - } - /** * This method creates a valid cluster UUID chain. * diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java index 3db3cbe9652fc..c39e83cb29687 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java @@ -1102,18 +1102,6 @@ private StarTreeDocument createAggregatedDocs(InMemoryTreeNode node) throws IOEx return aggregatedStarTreeDocument; } - /** - * Handles the dimension of date time field type - * - * @param fieldName name of the field - * @param val value of the field - * @return returns the converted dimension of the field to a particular granularity - */ - private long handleDateDimension(final String fieldName, final long val) { - // TODO: handle timestamp granularity - return val; - } - public void close() throws IOException { } diff --git a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java index e66aa3444c214..504903b737e7c 100644 --- a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java +++ b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java @@ -101,10 +101,6 @@ long getMinRefreshSeqNoLagLimit() { return minRefreshSeqNoLagLimit; } - private void setMinRefreshSeqNoLagLimit(long minRefreshSeqNoLagLimit) { - this.minRefreshSeqNoLagLimit = minRefreshSeqNoLagLimit; - } - double getBytesLagVarianceFactor() { return bytesLagVarianceFactor; } diff --git a/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java b/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java index 1e2264593310d..06a555790ddb0 100644 --- a/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java +++ b/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java @@ -322,17 +322,6 @@ public void onFailure(Exception e) { }); } - private boolean isRemoteSnapshot(ShardId shardId) { - final IndexService indexService = indicesService.indexService(shardId.getIndex()); - if (indexService != null) { - final IndexShard shard = indexService.getShardOrNull(shardId.id()); - if (shard != null) { - return shard.isRemoteSnapshot(); - } - } - return false; - } - // package private for testing static String summarizeFailure(Throwable t) { if (t.getCause() == null) { diff --git a/server/src/main/java/org/opensearch/transport/TransportLogger.java b/server/src/main/java/org/opensearch/transport/TransportLogger.java index 997b3bb5ba18e..ead31c49b2092 100644 --- a/server/src/main/java/org/opensearch/transport/TransportLogger.java +++ b/server/src/main/java/org/opensearch/transport/TransportLogger.java @@ -37,9 +37,7 @@ import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.io.IOUtils; import org.opensearch.core.common.bytes.BytesReference; -import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.StreamInput; -import org.opensearch.core.compress.CompressorRegistry; import java.io.IOException; @@ -175,16 +173,4 @@ private static String format(TcpChannel channel, InboundMessage message, String } return sb.toString(); } - - private static StreamInput decompressingStream(byte status, StreamInput streamInput) throws IOException { - if (TransportStatus.isCompress(status) && streamInput.available() > 0) { - try { - return new InputStreamStreamInput(CompressorRegistry.defaultCompressor().threadLocalInputStream(streamInput)); - } catch (IllegalArgumentException e) { - throw new IllegalStateException("stream marked as compressed, but is missing deflate header"); - } - } else { - return streamInput; - } - } } diff --git a/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java b/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java index ceb0c6f1c675b..919c909578076 100644 --- a/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java +++ b/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java @@ -521,18 +521,4 @@ public void testMaxMinNodeVersion() { assertEquals(Version.fromString("1.1.0"), build.getMaxNodeVersion()); assertEquals(Version.fromString("5.1.0"), build.getMinNodeVersion()); } - - private DiscoveryNode buildDiscoveryNodeFromExisting(DiscoveryNode existing, Version newVersion) { - return new DiscoveryNode( - existing.getName(), - existing.getId(), - existing.getEphemeralId(), - existing.getHostName(), - existing.getHostAddress(), - existing.getAddress(), - existing.getAttributes(), - existing.getRoles(), - newVersion - ); - } } diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java index 11cbe89645657..77b924550821f 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java @@ -619,29 +619,6 @@ private void verifyPerIndexPrimaryBalance(ClusterState currentState) { } } - private void verifySkewedPrimaryBalance(ClusterState clusterState, int delta) throws Exception { - assertBusy(() -> { - RoutingNodes nodes = clusterState.getRoutingNodes(); - int totalPrimaryShards = 0; - for (final IndexRoutingTable index : clusterState.getRoutingTable().indicesRouting().values()) { - totalPrimaryShards += index.primaryShardsActive(); - } - final int avgPrimaryShardsPerNode = (int) Math.ceil(totalPrimaryShards * 1f / clusterState.getRoutingNodes().size()); - int maxPrimaryShardOnNode = Integer.MIN_VALUE; - int minPrimaryShardOnNode = Integer.MAX_VALUE; - for (RoutingNode node : nodes) { - final int primaryCount = node.shardsWithState(STARTED) - .stream() - .filter(ShardRouting::primary) - .collect(Collectors.toList()) - .size(); - maxPrimaryShardOnNode = Math.max(maxPrimaryShardOnNode, primaryCount); - minPrimaryShardOnNode = Math.min(minPrimaryShardOnNode, primaryCount); - } - assertTrue(maxPrimaryShardOnNode - minPrimaryShardOnNode < delta); - }, 60, TimeUnit.SECONDS); - } - private void verifyPrimaryBalance(ClusterState clusterState, float buffer) throws Exception { assertBusy(() -> { RoutingNodes nodes = clusterState.getRoutingNodes(); diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java index cfdaaab4e117d..2b07d711e2e9b 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java @@ -194,14 +194,6 @@ protected ClusterState createRemoteIndex(ClusterState state, String indexName) { return ClusterState.builder(state).metadata(metadata).routingTable(routingTable).build(); } - private AllocationDeciders remoteAllocationDeciders(Settings settings, ClusterSettings clusterSettings) { - List deciders = new ArrayList<>( - ClusterModule.createAllocationDeciders(settings, clusterSettings, Collections.emptyList()) - ); - Collections.shuffle(deciders, random()); - return new AllocationDeciders(deciders); - } - public AllocationService createRemoteCapableAllocationService() { Settings settings = Settings.Builder.EMPTY_SETTINGS; return new OpenSearchAllocationTestCase.MockAllocationService( diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java index e55a9de160114..824d15030f052 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java @@ -95,16 +95,4 @@ private int getTotalShardCountAcrossNodes(final Map nodePrimari } return totalShardCount; } - - /** - * Asserts that the expected value is within the variance range. - *

- * Being used to assert the average number of shards per node. - * Variance is required in case of non-absolute mean values; - * for example, total number of remote capable nodes in a cluster. - */ - private void assertInRange(int actual, int expectedMean, int variance) { - assertTrue(actual >= expectedMean - variance); - assertTrue(actual <= expectedMean + variance); - } } diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java index e6e81c94e7f32..131beda510beb 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java @@ -583,10 +583,6 @@ private Settings getCustomSettings(String direction, String compatibilityMode, I return builder.build(); } - private String getRandomCompatibilityMode() { - return randomFrom(RemoteStoreNodeService.CompatibilityMode.STRICT.mode, RemoteStoreNodeService.CompatibilityMode.MIXED.mode); - } - private ClusterSettings getClusterSettings(Settings settings) { return new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); } diff --git a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java index 63501f878d55d..a8f5a87c53970 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java @@ -35,7 +35,6 @@ import org.opensearch.core.index.Index; import org.opensearch.gateway.remote.ClusterMetadataManifest; import org.opensearch.gateway.remote.RemoteClusterStateUtils; -import org.opensearch.index.remote.RemoteStoreEnums; import org.opensearch.index.remote.RemoteStorePathStrategy; import org.opensearch.index.remote.RemoteStoreUtils; import org.opensearch.index.translog.transfer.BlobStoreTransferService; @@ -776,14 +775,6 @@ private ClusterState createClusterState(String indexName) { .build(); } - private BlobPath getPath() { - BlobPath indexRoutingPath = basePath.add(INDEX_ROUTING_TABLE); - return RemoteStoreEnums.PathType.HASHED_PREFIX.path( - RemoteStorePathStrategy.PathInput.builder().basePath(indexRoutingPath).indexUUID("uuid").build(), - RemoteStoreEnums.PathHashAlgorithm.FNV_1A_BASE64 - ); - } - public void testDeleteStaleIndexRoutingPaths() throws IOException { doNothing().when(blobContainer).deleteBlobsIgnoringIfNotExists(any()); when(blobStore.blobContainer(any())).thenReturn(blobContainer); diff --git a/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java b/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java index 2edde8281b11a..9b91e51fab2f5 100644 --- a/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java +++ b/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java @@ -75,13 +75,6 @@ public void buildTestAllocator() { this.batchAllocator = new TestBatchAllocator(); } - private void allocateAllUnassigned(final RoutingAllocation allocation) { - final RoutingNodes.UnassignedShards.UnassignedIterator iterator = allocation.routingNodes().unassigned().iterator(); - while (iterator.hasNext()) { - batchAllocator.allocateUnassigned(iterator.next(), allocation, iterator); - } - } - private void allocateAllUnassignedBatch(final RoutingAllocation allocation) { final RoutingNodes.UnassignedShards.UnassignedIterator iterator = allocation.routingNodes().unassigned().iterator(); List shardsToBatch = new ArrayList<>(); diff --git a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java index d9de899bed529..930cb32ba668d 100644 --- a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java +++ b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java @@ -3919,30 +3919,6 @@ private void mockObjectsForGettingPreviousClusterUUID( when(blobStoreRepository.getCompressor()).thenReturn(compressor); } - private ClusterMetadataManifest generateV1ClusterMetadataManifest( - String clusterUUID, - String previousClusterUUID, - String stateUUID, - List uploadedIndexMetadata, - String globalMetadataFileName, - Boolean isUUIDCommitted - ) { - return ClusterMetadataManifest.builder() - .indices(uploadedIndexMetadata) - .clusterTerm(1L) - .stateVersion(1L) - .stateUUID(stateUUID) - .clusterUUID(clusterUUID) - .nodeId("nodeA") - .opensearchVersion(VersionUtils.randomOpenSearchVersion(random())) - .previousClusterUUID(previousClusterUUID) - .committed(true) - .clusterUUIDCommitted(isUUIDCommitted) - .globalMetadataFileName(globalMetadataFileName) - .codecVersion(CODEC_V1) - .build(); - } - private ClusterMetadataManifest generateClusterMetadataManifest( String clusterUUID, String previousClusterUUID, diff --git a/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java b/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java index d6def0b075128..2dd6189194abb 100644 --- a/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java +++ b/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java @@ -2306,47 +2306,6 @@ private StarTreeValues getStarTreeValuesWithKeywords( return starTreeValues; } - private StarTreeValues getStarTreeValuesWithKeywords( - SortedSetDocValues dimList, - SortedSetDocValues dimList2, - SortedSetDocValues dimList4, - SortedSetDocValues dimList3, - SortedNumericDocValues metricsList, - SortedNumericDocValues metricsList1, - StarTreeField sf, - String number - ) { - Map> dimDocIdSetIterators = Map.of( - "field1_minute", - () -> new SortedSetStarTreeValuesIterator(dimList), - "field1_half-hour", - () -> new SortedSetStarTreeValuesIterator(dimList4), - "field1_hour", - () -> new SortedSetStarTreeValuesIterator(dimList2), - "field3", - () -> new SortedSetStarTreeValuesIterator(dimList3) - ); - Map> metricDocIdSetIterators = new LinkedHashMap<>(); - - metricDocIdSetIterators.put( - fullyQualifiedFieldNameForStarTreeMetricsDocValues( - sf.getName(), - "field2", - sf.getMetrics().get(0).getMetrics().get(0).getTypeName() - ), - () -> new SortedNumericStarTreeValuesIterator(metricsList) - ); - metricDocIdSetIterators.put( - fullyQualifiedFieldNameForStarTreeMetricsDocValues( - sf.getName(), - "field2", - sf.getMetrics().get(0).getMetrics().get(1).getTypeName() - ), - () -> new SortedNumericStarTreeValuesIterator(metricsList1) - ); - return new StarTreeValues(sf, null, dimDocIdSetIterators, metricDocIdSetIterators, Map.of(SEGMENT_DOCS_COUNT, number), null); - } - private StarTreeValues getStarTreeValues( List dimList1, List docsWithField1, diff --git a/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java index 41ad9e8bcbb44..b3e3ad6a7ec76 100644 --- a/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java +++ b/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java @@ -31,7 +31,6 @@ import java.util.Date; import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.UUID; @@ -183,8 +182,4 @@ private void addTestFileMetadata(ReplicationLuceneIndex index, int startIndex, i } } } - - private static String percent(float percent) { - return String.format(Locale.ROOT, "%1.1f%%", percent); - } } diff --git a/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java b/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java index f106aaa13dc48..cb610a6139afc 100644 --- a/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java +++ b/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java @@ -26,13 +26,9 @@ import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.index.IndexService; import org.opensearch.index.IndexSettings; -import org.opensearch.index.mapper.ContentPath; import org.opensearch.index.mapper.DefaultDerivedFieldResolver; import org.opensearch.index.mapper.DerivedField; import org.opensearch.index.mapper.DerivedFieldResolverFactory; -import org.opensearch.index.mapper.DerivedFieldSupportedTypes; -import org.opensearch.index.mapper.DerivedFieldType; -import org.opensearch.index.mapper.Mapper; import org.opensearch.index.mapper.MapperService; import org.opensearch.index.mapper.SourceToParse; import org.opensearch.index.query.QueryShardContext; @@ -474,15 +470,4 @@ private static ScriptService getScriptService() { ScriptService scriptService = new ScriptService(Settings.EMPTY, engines, ScriptModule.CORE_CONTEXTS); return scriptService; } - - private DerivedFieldType createDerivedFieldType(String name, String type, String script) { - Mapper.BuilderContext context = mock(Mapper.BuilderContext.class); - when(context.path()).thenReturn(new ContentPath()); - return new DerivedFieldType( - new DerivedField(name, type, new Script(ScriptType.INLINE, "mockscript", script, emptyMap())), - DerivedFieldSupportedTypes.getFieldMapperFromType(type, name, context, null), - DerivedFieldSupportedTypes.getIndexableFieldGeneratorType(type, name), - null - ); - } } diff --git a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java index 4f78d9166b414..ea44910bb526a 100644 --- a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java +++ b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java @@ -78,12 +78,10 @@ import static org.opensearch.test.geo.RandomShapeGenerator.xRandomRectangle; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.not; -import static com.carrotsearch.randomizedtesting.RandomizedTest.assumeTrue; public class GeoShapeQueryTests extends GeoQueryTests { protected static final String[] PREFIX_TREES = new String[] { diff --git a/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java b/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java index 027b1bef84e7f..69d7b9f511bfd 100644 --- a/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java +++ b/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java @@ -59,14 +59,12 @@ import org.opensearch.core.xcontent.MediaTypeRegistry; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; -import org.opensearch.index.IndexModule; import org.opensearch.repositories.IndexId; import org.opensearch.repositories.RepositoriesService; import org.opensearch.repositories.RepositoryData; import org.opensearch.repositories.ShardGenerations; import org.opensearch.snapshots.SnapshotId; import org.opensearch.snapshots.SnapshotInfo; -import org.opensearch.snapshots.SnapshotMissingException; import org.opensearch.test.InternalTestCluster; import org.opensearch.threadpool.ThreadPool; @@ -470,24 +468,4 @@ private static ClusterService mockClusterService(ClusterState initialState) { when(clusterService.getClusterSettings()).thenReturn(clusterSettings); return clusterService; } - - private static boolean isRemoteSnapshot(BlobStoreRepository repository, RepositoryData repositoryData, IndexId indexId) - throws IOException { - final Collection snapshotIds = repositoryData.getSnapshotIds(); - for (SnapshotId snapshotId : snapshotIds) { - try { - if (isRemoteSnapshot(repository.getSnapshotIndexMetaData(repositoryData, snapshotId, indexId))) { - return true; - } - } catch (SnapshotMissingException e) { - // Index does not exist in this snapshot so continue looping - } - } - return false; - } - - private static boolean isRemoteSnapshot(IndexMetadata metadata) { - final String storeType = metadata.getSettings().get(IndexModule.INDEX_STORE_TYPE_SETTING.getKey()); - return storeType != null && storeType.equals(IndexModule.Type.REMOTE_SNAPSHOT.getSettingsKey()); - } } diff --git a/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java b/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java index 8c612d258f183..f03678ca4ca58 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java @@ -722,30 +722,6 @@ protected void refreshAllIndices() throws IOException { client().performRequest(refreshRequest); } - private static void deleteAllSLMPolicies() throws IOException { - Map policies; - - try { - Response response = adminClient().performRequest(new Request("GET", "/_slm/policy")); - policies = entityAsMap(response); - } catch (ResponseException e) { - if (RestStatus.METHOD_NOT_ALLOWED.getStatus() == e.getResponse().getStatusLine().getStatusCode() - || RestStatus.BAD_REQUEST.getStatus() == e.getResponse().getStatusLine().getStatusCode()) { - // If bad request returned, SLM is not enabled. - return; - } - throw e; - } - - if (policies == null || policies.isEmpty()) { - return; - } - - for (String policyName : policies.keySet()) { - adminClient().performRequest(new Request("DELETE", "/_slm/policy/" + policyName)); - } - } - /** * Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into * other tests. From daa1be52dd533a0a8c6339d899972f65c07b1605 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 13:06:01 +0200 Subject: [PATCH 02/21] spotless und gradle updateSHAs --- client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 | 1 + client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 | 1 - libs/core/licenses/jackson-core-2.17.3.jar.sha1 | 1 + libs/core/licenses/jackson-core-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 | 1 + libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 | 1 + libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 | 1 + libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 | 1 + libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 - .../ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 | 1 + .../licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 - modules/lang-expression/licenses/asm-9.7.jar.sha1 | 1 - modules/lang-expression/licenses/asm-9.8.jar.sha1 | 1 + modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 | 1 - modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 | 1 + modules/lang-painless/licenses/asm-9.7.jar.sha1 | 1 - modules/lang-painless/licenses/asm-9.8.jar.sha1 | 1 + modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 | 1 - modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 | 1 + modules/lang-painless/licenses/asm-util-9.7.jar.sha1 | 1 - modules/lang-painless/licenses/asm-util-9.8.jar.sha1 | 1 + .../licenses/error_prone_annotations-2.31.0.jar.sha1 | 1 - .../licenses/error_prone_annotations-2.36.0.jar.sha1 | 1 + .../licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + .../arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + .../ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - plugins/repository-azure/licenses/asm-9.7.jar.sha1 | 1 - plugins/repository-azure/licenses/asm-9.8.jar.sha1 | 1 + .../licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + .../repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-dataformat-xml-2.17.3.jar.sha1 | 1 + .../licenses/jackson-dataformat-xml-2.18.2.jar.sha1 | 1 - .../licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 | 1 + .../licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 - .../licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 | 1 + .../licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 | 1 - .../repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 | 1 + .../repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 | 1 + plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/error_prone_annotations-2.24.1.jar.sha1 | 1 - .../licenses/error_prone_annotations-2.36.0.jar.sha1 | 1 + server/licenses/jackson-core-2.17.3.jar.sha1 | 1 + server/licenses/jackson-core-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 | 1 + server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 | 1 + server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 | 1 + server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 - 72 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 delete mode 100644 client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 create mode 100644 libs/core/licenses/jackson-core-2.17.3.jar.sha1 delete mode 100644 libs/core/licenses/jackson-core-2.18.2.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 delete mode 100644 modules/lang-expression/licenses/asm-9.7.jar.sha1 create mode 100644 modules/lang-expression/licenses/asm-9.8.jar.sha1 delete mode 100644 modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 create mode 100644 modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-9.7.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-9.8.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-util-9.7.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-util-9.8.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/asm-9.7.jar.sha1 create mode 100644 plugins/repository-azure/licenses/asm-9.8.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 create mode 100644 plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 create mode 100644 plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 create mode 100644 plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 create mode 100644 server/licenses/jackson-core-2.17.3.jar.sha1 delete mode 100644 server/licenses/jackson-core-2.18.2.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 diff --git a/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 b/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..13c532bb8cfc9 --- /dev/null +++ b/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 @@ -0,0 +1 @@ +1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 b/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/core/licenses/jackson-core-2.17.3.jar.sha1 b/libs/core/licenses/jackson-core-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..13c532bb8cfc9 --- /dev/null +++ b/libs/core/licenses/jackson-core-2.17.3.jar.sha1 @@ -0,0 +1 @@ +1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/libs/core/licenses/jackson-core-2.18.2.jar.sha1 b/libs/core/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/libs/core/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..13c532bb8cfc9 --- /dev/null +++ b/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 @@ -0,0 +1 @@ +1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..6ff493a7256c9 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 @@ -0,0 +1 @@ +5286b5df35824b8c2a8ceae9a54e99dca9220e15 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 deleted file mode 100644 index 8b946b98ddbf9..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..7d71c29876246 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 @@ -0,0 +1 @@ +cd19020c7bace93ce269e85ac6fee782a6bf4e16 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 deleted file mode 100644 index 9fbdb9b3a2506..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..332ff6d34fdc1 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 @@ -0,0 +1 @@ +536e9d9ee966cf40a8b5d2f9ba505551364d0ad5 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 deleted file mode 100644 index 9dac9ee8e1e72..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..6d0a55ebdd7a4 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 @@ -0,0 +1 @@ +a25fe2f5607fea9e00ed00cf81b7aa2eaacbbd6e \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 deleted file mode 100644 index 7b9ab1d1e08d1..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-9.7.jar.sha1 b/modules/lang-expression/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/modules/lang-expression/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-9.8.jar.sha1 b/modules/lang-expression/licenses/asm-9.8.jar.sha1 new file mode 100644 index 0000000000000..24005efca428d --- /dev/null +++ b/modules/lang-expression/licenses/asm-9.8.jar.sha1 @@ -0,0 +1 @@ +dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 b/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 deleted file mode 100644 index d4eeef6151272..0000000000000 --- a/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e446a17b175bfb733b87c5c2560ccb4e57d69f1a \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 b/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 new file mode 100644 index 0000000000000..aa3698030694f --- /dev/null +++ b/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 @@ -0,0 +1 @@ +018419ca5b77a2f81097c741e7872e6ab8d2f40d \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/modules/lang-painless/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-9.8.jar.sha1 new file mode 100644 index 0000000000000..24005efca428d --- /dev/null +++ b/modules/lang-painless/licenses/asm-9.8.jar.sha1 @@ -0,0 +1 @@ +dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 deleted file mode 100644 index d4eeef6151272..0000000000000 --- a/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e446a17b175bfb733b87c5c2560ccb4e57d69f1a \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 new file mode 100644 index 0000000000000..aa3698030694f --- /dev/null +++ b/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 @@ -0,0 +1 @@ +018419ca5b77a2f81097c741e7872e6ab8d2f40d \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 deleted file mode 100644 index 37c0d27efe46f..0000000000000 --- a/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c0655519f24d92af2202cb681cd7c1569df6ead6 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 new file mode 100644 index 0000000000000..bd60871d16324 --- /dev/null +++ b/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 @@ -0,0 +1 @@ +395f1c1f035258511f27bc9b2583d76e4b143f59 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 deleted file mode 100644 index 4872d644799f5..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c3ba307b915d6d506e98ffbb49e6d2d12edad65b \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 new file mode 100644 index 0000000000000..2770835697e79 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 @@ -0,0 +1 @@ +227d4d4957ccc3dc5761bd897e3a0ee587e750a7 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/asm-9.7.jar.sha1 b/plugins/repository-azure/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/plugins/repository-azure/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/asm-9.8.jar.sha1 b/plugins/repository-azure/licenses/asm-9.8.jar.sha1 new file mode 100644 index 0000000000000..24005efca428d --- /dev/null +++ b/plugins/repository-azure/licenses/asm-9.8.jar.sha1 @@ -0,0 +1 @@ +dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..9b2965f3efca0 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 @@ -0,0 +1 @@ +cae13eba442238be7f265dd7c5681a63fb22bf71 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 deleted file mode 100644 index 61ee41aa8adf4..0000000000000 --- a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -069cb3b7bd34b3f7842cc4a6fd717981433bf73e \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..6d0a55ebdd7a4 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 @@ -0,0 +1 @@ +a25fe2f5607fea9e00ed00cf81b7aa2eaacbbd6e \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 deleted file mode 100644 index 7b9ab1d1e08d1..0000000000000 --- a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c8766eb9dcbdd --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +0ba7b7b68e0c564dd69ba757bdfc93b04e884478 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 deleted file mode 100644 index b98599718965b..0000000000000 --- a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -048c96032e5a428739e28ff04973717c032df598 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c96fec30e5fc5 --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 @@ -0,0 +1 @@ +4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..c310f4f68ca92 --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 @@ -0,0 +1 @@ +42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 b/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 deleted file mode 100644 index 67723f6f51248..0000000000000 --- a/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -32b299e45105aa9b0df8279c74dc1edfcf313ff0 \ No newline at end of file diff --git a/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 b/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 new file mode 100644 index 0000000000000..2770835697e79 --- /dev/null +++ b/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 @@ -0,0 +1 @@ +227d4d4957ccc3dc5761bd897e3a0ee587e750a7 \ No newline at end of file diff --git a/server/licenses/jackson-core-2.17.3.jar.sha1 b/server/licenses/jackson-core-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..13c532bb8cfc9 --- /dev/null +++ b/server/licenses/jackson-core-2.17.3.jar.sha1 @@ -0,0 +1 @@ +1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/server/licenses/jackson-core-2.18.2.jar.sha1 b/server/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/server/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..6ff493a7256c9 --- /dev/null +++ b/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 @@ -0,0 +1 @@ +5286b5df35824b8c2a8ceae9a54e99dca9220e15 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 deleted file mode 100644 index 8b946b98ddbf9..0000000000000 --- a/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..7d71c29876246 --- /dev/null +++ b/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 @@ -0,0 +1 @@ +cd19020c7bace93ce269e85ac6fee782a6bf4e16 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 deleted file mode 100644 index 9fbdb9b3a2506..0000000000000 --- a/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 new file mode 100644 index 0000000000000..332ff6d34fdc1 --- /dev/null +++ b/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 @@ -0,0 +1 @@ +536e9d9ee966cf40a8b5d2f9ba505551364d0ad5 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 deleted file mode 100644 index 9dac9ee8e1e72..0000000000000 --- a/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file From fa768d87f64e8818c3f44eb5f2d2d03071cacc95 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 13:06:06 +0200 Subject: [PATCH 03/21] spotless und gradle updateSHAs --- .../gradle/pluginzip/PublishTests.java | 10 ++--- .../core/xcontent/XContentBuilder.java | 4 +- .../org/opensearch/dissect/DissectParser.java | 6 +-- .../painless/ContextExampleTests.java | 38 +++++++++---------- .../DiscountedCumulativeGainTests.java | 12 +++--- .../azure/AzureStorageService.java | 2 +- .../telemetry/tracing/OTelTelemetry.java | 2 +- .../search/RescorerBuilderProtoUtils.java | 4 +- .../indices/recovery/IndexRecoveryIT.java | 2 +- .../RemoteDualReplicationIT.java | 10 ++--- .../aggregations/bucket/DoubleTermsIT.java | 6 +-- .../aggregations/bucket/LongTermsIT.java | 6 +-- .../search/aggregations/bucket/RangeIT.java | 4 +- .../allocation/AwarenessReplicaBalance.java | 6 +-- .../command/CancelAllocationCommand.java | 2 +- .../identity/tokens/OnBehalfOfClaims.java | 2 +- .../RemoteStoreShardShallowCopySnapshot.java | 2 +- .../index/translog/RemoteFsTranslog.java | 2 +- .../PersistentTasksClusterService.java | 2 +- .../org/opensearch/plugins/SearchPlugin.java | 2 +- .../terms/heuristic/MutualInformation.java | 2 +- .../org/opensearch/threadpool/ThreadPool.java | 2 +- .../StarTreeKeywordDocValuesFormatTests.java | 2 +- .../aggregations/bucket/BucketUtilsTests.java | 28 +++++++------- .../bucket/ShardSizeTestCase.java | 8 ++-- ...archAllocationWithConstraintsTestCase.java | 4 +- 26 files changed, 85 insertions(+), 85 deletions(-) diff --git a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java index 8e246ff9ecd11..f7edc453e5670 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java @@ -142,22 +142,22 @@ public void applyZipPublicationPluginWithConfig() throws IOException, URISyntaxE // and how these tasks are chained. The problem is that there is a known gradle issue (#20301) that does // not allow for it ATM. If, however, it is fixed in the future the following is the code that can // be used... - + Project project = ProjectBuilder.builder().build(); project.getPluginManager().apply(Publish.class); // add publications via API - + // evaluate the project ((DefaultProject)project).evaluate(); - + // - Check that "validatePluginZipPom" and/or "publishPluginZipPublicationToZipStagingRepository" // tasks have dependencies on "generatePomFileForNebulaPublication". // - Check that there is the staging repository added. - + // However, due to known issue(1): https://github.com/gradle/gradle/issues/20301 // it is impossible to reach to individual tasks and work with them. // (1): https://docs.gradle.org/7.4/release-notes.html#known-issues - + // I.e.: The following code throws exception, basically any access to individual tasks fails. project.getTasks().getByName("validatePluginZipPom"); ------------------------------- */ diff --git a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java index 552945d085884..987434a85d2f1 100644 --- a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java +++ b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java @@ -744,7 +744,7 @@ public XContentBuilder utf8Value(byte[] bytes, int offset, int length) throws IO /** * Write a time-based field and value, if the passed timeValue is null a * null value is written, otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeField(String name, Object timeValue) throws IOException { @@ -772,7 +772,7 @@ public XContentBuilder timeField(String name, String readableName, long value) t /** * Write a time-based value, if the value is null a null value is written, * otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeValue(Object timeValue) throws IOException { diff --git a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java index 828d4b7de450e..c05f7a9816839 100644 --- a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java +++ b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java @@ -195,18 +195,18 @@ public DissectParser(String pattern, String appendSeparator) { */ public Map parse(String inputString) { /* - + This implements a naive string matching algorithm. The string is walked left to right, comparing each byte against another string's bytes looking for matches. If the bytes match, then a second cursor looks ahead to see if all the bytes of the other string matches. If they all match, record it and advances the primary cursor to the match point. If it can not match all of the bytes then progress the main cursor. Repeat till the end of the input string. Since the string being searching for (the delimiter) is generally small and rare the naive approach is efficient. - + In this case the string that is walked is the input string, and the string being searched for is the current delimiter. For example for a dissect pattern of {@code %{a},%{b}:%{c}} the delimiters (comma then colon) are searched for in the input string. At class construction the list of keys+delimiters are found (dissectPairs), which allows the use of that ordered list to know which delimiter to use for the search. The delimiters is progressed once the current delimiter is matched. - + There are two special cases that requires additional parsing beyond the standard naive algorithm. Consecutive delimiters should results in a empty matches unless the {@code ->} is provided. For example given the dissect pattern of {@code %{a},%{b},%{c},%{d}} and input string of {@code foo,,,} the match should be successful with empty values for b,c and d. diff --git a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java index 740a49e6a9a77..6568b26241e7f 100644 --- a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java +++ b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java @@ -47,12 +47,12 @@ public class ContextExampleTests extends ScriptTestCase { // **** Docs Generator Code **** /* - + import java.io.FileWriter; import java.io.IOException; - + public class Generator { - + public final static String[] theatres = new String[] {"Down Port", "Graye", "Skyline", "Courtyard"}; public final static String[] plays = new String[] {"Driving", "Pick It Up", "Sway and Pull", "Harriot", "The Busline", "Ants Underground", "Exploria", "Line and Single", "Shafted", "Sunnyside Down", @@ -61,7 +61,7 @@ public class Generator { "Joel Madigan", "Jessica Brown", "Baz Knight", "Jo Hangum", "Rachel Grass", "Phoebe Miller", "Sarah Notch", "Brayden Green", "Joshua Iller", "Jon Hittle", "Rob Kettleman", "Laura Conrad", "Simon Hower", "Nora Blue", "Mike Candlestick", "Jacey Bell"}; - + public static void writeSeat(FileWriter writer, int id, String theatre, String play, String[] actors, String date, String time, int row, int number, double cost, boolean sold) throws IOException { StringBuilder builder = new StringBuilder(); @@ -94,11 +94,11 @@ public static void writeSeat(FileWriter writer, int id, String theatre, String p builder.append(" }\n"); writer.write(builder.toString()); } - + public static void main(String args[]) throws IOException { FileWriter writer = new FileWriter("/home/jdconrad/test/seats.json"); int id = 0; - + for (int playCount = 0; playCount < 12; ++playCount) { String play = plays[playCount]; String theatre; @@ -106,7 +106,7 @@ public static void main(String args[]) throws IOException { int startMonth; int endMonth; String time; - + if (playCount == 0) { theatre = theatres[0]; actor = new String[] {actors[0], actors[1], actors[2], actors[3]}; @@ -184,10 +184,10 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many plays"); } - + int rows; int number; - + if (playCount < 6) { rows = 3; number = 12; @@ -200,32 +200,32 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many seats"); } - + for (int month = startMonth; month <= endMonth; ++month) { for (int day = 1; day <= 14; ++day) { for (int row = 1; row <= rows; ++row) { for (int count = 1; count <= number; ++count) { String date = "2018-" + month + "-" + day; double cost = (25 - row) * 1.25; - + writeSeat(writer, ++id, theatre, play, actor, date, time, row, count, cost, false); } } } } } - + writer.write("\n"); writer.close(); } } - + */ // **** Initial Mappings **** /* - + curl -X PUT "localhost:9200/seats" -H 'Content-Type: application/json' -d' { "mappings": { @@ -246,13 +246,13 @@ public static void main(String args[]) throws IOException { } } ' - + */ // Create Ingest to Modify Dates: /* - + curl -X PUT "localhost:9200/_ingest/pipeline/seats" -H 'Content-Type: application/json' -d' { "description": "update datetime for seats", @@ -265,7 +265,7 @@ public static void main(String args[]) throws IOException { ] } ' - + */ public void testIngestProcessorScript() { @@ -304,9 +304,9 @@ public void testIngestProcessorScript() { // Post Generated Data: /* - + curl -XPOST localhost:9200/seats/seat/_bulk?pipeline=seats -H "Content-Type: application/x-ndjson" --data-binary "@/home/jdconrad/test/seats.json" - + */ // Use script_fields API to add two extra fields to the hits diff --git a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java index d96e3212e05a2..aca00b42a9331 100644 --- a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java +++ b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java @@ -94,7 +94,7 @@ public void testDCGAt() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -103,7 +103,7 @@ public void testDCGAt() { 4 | 2 | 3.0 | 2.321928094887362 | 1.2920296742201793 5 | 1 | 1.0 | 2.584962500721156  | 0.38685280723454163 6 | 0 | 0.0 | 2.807354922057604  | 0.0 - + idcg = 14.595390756454922 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -146,7 +146,7 @@ public void testDCGAtSixMissingRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) ---------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -155,7 +155,7 @@ public void testDCGAtSixMissingRatings() { 4 | 1 | 1.0 | 2.321928094887362   | 0.43067655807339 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -203,7 +203,7 @@ public void testDCGAtFourMoreRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -213,7 +213,7 @@ public void testDCGAtFourMoreRatings() { --------------------------------------------------------------------------------------- 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java index 19c9af317247f..7688b3c8b93ab 100644 --- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java +++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java @@ -172,7 +172,7 @@ public Tuple> client(String clientName) { * Obtains a {@code BlobServiceClient} on each invocation using the current client * settings. BlobServiceClient is thread safe and and could be cached but the settings * can change, therefore the instance might be recreated from scratch. - + * @param clientName client name * @param statsCollector statistics collector * @return the {@code BlobServiceClient} instance and context diff --git a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java index 0c697d2cc5e8c..606fdc317df16 100644 --- a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java +++ b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java @@ -24,7 +24,7 @@ public class OTelTelemetry implements Telemetry { /** * Creates Telemetry instance - + */ /** * Creates Telemetry instance diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java index 38f22f05a94e9..70d4cdb047a08 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java @@ -37,9 +37,9 @@ protected static RescorerBuilder parseFromProto(Rescore rescoreProto) { /* RescorerBuilder rescorer = null; // TODO populate rescorerBuilder - + return rescorer; - + */ } diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java index e2db9f85131a9..6f26515e7b75e 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java @@ -1617,7 +1617,7 @@ public void testOngoingRecoveryAndClusterManagerFailOver() throws Exception { /* Shard assignment is stuck because recovery is blocked at CLEAN_FILES stage. Once, it times out after 60s the replica shards get assigned. https://github.com/opensearch-project/OpenSearch/issues/18098. - + Stack trace: Caused by: org.opensearch.transport.ReceiveTimeoutTransportException: [node_t3][127.0.0.1:56648][internal:index/shard/recovery/clean_files] request_id [20] timed out after [60026ms] at org.opensearch.transport.TransportService$TimeoutHandler.run(TransportService.java:1399) ~[main/:?] diff --git a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java index d046f41ce0590..7a721c395df60 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java @@ -232,14 +232,14 @@ public void testRemotePrimaryDocRepAndRemoteReplica() throws Exception { public void testRetentionLeasePresentOnDocrepReplicaButNotRemote() throws Exception { /* Reducing indices.memory.shard_inactive_time to force a flush and trigger translog sync, instead of relying on Global CKP Sync action which doesn't run on remote enabled copies - + Under steady state, RetentionLeases would be on (GlobalCkp + 1) on a docrep enabled shard copy and (GlobalCkp) for a remote enabled shard copy. This is because we block translog sync on remote enabled shard copies during the GlobalCkpSync background task. - + RLs on remote enabled copies are brought up to (GlobalCkp + 1) upon a flush request issued by IndexingMemoryController when the shard becomes inactive after SHARD_INACTIVE_TIME_SETTING interval. - + Flush triggers a force sync of translog which bumps the RetentionLease sequence number along with it */ extraSettings = Settings.builder().put(IndexingMemoryController.SHARD_INACTIVE_TIME_SETTING.getKey(), "3s").build(); @@ -668,10 +668,10 @@ public void testFailoverRemotePrimaryToDocrepReplicaReseedToRemotePrimary() thro /* Performs the same experiment as testRemotePrimaryDocRepReplica. - + This ensures that the primary shard for the index has moved over to remote enabled node whereas the replica copy is still left behind on the docrep nodes - + At this stage, segrep lag computation shouldn't consider the docrep shard copy while calculating bytes lag */ public void testZeroSegrepLagForShardsWithMixedReplicationGroup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java index ccb4af8386472..a1e2f1ee32e99 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java @@ -427,20 +427,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java index 49031bfd3fc1d..f743f5e737d09 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java @@ -414,20 +414,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java index 5483db285dded..fe07b31238787 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java @@ -614,7 +614,7 @@ public void testMultiValuedFieldWithValueScript() throws Exception { [9, 10] [10, 11] [11, 12] - + r1: 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12 @@ -769,7 +769,7 @@ public void testScriptMultiValued() throws Exception { [8, 9] [9, 10] [10, 11] - + r1: 1, 2, 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11 diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java index 538d49d4e4701..9f52b08792e1a 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java @@ -80,14 +80,14 @@ private void setAwarenessAttributes(List awarenessAttributes) { /* For a cluster having zone as awareness attribute , it will return the size of zones if set it forced awareness attributes - + If there are multiple forced awareness attributes, it will return size of the largest list, as all copies of data is supposed to get distributed amongst those. - + cluster.routing.allocation.awareness.attributes: rack_id , zone cluster.routing.allocation.awareness.force.zone.values: zone1, zone2 cluster.routing.allocation.awareness.force.rack_id.values: rack_id1, rack_id2, rack_id3 - + In this case, awareness attributes would be 3. */ public int maxAwarenessAttributes() { diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java index a07f3eb9d95e1..5e35f587e7fa1 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java @@ -116,7 +116,7 @@ public String index() { } /** - + * Get the id of the shard which allocation should be canceled * @return id of the shard which allocation should be canceled */ diff --git a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java index 2b37ed954e7d4..653cf9f384867 100644 --- a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java +++ b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java @@ -25,7 +25,7 @@ public class OnBehalfOfClaims { * Constructor for OnBehalfOfClaims * @param aud the Audience for the token * @param expiration_seconds the length of time in seconds the token is valid - + */ public OnBehalfOfClaims(String aud, Long expiration_seconds) { this.audience = aud; diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java index 9c0ea42810e16..200a617dfc509 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java @@ -355,7 +355,7 @@ public String snapshot() { /* Returns list of files in the shard - + @return list of files */ diff --git a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java index e697e16d5e8a0..a9a03428d2a7e 100644 --- a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java +++ b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java @@ -215,7 +215,7 @@ static void download(TranslogTransferManager translogTransferManager, Path locat In Primary to Primary relocation , there can be concurrent upload and download of translog. While translog files are getting downloaded by new primary, it might hence be deleted by the primary Hence we retry if tlog/ckp files are not found . - + This doesn't happen in last download , where it is ensured that older primary has stopped modifying tlog data. */ IOException ex = null; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java index eb187224ebf07..4cab2bdd979de 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java @@ -372,7 +372,7 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS * @param taskName the task's name * @param taskParams the task's parameters * @param currentState the current {@link ClusterState} - + * @return a new {@link Assignment} */ private Assignment createAssignment( diff --git a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java index 80a4619f56b64..651761e6b29e5 100644 --- a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java @@ -667,7 +667,7 @@ public PipelineAggregationSpec( * @param builderReader the reader registered for this aggregation's builder. Typically, a reference to a constructor that takes a * {@link StreamInput} * @param parser reads the aggregation builder from XContent - + */ public PipelineAggregationSpec( String name, diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java index 86caa6d3b5059..d9a9471aca49e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java @@ -120,7 +120,7 @@ public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long + N01 / N * Math.log((N * N01) / (N0_ * N_1)) + N10 / N * Math.log((N * N10) / (N1_ * N_0)) + N00 / N * Math.log((N * N00) / (N0_ * N_0)); - + but we get many NaN if we do not take case of the 0s */ double getMITerm(double Nxy, double Nx_, double N_y, double N) { diff --git a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java index b67b00bb42054..46b3abc500586 100644 --- a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java +++ b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java @@ -426,7 +426,7 @@ public void registerClusterSettingsListeners(ClusterSettings clusterSettings) { /* Scaling threadpool can provide only max and core Fixed/ResizableQueue can provide only size - + For example valid settings would be for scaling and fixed thead pool cluster.threadpool.snapshot.max : "5", cluster.threadpool.snapshot.core : "5", diff --git a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java index 5603fe4e30f9f..9a96377b24466 100644 --- a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java +++ b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java @@ -451,7 +451,7 @@ public void testStarKeywordDocValuesWithMissingDocsInAllSegments() throws IOExce /** * keyword1 keyword2 | [ sum, value_count, min, max[sndv]] , doc_count [null, null] | [6.0, 4.0, 1.0, 2.0, 4.0] - + */ StarTreeDocument[] expectedStarTreeDocuments = new StarTreeDocument[1]; expectedStarTreeDocuments[0] = new StarTreeDocument(new Long[] { null, null }, new Double[] { 6.0, 4.0, 1.0, 2.0, 4.0 }); diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java index 88e281032d678..a203996d03f07 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java @@ -67,15 +67,15 @@ public static void main(String[] args) { final int numberOfShards = 10; final double skew = 2; // parameter of the zipf distribution final int size = 100; - + double totalWeight = 0; for (int rank = 1; rank <= numberOfUniqueTerms; ++rank) { totalWeight += weight(rank, skew); } - + int[] terms = new int[totalNumberOfTerms]; int len = 0; - + final int[] actualTopFreqs = new int[size]; for (int rank = 1; len < totalNumberOfTerms; ++rank) { int freq = (int) (weight(rank, skew) / totalWeight * totalNumberOfTerms); @@ -86,9 +86,9 @@ public static void main(String[] args) { actualTopFreqs[rank-1] = freq; } } - + final int maxTerm = terms[terms.length - 1] + 1; - + // shuffle terms Random r = new Random(0); for (int i = terms.length - 1; i > 0; --i) { @@ -104,7 +104,7 @@ public static void main(String[] args) { shards[i] = Arrays.copyOfRange(terms, upTo, upTo + (terms.length - upTo) / (numberOfShards - i)); upTo += shards[i].length; } - + final int[][] topShards = new int[numberOfShards][]; final int shardSize = BucketUtils.suggestShardSideQueueSize(size, numberOfShards); for (int shard = 0; shard < numberOfShards; ++shard) { @@ -118,7 +118,7 @@ public static void main(String[] args) { termIds[i] = i; } new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -128,16 +128,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return freqs[j] - freqs[i]; } }.sort(0, maxTerm); - + Arrays.fill(freqs, shardSize, freqs.length, 0); new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -147,16 +147,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return termIds[i] - termIds[j]; } }.sort(0, maxTerm); - + topShards[shard] = freqs; } - + final int[] computedTopFreqs = new int[size]; for (int[] freqs : topShards) { for (int i = 0; i < size; ++i) { @@ -174,7 +174,7 @@ protected int compare(int i, int j) { System.out.println("Computed freqs of top terms: " + Arrays.toString(computedTopFreqs)); System.out.println("Number of errors: " + numErrors + "/" + totalFreq); } - + private static double weight(int rank, double skew) { return 1d / Math.pow(rank, skew); }*/ diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java index 0bf23bd3e2cad..a8539e81f3233 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java @@ -81,8 +81,8 @@ protected void createIdx(String keyFieldMapping) { protected void indexData() throws Exception { /* - - + + || || size = 3, shard_size = 5 || shard_size = size = 3 || ||==========||==================================================||===============================================|| || shard 1: || "1" - 5 | "2" - 4 | "3" - 3 | "4" - 2 | "5" - 1 || "1" - 5 | "3" - 3 | "2" - 4 || @@ -92,8 +92,8 @@ protected void indexData() throws Exception { || reduced: || "1" - 8 | "2" - 5 | "3" - 8 | "4" - 4 | "5" - 2 || || || || || "1" - 8, "3" - 8, "2" - 4 <= WRONG || || || "1" - 8 | "3" - 8 | "2" - 5 <= CORRECT || || - - + + */ List docs = new ArrayList<>(); diff --git a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java index 0c08de252e4cd..758722ea4072a 100644 --- a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java @@ -215,7 +215,7 @@ public int allocateAndCheckIndexShardHotSpots(boolean expected, int nodes, Strin SameShardAllocationDecider, causing it to breach allocation constraint on another node. We need to differentiate between such hot spots v/s actual hot spots. - + A simple check could be to ensure there is no node with shards less than allocation limit, that can accept current shard. However, in current allocation algorithm, when nodes get throttled, shards are added to @@ -224,7 +224,7 @@ ModelNodes without adding them to actual cluster (RoutingNodes). As a result, weight function in balancer. RoutingNodes with {@link count} < {@link limit} may not have had the same count in the corresponding ModelNode seen by weight function. We hence use the following alternate check -- - + Given the way {@link limit} is defined, we should not have hot spots if *all* nodes are eligible to accept the shard. A hot spot is acceptable, if either all peer nodes have {@link count} > {@link limit}, or if even one node is From 3ee6f403e778f3affa300ee191cf3d4fe42ff6fc Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 13:07:09 +0200 Subject: [PATCH 04/21] spotless und gradle updateSHAs --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f4be5224d4cd4..c3fea164e3a91 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -org.gradle.workers.max=2 +#org.gradle.workers.max=2 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ From 52967abdfab077e2a8f81c9d8a8bb74fcc950651 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 14:44:43 +0200 Subject: [PATCH 05/21] spotless und gradle updateSHAs --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c3fea164e3a91..f4be5224d4cd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -#org.gradle.workers.max=2 +org.gradle.workers.max=2 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ From 7e41b90331016d787dbbfa70af65d5b8b3be45a2 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 14:44:47 +0200 Subject: [PATCH 06/21] spotless und gradle updateSHAs --- gradle/rewrite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/rewrite.yml b/gradle/rewrite.yml index 2a726b4917eb6..af2e9a77ec9db 100644 --- a/gradle/rewrite.yml +++ b/gradle/rewrite.yml @@ -4,7 +4,7 @@ displayName: CodeCleanup description: Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions. recipeList: - org.openrewrite.java.RemoveUnusedImports - - org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods +# - org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods # - org.openrewrite.java.format.RemoveTrailingWhitespace # - org.openrewrite.staticanalysis.EmptyBlock # - org.openrewrite.staticanalysis.RemoveCallsToSystemGc From b5008dc2f4ff41e3bf3cb2d70983244e0ee9f045 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 14:45:03 +0200 Subject: [PATCH 07/21] spotless und gradle updateSHAs --- .../gradle/pluginzip/PublishTests.java | 10 ++--- .../licenses/jackson-core-2.17.3.jar.sha1 | 1 - .../licenses/jackson-core-2.18.2.jar.sha1 | 1 + .../licenses/jackson-core-2.17.3.jar.sha1 | 1 - .../licenses/jackson-core-2.18.2.jar.sha1 | 1 + .../core/xcontent/XContentBuilder.java | 4 +- .../org/opensearch/dissect/DissectParser.java | 6 +-- .../task/commons/clients/TaskListRequest.java | 10 +++++ .../licenses/jackson-core-2.17.3.jar.sha1 | 1 - .../licenses/jackson-core-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-cbor-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-smile-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-smile-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-yaml-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 + .../tier/TieredSpilloverCacheTests.java | 11 +++++ .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../jackson-datatype-jsr310-2.17.3.jar.sha1 | 1 - .../jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 + .../lang-expression/licenses/asm-9.7.jar.sha1 | 1 + .../lang-expression/licenses/asm-9.8.jar.sha1 | 1 - .../licenses/asm-tree-9.7.jar.sha1 | 1 + .../licenses/asm-tree-9.8.jar.sha1 | 1 - .../lang-painless/licenses/asm-9.7.jar.sha1 | 1 + .../lang-painless/licenses/asm-9.8.jar.sha1 | 1 - .../licenses/asm-tree-9.7.jar.sha1 | 1 + .../licenses/asm-tree-9.8.jar.sha1 | 1 - .../licenses/asm-util-9.7.jar.sha1 | 1 + .../licenses/asm-util-9.8.jar.sha1 | 1 - .../painless/ContextExampleTests.java | 38 ++++++++--------- .../DiscountedCumulativeGainTests.java | 12 +++--- .../documentation/ReindexDocumentationIT.java | 1 + .../error_prone_annotations-2.31.0.jar.sha1 | 1 + .../error_prone_annotations-2.36.0.jar.sha1 | 1 - .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../flight/bootstrap/FlightClientManager.java | 5 +++ .../store/disk/EhCacheDiskCacheTests.java | 29 +++++++++++++ .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../shiro/ShiroIdentityPluginTests.java | 1 + .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../licenses/asm-9.7.jar.sha1 | 1 + .../licenses/asm-9.8.jar.sha1 | 1 - .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-xml-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-xml-2.18.2.jar.sha1 | 1 + .../jackson-datatype-jsr310-2.17.3.jar.sha1 | 1 - .../jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 + ...on-module-jaxb-annotations-2.17.3.jar.sha1 | 1 - ...on-module-jaxb-annotations-2.18.2.jar.sha1 | 1 + .../azure/AzureStorageService.java | 2 +- .../jackson-annotations-2.17.3.jar.sha1 | 1 - .../jackson-annotations-2.18.2.jar.sha1 | 1 + .../licenses/jackson-databind-2.17.3.jar.sha1 | 1 - .../licenses/jackson-databind-2.18.2.jar.sha1 | 1 + .../telemetry/tracing/OTelTelemetry.java | 2 +- .../error_prone_annotations-2.24.1.jar.sha1 | 1 + .../error_prone_annotations-2.36.0.jar.sha1 | 1 - .../search/RescorerBuilderProtoUtils.java | 4 +- ...ardOperationFailedExceptionProtoUtils.java | 2 + ...ardOperationFailedExceptionProtoUtils.java | 2 + server/licenses/jackson-core-2.17.3.jar.sha1 | 1 - server/licenses/jackson-core-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-cbor-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-smile-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-smile-2.18.2.jar.sha1 | 1 + .../jackson-dataformat-yaml-2.17.3.jar.sha1 | 1 - .../jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 + .../decider/DiskThresholdDeciderIT.java | 6 +++ .../indices/recovery/IndexRecoveryIT.java | 2 +- .../RemoteDualReplicationIT.java | 10 ++--- .../RemoteIndexPrimaryRelocationIT.java | 2 + .../remotestore/RemoteIndexRecoveryIT.java | 1 + .../RemoteStoreClusterStateRestoreIT.java | 4 ++ ...tReplicationWithRemoteStorePressureIT.java | 2 + .../aggregations/bucket/DoubleTermsIT.java | 6 +-- .../aggregations/bucket/LongTermsIT.java | 6 +-- .../search/aggregations/bucket/RangeIT.java | 4 +- .../search/searchafter/SearchAfterIT.java | 24 +++++++++++ .../snapshots/DeleteSnapshotIT.java | 1 + .../RemoteIndexSnapshotStatusApiIT.java | 1 + .../snapshots/SystemRepositoryIT.java | 2 + .../cluster/node/info/NodesInfoRequest.java | 13 ++++++ .../cluster/node/stats/NodesStatsRequest.java | 11 +++++ .../action/index/MappingUpdatedAction.java | 15 +++++++ .../allocation/AwarenessReplicaBalance.java | 6 +-- .../allocator/BalancedShardsAllocator.java | 1 + .../command/CancelAllocationCommand.java | 2 +- .../io/VersionedCodecStreamWrapper.java | 10 +++++ .../org/opensearch/env/NodeEnvironment.java | 12 ++++++ .../gateway/ShardsBatchGatewayAllocator.java | 12 ++++++ .../remote/RemoteClusterStateService.java | 23 +++++++++++ .../identity/tokens/OnBehalfOfClaims.java | 2 +- .../startree/builder/BaseStarTreeBuilder.java | 12 ++++++ .../remote/RemoteStorePressureSettings.java | 4 ++ .../RemoteStoreShardShallowCopySnapshot.java | 2 +- .../index/translog/RemoteFsTranslog.java | 2 +- .../PersistentTasksClusterService.java | 2 +- .../org/opensearch/plugins/SearchPlugin.java | 2 +- .../terms/heuristic/MutualInformation.java | 2 +- .../snapshots/SnapshotShardsService.java | 11 +++++ .../org/opensearch/threadpool/ThreadPool.java | 2 +- .../opensearch/transport/TransportLogger.java | 14 +++++++ .../cluster/node/DiscoveryNodesTests.java | 14 +++++++ .../allocation/BalanceConfigurationTests.java | 23 +++++++++++ .../RemoteShardsBalancerBaseTestCase.java | 8 ++++ .../RemoteShardsRebalanceShardsTests.java | 12 ++++++ ...eStoreMigrationAllocationDeciderTests.java | 4 ++ .../RemoteRoutingTableServiceTests.java | 9 ++++ .../PrimaryShardBatchAllocatorTests.java | 7 ++++ .../RemoteClusterStateServiceTests.java | 24 +++++++++++ .../StarTreeKeywordDocValuesFormatTests.java | 2 +- .../StarTreeBuilderMergeFlowTests.java | 41 +++++++++++++++++++ .../RestCatSegmentReplicationActionTests.java | 5 +++ .../aggregations/bucket/BucketUtilsTests.java | 28 ++++++------- .../bucket/ShardSizeTestCase.java | 8 ++-- .../DerivedFieldFetchAndHighlightTests.java | 15 +++++++ .../search/geo/GeoShapeQueryTests.java | 2 + ...archAllocationWithConstraintsTestCase.java | 4 +- .../blobstore/BlobStoreTestUtil.java | 22 ++++++++++ .../test/rest/OpenSearchRestTestCase.java | 24 +++++++++++ 141 files changed, 573 insertions(+), 121 deletions(-) delete mode 100644 client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 create mode 100644 client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/core/licenses/jackson-core-2.17.3.jar.sha1 create mode 100644 libs/core/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 create mode 100644 libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 create mode 100644 modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 create mode 100644 modules/lang-expression/licenses/asm-9.7.jar.sha1 delete mode 100644 modules/lang-expression/licenses/asm-9.8.jar.sha1 create mode 100644 modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 delete mode 100644 modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-9.7.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-9.8.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 create mode 100644 modules/lang-painless/licenses/asm-util-9.7.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-util-9.8.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/repository-azure/licenses/asm-9.7.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/asm-9.8.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 create mode 100644 plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 create mode 100644 plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 create mode 100644 plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 create mode 100644 plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 delete mode 100644 plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 delete mode 100644 server/licenses/jackson-core-2.17.3.jar.sha1 create mode 100644 server/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 create mode 100644 server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 diff --git a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java index f7edc453e5670..8e246ff9ecd11 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java @@ -142,22 +142,22 @@ public void applyZipPublicationPluginWithConfig() throws IOException, URISyntaxE // and how these tasks are chained. The problem is that there is a known gradle issue (#20301) that does // not allow for it ATM. If, however, it is fixed in the future the following is the code that can // be used... - + Project project = ProjectBuilder.builder().build(); project.getPluginManager().apply(Publish.class); // add publications via API - + // evaluate the project ((DefaultProject)project).evaluate(); - + // - Check that "validatePluginZipPom" and/or "publishPluginZipPublicationToZipStagingRepository" // tasks have dependencies on "generatePomFileForNebulaPublication". // - Check that there is the staging repository added. - + // However, due to known issue(1): https://github.com/gradle/gradle/issues/20301 // it is impossible to reach to individual tasks and work with them. // (1): https://docs.gradle.org/7.4/release-notes.html#known-issues - + // I.e.: The following code throws exception, basically any access to individual tasks fails. project.getTasks().getByName("validatePluginZipPom"); ------------------------------- */ diff --git a/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 b/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 deleted file mode 100644 index 13c532bb8cfc9..0000000000000 --- a/client/sniffer/licenses/jackson-core-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 b/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..96350c9307ae7 --- /dev/null +++ b/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 @@ -0,0 +1 @@ +fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/core/licenses/jackson-core-2.17.3.jar.sha1 b/libs/core/licenses/jackson-core-2.17.3.jar.sha1 deleted file mode 100644 index 13c532bb8cfc9..0000000000000 --- a/libs/core/licenses/jackson-core-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/libs/core/licenses/jackson-core-2.18.2.jar.sha1 b/libs/core/licenses/jackson-core-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..96350c9307ae7 --- /dev/null +++ b/libs/core/licenses/jackson-core-2.18.2.jar.sha1 @@ -0,0 +1 @@ +fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java index 987434a85d2f1..552945d085884 100644 --- a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java +++ b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java @@ -744,7 +744,7 @@ public XContentBuilder utf8Value(byte[] bytes, int offset, int length) throws IO /** * Write a time-based field and value, if the passed timeValue is null a * null value is written, otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeField(String name, Object timeValue) throws IOException { @@ -772,7 +772,7 @@ public XContentBuilder timeField(String name, String readableName, long value) t /** * Write a time-based value, if the value is null a null value is written, * otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeValue(Object timeValue) throws IOException { diff --git a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java index c05f7a9816839..828d4b7de450e 100644 --- a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java +++ b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java @@ -195,18 +195,18 @@ public DissectParser(String pattern, String appendSeparator) { */ public Map parse(String inputString) { /* - + This implements a naive string matching algorithm. The string is walked left to right, comparing each byte against another string's bytes looking for matches. If the bytes match, then a second cursor looks ahead to see if all the bytes of the other string matches. If they all match, record it and advances the primary cursor to the match point. If it can not match all of the bytes then progress the main cursor. Repeat till the end of the input string. Since the string being searching for (the delimiter) is generally small and rare the naive approach is efficient. - + In this case the string that is walked is the input string, and the string being searched for is the current delimiter. For example for a dissect pattern of {@code %{a},%{b}:%{c}} the delimiters (comma then colon) are searched for in the input string. At class construction the list of keys+delimiters are found (dissectPairs), which allows the use of that ordered list to know which delimiter to use for the search. The delimiters is progressed once the current delimiter is matched. - + There are two special cases that requires additional parsing beyond the standard naive algorithm. Consecutive delimiters should results in a empty matches unless the {@code ->} is provided. For example given the dissect pattern of {@code %{a},%{b},%{c},%{d}} and input string of {@code foo,,,} the match should be successful with empty values for b,c and d. diff --git a/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java b/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java index 64c414a20867c..625e15dfb3b6d 100644 --- a/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java +++ b/libs/task-commons/src/main/java/org/opensearch/task/commons/clients/TaskListRequest.java @@ -71,6 +71,16 @@ public TaskListRequest taskType(TaskStatus... taskStatus) { return this; } + /** + * Update worker node to filter with in the request + * @param workerNode WorkerNode + * @return ListTaskRequest + */ + private TaskListRequest workerNode(WorkerNode workerNode) { + this.workerNodes = workerNode; + return this; + } + /** * Update page number to start with when fetching the list of tasks * @param startPageNumber startPageNumber diff --git a/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 deleted file mode 100644 index 13c532bb8cfc9..0000000000000 --- a/libs/x-content/licenses/jackson-core-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..96350c9307ae7 --- /dev/null +++ b/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 @@ -0,0 +1 @@ +fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 deleted file mode 100644 index 6ff493a7256c9..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5286b5df35824b8c2a8ceae9a54e99dca9220e15 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..8b946b98ddbf9 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 @@ -0,0 +1 @@ +d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 deleted file mode 100644 index 7d71c29876246..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cd19020c7bace93ce269e85ac6fee782a6bf4e16 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..9fbdb9b3a2506 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 @@ -0,0 +1 @@ +44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 deleted file mode 100644 index 332ff6d34fdc1..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -536e9d9ee966cf40a8b5d2f9ba505551364d0ad5 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..9dac9ee8e1e72 --- /dev/null +++ b/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 @@ -0,0 +1 @@ +d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java index eb7f46e648516..2dc115b73c378 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java @@ -2600,6 +2600,17 @@ private TieredSpilloverCache getTieredSpilloverCache( return builder.build(); } + private TieredSpilloverCache initializeTieredSpilloverCache( + int keyValueSize, + int diskCacheSize, + RemovalListener, String> removalListener, + Settings settings, + long diskDeliberateDelay + + ) { + return initializeTieredSpilloverCache(keyValueSize, diskCacheSize, removalListener, settings, diskDeliberateDelay, null, 256); + } + private TieredSpilloverCache initializeTieredSpilloverCache( int keyValueSize, int diskCacheSize, diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 deleted file mode 100644 index 6d0a55ebdd7a4..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a25fe2f5607fea9e00ed00cf81b7aa2eaacbbd6e \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..7b9ab1d1e08d1 --- /dev/null +++ b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 @@ -0,0 +1 @@ +7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-9.7.jar.sha1 b/modules/lang-expression/licenses/asm-9.7.jar.sha1 new file mode 100644 index 0000000000000..84c9a9703af6d --- /dev/null +++ b/modules/lang-expression/licenses/asm-9.7.jar.sha1 @@ -0,0 +1 @@ +073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-9.8.jar.sha1 b/modules/lang-expression/licenses/asm-9.8.jar.sha1 deleted file mode 100644 index 24005efca428d..0000000000000 --- a/modules/lang-expression/licenses/asm-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 b/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 new file mode 100644 index 0000000000000..d4eeef6151272 --- /dev/null +++ b/modules/lang-expression/licenses/asm-tree-9.7.jar.sha1 @@ -0,0 +1 @@ +e446a17b175bfb733b87c5c2560ccb4e57d69f1a \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 b/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 deleted file mode 100644 index aa3698030694f..0000000000000 --- a/modules/lang-expression/licenses/asm-tree-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -018419ca5b77a2f81097c741e7872e6ab8d2f40d \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-9.7.jar.sha1 new file mode 100644 index 0000000000000..84c9a9703af6d --- /dev/null +++ b/modules/lang-painless/licenses/asm-9.7.jar.sha1 @@ -0,0 +1 @@ +073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-9.8.jar.sha1 deleted file mode 100644 index 24005efca428d..0000000000000 --- a/modules/lang-painless/licenses/asm-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 new file mode 100644 index 0000000000000..d4eeef6151272 --- /dev/null +++ b/modules/lang-painless/licenses/asm-tree-9.7.jar.sha1 @@ -0,0 +1 @@ +e446a17b175bfb733b87c5c2560ccb4e57d69f1a \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 deleted file mode 100644 index aa3698030694f..0000000000000 --- a/modules/lang-painless/licenses/asm-tree-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -018419ca5b77a2f81097c741e7872e6ab8d2f40d \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 new file mode 100644 index 0000000000000..37c0d27efe46f --- /dev/null +++ b/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 @@ -0,0 +1 @@ +c0655519f24d92af2202cb681cd7c1569df6ead6 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 b/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 deleted file mode 100644 index bd60871d16324..0000000000000 --- a/modules/lang-painless/licenses/asm-util-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -395f1c1f035258511f27bc9b2583d76e4b143f59 \ No newline at end of file diff --git a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java index 6568b26241e7f..740a49e6a9a77 100644 --- a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java +++ b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java @@ -47,12 +47,12 @@ public class ContextExampleTests extends ScriptTestCase { // **** Docs Generator Code **** /* - + import java.io.FileWriter; import java.io.IOException; - + public class Generator { - + public final static String[] theatres = new String[] {"Down Port", "Graye", "Skyline", "Courtyard"}; public final static String[] plays = new String[] {"Driving", "Pick It Up", "Sway and Pull", "Harriot", "The Busline", "Ants Underground", "Exploria", "Line and Single", "Shafted", "Sunnyside Down", @@ -61,7 +61,7 @@ public class Generator { "Joel Madigan", "Jessica Brown", "Baz Knight", "Jo Hangum", "Rachel Grass", "Phoebe Miller", "Sarah Notch", "Brayden Green", "Joshua Iller", "Jon Hittle", "Rob Kettleman", "Laura Conrad", "Simon Hower", "Nora Blue", "Mike Candlestick", "Jacey Bell"}; - + public static void writeSeat(FileWriter writer, int id, String theatre, String play, String[] actors, String date, String time, int row, int number, double cost, boolean sold) throws IOException { StringBuilder builder = new StringBuilder(); @@ -94,11 +94,11 @@ public static void writeSeat(FileWriter writer, int id, String theatre, String p builder.append(" }\n"); writer.write(builder.toString()); } - + public static void main(String args[]) throws IOException { FileWriter writer = new FileWriter("/home/jdconrad/test/seats.json"); int id = 0; - + for (int playCount = 0; playCount < 12; ++playCount) { String play = plays[playCount]; String theatre; @@ -106,7 +106,7 @@ public static void main(String args[]) throws IOException { int startMonth; int endMonth; String time; - + if (playCount == 0) { theatre = theatres[0]; actor = new String[] {actors[0], actors[1], actors[2], actors[3]}; @@ -184,10 +184,10 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many plays"); } - + int rows; int number; - + if (playCount < 6) { rows = 3; number = 12; @@ -200,32 +200,32 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many seats"); } - + for (int month = startMonth; month <= endMonth; ++month) { for (int day = 1; day <= 14; ++day) { for (int row = 1; row <= rows; ++row) { for (int count = 1; count <= number; ++count) { String date = "2018-" + month + "-" + day; double cost = (25 - row) * 1.25; - + writeSeat(writer, ++id, theatre, play, actor, date, time, row, count, cost, false); } } } } } - + writer.write("\n"); writer.close(); } } - + */ // **** Initial Mappings **** /* - + curl -X PUT "localhost:9200/seats" -H 'Content-Type: application/json' -d' { "mappings": { @@ -246,13 +246,13 @@ public static void main(String args[]) throws IOException { } } ' - + */ // Create Ingest to Modify Dates: /* - + curl -X PUT "localhost:9200/_ingest/pipeline/seats" -H 'Content-Type: application/json' -d' { "description": "update datetime for seats", @@ -265,7 +265,7 @@ public static void main(String args[]) throws IOException { ] } ' - + */ public void testIngestProcessorScript() { @@ -304,9 +304,9 @@ public void testIngestProcessorScript() { // Post Generated Data: /* - + curl -XPOST localhost:9200/seats/seat/_bulk?pipeline=seats -H "Content-Type: application/x-ndjson" --data-binary "@/home/jdconrad/test/seats.json" - + */ // Use script_fields API to add two extra fields to the hits diff --git a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java index aca00b42a9331..d96e3212e05a2 100644 --- a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java +++ b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java @@ -94,7 +94,7 @@ public void testDCGAt() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -103,7 +103,7 @@ public void testDCGAt() { 4 | 2 | 3.0 | 2.321928094887362 | 1.2920296742201793 5 | 1 | 1.0 | 2.584962500721156  | 0.38685280723454163 6 | 0 | 0.0 | 2.807354922057604  | 0.0 - + idcg = 14.595390756454922 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -146,7 +146,7 @@ public void testDCGAtSixMissingRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) ---------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -155,7 +155,7 @@ public void testDCGAtSixMissingRatings() { 4 | 1 | 1.0 | 2.321928094887362   | 0.43067655807339 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -203,7 +203,7 @@ public void testDCGAtFourMoreRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -213,7 +213,7 @@ public void testDCGAtFourMoreRatings() { --------------------------------------------------------------------------------------- 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); diff --git a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java index 288b7e370c647..9bc97d0213e73 100644 --- a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java +++ b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java @@ -61,6 +61,7 @@ import org.opensearch.tasks.TaskInfo; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.transport.client.Client; +import org.hamcrest.Matcher; import org.junit.Before; import java.util.Arrays; diff --git a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 new file mode 100644 index 0000000000000..4872d644799f5 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 @@ -0,0 +1 @@ +c3ba307b915d6d506e98ffbb49e6d2d12edad65b \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 deleted file mode 100644 index 2770835697e79..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.36.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -227d4d4957ccc3dc5761bd897e3a0ee587e750a7 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java b/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java index 6fb320aba0334..c81f4d3c270e7 100644 --- a/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java +++ b/plugins/arrow-flight-rpc/src/main/java/org/opensearch/arrow/flight/bootstrap/FlightClientManager.java @@ -35,6 +35,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -246,6 +247,10 @@ private static boolean isValidNode(DiscoveryNode node) { return node != null && !node.getVersion().before(MIN_SUPPORTED_VERSION) && FeatureFlags.isEnabled(ARROW_STREAMS_SETTING); } + private Set getCurrentClusterNodes() { + return Objects.requireNonNull(clientConfig.clusterService).state().nodes().getNodes().keySet(); + } + @VisibleForTesting Map getFlightClients() { return flightClients; diff --git a/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java b/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java index b7428a69704aa..3b3c5fd82f87f 100644 --- a/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java +++ b/plugins/cache-ehcache/src/test/java/org/opensearch/cache/store/disk/EhCacheDiskCacheTests.java @@ -1264,6 +1264,35 @@ PersistentCacheManager buildCacheManager() { } } + private EhcacheDiskCache.Builder createDummyBuilder(String storagePath) throws IOException { + Settings settings = Settings.builder().build(); + MockRemovalListener removalListener = new MockRemovalListener<>(); + ToLongBiFunction, String> weigher = getWeigher(); + try (NodeEnvironment env = newNodeEnvironment(settings)) { + if (storagePath == null || storagePath.isBlank()) { + storagePath = env.nodePaths()[0].path.toString() + "/request_cache"; + } + return (EhcacheDiskCache.Builder) new EhcacheDiskCache.Builder().setThreadPoolAlias( + "ehcacheTest" + ) + .setIsEventListenerModeSync(true) + .setStoragePath(storagePath) + .setKeyType(String.class) + .setValueType(String.class) + .setKeySerializer(new StringSerializer()) + .setDiskCacheAlias("test1") + .setValueSerializer(new StringSerializer()) + .setDimensionNames(List.of(dimensionName)) + .setCacheType(CacheType.INDICES_REQUEST_CACHE) + .setSettings(settings) + .setExpireAfterAccess(TimeValue.MAX_VALUE) + .setMaximumWeightInBytes(CACHE_SIZE_IN_BYTES) + .setRemovalListener(removalListener) + .setWeigher(weigher) + .setStatsTrackingEnabled(false); + } + } + private List getRandomDimensions(List dimensionNames) { Random rand = Randomness.get(); int bound = 3; diff --git a/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java index e89737ae6adb7..a15538e48bd66 100644 --- a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java +++ b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java @@ -17,6 +17,7 @@ import java.util.List; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThrows; diff --git a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/asm-9.7.jar.sha1 b/plugins/repository-azure/licenses/asm-9.7.jar.sha1 new file mode 100644 index 0000000000000..84c9a9703af6d --- /dev/null +++ b/plugins/repository-azure/licenses/asm-9.7.jar.sha1 @@ -0,0 +1 @@ +073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/asm-9.8.jar.sha1 b/plugins/repository-azure/licenses/asm-9.8.jar.sha1 deleted file mode 100644 index 24005efca428d..0000000000000 --- a/plugins/repository-azure/licenses/asm-9.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc19ecb3f7889b7860697215cae99c0f9b6f6b4b \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/repository-azure/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/repository-azure/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 deleted file mode 100644 index 9b2965f3efca0..0000000000000 --- a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cae13eba442238be7f265dd7c5681a63fb22bf71 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..61ee41aa8adf4 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 @@ -0,0 +1 @@ +069cb3b7bd34b3f7842cc4a6fd717981433bf73e \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 deleted file mode 100644 index 6d0a55ebdd7a4..0000000000000 --- a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a25fe2f5607fea9e00ed00cf81b7aa2eaacbbd6e \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..7b9ab1d1e08d1 --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 @@ -0,0 +1 @@ +7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c8766eb9dcbdd..0000000000000 --- a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0ba7b7b68e0c564dd69ba757bdfc93b04e884478 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..b98599718965b --- /dev/null +++ b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +048c96032e5a428739e28ff04973717c032df598 \ No newline at end of file diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java index 7688b3c8b93ab..19c9af317247f 100644 --- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java +++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java @@ -172,7 +172,7 @@ public Tuple> client(String clientName) { * Obtains a {@code BlobServiceClient} on each invocation using the current client * settings. BlobServiceClient is thread safe and and could be cached but the settings * can change, therefore the instance might be recreated from scratch. - + * @param clientName client name * @param statsCollector statistics collector * @return the {@code BlobServiceClient} instance and context diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 deleted file mode 100644 index c96fec30e5fc5..0000000000000 --- a/plugins/repository-s3/licenses/jackson-annotations-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f30a05d2eee0ab700cdc27aa5967e934d3042b2 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..a06e1d5f28425 --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 @@ -0,0 +1 @@ +985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 deleted file mode 100644 index c310f4f68ca92..0000000000000 --- a/plugins/repository-s3/licenses/jackson-databind-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -42c617beb411ee813bdc39a287424bfb19d99185 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..eedbfff66c705 --- /dev/null +++ b/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 @@ -0,0 +1 @@ +deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java index 606fdc317df16..0c697d2cc5e8c 100644 --- a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java +++ b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java @@ -24,7 +24,7 @@ public class OTelTelemetry implements Telemetry { /** * Creates Telemetry instance - + */ /** * Creates Telemetry instance diff --git a/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 b/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 new file mode 100644 index 0000000000000..67723f6f51248 --- /dev/null +++ b/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 @@ -0,0 +1 @@ +32b299e45105aa9b0df8279c74dc1edfcf313ff0 \ No newline at end of file diff --git a/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 b/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 deleted file mode 100644 index 2770835697e79..0000000000000 --- a/plugins/transport-grpc/licenses/error_prone_annotations-2.36.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -227d4d4957ccc3dc5761bd897e3a0ee587e750a7 \ No newline at end of file diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java index 70d4cdb047a08..38f22f05a94e9 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java @@ -37,9 +37,9 @@ protected static RescorerBuilder parseFromProto(Rescore rescoreProto) { /* RescorerBuilder rescorer = null; // TODO populate rescorerBuilder - + return rescorer; - + */ } diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java index bdabec9dc28a0..929eb3b19d646 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java @@ -8,6 +8,8 @@ package org.opensearch.plugin.transport.grpc.proto.response.exceptions; import org.opensearch.core.action.ShardOperationFailedException; +import org.opensearch.core.xcontent.ToXContent; +import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ObjectMap; /** diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java index 40edb78374579..c5a26930d9300 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java @@ -11,6 +11,8 @@ import org.opensearch.action.support.replication.ReplicationResponse; import org.opensearch.core.action.ShardOperationFailedException; import org.opensearch.core.action.support.DefaultShardOperationFailedException; +import org.opensearch.core.xcontent.ToXContent; +import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ShardFailure; import org.opensearch.snapshots.SnapshotShardFailure; diff --git a/server/licenses/jackson-core-2.17.3.jar.sha1 b/server/licenses/jackson-core-2.17.3.jar.sha1 deleted file mode 100644 index 13c532bb8cfc9..0000000000000 --- a/server/licenses/jackson-core-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1d6eb3e959c737692b720d3492b2f1f34c4c8579 \ No newline at end of file diff --git a/server/licenses/jackson-core-2.18.2.jar.sha1 b/server/licenses/jackson-core-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..96350c9307ae7 --- /dev/null +++ b/server/licenses/jackson-core-2.18.2.jar.sha1 @@ -0,0 +1 @@ +fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 deleted file mode 100644 index 6ff493a7256c9..0000000000000 --- a/server/licenses/jackson-dataformat-cbor-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5286b5df35824b8c2a8ceae9a54e99dca9220e15 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..8b946b98ddbf9 --- /dev/null +++ b/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 @@ -0,0 +1 @@ +d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 deleted file mode 100644 index 7d71c29876246..0000000000000 --- a/server/licenses/jackson-dataformat-smile-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cd19020c7bace93ce269e85ac6fee782a6bf4e16 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..9fbdb9b3a2506 --- /dev/null +++ b/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 @@ -0,0 +1 @@ +44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 b/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 deleted file mode 100644 index 332ff6d34fdc1..0000000000000 --- a/server/licenses/jackson-dataformat-yaml-2.17.3.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -536e9d9ee966cf40a8b5d2f9ba505551364d0ad5 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 new file mode 100644 index 0000000000000..9dac9ee8e1e72 --- /dev/null +++ b/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 @@ -0,0 +1 @@ +d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java index f428eeace7410..912c48d7bbdfe 100644 --- a/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java @@ -503,6 +503,12 @@ public void testDiskMonitorResetLastRuntimeMilliSecOnlyInFirstCall() throws Exce }, 30L, TimeUnit.SECONDS); } + private String populateNode(final String dataNodeName) throws Exception { + final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT); + createAndPopulateIndex(indexName, dataNodeName); + return indexName; + } + private void createIndex(String indexName, String nodeName, boolean isWarmIndex) throws Exception { final Settings.Builder indexSettingBuilder = Settings.builder() .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0) diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java index 6f26515e7b75e..e2db9f85131a9 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java @@ -1617,7 +1617,7 @@ public void testOngoingRecoveryAndClusterManagerFailOver() throws Exception { /* Shard assignment is stuck because recovery is blocked at CLEAN_FILES stage. Once, it times out after 60s the replica shards get assigned. https://github.com/opensearch-project/OpenSearch/issues/18098. - + Stack trace: Caused by: org.opensearch.transport.ReceiveTimeoutTransportException: [node_t3][127.0.0.1:56648][internal:index/shard/recovery/clean_files] request_id [20] timed out after [60026ms] at org.opensearch.transport.TransportService$TimeoutHandler.run(TransportService.java:1399) ~[main/:?] diff --git a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java index 7a721c395df60..d046f41ce0590 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java @@ -232,14 +232,14 @@ public void testRemotePrimaryDocRepAndRemoteReplica() throws Exception { public void testRetentionLeasePresentOnDocrepReplicaButNotRemote() throws Exception { /* Reducing indices.memory.shard_inactive_time to force a flush and trigger translog sync, instead of relying on Global CKP Sync action which doesn't run on remote enabled copies - + Under steady state, RetentionLeases would be on (GlobalCkp + 1) on a docrep enabled shard copy and (GlobalCkp) for a remote enabled shard copy. This is because we block translog sync on remote enabled shard copies during the GlobalCkpSync background task. - + RLs on remote enabled copies are brought up to (GlobalCkp + 1) upon a flush request issued by IndexingMemoryController when the shard becomes inactive after SHARD_INACTIVE_TIME_SETTING interval. - + Flush triggers a force sync of translog which bumps the RetentionLease sequence number along with it */ extraSettings = Settings.builder().put(IndexingMemoryController.SHARD_INACTIVE_TIME_SETTING.getKey(), "3s").build(); @@ -668,10 +668,10 @@ public void testFailoverRemotePrimaryToDocrepReplicaReseedToRemotePrimary() thro /* Performs the same experiment as testRemotePrimaryDocRepReplica. - + This ensures that the primary shard for the index has moved over to remote enabled node whereas the replica copy is still left behind on the docrep nodes - + At this stage, segrep lag computation shouldn't consider the docrep shard copy while calculating bytes lag */ public void testZeroSegrepLagForShardsWithMixedReplicationGroup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java index b518cc7f7bab6..67316ed0e6e6b 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java @@ -16,6 +16,8 @@ import java.nio.file.Path; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; + @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexPrimaryRelocationIT extends IndexPrimaryRelocationIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java index 0f0bbe7dcab4b..1961b0fa43705 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java @@ -26,6 +26,7 @@ import java.nio.file.Path; import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_CHUNK_SIZE_SETTING; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexRecoveryIT extends IndexRecoveryIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java index 69e45e41bd843..e2fada2e3496c 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreClusterStateRestoreIT.java @@ -83,6 +83,10 @@ protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), true).build(); } + private void addNewNodes(int dataNodeCount, int clusterManagerNodeCount) { + internalCluster().startNodes(dataNodeCount + clusterManagerNodeCount); + } + private Map initialTestSetup(int shardCount, int replicaCount, int dataNodeCount, int clusterManagerNodeCount) { prepareCluster(clusterManagerNodeCount, dataNodeCount, INDEX_NAME, replicaCount, shardCount); Map indexStats = indexData(1, false, INDEX_NAME); diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java index ab133c28e1ef7..6cfc76b7e3223 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java @@ -16,6 +16,8 @@ import java.nio.file.Path; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; + /** * This class executes the SegmentReplicationPressureIT suite with remote store integration enabled. */ diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java index a1e2f1ee32e99..ccb4af8386472 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java @@ -427,20 +427,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java index f743f5e737d09..49031bfd3fc1d 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java @@ -414,20 +414,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java index fe07b31238787..5483db285dded 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java @@ -614,7 +614,7 @@ public void testMultiValuedFieldWithValueScript() throws Exception { [9, 10] [10, 11] [11, 12] - + r1: 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12 @@ -769,7 +769,7 @@ public void testScriptMultiValued() throws Exception { [8, 9] [9, 10] [10, 11] - + r1: 1, 2, 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11 diff --git a/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java index 3f8e14d116a73..89c73d2e59485 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java @@ -398,4 +398,28 @@ private void createIndexMappingsFromObjectType(String indexName, List ty indexRequestBuilder.setMapping(mappings.toArray(new String[0])).get(); ensureGreen(); } + + // Convert Integer, Short, Byte and Boolean to Int in order to match the conversion done + // by the internal hits when populating the sort values. + private List convertSortValues(List sortValues) { + List converted = new ArrayList<>(); + for (int i = 0; i < sortValues.size(); i++) { + Object from = sortValues.get(i); + if (from instanceof Short) { + converted.add(((Short) from).intValue()); + } else if (from instanceof Byte) { + converted.add(((Byte) from).intValue()); + } else if (from instanceof Boolean) { + boolean b = (boolean) from; + if (b) { + converted.add(1); + } else { + converted.add(0); + } + } else { + converted.add(from); + } + } + return converted; + } } diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java index 6894b4c7f3654..ee4622a7d0f40 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java @@ -35,6 +35,7 @@ import static org.opensearch.index.remote.RemoteStoreEnums.DataCategory.SEGMENTS; import static org.opensearch.index.remote.RemoteStoreEnums.DataType.LOCK_FILES; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.comparesEqualTo; import static org.hamcrest.Matchers.is; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java index 60dc20aeceac8..e84de36df2fca 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java @@ -51,6 +51,7 @@ import java.util.Map; import java.util.concurrent.TimeUnit; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.snapshots.SnapshotsService.MAX_SHARDS_ALLOWED_IN_STATUS_API; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java index cb2a408877013..bb5cc89d4e1d5 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java @@ -17,6 +17,8 @@ import java.nio.file.Path; +import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; + @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class SystemRepositoryIT extends AbstractSnapshotIntegTestCase { protected Path absolutePath; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java index b95ad18471d0e..17b633c533218 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java @@ -146,6 +146,19 @@ public NodesInfoRequest removeMetric(String metric) { return this; } + /** + * Helper method for adding and removing metrics. Used when deserializing + * a NodesInfoRequest from an ordered list of booleans. + * + * @param addMetric Whether or not to include a metric. + * @param metricName Name of the metric to include or remove. + */ + private void optionallyAddMetric(boolean addMetric, String metricName) { + if (addMetric) { + requestedMetrics.add(metricName); + } + } + @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java index 2392f28e6bbcb..db45d19dcdcb0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java @@ -172,6 +172,17 @@ public NodesStatsRequest removeMetric(String metric) { return this; } + /** + * Helper method for adding metrics during deserialization. + * @param includeMetric Whether or not to include a metric. + * @param metricName Name of the metric to add. + */ + private void optionallyAddMetric(boolean includeMetric, String metricName) { + if (includeMetric) { + requestedMetrics.add(metricName); + } + } + @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); diff --git a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java index 438597030c5ca..2caea2a8431a4 100644 --- a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java @@ -32,6 +32,7 @@ package org.opensearch.cluster.action.index; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.mapping.put.AutoPutMappingAction; import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest; import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; @@ -43,6 +44,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.RunOnce; +import org.opensearch.common.util.concurrent.UncategorizedExecutionException; import org.opensearch.core.action.ActionListener; import org.opensearch.core.index.Index; import org.opensearch.core.xcontent.MediaTypeRegistry; @@ -148,6 +150,19 @@ protected void sendUpdateMapping(Index index, Mapping mappingUpdate, ActionListe ); } + // todo: this explicit unwrap should not be necessary, but is until guessRootCause is fixed to allow wrapped non-es exception. + private static Exception unwrapException(Exception cause) { + return cause instanceof OpenSearchException ? unwrapEsException((OpenSearchException) cause) : cause; + } + + private static RuntimeException unwrapEsException(OpenSearchException esEx) { + Throwable root = esEx.unwrapCause(); + if (root instanceof RuntimeException) { + return (RuntimeException) root; + } + return new UncategorizedExecutionException("Failed execution", root); + } + /** * An adjustable semaphore * diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java index 9f52b08792e1a..538d49d4e4701 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java @@ -80,14 +80,14 @@ private void setAwarenessAttributes(List awarenessAttributes) { /* For a cluster having zone as awareness attribute , it will return the size of zones if set it forced awareness attributes - + If there are multiple forced awareness attributes, it will return size of the largest list, as all copies of data is supposed to get distributed amongst those. - + cluster.routing.allocation.awareness.attributes: rack_id , zone cluster.routing.allocation.awareness.force.zone.values: zone1, zone2 cluster.routing.allocation.awareness.force.rack_id.values: rack_id1, rack_id2, rack_id3 - + In this case, awareness attributes would be 3. */ public int maxAwarenessAttributes() { diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index 42218310a3a12..bd5b694f4fe41 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -66,6 +66,7 @@ import java.util.Map; import java.util.Set; +import static org.opensearch.cluster.action.shard.ShardStateAction.FOLLOW_UP_REROUTE_PRIORITY_SETTING; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_REBALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.INDEX_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java index 5e35f587e7fa1..a07f3eb9d95e1 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java @@ -116,7 +116,7 @@ public String index() { } /** - + * Get the id of the shard which allocation should be canceled * @return id of the shard which allocation should be canceled */ diff --git a/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java b/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java index c2efb897f8749..b62ae1f1d3956 100644 --- a/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java +++ b/server/src/main/java/org/opensearch/common/io/VersionedCodecStreamWrapper.java @@ -13,6 +13,7 @@ import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.codecs.CodecUtil; import org.apache.lucene.index.CorruptIndexException; +import org.apache.lucene.store.ChecksumIndexInput; import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexOutput; @@ -96,6 +97,15 @@ private int checkHeader(IndexInput indexInput) throws IOException { return CodecUtil.checkHeader(indexInput, this.codec, minVersion, this.currentVersion); } + /** + * Reads footer from file input stream containing checksum. + * The {@link IndexInput#getFilePointer()} should be at the footer start position. + * @param indexInput file input stream + */ + private void checkFooter(ChecksumIndexInput indexInput) throws IOException { + CodecUtil.checkFooter(indexInput); + } + /** * Writes header with {@code this.codec} and {@code this.currentVersion} to the file output stream * @param indexOutput file output stream diff --git a/server/src/main/java/org/opensearch/env/NodeEnvironment.java b/server/src/main/java/org/opensearch/env/NodeEnvironment.java index a6e6679b9e272..4e284f1fe5c3e 100644 --- a/server/src/main/java/org/opensearch/env/NodeEnvironment.java +++ b/server/src/main/java/org/opensearch/env/NodeEnvironment.java @@ -677,6 +677,18 @@ public void deleteIndexDirectoryUnderLock(Index index, IndexSettings indexSettin } } + private void deleteIndexFileCacheDirectory(Index index) { + final Path indexCachePath = fileCacheNodePath().fileCachePath.resolve(index.getUUID()); + logger.trace("deleting index {} file cache directory, path: [{}]", index, indexCachePath); + if (Files.exists(indexCachePath)) { + try { + IOUtils.rm(indexCachePath); + } catch (IOException e) { + logger.error(() -> new ParameterizedMessage("Failed to delete cache path for index {}", index), e); + } + } + } + /** * Tries to lock all local shards for the given index. If any of the shard locks can't be acquired * a {@link ShardLockObtainFailedException} is thrown and all previously acquired locks are released. diff --git a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java index d72716a461389..ce14cb3442f75 100644 --- a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java +++ b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java @@ -43,6 +43,7 @@ import org.opensearch.indices.store.ShardAttributes; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata; +import org.opensearch.indices.store.TransportNodesListShardStoreMetadataHelper; import org.opensearch.indices.store.TransportNodesListShardStoreMetadataHelper.StoreFilesMetadata; import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry; @@ -837,6 +838,17 @@ protected void removeShard(ShardId shardId) { this.batchInfo.remove(shardId); } + private TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata buildEmptyReplicaShardResponse() { + return new TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata( + new TransportNodesListShardStoreMetadataHelper.StoreFilesMetadata( + null, + Store.MetadataSnapshot.EMPTY, + Collections.emptyList() + ), + null + ); + } + private void removeFromBatch(ShardRouting shard) { removeShard(shard.shardId()); clearShardFromCache(shard.shardId()); diff --git a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java index 943f5becc528a..c68cce4034716 100644 --- a/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java +++ b/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java @@ -1948,6 +1948,13 @@ public void setRemoteStateReadTimeout(TimeValue remoteStateReadTimeout) { this.remoteStateReadTimeout = remoteStateReadTimeout; } + private BlobStoreTransferService getBlobStoreTransferService() { + if (blobStoreTransferService == null) { + blobStoreTransferService = new BlobStoreTransferService(getBlobStore(), threadpool); + } + return blobStoreTransferService; + } + Set getAllClusterUUIDs(String clusterName) throws IOException { Map clusterUUIDMetadata = clusterUUIDContainer(blobStoreRepository, clusterName).children(); if (clusterUUIDMetadata == null) { @@ -1956,6 +1963,22 @@ Set getAllClusterUUIDs(String clusterName) throws IOException { return Collections.unmodifiableSet(clusterUUIDMetadata.keySet()); } + private Map getLatestManifestForAllClusterUUIDs(String clusterName, Set clusterUUIDs) { + Map manifestsByClusterUUID = new HashMap<>(); + for (String clusterUUID : clusterUUIDs) { + try { + Optional manifest = getLatestClusterMetadataManifest(clusterName, clusterUUID); + manifest.ifPresent(clusterMetadataManifest -> manifestsByClusterUUID.put(clusterUUID, clusterMetadataManifest)); + } catch (Exception e) { + throw new IllegalStateException( + String.format(Locale.ROOT, "Exception in fetching manifest for clusterUUID: %s", clusterUUID), + e + ); + } + } + return manifestsByClusterUUID; + } + /** * This method creates a valid cluster UUID chain. * diff --git a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java index 653cf9f384867..2b37ed954e7d4 100644 --- a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java +++ b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java @@ -25,7 +25,7 @@ public class OnBehalfOfClaims { * Constructor for OnBehalfOfClaims * @param aud the Audience for the token * @param expiration_seconds the length of time in seconds the token is valid - + */ public OnBehalfOfClaims(String aud, Long expiration_seconds) { this.audience = aud; diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java index c39e83cb29687..3db3cbe9652fc 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java @@ -1102,6 +1102,18 @@ private StarTreeDocument createAggregatedDocs(InMemoryTreeNode node) throws IOEx return aggregatedStarTreeDocument; } + /** + * Handles the dimension of date time field type + * + * @param fieldName name of the field + * @param val value of the field + * @return returns the converted dimension of the field to a particular granularity + */ + private long handleDateDimension(final String fieldName, final long val) { + // TODO: handle timestamp granularity + return val; + } + public void close() throws IOException { } diff --git a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java index 504903b737e7c..e66aa3444c214 100644 --- a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java +++ b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureSettings.java @@ -101,6 +101,10 @@ long getMinRefreshSeqNoLagLimit() { return minRefreshSeqNoLagLimit; } + private void setMinRefreshSeqNoLagLimit(long minRefreshSeqNoLagLimit) { + this.minRefreshSeqNoLagLimit = minRefreshSeqNoLagLimit; + } + double getBytesLagVarianceFactor() { return bytesLagVarianceFactor; } diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java index 200a617dfc509..9c0ea42810e16 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java @@ -355,7 +355,7 @@ public String snapshot() { /* Returns list of files in the shard - + @return list of files */ diff --git a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java index a9a03428d2a7e..e697e16d5e8a0 100644 --- a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java +++ b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java @@ -215,7 +215,7 @@ static void download(TranslogTransferManager translogTransferManager, Path locat In Primary to Primary relocation , there can be concurrent upload and download of translog. While translog files are getting downloaded by new primary, it might hence be deleted by the primary Hence we retry if tlog/ckp files are not found . - + This doesn't happen in last download , where it is ensured that older primary has stopped modifying tlog data. */ IOException ex = null; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java index 4cab2bdd979de..eb187224ebf07 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java @@ -372,7 +372,7 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS * @param taskName the task's name * @param taskParams the task's parameters * @param currentState the current {@link ClusterState} - + * @return a new {@link Assignment} */ private Assignment createAssignment( diff --git a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java index 651761e6b29e5..80a4619f56b64 100644 --- a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java @@ -667,7 +667,7 @@ public PipelineAggregationSpec( * @param builderReader the reader registered for this aggregation's builder. Typically, a reference to a constructor that takes a * {@link StreamInput} * @param parser reads the aggregation builder from XContent - + */ public PipelineAggregationSpec( String name, diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java index d9a9471aca49e..86caa6d3b5059 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java @@ -120,7 +120,7 @@ public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long + N01 / N * Math.log((N * N01) / (N0_ * N_1)) + N10 / N * Math.log((N * N10) / (N1_ * N_0)) + N00 / N * Math.log((N * N00) / (N0_ * N_0)); - + but we get many NaN if we do not take case of the 0s */ double getMITerm(double Nxy, double Nx_, double N_y, double N) { diff --git a/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java b/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java index 06a555790ddb0..1e2264593310d 100644 --- a/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java +++ b/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java @@ -322,6 +322,17 @@ public void onFailure(Exception e) { }); } + private boolean isRemoteSnapshot(ShardId shardId) { + final IndexService indexService = indicesService.indexService(shardId.getIndex()); + if (indexService != null) { + final IndexShard shard = indexService.getShardOrNull(shardId.id()); + if (shard != null) { + return shard.isRemoteSnapshot(); + } + } + return false; + } + // package private for testing static String summarizeFailure(Throwable t) { if (t.getCause() == null) { diff --git a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java index 46b3abc500586..b67b00bb42054 100644 --- a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java +++ b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java @@ -426,7 +426,7 @@ public void registerClusterSettingsListeners(ClusterSettings clusterSettings) { /* Scaling threadpool can provide only max and core Fixed/ResizableQueue can provide only size - + For example valid settings would be for scaling and fixed thead pool cluster.threadpool.snapshot.max : "5", cluster.threadpool.snapshot.core : "5", diff --git a/server/src/main/java/org/opensearch/transport/TransportLogger.java b/server/src/main/java/org/opensearch/transport/TransportLogger.java index ead31c49b2092..997b3bb5ba18e 100644 --- a/server/src/main/java/org/opensearch/transport/TransportLogger.java +++ b/server/src/main/java/org/opensearch/transport/TransportLogger.java @@ -37,7 +37,9 @@ import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.io.IOUtils; import org.opensearch.core.common.bytes.BytesReference; +import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.compress.CompressorRegistry; import java.io.IOException; @@ -173,4 +175,16 @@ private static String format(TcpChannel channel, InboundMessage message, String } return sb.toString(); } + + private static StreamInput decompressingStream(byte status, StreamInput streamInput) throws IOException { + if (TransportStatus.isCompress(status) && streamInput.available() > 0) { + try { + return new InputStreamStreamInput(CompressorRegistry.defaultCompressor().threadLocalInputStream(streamInput)); + } catch (IllegalArgumentException e) { + throw new IllegalStateException("stream marked as compressed, but is missing deflate header"); + } + } else { + return streamInput; + } + } } diff --git a/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java b/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java index 919c909578076..ceb0c6f1c675b 100644 --- a/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java +++ b/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodesTests.java @@ -521,4 +521,18 @@ public void testMaxMinNodeVersion() { assertEquals(Version.fromString("1.1.0"), build.getMaxNodeVersion()); assertEquals(Version.fromString("5.1.0"), build.getMinNodeVersion()); } + + private DiscoveryNode buildDiscoveryNodeFromExisting(DiscoveryNode existing, Version newVersion) { + return new DiscoveryNode( + existing.getName(), + existing.getId(), + existing.getEphemeralId(), + existing.getHostName(), + existing.getHostAddress(), + existing.getAddress(), + existing.getAttributes(), + existing.getRoles(), + newVersion + ); + } } diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java index 77b924550821f..11cbe89645657 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/BalanceConfigurationTests.java @@ -619,6 +619,29 @@ private void verifyPerIndexPrimaryBalance(ClusterState currentState) { } } + private void verifySkewedPrimaryBalance(ClusterState clusterState, int delta) throws Exception { + assertBusy(() -> { + RoutingNodes nodes = clusterState.getRoutingNodes(); + int totalPrimaryShards = 0; + for (final IndexRoutingTable index : clusterState.getRoutingTable().indicesRouting().values()) { + totalPrimaryShards += index.primaryShardsActive(); + } + final int avgPrimaryShardsPerNode = (int) Math.ceil(totalPrimaryShards * 1f / clusterState.getRoutingNodes().size()); + int maxPrimaryShardOnNode = Integer.MIN_VALUE; + int minPrimaryShardOnNode = Integer.MAX_VALUE; + for (RoutingNode node : nodes) { + final int primaryCount = node.shardsWithState(STARTED) + .stream() + .filter(ShardRouting::primary) + .collect(Collectors.toList()) + .size(); + maxPrimaryShardOnNode = Math.max(maxPrimaryShardOnNode, primaryCount); + minPrimaryShardOnNode = Math.min(minPrimaryShardOnNode, primaryCount); + } + assertTrue(maxPrimaryShardOnNode - minPrimaryShardOnNode < delta); + }, 60, TimeUnit.SECONDS); + } + private void verifyPrimaryBalance(ClusterState clusterState, float buffer) throws Exception { assertBusy(() -> { RoutingNodes nodes = clusterState.getRoutingNodes(); diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java index 2b07d711e2e9b..cfdaaab4e117d 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java @@ -194,6 +194,14 @@ protected ClusterState createRemoteIndex(ClusterState state, String indexName) { return ClusterState.builder(state).metadata(metadata).routingTable(routingTable).build(); } + private AllocationDeciders remoteAllocationDeciders(Settings settings, ClusterSettings clusterSettings) { + List deciders = new ArrayList<>( + ClusterModule.createAllocationDeciders(settings, clusterSettings, Collections.emptyList()) + ); + Collections.shuffle(deciders, random()); + return new AllocationDeciders(deciders); + } + public AllocationService createRemoteCapableAllocationService() { Settings settings = Settings.Builder.EMPTY_SETTINGS; return new OpenSearchAllocationTestCase.MockAllocationService( diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java index 824d15030f052..e55a9de160114 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsRebalanceShardsTests.java @@ -95,4 +95,16 @@ private int getTotalShardCountAcrossNodes(final Map nodePrimari } return totalShardCount; } + + /** + * Asserts that the expected value is within the variance range. + *

+ * Being used to assert the average number of shards per node. + * Variance is required in case of non-absolute mean values; + * for example, total number of remote capable nodes in a cluster. + */ + private void assertInRange(int actual, int expectedMean, int variance) { + assertTrue(actual >= expectedMean - variance); + assertTrue(actual <= expectedMean + variance); + } } diff --git a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java index 131beda510beb..e6e81c94e7f32 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteStoreMigrationAllocationDeciderTests.java @@ -583,6 +583,10 @@ private Settings getCustomSettings(String direction, String compatibilityMode, I return builder.build(); } + private String getRandomCompatibilityMode() { + return randomFrom(RemoteStoreNodeService.CompatibilityMode.STRICT.mode, RemoteStoreNodeService.CompatibilityMode.MIXED.mode); + } + private ClusterSettings getClusterSettings(Settings settings) { return new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); } diff --git a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java index a8f5a87c53970..63501f878d55d 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java @@ -35,6 +35,7 @@ import org.opensearch.core.index.Index; import org.opensearch.gateway.remote.ClusterMetadataManifest; import org.opensearch.gateway.remote.RemoteClusterStateUtils; +import org.opensearch.index.remote.RemoteStoreEnums; import org.opensearch.index.remote.RemoteStorePathStrategy; import org.opensearch.index.remote.RemoteStoreUtils; import org.opensearch.index.translog.transfer.BlobStoreTransferService; @@ -775,6 +776,14 @@ private ClusterState createClusterState(String indexName) { .build(); } + private BlobPath getPath() { + BlobPath indexRoutingPath = basePath.add(INDEX_ROUTING_TABLE); + return RemoteStoreEnums.PathType.HASHED_PREFIX.path( + RemoteStorePathStrategy.PathInput.builder().basePath(indexRoutingPath).indexUUID("uuid").build(), + RemoteStoreEnums.PathHashAlgorithm.FNV_1A_BASE64 + ); + } + public void testDeleteStaleIndexRoutingPaths() throws IOException { doNothing().when(blobContainer).deleteBlobsIgnoringIfNotExists(any()); when(blobStore.blobContainer(any())).thenReturn(blobContainer); diff --git a/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java b/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java index 9b91e51fab2f5..2edde8281b11a 100644 --- a/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java +++ b/server/src/test/java/org/opensearch/gateway/PrimaryShardBatchAllocatorTests.java @@ -75,6 +75,13 @@ public void buildTestAllocator() { this.batchAllocator = new TestBatchAllocator(); } + private void allocateAllUnassigned(final RoutingAllocation allocation) { + final RoutingNodes.UnassignedShards.UnassignedIterator iterator = allocation.routingNodes().unassigned().iterator(); + while (iterator.hasNext()) { + batchAllocator.allocateUnassigned(iterator.next(), allocation, iterator); + } + } + private void allocateAllUnassignedBatch(final RoutingAllocation allocation) { final RoutingNodes.UnassignedShards.UnassignedIterator iterator = allocation.routingNodes().unassigned().iterator(); List shardsToBatch = new ArrayList<>(); diff --git a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java index 930cb32ba668d..d9de899bed529 100644 --- a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java +++ b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java @@ -3919,6 +3919,30 @@ private void mockObjectsForGettingPreviousClusterUUID( when(blobStoreRepository.getCompressor()).thenReturn(compressor); } + private ClusterMetadataManifest generateV1ClusterMetadataManifest( + String clusterUUID, + String previousClusterUUID, + String stateUUID, + List uploadedIndexMetadata, + String globalMetadataFileName, + Boolean isUUIDCommitted + ) { + return ClusterMetadataManifest.builder() + .indices(uploadedIndexMetadata) + .clusterTerm(1L) + .stateVersion(1L) + .stateUUID(stateUUID) + .clusterUUID(clusterUUID) + .nodeId("nodeA") + .opensearchVersion(VersionUtils.randomOpenSearchVersion(random())) + .previousClusterUUID(previousClusterUUID) + .committed(true) + .clusterUUIDCommitted(isUUIDCommitted) + .globalMetadataFileName(globalMetadataFileName) + .codecVersion(CODEC_V1) + .build(); + } + private ClusterMetadataManifest generateClusterMetadataManifest( String clusterUUID, String previousClusterUUID, diff --git a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java index 9a96377b24466..5603fe4e30f9f 100644 --- a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java +++ b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java @@ -451,7 +451,7 @@ public void testStarKeywordDocValuesWithMissingDocsInAllSegments() throws IOExce /** * keyword1 keyword2 | [ sum, value_count, min, max[sndv]] , doc_count [null, null] | [6.0, 4.0, 1.0, 2.0, 4.0] - + */ StarTreeDocument[] expectedStarTreeDocuments = new StarTreeDocument[1]; expectedStarTreeDocuments[0] = new StarTreeDocument(new Long[] { null, null }, new Double[] { 6.0, 4.0, 1.0, 2.0, 4.0 }); diff --git a/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java b/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java index 2dd6189194abb..d6def0b075128 100644 --- a/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java +++ b/server/src/test/java/org/opensearch/index/compositeindex/datacube/startree/builder/StarTreeBuilderMergeFlowTests.java @@ -2306,6 +2306,47 @@ private StarTreeValues getStarTreeValuesWithKeywords( return starTreeValues; } + private StarTreeValues getStarTreeValuesWithKeywords( + SortedSetDocValues dimList, + SortedSetDocValues dimList2, + SortedSetDocValues dimList4, + SortedSetDocValues dimList3, + SortedNumericDocValues metricsList, + SortedNumericDocValues metricsList1, + StarTreeField sf, + String number + ) { + Map> dimDocIdSetIterators = Map.of( + "field1_minute", + () -> new SortedSetStarTreeValuesIterator(dimList), + "field1_half-hour", + () -> new SortedSetStarTreeValuesIterator(dimList4), + "field1_hour", + () -> new SortedSetStarTreeValuesIterator(dimList2), + "field3", + () -> new SortedSetStarTreeValuesIterator(dimList3) + ); + Map> metricDocIdSetIterators = new LinkedHashMap<>(); + + metricDocIdSetIterators.put( + fullyQualifiedFieldNameForStarTreeMetricsDocValues( + sf.getName(), + "field2", + sf.getMetrics().get(0).getMetrics().get(0).getTypeName() + ), + () -> new SortedNumericStarTreeValuesIterator(metricsList) + ); + metricDocIdSetIterators.put( + fullyQualifiedFieldNameForStarTreeMetricsDocValues( + sf.getName(), + "field2", + sf.getMetrics().get(0).getMetrics().get(1).getTypeName() + ), + () -> new SortedNumericStarTreeValuesIterator(metricsList1) + ); + return new StarTreeValues(sf, null, dimDocIdSetIterators, metricDocIdSetIterators, Map.of(SEGMENT_DOCS_COUNT, number), null); + } + private StarTreeValues getStarTreeValues( List dimList1, List docsWithField1, diff --git a/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java index b3e3ad6a7ec76..41ad9e8bcbb44 100644 --- a/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java +++ b/server/src/test/java/org/opensearch/rest/action/cat/RestCatSegmentReplicationActionTests.java @@ -31,6 +31,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.UUID; @@ -182,4 +183,8 @@ private void addTestFileMetadata(ReplicationLuceneIndex index, int startIndex, i } } } + + private static String percent(float percent) { + return String.format(Locale.ROOT, "%1.1f%%", percent); + } } diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java index a203996d03f07..88e281032d678 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java @@ -67,15 +67,15 @@ public static void main(String[] args) { final int numberOfShards = 10; final double skew = 2; // parameter of the zipf distribution final int size = 100; - + double totalWeight = 0; for (int rank = 1; rank <= numberOfUniqueTerms; ++rank) { totalWeight += weight(rank, skew); } - + int[] terms = new int[totalNumberOfTerms]; int len = 0; - + final int[] actualTopFreqs = new int[size]; for (int rank = 1; len < totalNumberOfTerms; ++rank) { int freq = (int) (weight(rank, skew) / totalWeight * totalNumberOfTerms); @@ -86,9 +86,9 @@ public static void main(String[] args) { actualTopFreqs[rank-1] = freq; } } - + final int maxTerm = terms[terms.length - 1] + 1; - + // shuffle terms Random r = new Random(0); for (int i = terms.length - 1; i > 0; --i) { @@ -104,7 +104,7 @@ public static void main(String[] args) { shards[i] = Arrays.copyOfRange(terms, upTo, upTo + (terms.length - upTo) / (numberOfShards - i)); upTo += shards[i].length; } - + final int[][] topShards = new int[numberOfShards][]; final int shardSize = BucketUtils.suggestShardSideQueueSize(size, numberOfShards); for (int shard = 0; shard < numberOfShards; ++shard) { @@ -118,7 +118,7 @@ public static void main(String[] args) { termIds[i] = i; } new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -128,16 +128,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return freqs[j] - freqs[i]; } }.sort(0, maxTerm); - + Arrays.fill(freqs, shardSize, freqs.length, 0); new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -147,16 +147,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return termIds[i] - termIds[j]; } }.sort(0, maxTerm); - + topShards[shard] = freqs; } - + final int[] computedTopFreqs = new int[size]; for (int[] freqs : topShards) { for (int i = 0; i < size; ++i) { @@ -174,7 +174,7 @@ protected int compare(int i, int j) { System.out.println("Computed freqs of top terms: " + Arrays.toString(computedTopFreqs)); System.out.println("Number of errors: " + numErrors + "/" + totalFreq); } - + private static double weight(int rank, double skew) { return 1d / Math.pow(rank, skew); }*/ diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java index a8539e81f3233..0bf23bd3e2cad 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java @@ -81,8 +81,8 @@ protected void createIdx(String keyFieldMapping) { protected void indexData() throws Exception { /* - - + + || || size = 3, shard_size = 5 || shard_size = size = 3 || ||==========||==================================================||===============================================|| || shard 1: || "1" - 5 | "2" - 4 | "3" - 3 | "4" - 2 | "5" - 1 || "1" - 5 | "3" - 3 | "2" - 4 || @@ -92,8 +92,8 @@ protected void indexData() throws Exception { || reduced: || "1" - 8 | "2" - 5 | "3" - 8 | "4" - 4 | "5" - 2 || || || || || "1" - 8, "3" - 8, "2" - 4 <= WRONG || || || "1" - 8 | "3" - 8 | "2" - 5 <= CORRECT || || - - + + */ List docs = new ArrayList<>(); diff --git a/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java b/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java index cb610a6139afc..f106aaa13dc48 100644 --- a/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java +++ b/server/src/test/java/org/opensearch/search/fetch/subphase/highlight/DerivedFieldFetchAndHighlightTests.java @@ -26,9 +26,13 @@ import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.index.IndexService; import org.opensearch.index.IndexSettings; +import org.opensearch.index.mapper.ContentPath; import org.opensearch.index.mapper.DefaultDerivedFieldResolver; import org.opensearch.index.mapper.DerivedField; import org.opensearch.index.mapper.DerivedFieldResolverFactory; +import org.opensearch.index.mapper.DerivedFieldSupportedTypes; +import org.opensearch.index.mapper.DerivedFieldType; +import org.opensearch.index.mapper.Mapper; import org.opensearch.index.mapper.MapperService; import org.opensearch.index.mapper.SourceToParse; import org.opensearch.index.query.QueryShardContext; @@ -470,4 +474,15 @@ private static ScriptService getScriptService() { ScriptService scriptService = new ScriptService(Settings.EMPTY, engines, ScriptModule.CORE_CONTEXTS); return scriptService; } + + private DerivedFieldType createDerivedFieldType(String name, String type, String script) { + Mapper.BuilderContext context = mock(Mapper.BuilderContext.class); + when(context.path()).thenReturn(new ContentPath()); + return new DerivedFieldType( + new DerivedField(name, type, new Script(ScriptType.INLINE, "mockscript", script, emptyMap())), + DerivedFieldSupportedTypes.getFieldMapperFromType(type, name, context, null), + DerivedFieldSupportedTypes.getIndexableFieldGeneratorType(type, name), + null + ); + } } diff --git a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java index ea44910bb526a..4f78d9166b414 100644 --- a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java +++ b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java @@ -78,10 +78,12 @@ import static org.opensearch.test.geo.RandomShapeGenerator.xRandomRectangle; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.not; +import static com.carrotsearch.randomizedtesting.RandomizedTest.assumeTrue; public class GeoShapeQueryTests extends GeoQueryTests { protected static final String[] PREFIX_TREES = new String[] { diff --git a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java index 758722ea4072a..0c08de252e4cd 100644 --- a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java @@ -215,7 +215,7 @@ public int allocateAndCheckIndexShardHotSpots(boolean expected, int nodes, Strin SameShardAllocationDecider, causing it to breach allocation constraint on another node. We need to differentiate between such hot spots v/s actual hot spots. - + A simple check could be to ensure there is no node with shards less than allocation limit, that can accept current shard. However, in current allocation algorithm, when nodes get throttled, shards are added to @@ -224,7 +224,7 @@ ModelNodes without adding them to actual cluster (RoutingNodes). As a result, weight function in balancer. RoutingNodes with {@link count} < {@link limit} may not have had the same count in the corresponding ModelNode seen by weight function. We hence use the following alternate check -- - + Given the way {@link limit} is defined, we should not have hot spots if *all* nodes are eligible to accept the shard. A hot spot is acceptable, if either all peer nodes have {@link count} > {@link limit}, or if even one node is diff --git a/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java b/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java index 69d7b9f511bfd..027b1bef84e7f 100644 --- a/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java +++ b/test/framework/src/main/java/org/opensearch/repositories/blobstore/BlobStoreTestUtil.java @@ -59,12 +59,14 @@ import org.opensearch.core.xcontent.MediaTypeRegistry; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; +import org.opensearch.index.IndexModule; import org.opensearch.repositories.IndexId; import org.opensearch.repositories.RepositoriesService; import org.opensearch.repositories.RepositoryData; import org.opensearch.repositories.ShardGenerations; import org.opensearch.snapshots.SnapshotId; import org.opensearch.snapshots.SnapshotInfo; +import org.opensearch.snapshots.SnapshotMissingException; import org.opensearch.test.InternalTestCluster; import org.opensearch.threadpool.ThreadPool; @@ -468,4 +470,24 @@ private static ClusterService mockClusterService(ClusterState initialState) { when(clusterService.getClusterSettings()).thenReturn(clusterSettings); return clusterService; } + + private static boolean isRemoteSnapshot(BlobStoreRepository repository, RepositoryData repositoryData, IndexId indexId) + throws IOException { + final Collection snapshotIds = repositoryData.getSnapshotIds(); + for (SnapshotId snapshotId : snapshotIds) { + try { + if (isRemoteSnapshot(repository.getSnapshotIndexMetaData(repositoryData, snapshotId, indexId))) { + return true; + } + } catch (SnapshotMissingException e) { + // Index does not exist in this snapshot so continue looping + } + } + return false; + } + + private static boolean isRemoteSnapshot(IndexMetadata metadata) { + final String storeType = metadata.getSettings().get(IndexModule.INDEX_STORE_TYPE_SETTING.getKey()); + return storeType != null && storeType.equals(IndexModule.Type.REMOTE_SNAPSHOT.getSettingsKey()); + } } diff --git a/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java b/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java index f03678ca4ca58..8c612d258f183 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java @@ -722,6 +722,30 @@ protected void refreshAllIndices() throws IOException { client().performRequest(refreshRequest); } + private static void deleteAllSLMPolicies() throws IOException { + Map policies; + + try { + Response response = adminClient().performRequest(new Request("GET", "/_slm/policy")); + policies = entityAsMap(response); + } catch (ResponseException e) { + if (RestStatus.METHOD_NOT_ALLOWED.getStatus() == e.getResponse().getStatusLine().getStatusCode() + || RestStatus.BAD_REQUEST.getStatus() == e.getResponse().getStatusLine().getStatusCode()) { + // If bad request returned, SLM is not enabled. + return; + } + throw e; + } + + if (policies == null || policies.isEmpty()) { + return; + } + + for (String policyName : policies.keySet()) { + adminClient().performRequest(new Request("DELETE", "/_slm/policy/" + policyName)); + } + } + /** * Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into * other tests. From 467293dbd10ec0bb1f2a5b1dcbcd64d7c75c1069 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 14:45:48 +0200 Subject: [PATCH 08/21] spotless und gradle updateSHAs --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f4be5224d4cd4..c3fea164e3a91 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -org.gradle.workers.max=2 +#org.gradle.workers.max=2 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ From 1e28daad9e387d195119f33a6b23a41d816fd30d Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:10:27 +0200 Subject: [PATCH 09/21] RemoveUnusedImports --- gradle.properties | 2 +- .../opensearch/client/documentation/ReindexDocumentationIT.java | 1 - .../opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java | 2 -- .../java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java | 1 - .../SegmentReplicationWithRemoteStorePressureIT.java | 2 -- .../java/org/opensearch/snapshots/DeleteSnapshotIT.java | 1 - .../opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java | 1 - .../java/org/opensearch/snapshots/SystemRepositoryIT.java | 2 -- .../routing/allocation/allocator/BalancedShardsAllocator.java | 1 - .../test/java/org/opensearch/search/geo/GeoShapeQueryTests.java | 2 -- 10 files changed, 1 insertion(+), 14 deletions(-) diff --git a/gradle.properties b/gradle.properties index c3fea164e3a91..f4be5224d4cd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -#org.gradle.workers.max=2 +org.gradle.workers.max=2 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ diff --git a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java index 9bc97d0213e73..288b7e370c647 100644 --- a/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java +++ b/modules/reindex/src/internalClusterTest/java/org/opensearch/client/documentation/ReindexDocumentationIT.java @@ -61,7 +61,6 @@ import org.opensearch.tasks.TaskInfo; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.transport.client.Client; -import org.hamcrest.Matcher; import org.junit.Before; import java.util.Arrays; diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java index 67316ed0e6e6b..b518cc7f7bab6 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexPrimaryRelocationIT.java @@ -16,8 +16,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexPrimaryRelocationIT extends IndexPrimaryRelocationIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java index 1961b0fa43705..0f0bbe7dcab4b 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteIndexRecoveryIT.java @@ -26,7 +26,6 @@ import java.nio.file.Path; import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_CHUNK_SIZE_SETTING; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class RemoteIndexRecoveryIT extends IndexRecoveryIT { diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java index 6cfc76b7e3223..ab133c28e1ef7 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/SegmentReplicationWithRemoteStorePressureIT.java @@ -16,8 +16,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - /** * This class executes the SegmentReplicationPressureIT suite with remote store integration enabled. */ diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java index ee4622a7d0f40..6894b4c7f3654 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/DeleteSnapshotIT.java @@ -35,7 +35,6 @@ import static org.opensearch.index.remote.RemoteStoreEnums.DataCategory.SEGMENTS; import static org.opensearch.index.remote.RemoteStoreEnums.DataType.LOCK_FILES; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.comparesEqualTo; import static org.hamcrest.Matchers.is; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java index e84de36df2fca..60dc20aeceac8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RemoteIndexSnapshotStatusApiIT.java @@ -51,7 +51,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; import static org.opensearch.snapshots.SnapshotsService.MAX_SHARDS_ALLOWED_IN_STATUS_API; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java index bb5cc89d4e1d5..cb2a408877013 100644 --- a/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SystemRepositoryIT.java @@ -17,8 +17,6 @@ import java.nio.file.Path; -import static org.opensearch.remotestore.RemoteStoreBaseIntegTestCase.remoteStoreClusterSettings; - @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class SystemRepositoryIT extends AbstractSnapshotIntegTestCase { protected Path absolutePath; diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index bd5b694f4fe41..42218310a3a12 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -66,7 +66,6 @@ import java.util.Map; import java.util.Set; -import static org.opensearch.cluster.action.shard.ShardStateAction.FOLLOW_UP_REROUTE_PRIORITY_SETTING; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.CLUSTER_PRIMARY_SHARD_REBALANCE_CONSTRAINT_ID; import static org.opensearch.cluster.routing.allocation.ConstraintTypes.INDEX_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID; diff --git a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java index 4f78d9166b414..ea44910bb526a 100644 --- a/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java +++ b/server/src/test/java/org/opensearch/search/geo/GeoShapeQueryTests.java @@ -78,12 +78,10 @@ import static org.opensearch.test.geo.RandomShapeGenerator.xRandomRectangle; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.not; -import static com.carrotsearch.randomizedtesting.RandomizedTest.assumeTrue; public class GeoShapeQueryTests extends GeoQueryTests { protected static final String[] PREFIX_TREES = new String[] { From 219d2619413881d3069da162d1daa0a853d3fc14 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:10:37 +0200 Subject: [PATCH 10/21] RemoveUnusedImports --- .../org/opensearch/identity/shiro/ShiroIdentityPluginTests.java | 1 - .../exceptions/ShardOperationFailedExceptionProtoUtils.java | 2 -- .../ShardOperationFailedExceptionProtoUtils.java | 2 -- 3 files changed, 5 deletions(-) diff --git a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java index a15538e48bd66..e89737ae6adb7 100644 --- a/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java +++ b/plugins/identity-shiro/src/test/java/org/opensearch/identity/shiro/ShiroIdentityPluginTests.java @@ -17,7 +17,6 @@ import java.util.List; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThrows; diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java index 929eb3b19d646..bdabec9dc28a0 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/ShardOperationFailedExceptionProtoUtils.java @@ -8,8 +8,6 @@ package org.opensearch.plugin.transport.grpc.proto.response.exceptions; import org.opensearch.core.action.ShardOperationFailedException; -import org.opensearch.core.xcontent.ToXContent; -import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ObjectMap; /** diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java index c5a26930d9300..40edb78374579 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/response/exceptions/shardoperationfailedexception/ShardOperationFailedExceptionProtoUtils.java @@ -11,8 +11,6 @@ import org.opensearch.action.support.replication.ReplicationResponse; import org.opensearch.core.action.ShardOperationFailedException; import org.opensearch.core.action.support.DefaultShardOperationFailedException; -import org.opensearch.core.xcontent.ToXContent; -import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.protobufs.ShardFailure; import org.opensearch.snapshots.SnapshotShardFailure; From d56715cd340686f70aa0bedefd94d4acd8fc7cd0 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:11:57 +0200 Subject: [PATCH 11/21] RemoveUnusedImports --- .../gradle/pluginzip/PublishTests.java | 10 ++--- .../core/xcontent/XContentBuilder.java | 4 +- .../org/opensearch/dissect/DissectParser.java | 6 +-- .../painless/ContextExampleTests.java | 38 +++++++++---------- .../DiscountedCumulativeGainTests.java | 12 +++--- .../azure/AzureStorageService.java | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java index 8e246ff9ecd11..f7edc453e5670 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java @@ -142,22 +142,22 @@ public void applyZipPublicationPluginWithConfig() throws IOException, URISyntaxE // and how these tasks are chained. The problem is that there is a known gradle issue (#20301) that does // not allow for it ATM. If, however, it is fixed in the future the following is the code that can // be used... - + Project project = ProjectBuilder.builder().build(); project.getPluginManager().apply(Publish.class); // add publications via API - + // evaluate the project ((DefaultProject)project).evaluate(); - + // - Check that "validatePluginZipPom" and/or "publishPluginZipPublicationToZipStagingRepository" // tasks have dependencies on "generatePomFileForNebulaPublication". // - Check that there is the staging repository added. - + // However, due to known issue(1): https://github.com/gradle/gradle/issues/20301 // it is impossible to reach to individual tasks and work with them. // (1): https://docs.gradle.org/7.4/release-notes.html#known-issues - + // I.e.: The following code throws exception, basically any access to individual tasks fails. project.getTasks().getByName("validatePluginZipPom"); ------------------------------- */ diff --git a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java index 552945d085884..987434a85d2f1 100644 --- a/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java +++ b/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java @@ -744,7 +744,7 @@ public XContentBuilder utf8Value(byte[] bytes, int offset, int length) throws IO /** * Write a time-based field and value, if the passed timeValue is null a * null value is written, otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeField(String name, Object timeValue) throws IOException { @@ -772,7 +772,7 @@ public XContentBuilder timeField(String name, String readableName, long value) t /** * Write a time-based value, if the value is null a null value is written, * otherwise a date transformers lookup is performed. - + * @throws IllegalArgumentException if there is no transformers for the type of object */ public XContentBuilder timeValue(Object timeValue) throws IOException { diff --git a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java index 828d4b7de450e..c05f7a9816839 100644 --- a/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java +++ b/libs/dissect/src/main/java/org/opensearch/dissect/DissectParser.java @@ -195,18 +195,18 @@ public DissectParser(String pattern, String appendSeparator) { */ public Map parse(String inputString) { /* - + This implements a naive string matching algorithm. The string is walked left to right, comparing each byte against another string's bytes looking for matches. If the bytes match, then a second cursor looks ahead to see if all the bytes of the other string matches. If they all match, record it and advances the primary cursor to the match point. If it can not match all of the bytes then progress the main cursor. Repeat till the end of the input string. Since the string being searching for (the delimiter) is generally small and rare the naive approach is efficient. - + In this case the string that is walked is the input string, and the string being searched for is the current delimiter. For example for a dissect pattern of {@code %{a},%{b}:%{c}} the delimiters (comma then colon) are searched for in the input string. At class construction the list of keys+delimiters are found (dissectPairs), which allows the use of that ordered list to know which delimiter to use for the search. The delimiters is progressed once the current delimiter is matched. - + There are two special cases that requires additional parsing beyond the standard naive algorithm. Consecutive delimiters should results in a empty matches unless the {@code ->} is provided. For example given the dissect pattern of {@code %{a},%{b},%{c},%{d}} and input string of {@code foo,,,} the match should be successful with empty values for b,c and d. diff --git a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java index 740a49e6a9a77..6568b26241e7f 100644 --- a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java +++ b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java @@ -47,12 +47,12 @@ public class ContextExampleTests extends ScriptTestCase { // **** Docs Generator Code **** /* - + import java.io.FileWriter; import java.io.IOException; - + public class Generator { - + public final static String[] theatres = new String[] {"Down Port", "Graye", "Skyline", "Courtyard"}; public final static String[] plays = new String[] {"Driving", "Pick It Up", "Sway and Pull", "Harriot", "The Busline", "Ants Underground", "Exploria", "Line and Single", "Shafted", "Sunnyside Down", @@ -61,7 +61,7 @@ public class Generator { "Joel Madigan", "Jessica Brown", "Baz Knight", "Jo Hangum", "Rachel Grass", "Phoebe Miller", "Sarah Notch", "Brayden Green", "Joshua Iller", "Jon Hittle", "Rob Kettleman", "Laura Conrad", "Simon Hower", "Nora Blue", "Mike Candlestick", "Jacey Bell"}; - + public static void writeSeat(FileWriter writer, int id, String theatre, String play, String[] actors, String date, String time, int row, int number, double cost, boolean sold) throws IOException { StringBuilder builder = new StringBuilder(); @@ -94,11 +94,11 @@ public static void writeSeat(FileWriter writer, int id, String theatre, String p builder.append(" }\n"); writer.write(builder.toString()); } - + public static void main(String args[]) throws IOException { FileWriter writer = new FileWriter("/home/jdconrad/test/seats.json"); int id = 0; - + for (int playCount = 0; playCount < 12; ++playCount) { String play = plays[playCount]; String theatre; @@ -106,7 +106,7 @@ public static void main(String args[]) throws IOException { int startMonth; int endMonth; String time; - + if (playCount == 0) { theatre = theatres[0]; actor = new String[] {actors[0], actors[1], actors[2], actors[3]}; @@ -184,10 +184,10 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many plays"); } - + int rows; int number; - + if (playCount < 6) { rows = 3; number = 12; @@ -200,32 +200,32 @@ public static void main(String args[]) throws IOException { } else { throw new RuntimeException("too many seats"); } - + for (int month = startMonth; month <= endMonth; ++month) { for (int day = 1; day <= 14; ++day) { for (int row = 1; row <= rows; ++row) { for (int count = 1; count <= number; ++count) { String date = "2018-" + month + "-" + day; double cost = (25 - row) * 1.25; - + writeSeat(writer, ++id, theatre, play, actor, date, time, row, count, cost, false); } } } } } - + writer.write("\n"); writer.close(); } } - + */ // **** Initial Mappings **** /* - + curl -X PUT "localhost:9200/seats" -H 'Content-Type: application/json' -d' { "mappings": { @@ -246,13 +246,13 @@ public static void main(String args[]) throws IOException { } } ' - + */ // Create Ingest to Modify Dates: /* - + curl -X PUT "localhost:9200/_ingest/pipeline/seats" -H 'Content-Type: application/json' -d' { "description": "update datetime for seats", @@ -265,7 +265,7 @@ public static void main(String args[]) throws IOException { ] } ' - + */ public void testIngestProcessorScript() { @@ -304,9 +304,9 @@ public void testIngestProcessorScript() { // Post Generated Data: /* - + curl -XPOST localhost:9200/seats/seat/_bulk?pipeline=seats -H "Content-Type: application/x-ndjson" --data-binary "@/home/jdconrad/test/seats.json" - + */ // Use script_fields API to add two extra fields to the hits diff --git a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java index d96e3212e05a2..aca00b42a9331 100644 --- a/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java +++ b/modules/rank-eval/src/test/java/org/opensearch/index/rankeval/DiscountedCumulativeGainTests.java @@ -94,7 +94,7 @@ public void testDCGAt() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -103,7 +103,7 @@ public void testDCGAt() { 4 | 2 | 3.0 | 2.321928094887362 | 1.2920296742201793 5 | 1 | 1.0 | 2.584962500721156  | 0.38685280723454163 6 | 0 | 0.0 | 2.807354922057604  | 0.0 - + idcg = 14.595390756454922 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -146,7 +146,7 @@ public void testDCGAtSixMissingRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) ---------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -155,7 +155,7 @@ public void testDCGAtSixMissingRatings() { 4 | 1 | 1.0 | 2.321928094887362   | 0.43067655807339 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); @@ -203,7 +203,7 @@ public void testDCGAtFourMoreRatings() { /* Check with normalization: to get the maximal possible dcg, sort documents by relevance in descending order - + rank | relevance | 2^(relevance) - 1 | log_2(rank + 1) | (2^(relevance) - 1) / log_2(rank + 1) --------------------------------------------------------------------------------------- 1 | 3 | 7.0 | 1.0  | 7.0 @@ -213,7 +213,7 @@ public void testDCGAtFourMoreRatings() { --------------------------------------------------------------------------------------- 5 | n.a | n.a | n.a.  | n.a. 6 | n.a | n.a | n.a  | n.a - + idcg = 13.347184833073591 (sum of last column) */ dcg = new DiscountedCumulativeGain(true, null, 10); diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java index 19c9af317247f..7688b3c8b93ab 100644 --- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java +++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java @@ -172,7 +172,7 @@ public Tuple> client(String clientName) { * Obtains a {@code BlobServiceClient} on each invocation using the current client * settings. BlobServiceClient is thread safe and and could be cached but the settings * can change, therefore the instance might be recreated from scratch. - + * @param clientName client name * @param statsCollector statistics collector * @return the {@code BlobServiceClient} instance and context From 1b39a3ce40a1966aedd7328134ae262c9459f193 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:12:00 +0200 Subject: [PATCH 12/21] RemoveUnusedImports --- .../telemetry/tracing/OTelTelemetry.java | 2 +- .../search/RescorerBuilderProtoUtils.java | 4 +-- .../indices/recovery/IndexRecoveryIT.java | 2 +- .../RemoteDualReplicationIT.java | 10 +++---- .../aggregations/bucket/DoubleTermsIT.java | 6 ++-- .../aggregations/bucket/LongTermsIT.java | 6 ++-- .../search/aggregations/bucket/RangeIT.java | 4 +-- .../allocation/AwarenessReplicaBalance.java | 6 ++-- .../command/CancelAllocationCommand.java | 2 +- .../identity/tokens/OnBehalfOfClaims.java | 2 +- .../RemoteStoreShardShallowCopySnapshot.java | 2 +- .../index/translog/RemoteFsTranslog.java | 2 +- .../PersistentTasksClusterService.java | 2 +- .../org/opensearch/plugins/SearchPlugin.java | 2 +- .../terms/heuristic/MutualInformation.java | 2 +- .../org/opensearch/threadpool/ThreadPool.java | 2 +- .../StarTreeKeywordDocValuesFormatTests.java | 2 +- .../aggregations/bucket/BucketUtilsTests.java | 28 +++++++++---------- .../bucket/ShardSizeTestCase.java | 8 +++--- ...archAllocationWithConstraintsTestCase.java | 4 +-- 20 files changed, 49 insertions(+), 49 deletions(-) diff --git a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java index 0c697d2cc5e8c..606fdc317df16 100644 --- a/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java +++ b/plugins/telemetry-otel/src/main/java/org/opensearch/telemetry/tracing/OTelTelemetry.java @@ -24,7 +24,7 @@ public class OTelTelemetry implements Telemetry { /** * Creates Telemetry instance - + */ /** * Creates Telemetry instance diff --git a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java index 38f22f05a94e9..70d4cdb047a08 100644 --- a/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java +++ b/plugins/transport-grpc/src/main/java/org/opensearch/plugin/transport/grpc/proto/request/search/RescorerBuilderProtoUtils.java @@ -37,9 +37,9 @@ protected static RescorerBuilder parseFromProto(Rescore rescoreProto) { /* RescorerBuilder rescorer = null; // TODO populate rescorerBuilder - + return rescorer; - + */ } diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java index e2db9f85131a9..6f26515e7b75e 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java @@ -1617,7 +1617,7 @@ public void testOngoingRecoveryAndClusterManagerFailOver() throws Exception { /* Shard assignment is stuck because recovery is blocked at CLEAN_FILES stage. Once, it times out after 60s the replica shards get assigned. https://github.com/opensearch-project/OpenSearch/issues/18098. - + Stack trace: Caused by: org.opensearch.transport.ReceiveTimeoutTransportException: [node_t3][127.0.0.1:56648][internal:index/shard/recovery/clean_files] request_id [20] timed out after [60026ms] at org.opensearch.transport.TransportService$TimeoutHandler.run(TransportService.java:1399) ~[main/:?] diff --git a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java index d046f41ce0590..7a721c395df60 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualReplicationIT.java @@ -232,14 +232,14 @@ public void testRemotePrimaryDocRepAndRemoteReplica() throws Exception { public void testRetentionLeasePresentOnDocrepReplicaButNotRemote() throws Exception { /* Reducing indices.memory.shard_inactive_time to force a flush and trigger translog sync, instead of relying on Global CKP Sync action which doesn't run on remote enabled copies - + Under steady state, RetentionLeases would be on (GlobalCkp + 1) on a docrep enabled shard copy and (GlobalCkp) for a remote enabled shard copy. This is because we block translog sync on remote enabled shard copies during the GlobalCkpSync background task. - + RLs on remote enabled copies are brought up to (GlobalCkp + 1) upon a flush request issued by IndexingMemoryController when the shard becomes inactive after SHARD_INACTIVE_TIME_SETTING interval. - + Flush triggers a force sync of translog which bumps the RetentionLease sequence number along with it */ extraSettings = Settings.builder().put(IndexingMemoryController.SHARD_INACTIVE_TIME_SETTING.getKey(), "3s").build(); @@ -668,10 +668,10 @@ public void testFailoverRemotePrimaryToDocrepReplicaReseedToRemotePrimary() thro /* Performs the same experiment as testRemotePrimaryDocRepReplica. - + This ensures that the primary shard for the index has moved over to remote enabled node whereas the replica copy is still left behind on the docrep nodes - + At this stage, segrep lag computation shouldn't consider the docrep shard copy while calculating bytes lag */ public void testZeroSegrepLagForShardsWithMixedReplicationGroup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java index ccb4af8386472..a1e2f1ee32e99 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java @@ -427,20 +427,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java index 49031bfd3fc1d..f743f5e737d09 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java @@ -414,20 +414,20 @@ public void testMultiValuedFieldWithValueScriptNotUnique() throws Exception { } /* - + [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] - + 1 - count: 1 - sum: 1 2 - count: 2 - sum: 4 3 - count: 2 - sum: 6 4 - count: 2 - sum: 8 5 - count: 2 - sum: 10 6 - count: 1 - sum: 6 - + */ public void testScriptSingleValue() throws Exception { diff --git a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java index 5483db285dded..fe07b31238787 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java @@ -614,7 +614,7 @@ public void testMultiValuedFieldWithValueScript() throws Exception { [9, 10] [10, 11] [11, 12] - + r1: 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12 @@ -769,7 +769,7 @@ public void testScriptMultiValued() throws Exception { [8, 9] [9, 10] [10, 11] - + r1: 1, 2, 2 r2: 3, 3, 4, 4, 5, 5 r3: 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11 diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java index 538d49d4e4701..9f52b08792e1a 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AwarenessReplicaBalance.java @@ -80,14 +80,14 @@ private void setAwarenessAttributes(List awarenessAttributes) { /* For a cluster having zone as awareness attribute , it will return the size of zones if set it forced awareness attributes - + If there are multiple forced awareness attributes, it will return size of the largest list, as all copies of data is supposed to get distributed amongst those. - + cluster.routing.allocation.awareness.attributes: rack_id , zone cluster.routing.allocation.awareness.force.zone.values: zone1, zone2 cluster.routing.allocation.awareness.force.rack_id.values: rack_id1, rack_id2, rack_id3 - + In this case, awareness attributes would be 3. */ public int maxAwarenessAttributes() { diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java index a07f3eb9d95e1..5e35f587e7fa1 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/CancelAllocationCommand.java @@ -116,7 +116,7 @@ public String index() { } /** - + * Get the id of the shard which allocation should be canceled * @return id of the shard which allocation should be canceled */ diff --git a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java index 2b37ed954e7d4..653cf9f384867 100644 --- a/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java +++ b/server/src/main/java/org/opensearch/identity/tokens/OnBehalfOfClaims.java @@ -25,7 +25,7 @@ public class OnBehalfOfClaims { * Constructor for OnBehalfOfClaims * @param aud the Audience for the token * @param expiration_seconds the length of time in seconds the token is valid - + */ public OnBehalfOfClaims(String aud, Long expiration_seconds) { this.audience = aud; diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java index 9c0ea42810e16..200a617dfc509 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RemoteStoreShardShallowCopySnapshot.java @@ -355,7 +355,7 @@ public String snapshot() { /* Returns list of files in the shard - + @return list of files */ diff --git a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java index e697e16d5e8a0..a9a03428d2a7e 100644 --- a/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java +++ b/server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java @@ -215,7 +215,7 @@ static void download(TranslogTransferManager translogTransferManager, Path locat In Primary to Primary relocation , there can be concurrent upload and download of translog. While translog files are getting downloaded by new primary, it might hence be deleted by the primary Hence we retry if tlog/ckp files are not found . - + This doesn't happen in last download , where it is ensured that older primary has stopped modifying tlog data. */ IOException ex = null; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java index eb187224ebf07..4cab2bdd979de 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java @@ -372,7 +372,7 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS * @param taskName the task's name * @param taskParams the task's parameters * @param currentState the current {@link ClusterState} - + * @return a new {@link Assignment} */ private Assignment createAssignment( diff --git a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java index 80a4619f56b64..651761e6b29e5 100644 --- a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java @@ -667,7 +667,7 @@ public PipelineAggregationSpec( * @param builderReader the reader registered for this aggregation's builder. Typically, a reference to a constructor that takes a * {@link StreamInput} * @param parser reads the aggregation builder from XContent - + */ public PipelineAggregationSpec( String name, diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java index 86caa6d3b5059..d9a9471aca49e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java @@ -120,7 +120,7 @@ public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long + N01 / N * Math.log((N * N01) / (N0_ * N_1)) + N10 / N * Math.log((N * N10) / (N1_ * N_0)) + N00 / N * Math.log((N * N00) / (N0_ * N_0)); - + but we get many NaN if we do not take case of the 0s */ double getMITerm(double Nxy, double Nx_, double N_y, double N) { diff --git a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java index b67b00bb42054..46b3abc500586 100644 --- a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java +++ b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java @@ -426,7 +426,7 @@ public void registerClusterSettingsListeners(ClusterSettings clusterSettings) { /* Scaling threadpool can provide only max and core Fixed/ResizableQueue can provide only size - + For example valid settings would be for scaling and fixed thead pool cluster.threadpool.snapshot.max : "5", cluster.threadpool.snapshot.core : "5", diff --git a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java index 5603fe4e30f9f..9a96377b24466 100644 --- a/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java +++ b/server/src/test/java/org/opensearch/index/codec/composite912/datacube/startree/StarTreeKeywordDocValuesFormatTests.java @@ -451,7 +451,7 @@ public void testStarKeywordDocValuesWithMissingDocsInAllSegments() throws IOExce /** * keyword1 keyword2 | [ sum, value_count, min, max[sndv]] , doc_count [null, null] | [6.0, 4.0, 1.0, 2.0, 4.0] - + */ StarTreeDocument[] expectedStarTreeDocuments = new StarTreeDocument[1]; expectedStarTreeDocuments[0] = new StarTreeDocument(new Long[] { null, null }, new Double[] { 6.0, 4.0, 1.0, 2.0, 4.0 }); diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java index 88e281032d678..a203996d03f07 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/BucketUtilsTests.java @@ -67,15 +67,15 @@ public static void main(String[] args) { final int numberOfShards = 10; final double skew = 2; // parameter of the zipf distribution final int size = 100; - + double totalWeight = 0; for (int rank = 1; rank <= numberOfUniqueTerms; ++rank) { totalWeight += weight(rank, skew); } - + int[] terms = new int[totalNumberOfTerms]; int len = 0; - + final int[] actualTopFreqs = new int[size]; for (int rank = 1; len < totalNumberOfTerms; ++rank) { int freq = (int) (weight(rank, skew) / totalWeight * totalNumberOfTerms); @@ -86,9 +86,9 @@ public static void main(String[] args) { actualTopFreqs[rank-1] = freq; } } - + final int maxTerm = terms[terms.length - 1] + 1; - + // shuffle terms Random r = new Random(0); for (int i = terms.length - 1; i > 0; --i) { @@ -104,7 +104,7 @@ public static void main(String[] args) { shards[i] = Arrays.copyOfRange(terms, upTo, upTo + (terms.length - upTo) / (numberOfShards - i)); upTo += shards[i].length; } - + final int[][] topShards = new int[numberOfShards][]; final int shardSize = BucketUtils.suggestShardSideQueueSize(size, numberOfShards); for (int shard = 0; shard < numberOfShards; ++shard) { @@ -118,7 +118,7 @@ public static void main(String[] args) { termIds[i] = i; } new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -128,16 +128,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return freqs[j] - freqs[i]; } }.sort(0, maxTerm); - + Arrays.fill(freqs, shardSize, freqs.length, 0); new InPlaceMergeSorter() { - + @Override protected void swap(int i, int j) { int tmp = termIds[i]; @@ -147,16 +147,16 @@ protected void swap(int i, int j) { freqs[i] = freqs[j]; freqs[j] = tmp; } - + @Override protected int compare(int i, int j) { return termIds[i] - termIds[j]; } }.sort(0, maxTerm); - + topShards[shard] = freqs; } - + final int[] computedTopFreqs = new int[size]; for (int[] freqs : topShards) { for (int i = 0; i < size; ++i) { @@ -174,7 +174,7 @@ protected int compare(int i, int j) { System.out.println("Computed freqs of top terms: " + Arrays.toString(computedTopFreqs)); System.out.println("Number of errors: " + numErrors + "/" + totalFreq); } - + private static double weight(int rank, double skew) { return 1d / Math.pow(rank, skew); }*/ diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java index 0bf23bd3e2cad..a8539e81f3233 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/ShardSizeTestCase.java @@ -81,8 +81,8 @@ protected void createIdx(String keyFieldMapping) { protected void indexData() throws Exception { /* - - + + || || size = 3, shard_size = 5 || shard_size = size = 3 || ||==========||==================================================||===============================================|| || shard 1: || "1" - 5 | "2" - 4 | "3" - 3 | "4" - 2 | "5" - 1 || "1" - 5 | "3" - 3 | "2" - 4 || @@ -92,8 +92,8 @@ protected void indexData() throws Exception { || reduced: || "1" - 8 | "2" - 5 | "3" - 8 | "4" - 4 | "5" - 2 || || || || || "1" - 8, "3" - 8, "2" - 4 <= WRONG || || || "1" - 8 | "3" - 8 | "2" - 5 <= CORRECT || || - - + + */ List docs = new ArrayList<>(); diff --git a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java index 0c08de252e4cd..758722ea4072a 100644 --- a/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationWithConstraintsTestCase.java @@ -215,7 +215,7 @@ public int allocateAndCheckIndexShardHotSpots(boolean expected, int nodes, Strin SameShardAllocationDecider, causing it to breach allocation constraint on another node. We need to differentiate between such hot spots v/s actual hot spots. - + A simple check could be to ensure there is no node with shards less than allocation limit, that can accept current shard. However, in current allocation algorithm, when nodes get throttled, shards are added to @@ -224,7 +224,7 @@ ModelNodes without adding them to actual cluster (RoutingNodes). As a result, weight function in balancer. RoutingNodes with {@link count} < {@link limit} may not have had the same count in the corresponding ModelNode seen by weight function. We hence use the following alternate check -- - + Given the way {@link limit} is defined, we should not have hot spots if *all* nodes are eligible to accept the shard. A hot spot is acceptable, if either all peer nodes have {@link count} > {@link limit}, or if even one node is From 085a75291fe1820926d99d2b1163283a090872f2 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:19:14 +0200 Subject: [PATCH 13/21] RemoveUnusedImports --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f4be5224d4cd4..88a2c7770161d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -org.gradle.workers.max=2 +org.gradle.workers.max=3 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ From 4f98d3ab271a0f9c1849ddc13d5df50ce10ca6ac Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:21:57 +0200 Subject: [PATCH 14/21] RemoveUnusedImports --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index 10a6f521c41e9..9a6cf4719fbd3 100644 --- a/build.gradle +++ b/build.gradle @@ -80,9 +80,6 @@ allprojects { resolutionStrategy { // Force specific versions for conflicting dependencies force( - 'org.jetbrains:annotations:26.0.2', - 'org.apache.commons:commons-text:1.13.1', - 'com.fasterxml.jackson:jackson-bom:2.17.3', 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', 'org.ow2.asm:asm-tree:9.8', From b5a78027fd1d01f8b9d53b206a9c62401882aeb5 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:22:15 +0200 Subject: [PATCH 15/21] RemoveUnusedImports --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 9a6cf4719fbd3..e4a13156c8fde 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,7 @@ allprojects { resolutionStrategy { // Force specific versions for conflicting dependencies force( + 'org.apache.commons:commons-text:1.13.1', 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', 'org.ow2.asm:asm-tree:9.8', From 65e0dd1fcf215695545f37a9faddc88cb9c064b4 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:22:47 +0200 Subject: [PATCH 16/21] RemoveUnusedImports --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e4a13156c8fde..69e2d3108cdc4 100644 --- a/build.gradle +++ b/build.gradle @@ -80,10 +80,11 @@ allprojects { resolutionStrategy { // Force specific versions for conflicting dependencies force( + 'org.jetbrains:annotations:26.0.2', 'org.apache.commons:commons-text:1.13.1', 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', - 'org.ow2.asm:asm-tree:9.8', +// 'org.ow2.asm:asm-tree:9.8', 'org.openrewrite.recipe:rewrite-java-dependencies:1.37.0', // Add this 'com.google.errorprone:error_prone_annotations:2.36.0' // Add this (using the higher version) ) From 910aeda1fa34fd7119813422fabaf5a27e93872e Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:23:24 +0200 Subject: [PATCH 17/21] RemoveUnusedImports --- build.gradle | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/build.gradle b/build.gradle index 69e2d3108cdc4..40c63f00f15c3 100644 --- a/build.gradle +++ b/build.gradle @@ -84,26 +84,7 @@ allprojects { 'org.apache.commons:commons-text:1.13.1', 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', -// 'org.ow2.asm:asm-tree:9.8', - 'org.openrewrite.recipe:rewrite-java-dependencies:1.37.0', // Add this - 'com.google.errorprone:error_prone_annotations:2.36.0' // Add this (using the higher version) ) - - // Prefer newer versions for Jackson modules - eachDependency { details -> - if (details.requested.group.startsWith('com.fasterxml.jackson')) { - details.useVersion '2.17.3' - } - // Add these additional rules if needed - if (details.requested.group == 'org.openrewrite.recipe' && - details.requested.name == 'rewrite-java-dependencies') { - details.useVersion '1.37.0' - } - if (details.requested.group == 'com.google.errorprone' && - details.requested.name == 'error_prone_annotations') { - details.useVersion '2.36.0' - } - } } } } From a92a8dd6f4ee0dffdcb39b59b180ac2117e5eb97 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:24:08 +0200 Subject: [PATCH 18/21] RemoveUnusedImports --- build.gradle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.gradle b/build.gradle index 40c63f00f15c3..fe2c7f13da637 100644 --- a/build.gradle +++ b/build.gradle @@ -85,6 +85,22 @@ allprojects { 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', ) + + // Prefer newer versions for Jackson modules + eachDependency { details -> + if (details.requested.group.startsWith('com.fasterxml.jackson')) { + details.useVersion '2.17.3' + } + // Add these additional rules if needed + if (details.requested.group == 'org.openrewrite.recipe' && + details.requested.name == 'rewrite-java-dependencies') { + details.useVersion '1.37.0' + } + if (details.requested.group == 'com.google.errorprone' && + details.requested.name == 'error_prone_annotations') { + details.useVersion '2.36.0' + } + } } } } From f9320dba1619fbeb800858bac99e8578882e8bb9 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:30:45 +0200 Subject: [PATCH 19/21] RemoveUnusedImports --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index fe2c7f13da637..1d0905bc60e97 100644 --- a/build.gradle +++ b/build.gradle @@ -85,13 +85,10 @@ allprojects { 'org.ow2.asm:asm:9.8', 'org.ow2.asm:asm-util:9.8', ) - - // Prefer newer versions for Jackson modules eachDependency { details -> if (details.requested.group.startsWith('com.fasterxml.jackson')) { details.useVersion '2.17.3' } - // Add these additional rules if needed if (details.requested.group == 'org.openrewrite.recipe' && details.requested.name == 'rewrite-java-dependencies') { details.useVersion '1.37.0' From ee2cf5aeb57db150d3fa11a529a18de8fe77bc46 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:31:06 +0200 Subject: [PATCH 20/21] RemoveUnusedImports --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1d0905bc60e97..20a40c27f73de 100644 --- a/build.gradle +++ b/build.gradle @@ -76,9 +76,8 @@ allprojects { description = "OpenSearch subproject ${project.path}" } allprojects { - configurations.all { + configurations.configureEach { resolutionStrategy { - // Force specific versions for conflicting dependencies force( 'org.jetbrains:annotations:26.0.2', 'org.apache.commons:commons-text:1.13.1', From 34ed4d9599a9d485ef16d3eb531f40924b1e35c2 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Wed, 16 Jul 2025 15:33:42 +0200 Subject: [PATCH 21/21] RemoveUnusedImports --- client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 | 1 - gradle.properties | 2 +- libs/core/licenses/jackson-core-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 - .../x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 | 1 - libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 - .../ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 - modules/lang-expression/licenses/asm-9.7.jar.sha1 | 1 - modules/lang-painless/licenses/asm-9.7.jar.sha1 | 1 - modules/lang-painless/licenses/asm-util-9.7.jar.sha1 | 1 - .../licenses/error_prone_annotations-2.31.0.jar.sha1 | 1 - .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - plugins/repository-azure/licenses/asm-9.7.jar.sha1 | 1 - .../licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - .../repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/jackson-dataformat-xml-2.18.2.jar.sha1 | 1 - .../licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 | 1 - .../licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 | 1 - .../repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 | 1 - plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 | 1 - .../licenses/error_prone_annotations-2.24.1.jar.sha1 | 1 - server/licenses/jackson-core-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 | 1 - server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 | 1 - 35 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/core/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 delete mode 100644 libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 delete mode 100644 modules/lang-expression/licenses/asm-9.7.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-9.7.jar.sha1 delete mode 100644 modules/lang-painless/licenses/asm-util-9.7.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/asm-9.7.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 delete mode 100644 plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 delete mode 100644 plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 delete mode 100644 server/licenses/jackson-core-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 delete mode 100644 server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 diff --git a/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 b/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/client/sniffer/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 88a2c7770161d..de0c203360487 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.caching=true org.gradle.warning.mode=none org.gradle.parallel=true # https://github.com/openrewrite/rewrite-gradle-plugin/issues/212 -org.gradle.workers.max=3 +#org.gradle.workers.max=3 org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ diff --git a/libs/core/licenses/jackson-core-2.18.2.jar.sha1 b/libs/core/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/libs/core/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/libs/x-content/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 deleted file mode 100644 index 8b946b98ddbf9..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 deleted file mode 100644 index 9fbdb9b3a2506..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 deleted file mode 100644 index 9dac9ee8e1e72..0000000000000 --- a/libs/x-content/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 deleted file mode 100644 index 7b9ab1d1e08d1..0000000000000 --- a/modules/ingest-geoip/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/modules/lang-expression/licenses/asm-9.7.jar.sha1 b/modules/lang-expression/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/modules/lang-expression/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/modules/lang-painless/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 b/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 deleted file mode 100644 index 37c0d27efe46f..0000000000000 --- a/modules/lang-painless/licenses/asm-util-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c0655519f24d92af2202cb681cd7c1569df6ead6 \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 b/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 deleted file mode 100644 index 4872d644799f5..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/error_prone_annotations-2.31.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c3ba307b915d6d506e98ffbb49e6d2d12edad65b \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/arrow-flight-rpc/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/crypto-kms/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/discovery-ec2/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/ingestion-kinesis/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/asm-9.7.jar.sha1 b/plugins/repository-azure/licenses/asm-9.7.jar.sha1 deleted file mode 100644 index 84c9a9703af6d..0000000000000 --- a/plugins/repository-azure/licenses/asm-9.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -073d7b3086e14beb604ced229c302feff6449723 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/repository-azure/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/repository-azure/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 deleted file mode 100644 index 61ee41aa8adf4..0000000000000 --- a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -069cb3b7bd34b3f7842cc4a6fd717981433bf73e \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 deleted file mode 100644 index 7b9ab1d1e08d1..0000000000000 --- a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7b6ff96adf421f4c6edbd694e797dd8fe434510a \ No newline at end of file diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 b/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 deleted file mode 100644 index b98599718965b..0000000000000 --- a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -048c96032e5a428739e28ff04973717c032df598 \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 deleted file mode 100644 index a06e1d5f28425..0000000000000 --- a/plugins/repository-s3/licenses/jackson-annotations-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -985d77751ebc7fce5db115a986bc9aa82f973f4a \ No newline at end of file diff --git a/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 b/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 deleted file mode 100644 index eedbfff66c705..0000000000000 --- a/plugins/repository-s3/licenses/jackson-databind-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -deef8697b92141fb6caf7aa86966cff4eec9b04f \ No newline at end of file diff --git a/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 b/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 deleted file mode 100644 index 67723f6f51248..0000000000000 --- a/plugins/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -32b299e45105aa9b0df8279c74dc1edfcf313ff0 \ No newline at end of file diff --git a/server/licenses/jackson-core-2.18.2.jar.sha1 b/server/licenses/jackson-core-2.18.2.jar.sha1 deleted file mode 100644 index 96350c9307ae7..0000000000000 --- a/server/licenses/jackson-core-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fb64ccac5c27dca8819418eb4e443a9f496d9ee7 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 deleted file mode 100644 index 8b946b98ddbf9..0000000000000 --- a/server/licenses/jackson-dataformat-cbor-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d4870757eff0344130f60e3ddb882b2336640f73 \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 deleted file mode 100644 index 9fbdb9b3a2506..0000000000000 --- a/server/licenses/jackson-dataformat-smile-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -44caf62d743bb5e5876e95efba5a55a1cab1b0db \ No newline at end of file diff --git a/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 b/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 deleted file mode 100644 index 9dac9ee8e1e72..0000000000000 --- a/server/licenses/jackson-dataformat-yaml-2.18.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d000e13505d1cf564371516fa3d5b8769a779dc9 \ No newline at end of file