diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocateUnassignedDecision.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocateUnassignedDecision.java index 43c6c19315cd0..4e77ab772f390 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocateUnassignedDecision.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocateUnassignedDecision.java @@ -105,7 +105,7 @@ public class AllocateUnassignedDecision extends AbstractAllocationDecision { private final long remainingDelayInMillis; private final long configuredDelayInMillis; - public AllocateUnassignedDecision( + private AllocateUnassignedDecision( AllocationStatus allocationStatus, DiscoveryNode assignedNode, String allocationId, diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java index f2cf4e8e01d6b..2d87be3fa005a 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java @@ -569,7 +569,10 @@ private void reroute(RoutingAllocation allocation) { long startTime = System.nanoTime(); allocateExistingUnassignedShards(allocation); // try to allocate existing shard copies first - logger.debug("Completing allocateExistingUnassignedShards, elapsed time: [{}]", TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime)); + logger.debug( + "Completing allocateExistingUnassignedShards, elapsed time: [{}]", + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime) + ); startTime = System.nanoTime(); shardsAllocator.allocate(allocation); logger.debug( diff --git a/server/src/main/java/org/opensearch/gateway/PrimaryShardBatchAllocator.java b/server/src/main/java/org/opensearch/gateway/PrimaryShardBatchAllocator.java index c50d8a40fd781..c493bf717c97f 100644 --- a/server/src/main/java/org/opensearch/gateway/PrimaryShardBatchAllocator.java +++ b/server/src/main/java/org/opensearch/gateway/PrimaryShardBatchAllocator.java @@ -12,7 +12,6 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RoutingNodes; import org.opensearch.cluster.routing.ShardRouting; -import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.allocation.AllocateUnassignedDecision; import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.core.index.shard.ShardId; diff --git a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java index e72876f7b6aec..d92a23cc8f76e 100644 --- a/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java +++ b/server/src/main/java/org/opensearch/gateway/ShardsBatchGatewayAllocator.java @@ -252,7 +252,11 @@ protected BatchRunnableExecutor innerAllocateUnassignedBatch( @Override public void onTimeout() { long startTime = System.nanoTime(); - primaryBatchShardAllocator.allocateUnassignedBatchOnTimeout(shardsBatch.getBatchedShardRoutings(), allocation, true); + primaryBatchShardAllocator.allocateUnassignedBatchOnTimeout( + shardsBatch.getBatchedShardRoutings(), + allocation, + true + ); logger.info( "Time taken to execute allocateUnassignedBatchOnTimeout for unassigned primary batch with id [{}], size : [{}] in this cycle:[{}ms]", shardsBatch.batchId,