diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index 95e8fefacdff6..5f906f4277dca 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -416,7 +416,7 @@ private void failAllocationOfNewPrimaries(RoutingAllocation allocation) { } private void scheduleRerouteIfAllocatorTimedOut() { - if(allocatorTimedOut()) { + if (allocatorTimedOut()) { if (rerouteService == null) { logger.info("RerouteService not set to schedule reroute after allocator time out"); return; diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/ShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/ShardsAllocator.java index 4172c58d47e75..38aafff6ce3e8 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/ShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/ShardsAllocator.java @@ -75,6 +75,5 @@ public interface ShardsAllocator { */ ShardAllocationDecision decideShardAllocation(ShardRouting shard, RoutingAllocation allocation); - default void setRerouteService(RerouteService rerouteService) { - } + default void setRerouteService(RerouteService rerouteService) {} }