use of org.smartdata.common.protocol.AdminServerProto.ListCommandInfoRequestProto in project SSM by Intel-bigdata.
the class SmartAdminProtocolAdminSideTranslatorPB method listCommandInfo.
@Override
public List<CommandInfo> listCommandInfo(long rid, CommandState commandState) throws IOException {
ListCommandInfoRequestProto req = ListCommandInfoRequestProto.newBuilder().setRuleID(rid).setCommandState(commandState.getValue()).build();
try {
List<CommandInfoProto> protoslist = rpcProxy.listCommandInfo(null, req).getCommandInfosList();
if (protoslist == null)
return new ArrayList<>();
List<CommandInfo> list = new ArrayList<>();
for (CommandInfoProto infoProto : protoslist) {
list.add(PBHelper.convert(infoProto));
}
return list;
} catch (ServiceException e) {
throw PBHelper.getRemoteException(e);
}
}
Aggregations