/** * Gets job priority from task context. If job has no priority default one will be used. * * @param ctx Job context. * @return Job priority. */ private int getJobPriority(GridComputeJobContext ctx) { assert ctx != null; Integer p; try { p = ctx.getAttribute(STEALING_PRIORITY_ATTR); } catch (ClassCastException e) { U.error(log, "Type of job context priority attribute '" + STEALING_PRIORITY_ATTR + "' is not java.lang.Integer (will use default priority) [type=" + ctx.getAttribute(STEALING_PRIORITY_ATTR).getClass() + ", dfltPriority=" + DFLT_JOB_PRIORITY + ']', e); p = DFLT_JOB_PRIORITY; } if (p == null) p = DFLT_JOB_PRIORITY; return p; }
p = (Integer)jctx.getAttribute(jobPriAttrKey); "' is not java.lang.Integer [type=" + jctx.getAttribute(jobPriAttrKey).getClass() + ']');
Integer stealingCnt = waitCtx.getJobContext().getAttribute(STEALING_ATTEMPT_COUNT_ATTR); break; Integer pri = waitCtx.getJobContext().getAttribute(STEALING_PRIORITY_ATTR); boolean cancel = waitCtx.getJobContext().getAttribute(THIEF_NODE_ATTR) == null;
Collection<UUID> failedNodes = ctx.getJobResult().getJobContext().getAttribute(FAILED_NODE_LIST_ATTR);
Integer failoverCnt = ctx.getJobResult().getJobContext().getAttribute(FAILOVER_ATTEMPT_COUNT_ATTR); boolean isNodeFailed = false; UUID thiefId = ctx.getJobResult().getJobContext().getAttribute(THIEF_NODE_ATTR); Collection<UUID> failedNodes = ctx.getJobResult().getJobContext().getAttribute(FAILED_NODE_LIST_ATTR);