@Nullable
@Override
public UnassignedShard apply(@Nullable ShardRouting input) {
assert input != null;
if (!input.active()) {
return new UnassignedShard(
input.shardId(), clusterService,
context.isPrimary(input.shardId()),input.state());
}
return null;
}