use of org.apache.ignite.internal.commandline.cache.distribution.CacheDistributionTaskResult in project ignite by apache.
the class CacheDistribution method execute.
/**
* {@inheritDoc}
*/
@Override
public Object execute(GridClientConfiguration clientCfg, Logger logger) throws Exception {
CacheDistributionTaskArg taskArg = new CacheDistributionTaskArg(args.caches(), args.getUserAttributes());
UUID nodeId = args.nodeId() == null ? BROADCAST_UUID : args.nodeId();
CacheDistributionTaskResult res;
try (GridClient client = Command.startClient(clientCfg)) {
res = executeTaskByNameOnNode(client, CacheDistributionTask.class.getName(), taskArg, nodeId, clientCfg);
}
CommandLogger.printErrors(res.exceptions(), "Cache distrubution task failed on nodes:", logger);
res.print(System.out);
return res;
}
Aggregations