|
@@ -267,14 +267,14 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
* @param projectId project for the restore
|
|
|
* @param request restore request
|
|
|
* @param listener restore listener
|
|
|
- * @param updater handler that allows callers to make modifications to {@link Metadata}
|
|
|
+ * @param updater handler that allows callers to make modifications to {@link ProjectMetadata}
|
|
|
* in the same cluster state update as the restore operation
|
|
|
*/
|
|
|
public void restoreSnapshot(
|
|
|
final ProjectId projectId,
|
|
|
final RestoreSnapshotRequest request,
|
|
|
final ActionListener<RestoreCompletionResponse> listener,
|
|
|
- final BiConsumer<ClusterState, Metadata.Builder> updater
|
|
|
+ final BiConsumer<ClusterState, ProjectMetadata.Builder> updater
|
|
|
) {
|
|
|
assert Repository.assertSnapshotMetaThread();
|
|
|
|
|
@@ -368,8 +368,8 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
* @param repository the repository to restore from
|
|
|
* @param request restore request
|
|
|
* @param repositoryData current repository data for the repository to restore from
|
|
|
- * @param updater handler that allows callers to make modifications to {@link Metadata} in the same cluster state update as the
|
|
|
- * restore operation
|
|
|
+ * @param updater handler that allows callers to make modifications to {@link ProjectMetadata} in the same cluster state update
|
|
|
+ * as the restore operation
|
|
|
* @param listener listener to resolve once restore has been started
|
|
|
* @throws IOException on failure to load metadata from the repository
|
|
|
*/
|
|
@@ -378,7 +378,7 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
Repository repository,
|
|
|
RestoreSnapshotRequest request,
|
|
|
RepositoryData repositoryData,
|
|
|
- BiConsumer<ClusterState, Metadata.Builder> updater,
|
|
|
+ BiConsumer<ClusterState, ProjectMetadata.Builder> updater,
|
|
|
ActionListener<RestoreCompletionResponse> listener
|
|
|
) throws IOException {
|
|
|
assert Repository.assertSnapshotMetaThread();
|
|
@@ -1371,7 +1371,7 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
|
|
|
private final Collection<DataStream> dataStreamsToRestore;
|
|
|
|
|
|
- private final BiConsumer<ClusterState, Metadata.Builder> updater;
|
|
|
+ private final BiConsumer<ClusterState, ProjectMetadata.Builder> updater;
|
|
|
|
|
|
private final AllocationActionListener<RestoreCompletionResponse> listener;
|
|
|
private final Settings settings;
|
|
@@ -1387,7 +1387,7 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
SnapshotInfo snapshotInfo,
|
|
|
Metadata metadata,
|
|
|
Collection<DataStream> dataStreamsToRestore,
|
|
|
- BiConsumer<ClusterState, Metadata.Builder> updater,
|
|
|
+ BiConsumer<ClusterState, ProjectMetadata.Builder> updater,
|
|
|
Settings settings,
|
|
|
ActionListener<RestoreCompletionResponse> listener
|
|
|
) {
|
|
@@ -1586,7 +1586,7 @@ public final class RestoreService implements ClusterStateApplier {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- updater.accept(currentState, mdBuilder);
|
|
|
+ updater.accept(currentState, mdBuilder.getProject(projectId));
|
|
|
final ClusterState updatedClusterState = builder.metadata(mdBuilder)
|
|
|
.blocks(blocks)
|
|
|
.putRoutingTable(projectId, rtBuilder.build())
|