-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Split the remote global metadata file to metadata attribute files #12190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shwetathareja
merged 29 commits into
opensearch-project:main
from
shiv0408:cluster_state_split
May 16, 2024
Merged
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6bf7bc9
Split the cluster state remote global metadata file to metadata attri…
shiv0408 5d6a0ad
Upload all the metadata attributes in parallel
shiv0408 279dbbe
Added javadocs
shiv0408 0542849
Address PR comment
shiv0408 c9fb25b
Add Integ test
shiv0408 fc270d1
Added a bwc test
shiv0408 adb4cf2
Address PR comments
shiv0408 0b38736
Modify Custom's fromXContent
shiv0408 c86c0f1
Remove ClusterMetadataManifest constructor
shiv0408 3ed92e5
Added tests
shiv0408 e1f517e
remove stale global metadata files
shiv0408 cd5c9a5
spotless apply
shiv0408 2bd97d7
Merge branch 'main' into cluster_state_split
shiv0408 8244c6d
Merge branch 'main' into cluster_state_split
shiv0408 425cf20
Merge branch 'main' into cluster_state_split
shiv0408 8efc1ed
fix build after merge
shiv0408 6c637c0
Merge branch 'main' into cluster_state_split
shiv0408 494aacc
Address PR comments
shiv0408 928b650
Address further PR comment
shiv0408 2ebfc6d
apply spotless
shiv0408 fb0b6aa
removed unnecessary method
shiv0408 032ced2
Address further PR comments
shiv0408 dd76f39
Merge branch 'main' into cluster_state_split
shiv0408 e81db21
Fix test failures
shiv0408 b20537a
Merge branch 'main' into cluster_state_split
shiv0408 87893ad
Change TemplatesMetadata to API
shiv0408 2fe0dd6
updated API version for TemplatesMetadata.Builder
shiv0408 556278f
Merge branch 'main' into cluster_state_split
shiv0408 4f8a64e
Merge branch 'main' into cluster_state_split
shiv0408 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/ClusterStateIT.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.opensearch.upgrades; | ||
|
||
import org.opensearch.client.Request; | ||
import org.opensearch.client.Response; | ||
|
||
import java.util.Map; | ||
|
||
public class ClusterStateIT extends AbstractRollingTestCase{ | ||
public void testTemplateMetadataUpgrades() throws Exception { | ||
if (CLUSTER_TYPE == ClusterType.OLD) { | ||
String templateName = "my_template"; | ||
Request putIndexTemplate = new Request("PUT", "_template/" + templateName); | ||
putIndexTemplate.setJsonEntity("{\"index_patterns\": [\"pattern-1\", \"log-*\"]}"); | ||
client().performRequest(putIndexTemplate); | ||
verifyTemplateMetadataInClusterState(); | ||
} else { | ||
verifyTemplateMetadataInClusterState(); | ||
} | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
private static void verifyTemplateMetadataInClusterState() throws Exception { | ||
Request request = new Request("GET", "_cluster/state/metadata"); | ||
Response response = client().performRequest(request); | ||
assertOK(response); | ||
Map<String, Object> metadata = (Map<String, Object>) entityAsMap(response).get("metadata"); | ||
assertNotNull(metadata.get("templates")); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.