Skip to content

Commit

Permalink
Replace magic 3 with constant describing logic of operation.
Browse files Browse the repository at this point in the history
See 39ba46b for more informations about the logic.
  • Loading branch information
fiedukow authored and cberner committed Jun 21, 2016
1 parent d49f6c6 commit 0340248
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -98,6 +98,7 @@ public final class HttpRemoteTask
{
private static final Logger log = Logger.get(HttpRemoteTask.class);
private static final Duration MAX_CLEANUP_RETRY_TIME = new Duration(2, TimeUnit.MINUTES);
private static final int MIN_RETRIES = 3;

private final TaskId taskId;
private final int partition;
Expand Down Expand Up @@ -246,7 +247,7 @@ public HttpRemoteTask(Session session,
}
});

long timeout = minErrorDuration.toMillis() / 3;
long timeout = minErrorDuration.toMillis() / MIN_RETRIES;
this.requestTimeout = new Duration(timeout + taskStatusRefreshMaxWait.toMillis(), MILLISECONDS);
partitionedSplitCountTracker.setPartitionedSplitCount(getPartitionedSplitCount());
}
Expand Down

0 comments on commit 0340248

Please sign in to comment.