/** * test JobID * @throws IOException */ @SuppressWarnings("deprecation") @Test (timeout=5000) public void testJobID() throws IOException{ JobID jid = new JobID("001",2); ByteArrayOutputStream out = new ByteArrayOutputStream(); jid.write(new DataOutputStream(out)); assertEquals(jid,JobID.read(new DataInputStream(new ByteArrayInputStream(out.toByteArray())))); assertEquals("job_001_0001",JobID.getJobIDsPattern("001",1)); } /**
@Override public void readFields(DataInput in) throws IOException { jobId = JobID.read(in); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); this.jobId = JobID.read(in); this.isMap = in.readBoolean(); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); this.jobId = JobID.read(in); this.isMap = in.readBoolean(); }
public synchronized void readFields(DataInput in) throws IOException { this.jobid = JobID.read(in); this.setupProgress = in.readFloat(); this.mapProgress = in.readFloat(); this.reduceProgress = in.readFloat(); this.cleanupProgress = in.readFloat(); this.runState = in.readInt(); this.startTime = in.readLong(); this.user = Text.readString(in); this.priority = WritableUtils.readEnum(in, JobPriority.class); this.schedulingInfo = Text.readString(in); }
public synchronized void readFields(DataInput in) throws IOException { this.jobid = JobID.read(in); this.setupProgress = in.readFloat(); this.mapProgress = in.readFloat(); this.reduceProgress = in.readFloat(); this.cleanupProgress = in.readFloat(); this.runState = in.readInt(); this.startTime = in.readLong(); this.user = Text.readString(in); this.priority = WritableUtils.readEnum(in, JobPriority.class); this.schedulingInfo = Text.readString(in); } }
public void readFields(DataInput in) throws IOException { this.responseId = in.readShort(); this.heartbeatInterval = in.readInt(); int length = WritableUtils.readVInt(in); if (length > 0) { actions = new TaskTrackerAction[length]; for (int i=0; i < length; ++i) { TaskTrackerAction.ActionType actionType = WritableUtils.readEnum(in, TaskTrackerAction.ActionType.class); actions[i] = TaskTrackerAction.createAction(actionType); actions[i].readFields(in); } } else { actions = null; } // Read the last map events index of the jobs int size = in.readInt(); if (size != 0) { lastKnownIndexMap = new HashMap<JobID, Integer>(size); for (int i = 0; i < size; ++i) { JobID id = JobID.read(in); int count = in.readInt(); lastKnownIndexMap.put(id, count); } } //actions = (TaskTrackerAction[]) ObjectWritable.readObject(in, conf); } }
public void readFields(DataInput in) throws IOException { this.jobid = JobID.read(in); this.jobFile = Text.readString(in); this.url = Text.readString(in); this.user = Text.readString(in); this.name = Text.readString(in); this.queueName = Text.readString(in); } }