Search in sources :

Example 11 with BlockMaster

use of alluxio.master.block.BlockMaster in project alluxio by Alluxio.

the class DefaultAlluxioMaster method createMasters.

/**
   * @param journalFactory the factory to use for creating journals
   */
protected void createMasters(JournalFactory journalFactory) {
    mBlockMaster = new BlockMaster(journalFactory);
    mFileSystemMaster = new FileSystemMaster(mBlockMaster, journalFactory);
    if (LineageUtils.isLineageEnabled()) {
        mLineageMaster = new LineageMaster(mFileSystemMaster, journalFactory);
    }
    mAdditionalMasters = new ArrayList<>();
    List<? extends Master> masters = Lists.newArrayList(mBlockMaster, mFileSystemMaster);
    for (MasterFactory factory : ServerUtils.getMasterServiceLoader()) {
        Master master = factory.create(masters, journalFactory);
        if (master != null) {
            mAdditionalMasters.add(master);
        }
    }
}
Also used : BlockMaster(alluxio.master.block.BlockMaster) BlockMaster(alluxio.master.block.BlockMaster) FileSystemMaster(alluxio.master.file.FileSystemMaster) LineageMaster(alluxio.master.lineage.LineageMaster) LineageMaster(alluxio.master.lineage.LineageMaster) FileSystemMaster(alluxio.master.file.FileSystemMaster)

Aggregations

BlockMaster (alluxio.master.block.BlockMaster)11 JournalFactory (alluxio.master.journal.JournalFactory)7 FileSystemMaster (alluxio.master.file.FileSystemMaster)3 Before (org.junit.Before)3 Test (org.junit.Test)3 InodeTree (alluxio.master.file.meta.InodeTree)2 AlluxioURI (alluxio.AlluxioURI)1 FileOutStream (alluxio.client.file.FileOutStream)1 URIStatus (alluxio.client.file.URIStatus)1 ManualClock (alluxio.clock.ManualClock)1 FileDoesNotExistException (alluxio.exception.FileDoesNotExistException)1 InodeDirectoryIdGenerator (alluxio.master.file.meta.InodeDirectoryIdGenerator)1 MountTable (alluxio.master.file.meta.MountTable)1 LineageMaster (alluxio.master.lineage.LineageMaster)1 BlockInfo (alluxio.wire.BlockInfo)1 WorkerNetAddress (alluxio.wire.WorkerNetAddress)1 BlockWorker (alluxio.worker.block.BlockWorker)1 ImmutableList (com.google.common.collect.ImmutableList)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1