public BlockMaster(Journal journal) { super(journal, Executors.newFixedThreadPool(2, ThreadFactoryUtils.build("block-master-%d", true))); }
/** * Creates the lineage master. * * @param fileSystemMaster the file system master * @param journal the journal */ public LineageMaster(FileSystemMaster fileSystemMaster, Journal journal) { super(journal, Executors.newFixedThreadPool(2, ThreadFactoryUtils.build("lineage-master-%d", true))); mTachyonConf = MasterContext.getConf(); mFileSystemMaster = Preconditions.checkNotNull(fileSystemMaster); mLineageIdGenerator = new LineageIdGenerator(); mLineageStore = new LineageStore(mLineageIdGenerator); mWorkerToCheckpointFile = Maps.newHashMap(); }
public RawTableMaster(FileSystemMaster fileSystemMaster, Journal journal) { super(journal, Executors.newFixedThreadPool(2, ThreadFactoryUtils.build("raw-table-master-%d", true))); TachyonConf conf = MasterContext.getConf(); mMaxTableMetadataBytes = conf.getBytes(Constants.MAX_TABLE_METADATA_BYTE); mMaxColumns = conf.getInt(Constants.MAX_COLUMNS); mFileSystemMaster = fileSystemMaster; }
public LineageWorker(BlockDataManager blockDataManager) { Preconditions.checkState(WorkerIdRegistry.getWorkerId() != 0, "Failed to register worker"); mTachyonConf = WorkerContext.getConf(); mLineageDataManager = new LineageDataManager(Preconditions.checkNotNull(blockDataManager)); // Setup MasterClientBase mLineageMasterWorkerClient = new LineageMasterWorkerClient( NetworkAddressUtils.getConnectAddress(ServiceType.MASTER_RPC, mTachyonConf), mTachyonConf); mSyncExecutorService = Executors.newFixedThreadPool(3, ThreadFactoryUtils.build("lineage-worker-heartbeat-%d", true)); }
/** * Initializes the client context singleton with a given conf. */ public static synchronized void reset(TachyonConf conf) { sTachyonConf = conf; String masterHostname = Preconditions.checkNotNull(sTachyonConf.get(Constants.MASTER_HOSTNAME)); int masterPort = sTachyonConf.getInt(Constants.MASTER_PORT); sMasterAddress = new InetSocketAddress(masterHostname, masterPort); sClientMetrics = new ClientMetrics(); sRandom = new Random(); if (sExecutorService != null) { sExecutorService.shutdown(); } sExecutorService = Executors.newFixedThreadPool( sTachyonConf.getInt(Constants.USER_BLOCK_WORKER_CLIENT_THREADS), ThreadFactoryUtils.build("block-worker-heartbeat-%d", true)); // We must set sInitialized to true before resetting BlockStoreContext and FileSystemContext // as they need ClientContext initialized. sInitialized = true; BlockStoreContext.INSTANCE.reset(); FileSystemContext.INSTANCE.reset(); }
public FileSystemMaster(BlockMaster blockMaster, Journal journal) { super(journal, Executors.newFixedThreadPool(2, ThreadFactoryUtils.build("file-system-master-%d", true))); mBlockMaster = blockMaster; mDirectoryIdGenerator = new InodeDirectoryIdGenerator(mBlockMaster); mMountTable = new MountTable(); mInodeTree = new InodeTree(mBlockMaster, mDirectoryIdGenerator, mMountTable); // TODO(gene): Handle default config value for whitelist. TachyonConf conf = MasterContext.getConf(); mWhitelist = new PrefixList(conf.getList(Constants.MASTER_WHITELIST, ",")); }
Executors.newFixedThreadPool(4, ThreadFactoryUtils.build("worker-heartbeat-%d", true));