Skip to content

Commit 27f905c

Browse files
committed
naming
1 parent b928faf commit 27f905c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/RecoverySource.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* - {@link PeerRecoverySource} recovery from a primary on another node
3333
* - {@link SnapshotRecoverySource} recovery from a snapshot
3434
* - {@link LocalShardsRecoverySource} recovery from other shards of another index on the same node
35-
* - {@link SplitTargetRecoverySource} recovery of a shard that is created as a result of a resharding split
35+
* - {@link ReshardSplitTargetRecoverySource} recovery of a shard that is created as a result of a resharding split
3636
*/
3737
public abstract class RecoverySource implements Writeable, ToXContentObject {
3838

@@ -61,7 +61,7 @@ public static RecoverySource readFrom(StreamInput in) throws IOException {
6161
case PEER -> PeerRecoverySource.INSTANCE;
6262
case SNAPSHOT -> new SnapshotRecoverySource(in);
6363
case LOCAL_SHARDS -> LocalShardsRecoverySource.INSTANCE;
64-
case RESHARD_SPLIT_TARGET -> new SplitTargetRecoverySource(in);
64+
case RESHARD_SPLIT_TARGET -> new ReshardSplitTargetRecoverySource(in);
6565
};
6666
}
6767

@@ -330,14 +330,14 @@ public boolean expectEmptyRetentionLeases() {
330330
* Recovery of a shard that is created as a result of a resharding split.
331331
* Not to be confused with _split API.
332332
*/
333-
public static class SplitTargetRecoverySource extends RecoverySource {
333+
public static class ReshardSplitTargetRecoverySource extends RecoverySource {
334334
private final ShardId sourceShardId;
335335

336-
public SplitTargetRecoverySource(ShardId sourceShardId) {
336+
public ReshardSplitTargetRecoverySource(ShardId sourceShardId) {
337337
this.sourceShardId = sourceShardId;
338338
}
339339

340-
SplitTargetRecoverySource(StreamInput in) throws IOException {
340+
ReshardSplitTargetRecoverySource(StreamInput in) throws IOException {
341341
sourceShardId = new ShardId(in);
342342
}
343343

server/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ private void createShard(ShardRouting shardRouting, ClusterState state) {
703703
return;
704704
}
705705
} else if (shardRouting.recoverySource().getType() == Type.RESHARD_SPLIT_TARGET) {
706-
ShardId sourceShardId = ((RecoverySource.SplitTargetRecoverySource) shardRouting.recoverySource()).getSourceShardId();
706+
ShardId sourceShardId = ((RecoverySource.ReshardSplitTargetRecoverySource) shardRouting.recoverySource()).getSourceShardId();
707707
sourceNode = findSourceNodeForSplitTargetRecovery(state.routingTable(project.id()), state.nodes(), sourceShardId);
708708
if (sourceNode == null) {
709709
logger.trace("ignoring initializing reshard target shard {} - no source node can be found.", shardId);

test/framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public static RecoverySource buildRecoverySource() {
276276
IndexVersion.current(),
277277
new IndexId("some_index", randomUUID())
278278
),
279-
new RecoverySource.SplitTargetRecoverySource(new ShardId("some_index", randomUUID(), randomIntBetween(0, 1000)))
279+
new RecoverySource.ReshardSplitTargetRecoverySource(new ShardId("some_index", randomUUID(), randomIntBetween(0, 1000)))
280280
);
281281
}
282282
}

0 commit comments

Comments
 (0)