use of org.smartdata.common.protocol.AdminServerProto.ActionInfoProto in project SSM by Intel-bigdata.
the class ClientSmartProtocolServerSideTranslatorPB method listActionInfoOfLastActions.
@Override
public ListActionInfoOfLastActionsResponseProto listActionInfoOfLastActions(RpcController controller, ListActionInfoOfLastActionsRequestProto request) throws ServiceException {
try {
List<ActionInfo> list = server.listActionInfoOfLastActions(request.getMaxNumActions());
if (list == null) {
return ListActionInfoOfLastActionsResponseProto.newBuilder().build();
}
List<ActionInfoProto> protoList = new ArrayList<>();
for (ActionInfo a : list) {
protoList.add(PBHelper.convert(a));
}
return ListActionInfoOfLastActionsResponseProto.newBuilder().addAllActionInfoList(protoList).build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
use of org.smartdata.common.protocol.AdminServerProto.ActionInfoProto in project SSM by Intel-bigdata.
the class SmartAdminProtocolAdminSideTranslatorPB method listActionInfoOfLastActions.
@Override
public List<ActionInfo> listActionInfoOfLastActions(int maxNumActions) throws IOException {
ListActionInfoOfLastActionsRequestProto req = ListActionInfoOfLastActionsRequestProto.newBuilder().setMaxNumActions(maxNumActions).build();
try {
List<ActionInfoProto> protoslist = rpcProxy.listActionInfoOfLastActions(null, req).getActionInfoListList();
if (protoslist == null) {
return new ArrayList<>();
}
List<ActionInfo> list = new ArrayList<>();
for (ActionInfoProto infoProto : protoslist) {
list.add(PBHelper.convert(infoProto));
}
return list;
} catch (ServiceException e) {
throw PBHelper.getRemoteException(e);
}
}
Aggregations