use of alluxio.heartbeat.HeartbeatThread in project alluxio by Alluxio.
the class DefaultMetricsMaster method start.
@Override
public void start(Boolean isLeader) throws IOException {
super.start(isLeader);
mMetricsStore.initMetricKeys();
mMetricsStore.clear();
if (isLeader) {
getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_CLUSTER_METRICS_UPDATER, new ClusterMetricsUpdater(), ServerConfiguration.getMs(PropertyKey.MASTER_CLUSTER_METRICS_UPDATE_INTERVAL), ServerConfiguration.global(), mMasterContext.getUserState()));
}
}
use of alluxio.heartbeat.HeartbeatThread in project alluxio by Alluxio.
the class JobWorker method start.
@Override
public void start(WorkerNetAddress address) throws IOException {
super.start(address);
// Start serving metrics system, this will not block
MetricsSystem.startSinks(ServerConfiguration.getString(PropertyKey.METRICS_CONF_FILE));
try {
JobWorkerIdRegistry.registerWorker(mJobMasterClient, address);
} catch (ConnectionFailedException e) {
LOG.error("Failed to connect to job master", e);
throw Throwables.propagate(e);
}
mTaskExecutorManager = new TaskExecutorManager(ServerConfiguration.getInt(PropertyKey.JOB_WORKER_THREADPOOL_SIZE), address);
mCommandHandlingService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.JOB_WORKER_COMMAND_HANDLING, new CommandHandlingExecutor(mJobServerContext, mTaskExecutorManager, mJobMasterClient, address), (int) ServerConfiguration.getMs(PropertyKey.JOB_MASTER_WORKER_HEARTBEAT_INTERVAL), ServerConfiguration.global(), ServerUserState.global()));
}
use of alluxio.heartbeat.HeartbeatThread in project alluxio by Alluxio.
the class LineageMaster method start.
@Override
public void start(boolean isLeader) throws IOException {
super.start(isLeader);
if (isLeader) {
getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_CHECKPOINT_SCHEDULING, new CheckpointSchedulingExecutor(this, mFileSystemMaster), Configuration.getInt(PropertyKey.MASTER_LINEAGE_CHECKPOINT_INTERVAL_MS)));
getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_FILE_RECOMPUTATION, new RecomputeExecutor(new RecomputePlanner(mLineageStore, mFileSystemMaster), mFileSystemMaster), Configuration.getInt(PropertyKey.MASTER_LINEAGE_RECOMPUTE_INTERVAL_MS)));
}
}
use of alluxio.heartbeat.HeartbeatThread in project alluxio by Alluxio.
the class FileSystemMaster method start.
@Override
public void start(boolean isLeader) throws IOException {
if (isLeader) {
// Only initialize root when isLeader because when initializing root, BlockMaster needs to
// write journal entry, if it is not leader, BlockMaster won't have a writable journal.
// If it is standby, it should be able to load the inode tree from leader's checkpoint.
mInodeTree.initializeRoot(SecurityUtils.getOwnerFromLoginModule(), SecurityUtils.getGroupFromLoginModule(), Mode.createFullAccess().applyDirectoryUMask());
String defaultUFS = Configuration.get(PropertyKey.UNDERFS_ADDRESS);
try {
mMountTable.add(new AlluxioURI(MountTable.ROOT), new AlluxioURI(defaultUFS), MountOptions.defaults().setShared(UnderFileSystemUtils.isObjectStorage(defaultUFS) && Configuration.getBoolean(PropertyKey.UNDERFS_OBJECT_STORE_MOUNT_SHARED_PUBLICLY)));
} catch (FileAlreadyExistsException | InvalidPathException e) {
throw new IOException("Failed to mount the default UFS " + defaultUFS);
}
}
// Call super.start after mInodeTree is initialized because mInodeTree is needed to write
// a journal entry during super.start. Call super.start before calling
// getExecutorService() because the super.start initializes the executor service.
super.start(isLeader);
if (isLeader) {
mTtlCheckerService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_TTL_CHECK, new MasterInodeTtlCheckExecutor(), Configuration.getInt(PropertyKey.MASTER_TTL_CHECKER_INTERVAL_MS)));
mLostFilesDetectionService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_LOST_FILES_DETECTION, new LostFilesDetectionHeartbeatExecutor(), Configuration.getInt(PropertyKey.MASTER_HEARTBEAT_INTERVAL_MS)));
if (Configuration.getBoolean(PropertyKey.MASTER_STARTUP_CONSISTENCY_CHECK_ENABLED)) {
mStartupConsistencyCheck = getExecutorService().submit(new Callable<List<AlluxioURI>>() {
@Override
public List<AlluxioURI> call() throws Exception {
return startupCheckConsistency(ExecutorServiceFactories.fixedThreadPoolExecutorServiceFactory("startup-consistency-check", 32).create());
}
});
}
}
}
use of alluxio.heartbeat.HeartbeatThread in project alluxio by Alluxio.
the class BlockMaster method start.
@Override
public void start(boolean isLeader) throws IOException {
super.start(isLeader);
mGlobalStorageTierAssoc = new MasterStorageTierAssoc();
if (isLeader) {
mLostWorkerDetectionService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_LOST_WORKER_DETECTION, new LostWorkerDetectionHeartbeatExecutor(), Configuration.getInt(PropertyKey.MASTER_HEARTBEAT_INTERVAL_MS)));
}
}
Aggregations