Search in sources :

Example 1 with TrackingKeyValueService

use of com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService in project atlasdb by palantir.

the class SnapshotTransactionTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    // Some KV stores need more nodes to be up to accomplish a delete, so we model that here as throwing
    keyValueService = new TrackingKeyValueService(keyValueService) {

        @Override
        public void delete(TableReference tableRef, Multimap<Cell, Long> keys) {
            throw new RuntimeException("cannot delete");
        }
    };
    keyValueService.createTable(TABLE, AtlasDbConstants.GENERIC_TABLE_METADATA);
    keyValueService.createTable(TABLE1, AtlasDbConstants.GENERIC_TABLE_METADATA);
    keyValueService.createTable(TABLE2, AtlasDbConstants.GENERIC_TABLE_METADATA);
}
Also used : TableReference(com.palantir.atlasdb.keyvalue.api.TableReference) TrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService) MutableLong(org.apache.commons.lang3.mutable.MutableLong) AtomicLong(java.util.concurrent.atomic.AtomicLong) Cell(com.palantir.atlasdb.keyvalue.api.Cell) Before(org.junit.Before)

Example 2 with TrackingKeyValueService

use of com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService in project atlasdb by palantir.

the class AtlasDbTestCase method setUp.

@Before
public void setUp() throws Exception {
    timestampService = new InMemoryTimestampService();
    KeyValueService kvs = getBaseKeyValueService();
    keyValueServiceWithStats = new StatsTrackingKeyValueService(kvs);
    keyValueService = new TrackingKeyValueService(keyValueServiceWithStats);
    TransactionTables.createTables(kvs);
    transactionService = TransactionServices.createTransactionService(kvs);
    conflictDetectionManager = ConflictDetectionManagers.createWithoutWarmingCache(keyValueService);
    sweepStrategyManager = SweepStrategyManagers.createDefault(keyValueService);
    serializableTxManager = new TestTransactionManagerImpl(keyValueService, timestampService, lockClient, lockService, transactionService, conflictDetectionManager, sweepStrategyManager, wrappingSweepQueue);
    txManager = new CachingTestTransactionManager(serializableTxManager);
}
Also used : InMemoryKeyValueService(com.palantir.atlasdb.keyvalue.impl.InMemoryKeyValueService) StatsTrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.StatsTrackingKeyValueService) TracingKeyValueService(com.palantir.atlasdb.keyvalue.impl.TracingKeyValueService) TrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService) KeyValueService(com.palantir.atlasdb.keyvalue.api.KeyValueService) StatsTrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.StatsTrackingKeyValueService) TestTransactionManagerImpl(com.palantir.atlasdb.transaction.impl.TestTransactionManagerImpl) StatsTrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.StatsTrackingKeyValueService) TrackingKeyValueService(com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService) CachingTestTransactionManager(com.palantir.atlasdb.transaction.impl.CachingTestTransactionManager) InMemoryTimestampService(com.palantir.timestamp.InMemoryTimestampService) Before(org.junit.Before)

Aggregations

TrackingKeyValueService (com.palantir.atlasdb.keyvalue.impl.TrackingKeyValueService)2 Before (org.junit.Before)2 Cell (com.palantir.atlasdb.keyvalue.api.Cell)1 KeyValueService (com.palantir.atlasdb.keyvalue.api.KeyValueService)1 TableReference (com.palantir.atlasdb.keyvalue.api.TableReference)1 InMemoryKeyValueService (com.palantir.atlasdb.keyvalue.impl.InMemoryKeyValueService)1 StatsTrackingKeyValueService (com.palantir.atlasdb.keyvalue.impl.StatsTrackingKeyValueService)1 TracingKeyValueService (com.palantir.atlasdb.keyvalue.impl.TracingKeyValueService)1 CachingTestTransactionManager (com.palantir.atlasdb.transaction.impl.CachingTestTransactionManager)1 TestTransactionManagerImpl (com.palantir.atlasdb.transaction.impl.TestTransactionManagerImpl)1 InMemoryTimestampService (com.palantir.timestamp.InMemoryTimestampService)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 MutableLong (org.apache.commons.lang3.mutable.MutableLong)1