Search in sources :

Example 1 with BlockMetadataManager

use of alluxio.worker.block.BlockMetadataManager in project alluxio by Alluxio.

the class StorageDirViewTest method before.

/**
 * Sets up all dependencies before a test runs.
 */
@Before
public void before() throws Exception {
    File tempFolder = mTestFolder.newFolder();
    BlockMetadataManager metaManager = TieredBlockStoreTestUtils.defaultMetadataManager(tempFolder.getAbsolutePath());
    mMetadataView = Mockito.spy(new BlockMetadataEvictorView(metaManager, new HashSet<Long>(), new HashSet<Long>()));
    StorageTier testTier = metaManager.getTiers().get(TEST_TIER_LEVEL);
    mTestDir = testTier.getDir(TEST_DIR);
    mTestTierView = new StorageTierEvictorView(testTier, mMetadataView);
    mTestDirView = new StorageDirEvictorView(mTestDir, mTestTierView, mMetadataView);
}
Also used : BlockMetadataManager(alluxio.worker.block.BlockMetadataManager) BlockMetadataEvictorView(alluxio.worker.block.BlockMetadataEvictorView) File(java.io.File) Before(org.junit.Before)

Example 2 with BlockMetadataManager

use of alluxio.worker.block.BlockMetadataManager in project alluxio by Alluxio.

the class StorageTierViewTest method before.

/**
 * Sets up all dependencies before a test runs.
 */
@Before
public void before() throws Exception {
    File tempFolder = mTestFolder.newFolder();
    BlockMetadataManager metaManager = TieredBlockStoreTestUtils.defaultMetadataManager(tempFolder.getAbsolutePath());
    mMetadataView = new BlockMetadataEvictorView(metaManager, new HashSet<Long>(), new HashSet<Long>());
    mTestTier = metaManager.getTiers().get(TEST_TIER_LEVEL);
    mTestTierView = new StorageTierEvictorView(mTestTier, mMetadataView);
}
Also used : BlockMetadataManager(alluxio.worker.block.BlockMetadataManager) BlockMetadataEvictorView(alluxio.worker.block.BlockMetadataEvictorView) File(java.io.File) HashSet(java.util.HashSet) Before(org.junit.Before)

Aggregations

BlockMetadataEvictorView (alluxio.worker.block.BlockMetadataEvictorView)2 BlockMetadataManager (alluxio.worker.block.BlockMetadataManager)2 File (java.io.File)2 Before (org.junit.Before)2 HashSet (java.util.HashSet)1