Entity entity = getEntity("queryJob", jobKey);
JobRecord jobRecord = new JobRecord(entity);
Barrier runBarrier = null;
Barrier finalizeBarrier = null;
Slot outputSlot = null;
JobInstanceRecord jobInstanceRecord = null;
ExceptionRecord failureRecord = null;
switch (inflationType) {
case FOR_RUN:
runBarrier = queryBarrier(jobRecord.getRunBarrierKey(), true);
finalizeBarrier = queryBarrier(jobRecord.getFinalizeBarrierKey(), false);
jobInstanceRecord =
new JobInstanceRecord(getEntity("queryJob", jobRecord.getJobInstanceKey()));
outputSlot = querySlot(jobRecord.getOutputSlotKey(), false);
break;
case FOR_FINALIZE:
finalizeBarrier = queryBarrier(jobRecord.getFinalizeBarrierKey(), true);
outputSlot = querySlot(jobRecord.getOutputSlotKey(), false);