use of com.tencent.angel.ml.matrix.psf.update.base.VoidResult in project angel by Tencent.
the class MatrixClientImpl method asyncUpdate.
@Override
public Future<VoidResult> asyncUpdate(int[] rowIds, Vector[] rows) throws AngelException {
checkNotNull(rowIds, "rowIds");
checkNotNull(rows, "rows");
assert rowIds.length == rows.length;
// Just return
if (rowIds.length == 0) {
LOG.warn("parameter rowIds is empty, you should check it, just return now!!!");
FutureResult<VoidResult> result = new FutureResult<>();
result.set(new VoidResult(ResponseType.SUCCESS));
return result;
}
try {
return PSAgentContext.get().getUserRequestAdapter().update(matrixId, rowIds, rows, UpdateOp.REPLACE);
} catch (Throwable e) {
throw new AngelException(e);
}
}
use of com.tencent.angel.ml.matrix.psf.update.base.VoidResult in project angel by Tencent.
the class MatrixClientImpl method asyncIncrement.
@Override
public Future<VoidResult> asyncIncrement(int[] rowIds, Vector[] rows) throws AngelException {
checkNotNull(rowIds, "rowIds");
checkNotNull(rows, "rows");
assert rowIds.length == rows.length;
// Just return
if (rowIds.length == 0) {
LOG.warn("parameter rowIds is empty, you should check it, just return now!!!");
FutureResult result = new FutureResult<VoidResult>();
result.set(new VoidResult(ResponseType.SUCCESS));
return result;
}
return PSAgentContext.get().getUserRequestAdapter().update(matrixId, rowIds, rows, UpdateOp.PLUS);
}
use of com.tencent.angel.ml.matrix.psf.update.base.VoidResult in project angel by Tencent.
the class MatrixClientImpl method flush.
@Deprecated
@Override
public Future<VoidResult> flush() throws AngelException {
FutureResult<VoidResult> result = new FutureResult<>();
result.set(new VoidResult(ResponseType.SUCCESS));
return result;
// return PSAgentContext.get().getMatrixOpLogCache().flush(taskContext, matrixId);
}
use of com.tencent.angel.ml.matrix.psf.update.base.VoidResult in project angel by Tencent.
the class MatrixClientImpl method clock.
@Deprecated
@Override
public Future<VoidResult> clock(boolean flushFirst) throws AngelException {
FutureResult<VoidResult> result = new FutureResult<>();
result.set(new VoidResult(ResponseType.SUCCESS));
return result;
// return PSAgentContext.get().getConsistencyController().clock(taskContext, matrixId, flushFirst);
}
Aggregations