Search in sources :

Example 1 with TimeLockManagementService

use of com.palantir.atlasdb.timelock.api.management.TimeLockManagementService in project atlasdb by palantir.

the class AtlasRestoreServiceTest method restoresToNewNamespaceCorrectly.

@Test
public void restoresToNewNamespaceCorrectly() {
    RestoreRequest restoreRequest = RestoreRequest.builder().oldNamespace(WITH_BACKUP).newNamespace(NO_BACKUP).build();
    // prepare
    DisableNamespacesResponse successfulDisable = DisableNamespacesResponse.successful(SuccessfulDisableNamespacesResponse.of(BACKUP_ID));
    DisableNamespacesRequest request = DisableNamespacesRequest.of(ImmutableSet.of(NO_BACKUP), BACKUP_ID);
    when(timeLockManagementService.disableTimelock(authHeader, request)).thenReturn(successfulDisable);
    Set<Namespace> disabledNamespaces = atlasRestoreService.prepareRestore(ImmutableSet.of(restoreRequest), BACKUP_ID);
    assertThat(disabledNamespaces).containsExactly(NO_BACKUP);
    // repair
    BiConsumer<String, RangesForRepair> doNothingConsumer = (_unused1, _unused2) -> {
    };
    Set<Namespace> repairedNamespaces = atlasRestoreService.repairInternalTables(ImmutableSet.of(restoreRequest), doNothingConsumer);
    assertThat(repairedNamespaces).containsExactly(NO_BACKUP);
    verify(cassandraRepairHelper).repairInternalTables(NO_BACKUP, doNothingConsumer);
    verify(cassandraRepairHelper).repairTransactionsTables(eq(NO_BACKUP), anyList(), eq(doNothingConsumer));
    verify(cassandraRepairHelper).cleanTransactionsTables(eq(NO_BACKUP), eq(BACKUP_START_TIMESTAMP), anyList());
    verifyNoMoreInteractions(cassandraRepairHelper);
    // complete
    CompletedBackup completedBackup = backupPersister.getCompletedBackup(WITH_BACKUP).orElseThrow();
    CompleteRestoreRequest completeRestoreRequest = CompleteRestoreRequest.of(ImmutableMap.of(NO_BACKUP, completedBackup));
    when(atlasRestoreClient.completeRestore(authHeader, completeRestoreRequest)).thenReturn(CompleteRestoreResponse.of(ImmutableSet.of(NO_BACKUP)));
    ReenableNamespacesRequest reenableRequest = ReenableNamespacesRequest.of(ImmutableSet.of(NO_BACKUP), BACKUP_ID);
    Set<Namespace> completedNamespaces = atlasRestoreService.completeRestore(ImmutableSet.of(restoreRequest), BACKUP_ID);
    assertThat(completedNamespaces).containsExactly(NO_BACKUP);
    verify(atlasRestoreClient).completeRestore(authHeader, completeRestoreRequest);
    verify(timeLockManagementService).reenableTimelock(authHeader, reenableRequest);
}
Also used : RangesForRepair(com.palantir.atlasdb.cassandra.backup.RangesForRepair) CassandraRepairHelper(com.palantir.atlasdb.cassandra.backup.CassandraRepairHelper) CompleteRestoreResponse(com.palantir.atlasdb.backup.api.CompleteRestoreResponse) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) RunWith(org.junit.runner.RunWith) AuthHeader(com.palantir.tokens.auth.AuthHeader) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) CompletedBackup(com.palantir.atlasdb.backup.api.CompletedBackup) Mockito.verifyNoInteractions(org.mockito.Mockito.verifyNoInteractions) ReenableNamespacesRequest(com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest) SuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.SuccessfulDisableNamespacesResponse) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) Map(java.util.Map) BiConsumer(java.util.function.BiConsumer) Before(org.junit.Before) ImmutableSet(com.google.common.collect.ImmutableSet) InOrder(org.mockito.InOrder) ImmutableMap(com.google.common.collect.ImmutableMap) KeyedStream(com.palantir.common.streams.KeyedStream) DisableNamespacesRequest(com.palantir.atlasdb.timelock.api.DisableNamespacesRequest) UnsuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.UnsuccessfulDisableNamespacesResponse) SafeIllegalArgumentException(com.palantir.logsafe.exceptions.SafeIllegalArgumentException) Set(java.util.Set) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) RangesForRepair(com.palantir.atlasdb.cassandra.backup.RangesForRepair) Namespace(com.palantir.atlasdb.timelock.api.Namespace) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Mockito(org.mockito.Mockito) DisableNamespacesResponse(com.palantir.atlasdb.timelock.api.DisableNamespacesResponse) Optional(java.util.Optional) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) SuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.SuccessfulDisableNamespacesResponse) UnsuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.UnsuccessfulDisableNamespacesResponse) DisableNamespacesResponse(com.palantir.atlasdb.timelock.api.DisableNamespacesResponse) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) CompletedBackup(com.palantir.atlasdb.backup.api.CompletedBackup) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) ReenableNamespacesRequest(com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest) DisableNamespacesRequest(com.palantir.atlasdb.timelock.api.DisableNamespacesRequest) Namespace(com.palantir.atlasdb.timelock.api.Namespace) Test(org.junit.Test)

Example 2 with TimeLockManagementService

use of com.palantir.atlasdb.timelock.api.management.TimeLockManagementService in project atlasdb by palantir.

the class AtlasRestoreService method create.

public static AtlasRestoreService create(AuthHeader authHeader, Refreshable<ServicesConfigBlock> servicesConfigBlock, String serviceName, BackupPersister backupPersister, Function<Namespace, CassandraKeyValueServiceConfig> keyValueServiceConfigFactory, Function<Namespace, KeyValueService> keyValueServiceFactory) {
    DialogueClients.ReloadingFactory reloadingFactory = DialogueClients.create(servicesConfigBlock).withUserAgent(UserAgent.of(AtlasDbRemotingConstants.ATLASDB_HTTP_CLIENT_AGENT));
    AtlasRestoreClient atlasRestoreClient = new DialogueAdaptingAtlasRestoreClient(reloadingFactory.get(AtlasRestoreClientBlocking.class, serviceName));
    TimeLockManagementService timeLockManagementService = new DialogueAdaptingTimeLockManagementService(reloadingFactory.get(TimeLockManagementServiceBlocking.class, serviceName));
    CassandraRepairHelper cassandraRepairHelper = new CassandraRepairHelper(KvsRunner.create(keyValueServiceFactory), keyValueServiceConfigFactory);
    return new AtlasRestoreService(authHeader, atlasRestoreClient, timeLockManagementService, backupPersister, cassandraRepairHelper);
}
Also used : CassandraRepairHelper(com.palantir.atlasdb.cassandra.backup.CassandraRepairHelper) TimeLockManagementServiceBlocking(com.palantir.atlasdb.timelock.api.management.TimeLockManagementServiceBlocking) AtlasRestoreClientBlocking(com.palantir.atlasdb.backup.api.AtlasRestoreClientBlocking) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) DialogueClients(com.palantir.dialogue.clients.DialogueClients)

Example 3 with TimeLockManagementService

use of com.palantir.atlasdb.timelock.api.management.TimeLockManagementService in project atlasdb by palantir.

the class AtlasRestoreService method create.

public static AtlasRestoreService create(AuthHeader authHeader, Refreshable<ServicesConfigBlock> servicesConfigBlock, String serviceName, BackupPersister backupPersister, Function<AtlasService, CassandraClusterConfig> cassandraClusterConfigFactory, Function<AtlasService, Refreshable<CassandraServersConfig>> refreshableCassandraServersConfigFactory, Function<AtlasService, KeyValueService> keyValueServiceFactory) {
    DialogueClients.ReloadingFactory reloadingFactory = DialogueClients.create(servicesConfigBlock).withUserAgent(UserAgent.of(AtlasDbRemotingConstants.ATLASDB_HTTP_CLIENT_AGENT));
    AtlasRestoreClient atlasRestoreClient = new DialogueAdaptingAtlasRestoreClient(reloadingFactory.get(AtlasRestoreClientBlocking.class, serviceName));
    TimeLockManagementService timeLockManagementService = new DialogueAdaptingTimeLockManagementService(reloadingFactory.get(TimeLockManagementServiceBlocking.class, serviceName));
    CassandraRepairHelper cassandraRepairHelper = new CassandraRepairHelper(KvsRunner.create(keyValueServiceFactory), cassandraClusterConfigFactory, refreshableCassandraServersConfigFactory);
    return new AtlasRestoreService(authHeader, atlasRestoreClient, timeLockManagementService, backupPersister, cassandraRepairHelper);
}
Also used : CassandraRepairHelper(com.palantir.atlasdb.cassandra.backup.CassandraRepairHelper) TimeLockManagementServiceBlocking(com.palantir.atlasdb.timelock.api.management.TimeLockManagementServiceBlocking) AtlasRestoreClientBlocking(com.palantir.atlasdb.backup.api.AtlasRestoreClientBlocking) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) DialogueClients(com.palantir.dialogue.clients.DialogueClients)

Example 4 with TimeLockManagementService

use of com.palantir.atlasdb.timelock.api.management.TimeLockManagementService in project atlasdb by palantir.

the class AtlasRestoreServiceTest method restoresToNewAtlasServiceCorrectly.

@Test
public void restoresToNewAtlasServiceCorrectly() {
    RestoreRequest restoreRequest = RestoreRequest.builder().oldAtlasService(WITH_BACKUP).newAtlasService(NO_BACKUP).build();
    // prepare
    DisableNamespacesResponse successfulDisable = DisableNamespacesResponse.successful(SuccessfulDisableNamespacesResponse.of(BACKUP_ID));
    DisableNamespacesRequest request = DisableNamespacesRequest.of(ImmutableSet.of(NO_BACKUP_NS), BACKUP_ID);
    when(timeLockManagementService.disableTimelock(authHeader, request)).thenReturn(successfulDisable);
    Set<AtlasService> disabledAtlasServices = atlasRestoreService.prepareRestore(ImmutableSet.of(restoreRequest), BACKUP_ID);
    assertThat(disabledAtlasServices).containsExactly(NO_BACKUP);
    // repair
    BiConsumer<String, RangesForRepair> doNothingConsumer = (_unused1, _unused2) -> {
    };
    Set<AtlasService> repairedAtlasServices = atlasRestoreService.repairInternalTables(ImmutableSet.of(restoreRequest), doNothingConsumer);
    assertThat(repairedAtlasServices).containsExactly(NO_BACKUP);
    verify(cassandraRepairHelper).repairInternalTables(NO_BACKUP, doNothingConsumer);
    verify(cassandraRepairHelper).repairTransactionsTables(eq(NO_BACKUP), anyList(), eq(doNothingConsumer));
    verify(cassandraRepairHelper).cleanTransactionsTables(eq(NO_BACKUP), eq(BACKUP_START_TIMESTAMP), anyList());
    verifyNoMoreInteractions(cassandraRepairHelper);
    // complete
    CompletedBackup completedBackup = backupPersister.getCompletedBackup(WITH_BACKUP).orElseThrow();
    CompleteRestoreRequest completeRestoreRequest = CompleteRestoreRequest.of(ImmutableMap.of(NO_BACKUP_NS, completedBackup));
    when(atlasRestoreClient.completeRestore(authHeader, completeRestoreRequest)).thenReturn(CompleteRestoreResponse.of(ImmutableSet.of(NO_BACKUP_NS)));
    ReenableNamespacesRequest reenableRequest = ReenableNamespacesRequest.of(ImmutableSet.of(NO_BACKUP_NS), BACKUP_ID);
    Set<AtlasService> completedAtlasServices = atlasRestoreService.completeRestore(ImmutableSet.of(restoreRequest), BACKUP_ID);
    assertThat(completedAtlasServices).containsExactly(NO_BACKUP);
    verify(atlasRestoreClient).completeRestore(authHeader, completeRestoreRequest);
    verify(timeLockManagementService).reenableTimelock(authHeader, reenableRequest);
}
Also used : RangesForRepair(com.palantir.atlasdb.cassandra.backup.RangesForRepair) CassandraRepairHelper(com.palantir.atlasdb.cassandra.backup.CassandraRepairHelper) CompleteRestoreResponse(com.palantir.atlasdb.backup.api.CompleteRestoreResponse) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) RunWith(org.junit.runner.RunWith) AuthHeader(com.palantir.tokens.auth.AuthHeader) ServiceId(com.palantir.atlasdb.backup.api.ServiceId) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) CompletedBackup(com.palantir.atlasdb.backup.api.CompletedBackup) Mockito.verifyNoInteractions(org.mockito.Mockito.verifyNoInteractions) ReenableNamespacesRequest(com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest) SuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.SuccessfulDisableNamespacesResponse) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) Map(java.util.Map) BiConsumer(java.util.function.BiConsumer) Before(org.junit.Before) ImmutableSet(com.google.common.collect.ImmutableSet) InOrder(org.mockito.InOrder) ImmutableMap(com.google.common.collect.ImmutableMap) KeyedStream(com.palantir.common.streams.KeyedStream) DisableNamespacesRequest(com.palantir.atlasdb.timelock.api.DisableNamespacesRequest) UnsuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.UnsuccessfulDisableNamespacesResponse) SafeIllegalArgumentException(com.palantir.logsafe.exceptions.SafeIllegalArgumentException) Set(java.util.Set) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) RangesForRepair(com.palantir.atlasdb.cassandra.backup.RangesForRepair) Namespace(com.palantir.atlasdb.timelock.api.Namespace) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Mockito(org.mockito.Mockito) Assertions.assertThatLoggableExceptionThrownBy(com.palantir.logsafe.testing.Assertions.assertThatLoggableExceptionThrownBy) DisableNamespacesResponse(com.palantir.atlasdb.timelock.api.DisableNamespacesResponse) Optional(java.util.Optional) AtlasService(com.palantir.atlasdb.backup.api.AtlasService) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) SuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.SuccessfulDisableNamespacesResponse) UnsuccessfulDisableNamespacesResponse(com.palantir.atlasdb.timelock.api.UnsuccessfulDisableNamespacesResponse) DisableNamespacesResponse(com.palantir.atlasdb.timelock.api.DisableNamespacesResponse) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) AtlasService(com.palantir.atlasdb.backup.api.AtlasService) CompletedBackup(com.palantir.atlasdb.backup.api.CompletedBackup) CompleteRestoreRequest(com.palantir.atlasdb.backup.api.CompleteRestoreRequest) ReenableNamespacesRequest(com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest) DisableNamespacesRequest(com.palantir.atlasdb.timelock.api.DisableNamespacesRequest) Test(org.junit.Test)

Example 5 with TimeLockManagementService

use of com.palantir.atlasdb.timelock.api.management.TimeLockManagementService in project atlasdb by palantir.

the class AtlasDbEteServer method createAndRegisterBackupAndRestoreResource.

private void createAndRegisterBackupAndRestoreResource(AtlasDbEteConfiguration config, Environment environment, TransactionManager txManager, TaggedMetricRegistry taggedMetrics) throws IOException {
    AuthHeader authHeader = AuthHeader.of(BearerToken.valueOf("test-auth"));
    URL localServer = new URL("https://localhost:1234");
    Path backupFolder = Paths.get("/var/data/backup");
    Files.createDirectories(backupFolder);
    Function<AtlasService, Path> backupFolderFactory = _unused -> backupFolder;
    ExternalBackupPersister externalBackupPersister = new ExternalBackupPersister(backupFolderFactory);
    Function<String, BackupTimeLockServiceView> timelockServices = _unused -> createBackupTimeLockServiceView(txManager);
    AuthHeaderValidator authHeaderValidator = new AuthHeaderValidator(() -> Optional.of(authHeader.getBearerToken()));
    RedirectRetryTargeter redirectRetryTargeter = RedirectRetryTargeter.create(localServer, ImmutableList.of(localServer));
    AtlasBackupClient atlasBackupClient = AtlasBackupResource.jersey(authHeaderValidator, redirectRetryTargeter, timelockServices);
    AtlasRestoreClient atlasRestoreClient = AtlasRestoreResource.jersey(authHeaderValidator, redirectRetryTargeter, timelockServices);
    Refreshable<ServerListConfig> serverListConfig = getServerListConfigForTimeLock(config);
    TimeLockManagementService timeLockManagementService = getRemoteTimeLockManagementService(serverListConfig, taggedMetrics);
    AtlasBackupService atlasBackupService = AtlasBackupService.createForTests(authHeader, atlasBackupClient, txManager, backupFolderFactory);
    Function<AtlasService, CassandraKeyValueServiceConfig> keyValueServiceConfigFactory = _unused -> (CassandraKeyValueServiceConfig) config.getAtlasDbConfig().keyValueService();
    Function<AtlasService, CassandraKeyValueServiceRuntimeConfig> runtimeConfigFactory = _unused -> (CassandraKeyValueServiceRuntimeConfig) config.getAtlasDbRuntimeConfig().flatMap(AtlasDbRuntimeConfig::keyValueService).orElseThrow();
    Function<AtlasService, CassandraClusterConfig> cassandraClusterConfigFactory = atlasService -> CassandraClusterConfig.of(keyValueServiceConfigFactory.apply(atlasService), runtimeConfigFactory.apply(atlasService));
    Function<AtlasService, Refreshable<CassandraServersConfig>> refreshableCassandraServersConfigFactory = runtimeConfigFactory.andThen(runtimeConfig -> Refreshable.only(runtimeConfig.servers()));
    AtlasRestoreService atlasRestoreService = AtlasRestoreService.createForTests(authHeader, atlasRestoreClient, timeLockManagementService, externalBackupPersister, txManager, cassandraClusterConfigFactory, refreshableCassandraServersConfigFactory);
    environment.jersey().register(new SimpleBackupAndRestoreResource(atlasBackupService, atlasRestoreService, externalBackupPersister));
}
Also used : TransactionService(com.palantir.atlasdb.transaction.service.TransactionService) ServerListConfigs(com.palantir.atlasdb.config.ServerListConfigs) NotInitializedExceptionMapper(com.palantir.atlasdb.http.NotInitializedExceptionMapper) LongSupplier(java.util.function.LongSupplier) SimpleLockResource(com.palantir.atlasdb.lock.SimpleLockResource) URL(java.net.URL) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) SafeIllegalStateException(com.palantir.logsafe.exceptions.SafeIllegalStateException) ExceptionMapper(javax.ws.rs.ext.ExceptionMapper) AuthHeader(com.palantir.tokens.auth.AuthHeader) BlobSchema(com.palantir.atlasdb.blob.BlobSchema) TargetedSweepFollower(com.palantir.atlasdb.sweep.queue.TargetedSweepFollower) SimpleTodoResource(com.palantir.atlasdb.todo.SimpleTodoResource) RedirectRetryTargeter(com.palantir.atlasdb.http.RedirectRetryTargeter) AtlasBackupService(com.palantir.atlasdb.backup.AtlasBackupService) UserAgent(com.palantir.conjure.java.api.config.service.UserAgent) TransactionServices(com.palantir.atlasdb.transaction.service.TransactionServices) CoordinationServices(com.palantir.atlasdb.internalschema.persistence.CoordinationServices) SweepTaskRunner(com.palantir.atlasdb.sweep.SweepTaskRunner) Path(java.nio.file.Path) InternalSchemaMetadata(com.palantir.atlasdb.internalschema.InternalSchemaMetadata) CassandraServersConfig(com.palantir.atlasdb.cassandra.CassandraServersConfigs.CassandraServersConfig) Refreshable(com.palantir.refreshable.Refreshable) Application(io.dropwizard.Application) ImmutableSet(com.google.common.collect.ImmutableSet) TimestampManagementService(com.palantir.timestamp.TimestampManagementService) CoordinationService(com.palantir.atlasdb.coordination.CoordinationService) AtlasDbDialogueServiceProvider(com.palantir.atlasdb.factory.AtlasDbDialogueServiceProvider) BackupTimeLockServiceView(com.palantir.atlasdb.timelock.BackupTimeLockServiceView) SharedMetricRegistries(com.codahale.metrics.SharedMetricRegistries) TransactionManager(com.palantir.atlasdb.transaction.api.TransactionManager) Jdk8Module(com.fasterxml.jackson.datatype.jdk8.Jdk8Module) ServerListConfig(com.palantir.atlasdb.config.ServerListConfig) MetricsManagers(com.palantir.atlasdb.util.MetricsManagers) ServicesConfigBlock(com.palantir.conjure.java.api.config.service.ServicesConfigBlock) SimpleBackupAndRestoreResource(com.palantir.atlasdb.backup.SimpleBackupAndRestoreResource) Response(javax.ws.rs.core.Response) AtlasBackupResource(com.palantir.atlasdb.backup.AtlasBackupResource) AtlasRestoreService(com.palantir.atlasdb.backup.AtlasRestoreService) Optional(java.util.Optional) SpecialTimestampsSupplier(com.palantir.atlasdb.sweep.queue.SpecialTimestampsSupplier) SimpleEteTimestampResource(com.palantir.atlasdb.timestamp.SimpleEteTimestampResource) CassandraKeyValueServiceConfig(com.palantir.atlasdb.cassandra.CassandraKeyValueServiceConfig) TodoClient(com.palantir.atlasdb.todo.TodoClient) CassandraKeyValueServiceRuntimeConfig(com.palantir.atlasdb.cassandra.CassandraKeyValueServiceRuntimeConfig) SafeLoggerFactory(com.palantir.logsafe.logger.SafeLoggerFactory) AtlasBackupClient(com.palantir.atlasdb.backup.api.AtlasBackupClient) Bootstrap(io.dropwizard.setup.Bootstrap) Stopwatch(com.google.common.base.Stopwatch) TodoSchema(com.palantir.atlasdb.todo.TodoSchema) ExternalBackupPersister(com.palantir.atlasdb.backup.ExternalBackupPersister) Function(java.util.function.Function) Supplier(java.util.function.Supplier) TransactionManagers(com.palantir.atlasdb.factory.TransactionManagers) SafeLogger(com.palantir.logsafe.logger.SafeLogger) AtlasRestoreResource(com.palantir.atlasdb.backup.AtlasRestoreResource) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) BearerToken(com.palantir.tokens.auth.BearerToken) SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) ImmutableList(com.google.common.collect.ImmutableList) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) TransactionSchemaVersionEnforcement(com.palantir.atlasdb.transaction.impl.TransactionSchemaVersionEnforcement) Suppliers(com.google.common.base.Suppliers) SimpleCoordinationResource(com.palantir.atlasdb.coordination.SimpleCoordinationResource) SharedTaggedMetricRegistries(com.palantir.tritium.metrics.registry.SharedTaggedMetricRegistries) Environment(io.dropwizard.setup.Environment) Files(java.nio.file.Files) CassandraClusterConfig(com.palantir.atlasdb.keyvalue.cassandra.async.client.creation.ClusterFactory.CassandraClusterConfig) TargetedSweeper(com.palantir.atlasdb.sweep.queue.TargetedSweeper) IOException(java.io.IOException) TransactionSchemaManager(com.palantir.atlasdb.internalschema.TransactionSchemaManager) TimelockService(com.palantir.lock.v2.TimelockService) TaggedMetricRegistry(com.palantir.tritium.metrics.registry.TaggedMetricRegistry) DelegatingBackupTimeLockServiceView(com.palantir.atlasdb.backup.DelegatingBackupTimeLockServiceView) TimeUnit(java.util.concurrent.TimeUnit) AtlasDbRuntimeConfig(com.palantir.atlasdb.config.AtlasDbRuntimeConfig) EmptyOptionalException(io.dropwizard.jersey.optional.EmptyOptionalException) Follower(com.palantir.atlasdb.cleaner.Follower) Paths(java.nio.file.Paths) KeyValueService(com.palantir.atlasdb.keyvalue.api.KeyValueService) ConjureJerseyFeature(com.palantir.conjure.java.server.jersey.ConjureJerseyFeature) AtlasDbRemotingConstants(com.palantir.atlasdb.http.AtlasDbRemotingConstants) CellsSweeper(com.palantir.atlasdb.sweep.CellsSweeper) AuthHeaderValidator(com.palantir.atlasdb.backup.AuthHeaderValidator) AtlasService(com.palantir.atlasdb.backup.api.AtlasService) DialogueClients(com.palantir.dialogue.clients.DialogueClients) Schema(com.palantir.atlasdb.table.description.Schema) CleanupFollower(com.palantir.atlasdb.cleaner.CleanupFollower) AtlasDbConfig(com.palantir.atlasdb.config.AtlasDbConfig) CassandraKeyValueServiceRuntimeConfig(com.palantir.atlasdb.cassandra.CassandraKeyValueServiceRuntimeConfig) AtlasService(com.palantir.atlasdb.backup.api.AtlasService) TimeLockManagementService(com.palantir.atlasdb.timelock.api.management.TimeLockManagementService) URL(java.net.URL) CassandraKeyValueServiceConfig(com.palantir.atlasdb.cassandra.CassandraKeyValueServiceConfig) Path(java.nio.file.Path) ExternalBackupPersister(com.palantir.atlasdb.backup.ExternalBackupPersister) SimpleBackupAndRestoreResource(com.palantir.atlasdb.backup.SimpleBackupAndRestoreResource) AuthHeader(com.palantir.tokens.auth.AuthHeader) BackupTimeLockServiceView(com.palantir.atlasdb.timelock.BackupTimeLockServiceView) DelegatingBackupTimeLockServiceView(com.palantir.atlasdb.backup.DelegatingBackupTimeLockServiceView) CassandraClusterConfig(com.palantir.atlasdb.keyvalue.cassandra.async.client.creation.ClusterFactory.CassandraClusterConfig) Refreshable(com.palantir.refreshable.Refreshable) AtlasRestoreClient(com.palantir.atlasdb.backup.api.AtlasRestoreClient) RedirectRetryTargeter(com.palantir.atlasdb.http.RedirectRetryTargeter) ServerListConfig(com.palantir.atlasdb.config.ServerListConfig) AuthHeaderValidator(com.palantir.atlasdb.backup.AuthHeaderValidator) AtlasBackupClient(com.palantir.atlasdb.backup.api.AtlasBackupClient) AtlasRestoreService(com.palantir.atlasdb.backup.AtlasRestoreService) AtlasBackupService(com.palantir.atlasdb.backup.AtlasBackupService) AtlasDbRuntimeConfig(com.palantir.atlasdb.config.AtlasDbRuntimeConfig)

Aggregations

AtlasRestoreClient (com.palantir.atlasdb.backup.api.AtlasRestoreClient)5 TimeLockManagementService (com.palantir.atlasdb.timelock.api.management.TimeLockManagementService)5 CassandraRepairHelper (com.palantir.atlasdb.cassandra.backup.CassandraRepairHelper)4 ImmutableSet (com.google.common.collect.ImmutableSet)3 AuthHeader (com.palantir.tokens.auth.AuthHeader)3 Optional (java.util.Optional)3 ImmutableMap (com.google.common.collect.ImmutableMap)2 AtlasRestoreClientBlocking (com.palantir.atlasdb.backup.api.AtlasRestoreClientBlocking)2 AtlasService (com.palantir.atlasdb.backup.api.AtlasService)2 CompleteRestoreRequest (com.palantir.atlasdb.backup.api.CompleteRestoreRequest)2 CompleteRestoreResponse (com.palantir.atlasdb.backup.api.CompleteRestoreResponse)2 CompletedBackup (com.palantir.atlasdb.backup.api.CompletedBackup)2 RangesForRepair (com.palantir.atlasdb.cassandra.backup.RangesForRepair)2 TimeLockManagementServiceBlocking (com.palantir.atlasdb.timelock.api.management.TimeLockManagementServiceBlocking)2 DialogueClients (com.palantir.dialogue.clients.DialogueClients)2 SharedMetricRegistries (com.codahale.metrics.SharedMetricRegistries)1 Jdk8Module (com.fasterxml.jackson.datatype.jdk8.Jdk8Module)1 Stopwatch (com.google.common.base.Stopwatch)1 Suppliers (com.google.common.base.Suppliers)1 ImmutableList (com.google.common.collect.ImmutableList)1