use of com.tencent.angel.ps.io.PSModelIOExecutor in project angel by Tencent.
the class ParameterServer method initialize.
/**
* Initialize.
*/
public void initialize() throws IOException, InstantiationException, IllegalAccessException {
LOG.info("Initialize a parameter server");
ServerRow.maxLockWaitTimeMs = conf.getInt(AngelConf.ANGEL_PS_MAX_LOCK_WAITTIME_MS, AngelConf.DEFAULT_ANGEL_PS_MAX_LOCK_WAITTIME_MS);
ServerRow.useAdaptiveKey = conf.getBoolean(AngelConf.ANGEL_PS_USE_ADAPTIVE_KEY_ENABLE, AngelConf.DEFAULT_ANGEL_PS_USE_ADAPTIVE_KEY_ENABLE);
ServerRow.useAdaptiveStorage = conf.getBoolean(AngelConf.ANGEL_PS_USE_ADAPTIVE_STORAGE_ENABLE, AngelConf.DEFAULT_ANGEL_PS_USE_ADAPTIVE_STORAGE_ENABLE);
ServerRow.sparseToDenseFactor = conf.getFloat(AngelConf.ANGEL_PS_SPARSE_TO_DENSE_FACTOR, AngelConf.DEFAULT_ANGEL_PS_SPARSE_TO_DENSE_FACTOR);
dataCollectionInterval = conf.getInt(AngelConf.ANGEL_PS_HEARTBEAT_DATA_COLLECTION_INTERVAL, AngelConf.DEFAULT_ANGEL_PS_HEARTBEAT_DATA_COLLECTION_INTERVAL);
locationManager = new PSLocationManager(context);
locationManager.setMasterLocation(masterLocation);
runningContext = new RunningContext(context);
workerPool = new WorkerPool(context, runningContext);
workerPool.init();
ioExecutor = new PSModelIOExecutor(context);
ioExecutor.init();
matrixStorageManager = new MatrixStorageManager(context);
matrixMetaManager = new PSMatrixMetaManager(context);
master = new MasterClient(context);
master.init();
psServerService = new ParameterServerService(context);
psServerService.start();
matrixTransportServer = new MatrixTransportServer(getPort() + 1, context);
saver = new PSModelSaver(context);
loader = new PSModelLoader(context);
snapshotDumper = new SnapshotDumper(context);
}
Aggregations