Search in sources :

Example 21 with InMemAccountService

use of com.github.ambry.account.InMemAccountService in project ambry by linkedin.

the class StorageManagerTest method removeBlobStoreTest.

/**
 * Test remove blob store with given {@link PartitionId}
 * @throws Exception
 */
@Test
public void removeBlobStoreTest() throws Exception {
    MockDataNodeId dataNode = clusterMap.getDataNodes().get(0);
    List<ReplicaId> replicas = clusterMap.getReplicaIds(dataNode);
    List<MockDataNodeId> dataNodes = new ArrayList<>();
    dataNodes.add(dataNode);
    MockPartitionId invalidPartition = new MockPartitionId(Long.MAX_VALUE, MockClusterMap.DEFAULT_PARTITION_CLASS, dataNodes, 0);
    StorageManager storageManager = createStorageManager(dataNode, metricRegistry, null);
    storageManager.start();
    // Replica[1] will be used to test removing a started store. Replica[2] will be used to test a store with compaction enabled
    for (int i = 3; i < replicas.size(); i++) {
        ReplicaId replica = replicas.get(i);
        PartitionId id = replica.getPartitionId();
        assertTrue("Disable compaction should succeed", storageManager.controlCompactionForBlobStore(id, false));
        assertTrue("Shutdown should succeed on given store", storageManager.shutdownBlobStore(id));
        assertTrue("Removing store should succeed", storageManager.removeBlobStore(id));
        assertNull("The store should not exist", storageManager.getStore(id, false));
    }
    // test remove store that compaction is still enabled on it, even though it is shutdown
    PartitionId id = replicas.get(2).getPartitionId();
    assertTrue("Shutdown should succeed on given store", storageManager.shutdownBlobStore(id));
    assertFalse("Removing store should fail because compaction is enabled on this store", storageManager.removeBlobStore(id));
    // test remove store that is still started
    id = replicas.get(1).getPartitionId();
    assertFalse("Removing store should fail because store is still started", storageManager.removeBlobStore(id));
    // test remove store that the disk manager is not running
    id = replicas.get(0).getPartitionId();
    storageManager.getDiskManager(id).shutdown();
    assertFalse("Removing store should fail because disk manager is not running", storageManager.removeBlobStore(id));
    // test a store that doesn't exist
    assertFalse("Removing not-found store should return false", storageManager.removeBlobStore(invalidPartition));
    shutdownAndAssertStoresInaccessible(storageManager, replicas);
    // test that remove store when compaction executor is not instantiated
    // by default, storeCompactionTriggers = "" which makes compaction executor = null during initialization
    VerifiableProperties vProps = new VerifiableProperties(new Properties());
    storageManager = new StorageManager(new StoreConfig(vProps), diskManagerConfig, Utils.newScheduler(1, false), metricRegistry, new MockIdFactory(), clusterMap, dataNode, new DummyMessageStoreHardDelete(), null, SystemTime.getInstance(), new DummyMessageStoreRecovery(), new InMemAccountService(false, false));
    storageManager.start();
    for (ReplicaId replica : replicas) {
        id = replica.getPartitionId();
        assertTrue("Disable compaction should succeed", storageManager.controlCompactionForBlobStore(id, false));
        assertTrue("Shutdown should succeed on given store", storageManager.shutdownBlobStore(id));
        assertTrue("Removing store should succeed", storageManager.removeBlobStore(id));
        assertNull("The store should not exist", storageManager.getStore(id, false));
    }
    shutdownAndAssertStoresInaccessible(storageManager, replicas);
}
Also used : MockPartitionId(com.github.ambry.clustermap.MockPartitionId) VerifiableProperties(com.github.ambry.config.VerifiableProperties) ArrayList(java.util.ArrayList) MockPartitionId(com.github.ambry.clustermap.MockPartitionId) PartitionId(com.github.ambry.clustermap.PartitionId) Properties(java.util.Properties) VerifiableProperties(com.github.ambry.config.VerifiableProperties) ReplicaId(com.github.ambry.clustermap.ReplicaId) InMemAccountService(com.github.ambry.account.InMemAccountService) MockDataNodeId(com.github.ambry.clustermap.MockDataNodeId) StoreConfig(com.github.ambry.config.StoreConfig) BlobStoreTest(com.github.ambry.store.BlobStoreTest) Test(org.junit.Test)

Example 22 with InMemAccountService

use of com.github.ambry.account.InMemAccountService in project ambry by linkedin.

the class FrontendTestUrlSigningServiceFactory method injectionAccountAndContainerForGetHeadDeleteBlobIdTest.

/**
 * Tests injecting target {@link Account} and {@link Container} for GET/HEAD/DELETE blobId string in {@link BlobId#BLOB_ID_V2}.
 * The {@link AccountService} is prepopulated with a reference account and {@link InMemAccountService#UNKNOWN_ACCOUNT}. The expected
 * behavior should be:
 *
 * <pre>
 *   AId in blobId    CId in blobId     expected Error      injected account      injected container
 *    realAId           realCId          NotFound            refAccount            refContainer       This can succeed if the blob exists in backend.
 *    realAId           UNKNOWN          InvalidContainer    null                  null
 *    realAId           nonExistCId      InvalidContainer    null                  null
 *    UNKNOWN           realCId          InvalidContainer    null                  null
 *    UNKNOWN           UNKNOWN          NotFound            UNKNOWN               UNKNOWN            This can succeed if the blob exists in backend.
 *    UNKNOWN           nonExistCId      InvalidContainer    null                  null
 *    nonExistAId       realCId          InvalidAccount      null                  null
 *    nonExistAId       UNKNOWN          InvalidAccount      null                  null
 *    nonExistAId       nonExistCId      InvalidAccount      null                  null
 * </pre>
 *
 * @throws Exception
 */
@Test
public void injectionAccountAndContainerForGetHeadDeleteBlobIdTest() throws Exception {
    List<Short> blobIdVersions = Arrays.stream(BlobId.getAllValidVersions()).filter(version -> version >= BlobId.BLOB_ID_V2).collect(Collectors.toList());
    for (short version : blobIdVersions) {
        populateAccountService();
        // aid=refAId, cid=refCId
        String blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, refAccount.getId(), refContainer.getId(), clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, refAccount, refContainer, RestServiceErrorCode.NotFound);
        // aid=refAId, cid=unknownCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, refAccount.getId(), Container.UNKNOWN_CONTAINER_ID, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidContainer);
        // aid=refAId, cid=nonExistCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, refAccount.getId(), (short) -1234, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidContainer);
        // aid=unknownAId, cid=refCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, refContainer.getId(), clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidContainer);
        // aid=unknownAId, cid=unknownCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, InMemAccountService.UNKNOWN_ACCOUNT, Container.UNKNOWN_CONTAINER, RestServiceErrorCode.NotFound);
        // aid=unknownAId, cid=nonExistCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, (short) -1234, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidContainer);
        // aid=nonExistAId, cid=refCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, (short) -1234, refContainer.getId(), clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidAccount);
        // aid=nonExistAId, cid=unknownCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, (short) -1234, Container.UNKNOWN_CONTAINER_ID, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidAccount);
        // aid=nonExistAId, cid=nonExistCId
        blobId = new BlobId(version, BlobId.BlobIdType.NATIVE, ClusterMap.UNKNOWN_DATACENTER_ID, (short) -1234, (short) -11, clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0), false, BlobId.BlobDataType.DATACHUNK).getID();
        verifyAccountAndContainerFromBlobId(blobId, null, null, RestServiceErrorCode.InvalidAccount);
    }
}
Also used : GetOption(com.github.ambry.protocol.GetOption) MockRestRequest(com.github.ambry.rest.MockRestRequest) Arrays(java.util.Arrays) FrontendConfig(com.github.ambry.config.FrontendConfig) AggregatedPartitionClassStorageStats(com.github.ambry.server.storagestats.AggregatedPartitionClassStorageStats) BlobProperties(com.github.ambry.messageformat.BlobProperties) FutureResult(com.github.ambry.router.FutureResult) Future(java.util.concurrent.Future) JSONException(org.json.JSONException) TestUtils(com.github.ambry.utils.TestUtils) Map(java.util.Map) ChunkInfo(com.github.ambry.router.ChunkInfo) EnumSet(java.util.EnumSet) RouterErrorCode(com.github.ambry.router.RouterErrorCode) RestResponseHandler(com.github.ambry.rest.RestResponseHandler) ReadableStreamChannel(com.github.ambry.router.ReadableStreamChannel) ClusterMapSnapshotConstants(com.github.ambry.clustermap.ClusterMapSnapshotConstants) RestResponseChannel(com.github.ambry.rest.RestResponseChannel) Set(java.util.Set) StandardCharsets(java.nio.charset.StandardCharsets) AccountStatsStore(com.github.ambry.accountstats.AccountStatsStore) BlobInfo(com.github.ambry.messageformat.BlobInfo) InvocationTargetException(java.lang.reflect.InvocationTargetException) AggregatedAccountStorageStats(com.github.ambry.server.storagestats.AggregatedAccountStorageStats) CountDownLatch(java.util.concurrent.CountDownLatch) RestServiceException(com.github.ambry.rest.RestServiceException) MockRestResponseChannel(com.github.ambry.rest.MockRestResponseChannel) Account(com.github.ambry.account.Account) InMemoryRouter(com.github.ambry.router.InMemoryRouter) SimpleDateFormat(java.text.SimpleDateFormat) RestTestUtils(com.github.ambry.rest.RestTestUtils) PutBlobOptions(com.github.ambry.router.PutBlobOptions) ArrayList(java.util.ArrayList) QuotaConfig(com.github.ambry.config.QuotaConfig) QuotaMode(com.github.ambry.quota.QuotaMode) Lists(com.google.common.collect.Lists) SSLSession(javax.net.ssl.SSLSession) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) SystemTime(com.github.ambry.utils.SystemTime) MetricRegistry(com.codahale.metrics.MetricRegistry) Properties(java.util.Properties) RestMethod(com.github.ambry.rest.RestMethod) VerifiableProperties(com.github.ambry.config.VerifiableProperties) IOException(java.io.IOException) Test(org.junit.Test) RouterException(com.github.ambry.router.RouterException) InMemAccountServiceFactory(com.github.ambry.account.InMemAccountServiceFactory) AmbryQuotaManager(com.github.ambry.quota.AmbryQuotaManager) QuotaMetrics(com.github.ambry.quota.QuotaMetrics) GetBlobResult(com.github.ambry.router.GetBlobResult) PutBlobOptionsBuilder(com.github.ambry.router.PutBlobOptionsBuilder) SimpleQuotaRecommendationMergePolicy(com.github.ambry.quota.SimpleQuotaRecommendationMergePolicy) Assert(org.junit.Assert) Date(java.util.Date) URISyntaxException(java.net.URISyntaxException) ResponseStatus(com.github.ambry.rest.ResponseStatus) ByteBufferReadableStreamChannel(com.github.ambry.commons.ByteBufferReadableStreamChannel) ContainerBuilder(com.github.ambry.account.ContainerBuilder) ByteBuffer(java.nio.ByteBuffer) AccountCollectionSerde(com.github.ambry.account.AccountCollectionSerde) RestUtilsTest(com.github.ambry.rest.RestUtilsTest) JSONObject(org.json.JSONObject) ByteArrayInputStream(java.io.ByteArrayInputStream) Locale(java.util.Locale) After(org.junit.After) Method(java.lang.reflect.Method) Container(com.github.ambry.account.Container) TimeZone(java.util.TimeZone) RestServiceErrorCode(com.github.ambry.rest.RestServiceErrorCode) Utils(com.github.ambry.utils.Utils) AccountBuilder(com.github.ambry.account.AccountBuilder) Collectors(java.util.stream.Collectors) NamedBlobRecord(com.github.ambry.named.NamedBlobRecord) AsyncWritableChannel(com.github.ambry.router.AsyncWritableChannel) List(java.util.List) QuotaTestUtils(com.github.ambry.quota.QuotaTestUtils) RestRequestMetricsTracker(com.github.ambry.rest.RestRequestMetricsTracker) Callback(com.github.ambry.commons.Callback) RestUtils(com.github.ambry.rest.RestUtils) UnsupportedEncodingException(java.io.UnsupportedEncodingException) InMemAccountService(com.github.ambry.account.InMemAccountService) PartitionId(com.github.ambry.clustermap.PartitionId) BlobId(com.github.ambry.commons.BlobId) StorageStatsUtilTest(com.github.ambry.server.StorageStatsUtilTest) ByteRanges(com.github.ambry.router.ByteRanges) AccountService(com.github.ambry.account.AccountService) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) QuotaManager(com.github.ambry.quota.QuotaManager) HashSet(java.util.HashSet) NamedBlobDb(com.github.ambry.named.NamedBlobDb) CommonTestUtils(com.github.ambry.commons.CommonTestUtils) LinkedList(java.util.LinkedList) Router(com.github.ambry.router.Router) Pair(com.github.ambry.utils.Pair) Iterator(java.util.Iterator) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) QuotaChargeCallback(com.github.ambry.quota.QuotaChargeCallback) ByteRange(com.github.ambry.router.ByteRange) ClusterMap(com.github.ambry.clustermap.ClusterMap) GetBlobOptions(com.github.ambry.router.GetBlobOptions) AccountServiceException(com.github.ambry.account.AccountServiceException) TimeUnit(java.util.concurrent.TimeUnit) Mockito(org.mockito.Mockito) StatsReportType(com.github.ambry.server.StatsReportType) RestRequest(com.github.ambry.rest.RestRequest) Collections(java.util.Collections) MockClusterMap(com.github.ambry.clustermap.MockClusterMap) BlobId(com.github.ambry.commons.BlobId) Test(org.junit.Test) RestUtilsTest(com.github.ambry.rest.RestUtilsTest) StorageStatsUtilTest(com.github.ambry.server.StorageStatsUtilTest)

Example 23 with InMemAccountService

use of com.github.ambry.account.InMemAccountService in project ambry by linkedin.

the class FrontendRestRequestServiceFactoryTest method getFrontendRestRequestServiceTest.

/**
 * Tests the instantiation of an {@link FrontendRestRequestService} instance through the
 * {@link FrontendRestRequestServiceFactory}.
 * @throws Exception
 */
@Test
public void getFrontendRestRequestServiceTest() throws Exception {
    // dud properties. server should pick up defaults
    JSONObject jsonObject = new JSONObject().put("POST", "http://uploadUrl:15158").put("GET", "http://downloadUrl:15158");
    Properties properties = new Properties();
    CommonTestUtils.populateRequiredRouterProps(properties);
    properties.setProperty(FrontendConfig.URL_SIGNER_ENDPOINTS, jsonObject.toString());
    properties.setProperty("clustermap.cluster.name", "Cluster-Name");
    properties.setProperty("clustermap.datacenter.name", "Datacenter-Name");
    properties.setProperty("clustermap.host.name", "localhost");
    VerifiableProperties verifiableProperties = new VerifiableProperties(properties);
    FrontendRestRequestServiceFactory frontendRestRequestServiceFactory = new FrontendRestRequestServiceFactory(verifiableProperties, new MockClusterMap(), new InMemoryRouter(verifiableProperties, new MockClusterMap()), new InMemAccountService(false, true));
    RestRequestService ambryRestRequestService = frontendRestRequestServiceFactory.getRestRequestService();
    assertNotNull("No RestRequestService returned", ambryRestRequestService);
    assertEquals("Did not receive an FrontendRestRequestService instance", FrontendRestRequestService.class.getCanonicalName(), ambryRestRequestService.getClass().getCanonicalName());
}
Also used : InMemoryRouter(com.github.ambry.router.InMemoryRouter) InMemAccountService(com.github.ambry.account.InMemAccountService) RestRequestService(com.github.ambry.rest.RestRequestService) JSONObject(org.json.JSONObject) VerifiableProperties(com.github.ambry.config.VerifiableProperties) Properties(java.util.Properties) VerifiableProperties(com.github.ambry.config.VerifiableProperties) MockClusterMap(com.github.ambry.clustermap.MockClusterMap) Test(org.junit.Test)

Example 24 with InMemAccountService

use of com.github.ambry.account.InMemAccountService in project ambry by linkedin.

the class CloudToStoreReplicationManagerTest method cloudReplicaRemovalTest.

/**
 * Test both success and failure cases when removing cloud replica.
 * @throws Exception
 */
@Test
public void cloudReplicaRemovalTest() throws Exception {
    StorageManager storageManager = new StorageManager(storeConfig, new DiskManagerConfig(verifiableProperties), Utils.newScheduler(1, true), clusterMap.getMetricRegistry(), null, clusterMap, currentNode, null, Collections.singletonList(mockHelixParticipant), new MockTime(), null, new InMemAccountService(false, false));
    CloudToStoreReplicationManager cloudToStoreReplicationManager = new CloudToStoreReplicationManager(replicationConfig, clusterMapConfig, storeConfig, storageManager, storeKeyFactory, clusterMap, mockScheduler, currentNode, null, clusterMap.getMetricRegistry(), null, storeKeyConverterFactory, serverConfig.serverMessageTransformer, mockClusterSpectator, mockHelixParticipant);
    storageManager.start();
    cloudToStoreReplicationManager.start();
    mockClusterSpectator.spectate();
    PartitionId localPartition = storageManager.getLocalPartitions().iterator().next();
    // 1. add cloud replica first for subsequent removal test
    mockHelixParticipant.onPartitionBecomeLeaderFromStandby(localPartition.toPathString());
    String replicaPath = Cloud_Replica_Keyword + File.separator + localPartition.toPathString() + File.separator + localPartition.toPathString();
    RemoteReplicaInfo remoteReplicaInfo = cloudToStoreReplicationManager.getRemoteReplicaInfo(localPartition, vcrNode.getHostname(), replicaPath);
    assertNotNull("Remote replica info should not be null", remoteReplicaInfo);
    assertEquals("There should be only one cloud replica thread created", 1, TestUtils.getAllThreadsByThisName(REPLICA_THREAD_PREFIX).size());
    // 2. before removing cloud replica of local partition let's remove a non-existent partition first
    mockHelixParticipant.onPartitionBecomeStandbyFromLeader(NEW_PARTITION_NAME);
    // ensure there is no change in replica thread
    assertEquals("There should be only one cloud replica thread created", 1, TestUtils.getAllThreadsByThisName(REPLICA_THREAD_PREFIX).size());
    // 3. remove the cloud replica by calling Leader-To-Standby transition on local partition
    mockHelixParticipant.onPartitionBecomeStandbyFromLeader(localPartition.toPathString());
    // ensure that the remote replica info has been successfully removed from replica thread
    assertNull("Cloud replica should be removed and no thread is assigned to it", remoteReplicaInfo.getReplicaThread());
    cloudToStoreReplicationManager.shutdown();
    storageManager.shutdown();
}
Also used : DiskManagerConfig(com.github.ambry.config.DiskManagerConfig) InMemAccountService(com.github.ambry.account.InMemAccountService) StorageManager(com.github.ambry.store.StorageManager) MockPartitionId(com.github.ambry.clustermap.MockPartitionId) PartitionId(com.github.ambry.clustermap.PartitionId) MockTime(com.github.ambry.utils.MockTime) Test(org.junit.Test)

Example 25 with InMemAccountService

use of com.github.ambry.account.InMemAccountService in project ambry by linkedin.

the class JsonCUQuotaDataProviderUtilTest method testGetCUQuotasFromJson.

@Test
public void testGetCUQuotasFromJson() throws IOException, AccountServiceException {
    InMemAccountService accountService = new InMemAccountService(false, false);
    ObjectMapper objectMapper = new ObjectMapper();
    Map<String, JsonCUQuotaDataProviderUtil.MapOrQuota> testQuotas = objectMapper.readValue(DEFAULT_CU_QUOTA_IN_JSON, new TypeReference<Map<String, JsonCUQuotaDataProviderUtil.MapOrQuota>>() {
    });
    for (String s : testQuotas.keySet()) {
        accountService.updateAccounts(Collections.singletonList(createAccountForQuota(testQuotas.get(s), s)));
    }
    Map<String, CapacityUnit> quotas = JsonCUQuotaDataProviderUtil.getCUQuotasFromJson(DEFAULT_CU_QUOTA_IN_JSON, accountService);
    Assert.assertEquals(4, quotas.size());
    Assert.assertEquals(1024000000, (long) quotas.get("101_1").getRcu());
    Assert.assertEquals(1024000000, (long) quotas.get("101_1").getWcu());
    Assert.assertEquals(258438456, (long) quotas.get("101_2").getRcu());
    Assert.assertEquals(258438456, (long) quotas.get("101_2").getWcu());
    Assert.assertEquals(1024000000, (long) quotas.get("102_1").getRcu());
    Assert.assertEquals(1024000000, (long) quotas.get("102_1").getWcu());
    Assert.assertEquals(10737418240L, (long) quotas.get("103").getRcu());
    Assert.assertEquals(10737418240L, (long) quotas.get("103").getWcu());
}
Also used : JsonCUQuotaDataProviderUtil(com.github.ambry.quota.capacityunit.JsonCUQuotaDataProviderUtil) InMemAccountService(com.github.ambry.account.InMemAccountService) CapacityUnit(com.github.ambry.quota.capacityunit.CapacityUnit) Map(java.util.Map) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Aggregations

InMemAccountService (com.github.ambry.account.InMemAccountService)40 Test (org.junit.Test)30 VerifiableProperties (com.github.ambry.config.VerifiableProperties)24 ArrayList (java.util.ArrayList)16 Properties (java.util.Properties)16 MockClusterMap (com.github.ambry.clustermap.MockClusterMap)14 LoggingNotificationSystem (com.github.ambry.commons.LoggingNotificationSystem)14 BlobProperties (com.github.ambry.messageformat.BlobProperties)14 PartitionId (com.github.ambry.clustermap.PartitionId)11 IOException (java.io.IOException)10 MockPartitionId (com.github.ambry.clustermap.MockPartitionId)9 BlobId (com.github.ambry.commons.BlobId)9 MockTime (com.github.ambry.utils.MockTime)9 Map (java.util.Map)9 AccountService (com.github.ambry.account.AccountService)8 ByteBufferReadableStreamChannel (com.github.ambry.commons.ByteBufferReadableStreamChannel)8 RouterConfig (com.github.ambry.config.RouterConfig)8 StoreConfig (com.github.ambry.config.StoreConfig)8 MetricRegistry (com.codahale.metrics.MetricRegistry)7 MockDataNodeId (com.github.ambry.clustermap.MockDataNodeId)7