Code for backward compatibility
This commit is contained in:
parent
6520d3e739
commit
d01ed3e527
5 changed files with 206 additions and 53 deletions
|
|
@ -419,7 +419,7 @@ public class Scheduler implements Runnable {
|
||||||
leaseManagementConfig.failoverTimeMillis(),
|
leaseManagementConfig.failoverTimeMillis(),
|
||||||
metricsFactory,
|
metricsFactory,
|
||||||
lamThreadPool,
|
lamThreadPool,
|
||||||
System::nanoTime,
|
() -> System.nanoTime(),
|
||||||
leaseManagementConfig.maxLeasesForWorker(),
|
leaseManagementConfig.maxLeasesForWorker(),
|
||||||
leaseManagementConfig.gracefulLeaseHandoffConfig(),
|
leaseManagementConfig.gracefulLeaseHandoffConfig(),
|
||||||
leaseManagementConfig.leaseAssignmentIntervalMillis()))
|
leaseManagementConfig.leaseAssignmentIntervalMillis()))
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ import java.util.stream.Collectors;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import software.amazon.awssdk.services.cloudwatch.model.StandardUnit;
|
import software.amazon.awssdk.services.cloudwatch.model.StandardUnit;
|
||||||
|
|
@ -71,21 +70,14 @@ import static java.util.Objects.nonNull;
|
||||||
* In the end, performs actual assignment by writing to storage.
|
* In the end, performs actual assignment by writing to storage.
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
|
||||||
@KinesisClientInternalApi
|
@KinesisClientInternalApi
|
||||||
public final class LeaseAssignmentManager {
|
public class LeaseAssignmentManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default number of continuous failure execution after which leadership is released.
|
* Default number of continuous failure execution after which leadership is released.
|
||||||
*/
|
*/
|
||||||
private static final int DEFAULT_FAILURE_COUNT_TO_SWITCH_LEADER = 3;
|
private static final int DEFAULT_FAILURE_COUNT_TO_SWITCH_LEADER = 3;
|
||||||
|
|
||||||
/**
|
|
||||||
* Default multiplier for LAM frequency with respect to leaseDurationMillis (lease failover millis).
|
|
||||||
* If leaseDurationMillis is 10000 millis, default LAM frequency is 20000 millis.
|
|
||||||
*/
|
|
||||||
private static final int DEFAULT_LEASE_ASSIGNMENT_MANAGER_FREQ_MULTIPLIER = 2;
|
|
||||||
|
|
||||||
private static final String FORCE_LEADER_RELEASE_METRIC_NAME = "ForceLeaderRelease";
|
private static final String FORCE_LEADER_RELEASE_METRIC_NAME = "ForceLeaderRelease";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -123,7 +115,60 @@ public final class LeaseAssignmentManager {
|
||||||
|
|
||||||
private int noOfContinuousFailedAttempts = 0;
|
private int noOfContinuousFailedAttempts = 0;
|
||||||
private int lamRunCounter = 0;
|
private int lamRunCounter = 0;
|
||||||
private long varianceBasedBalancingLastRunTime;
|
|
||||||
|
@Deprecated
|
||||||
|
public LeaseAssignmentManager(
|
||||||
|
LeaseRefresher leaseRefresher,
|
||||||
|
WorkerMetricStatsDAO workerMetricsDAO,
|
||||||
|
LeaderDecider leaderDecider,
|
||||||
|
LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig config,
|
||||||
|
String workerIdentifier,
|
||||||
|
Long leaseDurationMillis,
|
||||||
|
MetricsFactory metricsFactory,
|
||||||
|
ScheduledExecutorService executorService,
|
||||||
|
Supplier<Long> nanoTimeProvider,
|
||||||
|
int maxLeasesForWorker,
|
||||||
|
LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig) {
|
||||||
|
this.leaseRefresher = leaseRefresher;
|
||||||
|
this.workerMetricsDAO = workerMetricsDAO;
|
||||||
|
this.leaderDecider = leaderDecider;
|
||||||
|
this.config = config;
|
||||||
|
this.currentWorkerId = workerIdentifier;
|
||||||
|
this.leaseDurationMillis = leaseDurationMillis;
|
||||||
|
this.metricsFactory = metricsFactory;
|
||||||
|
this.executorService = executorService;
|
||||||
|
this.nanoTimeProvider = nanoTimeProvider;
|
||||||
|
this.maxLeasesForWorker = maxLeasesForWorker;
|
||||||
|
this.gracefulLeaseHandoffConfig = gracefulLeaseHandoffConfig;
|
||||||
|
this.leaseAssignmentIntervalMillis = 2 * leaseDurationMillis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LeaseAssignmentManager(
|
||||||
|
LeaseRefresher leaseRefresher,
|
||||||
|
WorkerMetricStatsDAO workerMetricsDAO,
|
||||||
|
LeaderDecider leaderDecider,
|
||||||
|
LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig config,
|
||||||
|
String workerIdentifier,
|
||||||
|
Long leaseDurationMillis,
|
||||||
|
MetricsFactory metricsFactory,
|
||||||
|
ScheduledExecutorService executorService,
|
||||||
|
Supplier<Long> nanoTimeProvider,
|
||||||
|
int maxLeasesForWorker,
|
||||||
|
LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig,
|
||||||
|
long leaseAssignmentIntervalMillis) {
|
||||||
|
this.leaseRefresher = leaseRefresher;
|
||||||
|
this.workerMetricsDAO = workerMetricsDAO;
|
||||||
|
this.leaderDecider = leaderDecider;
|
||||||
|
this.config = config;
|
||||||
|
this.currentWorkerId = workerIdentifier;
|
||||||
|
this.leaseDurationMillis = leaseDurationMillis;
|
||||||
|
this.metricsFactory = metricsFactory;
|
||||||
|
this.executorService = executorService;
|
||||||
|
this.nanoTimeProvider = nanoTimeProvider;
|
||||||
|
this.maxLeasesForWorker = maxLeasesForWorker;
|
||||||
|
this.gracefulLeaseHandoffConfig = gracefulLeaseHandoffConfig;
|
||||||
|
this.leaseAssignmentIntervalMillis = leaseAssignmentIntervalMillis;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void start() {
|
public synchronized void start() {
|
||||||
if (isNull(managerFuture)) {
|
if (isNull(managerFuture)) {
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ public class DynamoDBLeaseCoordinator implements LeaseCoordinator {
|
||||||
* @param metricsFactory
|
* @param metricsFactory
|
||||||
* Used to publish metrics about lease operations
|
* Used to publish metrics about lease operations
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public DynamoDBLeaseCoordinator(
|
public DynamoDBLeaseCoordinator(
|
||||||
final LeaseRefresher leaseRefresher,
|
final LeaseRefresher leaseRefresher,
|
||||||
final String workerIdentifier,
|
final String workerIdentifier,
|
||||||
|
|
@ -152,7 +153,7 @@ public class DynamoDBLeaseCoordinator implements LeaseCoordinator {
|
||||||
.withEnablePriorityLeaseAssignment(enablePriorityLeaseAssignment);
|
.withEnablePriorityLeaseAssignment(enablePriorityLeaseAssignment);
|
||||||
this.renewerIntervalMillis = getRenewerTakerIntervalMillis(leaseDurationMillis, epsilonMillis);
|
this.renewerIntervalMillis = getRenewerTakerIntervalMillis(leaseDurationMillis, epsilonMillis);
|
||||||
this.takerIntervalMillis = (leaseDurationMillis + epsilonMillis) * 2;
|
this.takerIntervalMillis = (leaseDurationMillis + epsilonMillis) * 2;
|
||||||
// Should run twice every leaseAssignmentIntervalMillis to identify new leases before expiry.
|
// Should run once every leaseDurationMillis to identify new leases before expiry.
|
||||||
this.leaseDiscovererIntervalMillis = leaseDurationMillis - epsilonMillis;
|
this.leaseDiscovererIntervalMillis = leaseDurationMillis - epsilonMillis;
|
||||||
this.leaseStatsRecorder = new LeaseStatsRecorder(renewerIntervalMillis, System::currentTimeMillis);
|
this.leaseStatsRecorder = new LeaseStatsRecorder(renewerIntervalMillis, System::currentTimeMillis);
|
||||||
this.leaseGracefulShutdownHandler = LeaseGracefulShutdownHandler.create(
|
this.leaseGracefulShutdownHandler = LeaseGracefulShutdownHandler.create(
|
||||||
|
|
@ -223,6 +224,8 @@ public class DynamoDBLeaseCoordinator implements LeaseCoordinator {
|
||||||
workerUtilizationAwareAssignmentConfig,
|
workerUtilizationAwareAssignmentConfig,
|
||||||
gracefulLeaseHandoffConfig,
|
gracefulLeaseHandoffConfig,
|
||||||
shardInfoShardConsumerMap);
|
shardInfoShardConsumerMap);
|
||||||
|
|
||||||
|
// Should run twice every leaseAssignmentIntervalMillis to identify new leases before expiry.
|
||||||
this.leaseDiscovererIntervalMillis = (leaseAssignmentIntervalMillis - epsilonMillis) / 2;
|
this.leaseDiscovererIntervalMillis = (leaseAssignmentIntervalMillis - epsilonMillis) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,114 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
||||||
private final boolean isMultiStreamMode;
|
private final boolean isMultiStreamMode;
|
||||||
private final LeaseCleanupConfig leaseCleanupConfig;
|
private final LeaseCleanupConfig leaseCleanupConfig;
|
||||||
private final LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig;
|
private final LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig;
|
||||||
private final long leaseAssignmentIntervalMillis;
|
private long leaseAssignmentIntervalMillis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
* @param kinesisClient
|
||||||
|
* @param dynamoDBClient
|
||||||
|
* @param tableName
|
||||||
|
* @param workerIdentifier
|
||||||
|
* @param executorService
|
||||||
|
* @param failoverTimeMillis
|
||||||
|
* @param enablePriorityLeaseAssignment
|
||||||
|
* @param epsilonMillis
|
||||||
|
* @param maxLeasesForWorker
|
||||||
|
* @param maxLeasesToStealAtOneTime
|
||||||
|
* @param maxLeaseRenewalThreads
|
||||||
|
* @param cleanupLeasesUponShardCompletion
|
||||||
|
* @param ignoreUnexpectedChildShards
|
||||||
|
* @param shardSyncIntervalMillis
|
||||||
|
* @param consistentReads
|
||||||
|
* @param listShardsBackoffTimeMillis
|
||||||
|
* @param maxListShardsRetryAttempts
|
||||||
|
* @param maxCacheMissesBeforeReload
|
||||||
|
* @param listShardsCacheAllowedAgeInSeconds
|
||||||
|
* @param cacheMissWarningModulus
|
||||||
|
* @param initialLeaseTableReadCapacity
|
||||||
|
* @param initialLeaseTableWriteCapacity
|
||||||
|
* @param tableCreatorCallback
|
||||||
|
* @param dynamoDbRequestTimeout
|
||||||
|
* @param billingMode
|
||||||
|
* @param leaseTableDeletionProtectionEnabled
|
||||||
|
* @param leaseTablePitrEnabled
|
||||||
|
* @param leaseSerializer
|
||||||
|
* @param customShardDetectorProvider
|
||||||
|
* @param isMultiStreamMode
|
||||||
|
* @param leaseCleanupConfig
|
||||||
|
* @param workerUtilizationAwareAssignmentConfig
|
||||||
|
* @param gracefulLeaseHandoffConfig
|
||||||
|
*/
|
||||||
|
public DynamoDBLeaseManagementFactory(
|
||||||
|
final @NotNull KinesisAsyncClient kinesisClient,
|
||||||
|
final @NotNull DynamoDbAsyncClient dynamoDBClient,
|
||||||
|
final @NotNull String tableName,
|
||||||
|
final @NotNull String workerIdentifier,
|
||||||
|
final @NotNull ExecutorService executorService,
|
||||||
|
final long failoverTimeMillis,
|
||||||
|
final boolean enablePriorityLeaseAssignment,
|
||||||
|
final long epsilonMillis,
|
||||||
|
final int maxLeasesForWorker,
|
||||||
|
final int maxLeasesToStealAtOneTime,
|
||||||
|
final int maxLeaseRenewalThreads,
|
||||||
|
final boolean cleanupLeasesUponShardCompletion,
|
||||||
|
final boolean ignoreUnexpectedChildShards,
|
||||||
|
final long shardSyncIntervalMillis,
|
||||||
|
final boolean consistentReads,
|
||||||
|
final long listShardsBackoffTimeMillis,
|
||||||
|
final int maxListShardsRetryAttempts,
|
||||||
|
final int maxCacheMissesBeforeReload,
|
||||||
|
final long listShardsCacheAllowedAgeInSeconds,
|
||||||
|
final int cacheMissWarningModulus,
|
||||||
|
final long initialLeaseTableReadCapacity,
|
||||||
|
final long initialLeaseTableWriteCapacity,
|
||||||
|
final TableCreatorCallback tableCreatorCallback,
|
||||||
|
final Duration dynamoDbRequestTimeout,
|
||||||
|
final BillingMode billingMode,
|
||||||
|
final boolean leaseTableDeletionProtectionEnabled,
|
||||||
|
final boolean leaseTablePitrEnabled,
|
||||||
|
final Collection<Tag> tags,
|
||||||
|
final @NotNull LeaseSerializer leaseSerializer,
|
||||||
|
final Function<StreamConfig, ShardDetector> customShardDetectorProvider,
|
||||||
|
boolean isMultiStreamMode,
|
||||||
|
final LeaseCleanupConfig leaseCleanupConfig,
|
||||||
|
final LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig workerUtilizationAwareAssignmentConfig,
|
||||||
|
final LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig) {
|
||||||
|
this.kinesisClient = kinesisClient;
|
||||||
|
this.dynamoDBClient = dynamoDBClient;
|
||||||
|
this.tableName = tableName;
|
||||||
|
this.workerIdentifier = workerIdentifier;
|
||||||
|
this.executorService = executorService;
|
||||||
|
this.failoverTimeMillis = failoverTimeMillis;
|
||||||
|
this.enablePriorityLeaseAssignment = enablePriorityLeaseAssignment;
|
||||||
|
this.epsilonMillis = epsilonMillis;
|
||||||
|
this.maxLeasesForWorker = maxLeasesForWorker;
|
||||||
|
this.maxLeasesToStealAtOneTime = maxLeasesToStealAtOneTime;
|
||||||
|
this.maxLeaseRenewalThreads = maxLeaseRenewalThreads;
|
||||||
|
this.cleanupLeasesUponShardCompletion = cleanupLeasesUponShardCompletion;
|
||||||
|
this.ignoreUnexpectedChildShards = ignoreUnexpectedChildShards;
|
||||||
|
this.shardSyncIntervalMillis = shardSyncIntervalMillis;
|
||||||
|
this.consistentReads = consistentReads;
|
||||||
|
this.listShardsBackoffTimeMillis = listShardsBackoffTimeMillis;
|
||||||
|
this.maxListShardsRetryAttempts = maxListShardsRetryAttempts;
|
||||||
|
this.maxCacheMissesBeforeReload = maxCacheMissesBeforeReload;
|
||||||
|
this.listShardsCacheAllowedAgeInSeconds = listShardsCacheAllowedAgeInSeconds;
|
||||||
|
this.cacheMissWarningModulus = cacheMissWarningModulus;
|
||||||
|
this.initialLeaseTableReadCapacity = initialLeaseTableReadCapacity;
|
||||||
|
this.initialLeaseTableWriteCapacity = initialLeaseTableWriteCapacity;
|
||||||
|
this.tableCreatorCallback = tableCreatorCallback;
|
||||||
|
this.dynamoDbRequestTimeout = dynamoDbRequestTimeout;
|
||||||
|
this.billingMode = billingMode;
|
||||||
|
this.leaseTableDeletionProtectionEnabled = leaseTableDeletionProtectionEnabled;
|
||||||
|
this.leaseTablePitrEnabled = leaseTablePitrEnabled;
|
||||||
|
this.leaseSerializer = leaseSerializer;
|
||||||
|
this.customShardDetectorProvider = customShardDetectorProvider;
|
||||||
|
this.isMultiStreamMode = isMultiStreamMode;
|
||||||
|
this.leaseCleanupConfig = leaseCleanupConfig;
|
||||||
|
this.tags = tags;
|
||||||
|
this.workerUtilizationAwareAssignmentConfig = workerUtilizationAwareAssignmentConfig;
|
||||||
|
this.gracefulLeaseHandoffConfig = gracefulLeaseHandoffConfig;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
@ -183,40 +290,41 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
||||||
final LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig workerUtilizationAwareAssignmentConfig,
|
final LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig workerUtilizationAwareAssignmentConfig,
|
||||||
final LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig,
|
final LeaseManagementConfig.GracefulLeaseHandoffConfig gracefulLeaseHandoffConfig,
|
||||||
long leaseAssignmentIntervalMillis) {
|
long leaseAssignmentIntervalMillis) {
|
||||||
this.kinesisClient = kinesisClient;
|
this(
|
||||||
this.dynamoDBClient = dynamoDBClient;
|
kinesisClient,
|
||||||
this.tableName = tableName;
|
dynamoDBClient,
|
||||||
this.workerIdentifier = workerIdentifier;
|
tableName,
|
||||||
this.executorService = executorService;
|
workerIdentifier,
|
||||||
this.failoverTimeMillis = failoverTimeMillis;
|
executorService,
|
||||||
this.enablePriorityLeaseAssignment = enablePriorityLeaseAssignment;
|
failoverTimeMillis,
|
||||||
this.epsilonMillis = epsilonMillis;
|
enablePriorityLeaseAssignment,
|
||||||
this.maxLeasesForWorker = maxLeasesForWorker;
|
epsilonMillis,
|
||||||
this.maxLeasesToStealAtOneTime = maxLeasesToStealAtOneTime;
|
maxLeasesForWorker,
|
||||||
this.maxLeaseRenewalThreads = maxLeaseRenewalThreads;
|
maxLeasesToStealAtOneTime,
|
||||||
this.cleanupLeasesUponShardCompletion = cleanupLeasesUponShardCompletion;
|
maxLeaseRenewalThreads,
|
||||||
this.ignoreUnexpectedChildShards = ignoreUnexpectedChildShards;
|
cleanupLeasesUponShardCompletion,
|
||||||
this.shardSyncIntervalMillis = shardSyncIntervalMillis;
|
ignoreUnexpectedChildShards,
|
||||||
this.consistentReads = consistentReads;
|
shardSyncIntervalMillis,
|
||||||
this.listShardsBackoffTimeMillis = listShardsBackoffTimeMillis;
|
consistentReads,
|
||||||
this.maxListShardsRetryAttempts = maxListShardsRetryAttempts;
|
listShardsBackoffTimeMillis,
|
||||||
this.maxCacheMissesBeforeReload = maxCacheMissesBeforeReload;
|
maxListShardsRetryAttempts,
|
||||||
this.listShardsCacheAllowedAgeInSeconds = listShardsCacheAllowedAgeInSeconds;
|
maxCacheMissesBeforeReload,
|
||||||
this.cacheMissWarningModulus = cacheMissWarningModulus;
|
listShardsCacheAllowedAgeInSeconds,
|
||||||
this.initialLeaseTableReadCapacity = initialLeaseTableReadCapacity;
|
cacheMissWarningModulus,
|
||||||
this.initialLeaseTableWriteCapacity = initialLeaseTableWriteCapacity;
|
initialLeaseTableReadCapacity,
|
||||||
this.tableCreatorCallback = tableCreatorCallback;
|
initialLeaseTableWriteCapacity,
|
||||||
this.dynamoDbRequestTimeout = dynamoDbRequestTimeout;
|
tableCreatorCallback,
|
||||||
this.billingMode = billingMode;
|
dynamoDbRequestTimeout,
|
||||||
this.leaseTableDeletionProtectionEnabled = leaseTableDeletionProtectionEnabled;
|
billingMode,
|
||||||
this.leaseTablePitrEnabled = leaseTablePitrEnabled;
|
leaseTableDeletionProtectionEnabled,
|
||||||
this.leaseSerializer = leaseSerializer;
|
leaseTablePitrEnabled,
|
||||||
this.customShardDetectorProvider = customShardDetectorProvider;
|
tags,
|
||||||
this.isMultiStreamMode = isMultiStreamMode;
|
leaseSerializer,
|
||||||
this.leaseCleanupConfig = leaseCleanupConfig;
|
customShardDetectorProvider,
|
||||||
this.tags = tags;
|
isMultiStreamMode,
|
||||||
this.workerUtilizationAwareAssignmentConfig = workerUtilizationAwareAssignmentConfig;
|
leaseCleanupConfig,
|
||||||
this.gracefulLeaseHandoffConfig = gracefulLeaseHandoffConfig;
|
workerUtilizationAwareAssignmentConfig,
|
||||||
|
gracefulLeaseHandoffConfig);
|
||||||
this.leaseAssignmentIntervalMillis = leaseAssignmentIntervalMillis;
|
this.leaseAssignmentIntervalMillis = leaseAssignmentIntervalMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -741,8 +741,7 @@ class LeaseAssignmentManagerTest {
|
||||||
Integer.MAX_VALUE,
|
Integer.MAX_VALUE,
|
||||||
LeaseManagementConfig.GracefulLeaseHandoffConfig.builder()
|
LeaseManagementConfig.GracefulLeaseHandoffConfig.builder()
|
||||||
.isGracefulLeaseHandoffEnabled(false)
|
.isGracefulLeaseHandoffEnabled(false)
|
||||||
.build(),
|
.build());
|
||||||
200L);
|
|
||||||
|
|
||||||
leaseAssignmentManager.start();
|
leaseAssignmentManager.start();
|
||||||
|
|
||||||
|
|
@ -1146,8 +1145,7 @@ class LeaseAssignmentManagerTest {
|
||||||
mockExecutor,
|
mockExecutor,
|
||||||
System::nanoTime,
|
System::nanoTime,
|
||||||
Integer.MAX_VALUE,
|
Integer.MAX_VALUE,
|
||||||
gracefulLeaseHandoffConfig,
|
gracefulLeaseHandoffConfig);
|
||||||
2 * failoverTimeMillis);
|
|
||||||
|
|
||||||
leaseAssignmentManager.start();
|
leaseAssignmentManager.start();
|
||||||
|
|
||||||
|
|
@ -1203,8 +1201,7 @@ class LeaseAssignmentManagerTest {
|
||||||
scheduledExecutorService,
|
scheduledExecutorService,
|
||||||
nanoTimeProvider,
|
nanoTimeProvider,
|
||||||
maxLeasesPerWorker,
|
maxLeasesPerWorker,
|
||||||
gracefulLeaseHandoffConfig,
|
gracefulLeaseHandoffConfig);
|
||||||
2 * leaseDurationMillis);
|
|
||||||
leaseAssignmentManager.start();
|
leaseAssignmentManager.start();
|
||||||
return leaseAssignmentManager;
|
return leaseAssignmentManager;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue