@ThreadSafe public class MigrationAwareLAMDataManager extends Object implements LAMDataManager
LAMDataManager that encapsulates:
TableMigrationSummary for migration state decisionsLAM receives valid, non-expired worker metrics and applies its own domain-specific filtering (e.g., excluding workers with failing metrics from assignment).
The main purpose of this class it to reuse the scan result from LAM for other things like tableMigrationStateMachine. Ideally the two should be decoupled and can do their own scan to get the result they want separately at the cost of higher DDB usage. To make table migration seemless keep the iops low and being efficient is better.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_NO_OF_SKIP_STAT_FOR_DEAD_WORKER_THRESHOLD |
| Constructor and Description |
|---|
MigrationAwareLAMDataManager(EntityDAO entityDAO,
WorkerMetricStatsDAO workerMetricsDAO,
TableMigrationStatusProvider tableMigrationStatusProvider,
Consumer<TableMigrationSummary> migrationSummaryConsumer,
LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig config,
ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
LAMDataSnapshot |
loadData(MetricsScope metricsScope)
Load, validate, and clean worker metrics and leases for a single LAM assignment cycle.
|
void |
shutdown()
Shuts down any internal resources (e.g., thread pools) used by this manager.
|
public static final int DEFAULT_NO_OF_SKIP_STAT_FOR_DEAD_WORKER_THRESHOLD
public MigrationAwareLAMDataManager(EntityDAO entityDAO, WorkerMetricStatsDAO workerMetricsDAO, TableMigrationStatusProvider tableMigrationStatusProvider, Consumer<TableMigrationSummary> migrationSummaryConsumer, LeaseManagementConfig.WorkerUtilizationAwareAssignmentConfig config, ExecutorService executorService)
public LAMDataSnapshot loadData(MetricsScope metricsScope)
LAMDataManagerThe implementation will:
loadData in interface LAMDataManagermetricsScope - the metrics scope for emitting data quality metricspublic void shutdown()
LAMDataManagershutdown in interface LAMDataManagerCopyright © 2026. All rights reserved.