use of com.tencent.angel.ml.matrix.psf.update.base.UpdateFunc in project angel by Tencent.
the class PSFUpdateHandler method handle.
@Override
public ResponseData handle(RequestHeader header, RequestData data) throws Exception {
UpdateUDFRequest request = (UpdateUDFRequest) data;
Class<? extends UpdateFunc> funcClass = (Class<? extends UpdateFunc>) Class.forName(request.getUpdaterFuncClass());
Constructor<? extends UpdateFunc> constructor = funcClass.getConstructor();
constructor.setAccessible(true);
UpdateFunc func = constructor.newInstance();
func.setPsContext(context);
func.partitionUpdate(request.getPartParam());
return new UpdateUDFResponse();
}
Aggregations