/** * Run client task. * * @param task Task. * @return Result. */ <T> T runClientTask(IgfsClientAbstractCallable<T> task) { try { return (cfg.isColocateMetadata()) ? clientCompute().affinityCall(metaCacheName, IgfsUtils.ROOT_ID, task) : clientCompute().call(task); } catch (Exception e) { if (X.hasCause(e, ClusterTopologyException.class)) throw new IgfsException("Failed to execute operation because there are no IGFS metadata nodes." , e); IgfsException igfsEx = X.cause(e, IgfsException.class); if (igfsEx != null) throw igfsEx; throw e; } }
/** * Run client task. * * @param task Task. * @return Result. */ <T> T runClientTask(IgfsClientAbstractCallable<T> task) { try { return (cfg.isColocateMetadata()) ? clientCompute().affinityCall(metaCacheName, IgfsUtils.ROOT_ID, task) : clientCompute().call(task); } catch (Exception e) { if (X.hasCause(e, ClusterTopologyException.class)) throw new IgfsException("Failed to execute operation because there are no IGFS metadata nodes." , e); IgfsException igfsEx = X.cause(e, IgfsException.class); if (igfsEx != null) throw igfsEx; throw e; } }