forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '6.7' into retention-lease-bwc
* 6.7: Fix CCR HLRC docs Introduce forget follower API (elastic#39718) 6.6.2 release notes. Update release notes for 6.7.0 Add documentation for min_hash filter (elastic#39671) Unmute testIndividualActionsTimeout Unmute testFollowIndexAndCloseNode Use unwrapped cause to determine if node is closing (elastic#39723) Don’t ack if unable to remove failing replica (elastic#39584) Wipe Snapshots Before Indices in RestTests (elastic#39662) (elastic#39765) Bug fix for AnnotatedTextHighlighter (elastic#39525) Fix Snapshot BwC with Version 5.6.x (elastic#39737) Fix occasional SearchServiceTests failure (elastic#39697) Correct date in daterange-aggregation.asciidoc (elastic#39727) Add a note to purge the ingest-geoip plugin (elastic#39553)
- Loading branch information
Showing
56 changed files
with
1,991 additions
and
220 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
89 changes: 89 additions & 0 deletions
89
client/rest-high-level/src/main/java/org/elasticsearch/client/ccr/ForgetFollowerRequest.java
This file contains 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,89 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.elasticsearch.client.ccr; | ||
|
||
import org.elasticsearch.client.Validatable; | ||
import org.elasticsearch.common.xcontent.ToXContentObject; | ||
import org.elasticsearch.common.xcontent.XContentBuilder; | ||
|
||
import java.io.IOException; | ||
import java.util.Objects; | ||
|
||
/** | ||
* Represents a forget follower request. Note that this an expert API intended to be used only when unfollowing a follower index fails to | ||
* remove the follower retention leases. Please be sure that you understand the purpose this API before using. | ||
*/ | ||
public final class ForgetFollowerRequest implements ToXContentObject, Validatable { | ||
|
||
private final String followerCluster; | ||
|
||
private final String followerIndex; | ||
|
||
private final String followerIndexUUID; | ||
|
||
private final String leaderRemoteCluster; | ||
|
||
private final String leaderIndex; | ||
|
||
/** | ||
* The name of the leader index. | ||
* | ||
* @return the name of the leader index | ||
*/ | ||
public String leaderIndex() { | ||
return leaderIndex; | ||
} | ||
|
||
/** | ||
* Construct a forget follower request. | ||
* | ||
* @param followerCluster the name of the cluster containing the follower index to forget | ||
* @param followerIndex the name of follower index | ||
* @param followerIndexUUID the UUID of the follower index | ||
* @param leaderRemoteCluster the alias of the remote cluster containing the leader index from the perspective of the follower index | ||
* @param leaderIndex the name of the leader index | ||
*/ | ||
public ForgetFollowerRequest( | ||
final String followerCluster, | ||
final String followerIndex, | ||
final String followerIndexUUID, | ||
final String leaderRemoteCluster, | ||
final String leaderIndex) { | ||
this.followerCluster = Objects.requireNonNull(followerCluster); | ||
this.followerIndex = Objects.requireNonNull(followerIndex); | ||
this.followerIndexUUID = Objects.requireNonNull(followerIndexUUID); | ||
this.leaderRemoteCluster = Objects.requireNonNull(leaderRemoteCluster); | ||
this.leaderIndex = Objects.requireNonNull(leaderIndex); | ||
} | ||
|
||
@Override | ||
public XContentBuilder toXContent(final XContentBuilder builder, final Params params) throws IOException { | ||
builder.startObject(); | ||
{ | ||
builder.field("follower_cluster", followerCluster); | ||
builder.field("follower_index", followerIndex); | ||
builder.field("follower_index_uuid", followerIndexUUID); | ||
builder.field("leader_remote_cluster", leaderRemoteCluster); | ||
} | ||
builder.endObject(); | ||
return builder; | ||
} | ||
|
||
} |
Oops, something went wrong.