Skip to content

Commit

Permalink
Fix spotless check
Browse files Browse the repository at this point in the history
Signed-off-by: Rishab Nahata <[email protected]>
  • Loading branch information
imRishN committed Jul 23, 2024
1 parent 109616a commit 5c40c99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5c40c99

Please sign in to comment.