Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Himshikha Gupta <himshikh@amazon.com>
  • Loading branch information
Himshikha Gupta committed Jun 4, 2024
1 parent b3c18d8 commit 8ecf865
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ClusterMetadataManifest implements Writeable, ToXContentFragment {
public static final int CODEC_V0 = 0; // Older codec version, where we haven't introduced codec versions for manifest.
public static final int CODEC_V1 = 1; // In Codec V1 we have introduced global-metadata and codec version in Manifest file.
public static final int CODEC_V2 = 2; // In Codec V2, there are seperate metadata files rather than a single global metadata file.
public static final int CODEC_V3 = 3; // In Codec V2 we introduce index routing-metadata in manifest file.
public static final int CODEC_V3 = 3; // In Codec V3, we introduce index routing-metadata in manifest file.

private static final ParseField CLUSTER_TERM_FIELD = new ParseField("cluster_term");
private static final ParseField STATE_VERSION_FIELD = new ParseField("state_version");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ private ClusterMetadataManifest uploadManifest(
uploadedTemplatesMetadata,
uploadedCustomMetadataMap,
clusterState.routingTable().version(),
// TODO: Add actual list of changed indices routing with index routing upload flow.
new ArrayList<>()
);
writeMetadataManifest(clusterState.getClusterName().value(), clusterState.metadata().clusterUUID(), manifest, manifestFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public RemoteIndexRoutingTable(IndexRoutingTable indexRoutingTable) {
this.indexRoutingTable = indexRoutingTable;
}

/**
* Reads data from inputStream and creates RemoteIndexRoutingTable object with the {@link IndexRoutingTable}
* @param inputStream
* @param index
* @throws IOException
*/
public RemoteIndexRoutingTable(InputStream inputStream, Index index) throws IOException {
try {
try (BufferedChecksumStreamInput in = new BufferedChecksumStreamInput(new InputStreamStreamInput(inputStream), "assertion")) {
Expand All @@ -57,6 +63,11 @@ public IndexRoutingTable getIndexRoutingTable() {
return indexRoutingTable;
}

/**
* Writes {@link IndexRoutingTable} to the given stream
* @param streamOutput
* @throws IOException
*/
@Override
public void writeTo(StreamOutput streamOutput) throws IOException {
try {
Expand Down

0 comments on commit 8ecf865

Please sign in to comment.