/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { lock (this) { this.jobid = new JobID(); this.jobid.ReadFields(@in); this.setupProgress = @in.ReadFloat(); this.mapProgress = @in.ReadFloat(); this.reduceProgress = @in.ReadFloat(); this.cleanupProgress = @in.ReadFloat(); this.runState = WritableUtils.ReadEnum <JobStatus.State>(@in); this.startTime = @in.ReadLong(); this.user = StringInterner.WeakIntern(Text.ReadString(@in)); this.priority = WritableUtils.ReadEnum <JobPriority>(@in); this.schedulingInfo = StringInterner.WeakIntern(Text.ReadString(@in)); this.finishTime = @in.ReadLong(); this.isRetired = @in.ReadBoolean(); this.historyFile = StringInterner.WeakIntern(Text.ReadString(@in)); this.jobName = StringInterner.WeakIntern(Text.ReadString(@in)); this.trackingUrl = StringInterner.WeakIntern(Text.ReadString(@in)); this.jobFile = StringInterner.WeakIntern(Text.ReadString(@in)); this.isUber = @in.ReadBoolean(); // De-serialize the job's ACLs int numACLs = @in.ReadInt(); for (int i = 0; i < numACLs; i++) { JobACL aclType = WritableUtils.ReadEnum <JobACL>(@in); AccessControlList acl = new AccessControlList(" "); acl.ReadFields(@in); this.jobACLs[aclType] = acl; } } }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { numActiveTrackers = @in.ReadInt(); int numTrackerNames = @in.ReadInt(); if (numTrackerNames > 0) { for (int i = 0; i < numTrackerNames; i++) { string name = StringInterner.WeakIntern(Org.Apache.Hadoop.IO.Text.ReadString(@in) ); activeTrackers.AddItem(name); } } numBlacklistedTrackers = @in.ReadInt(); int blackListTrackerInfoSize = @in.ReadInt(); if (blackListTrackerInfoSize > 0) { for (int i = 0; i < blackListTrackerInfoSize; i++) { ClusterStatus.BlackListInfo info = new ClusterStatus.BlackListInfo(); info.ReadFields(@in); blacklistedTrackersInfo.AddItem(info); } } numExcludedNodes = @in.ReadInt(); ttExpiryInterval = @in.ReadLong(); map_tasks = @in.ReadInt(); reduce_tasks = @in.ReadInt(); max_map_tasks = @in.ReadInt(); max_reduce_tasks = @in.ReadInt(); status = WritableUtils.ReadEnum <Cluster.JobTrackerStatus>(@in); grayListedTrackers = @in.ReadInt(); }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { this.taskid.ReadFields(@in); this.progress = @in.ReadFloat(); this.state = StringInterner.WeakIntern(Text.ReadString(@in)); this.startTime = @in.ReadLong(); this.finishTime = @in.ReadLong(); diagnostics = WritableUtils.ReadStringArray(@in); counters = new Counters(); counters.ReadFields(@in); currentStatus = WritableUtils.ReadEnum <TIPStatus>(@in); if (currentStatus == TIPStatus.Running) { int num = WritableUtils.ReadVInt(@in); for (int i = 0; i < num; i++) { TaskAttemptID t = new TaskAttemptID(); t.ReadFields(@in); runningAttempts.AddItem(t); } } else { if (currentStatus == TIPStatus.Complete) { successfulAttempt.ReadFields(@in); } } }
public virtual void ReadFields(BinaryReader reader) { blockSize = @in.ReadLong(); bytesPerChecksum = @in.ReadInt(); writePacketSize = @in.ReadInt(); replication = @in.ReadShort(); fileBufferSize = @in.ReadInt(); checksumType = WritableUtils.ReadEnum <DataChecksum.Type>(@in); }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { taskId.ReadFields(@in); idWithinJob = WritableUtils.ReadVInt(@in); isMap = @in.ReadBoolean(); status = WritableUtils.ReadEnum <TaskCompletionEvent.Status>(@in); taskTrackerHttp = WritableUtils.ReadString(@in); taskRunTime = WritableUtils.ReadVInt(@in); eventId = WritableUtils.ReadVInt(@in); }
// DELEGATION_TOKENS /// <summary>Process the INodes under construction section of the fsimage.</summary> /// <param name="in">DataInputStream to process</param> /// <param name="v">Visitor to walk over inodes</param> /// <param name="skipBlocks">Walk over each block?</param> /// <exception cref="System.IO.IOException"/> private void ProcessINodesUC(DataInputStream @in, ImageVisitor v, bool skipBlocks ) { int numINUC = @in.ReadInt(); v.VisitEnclosingElement(ImageVisitor.ImageElement.InodesUnderConstruction, ImageVisitor.ImageElement .NumInodesUnderConstruction, numINUC); for (int i = 0; i < numINUC; i++) { v.VisitEnclosingElement(ImageVisitor.ImageElement.InodeUnderConstruction); byte[] name = FSImageSerialization.ReadBytes(@in); string n = Sharpen.Runtime.GetStringForBytes(name, "UTF8"); v.Visit(ImageVisitor.ImageElement.InodePath, n); if (NameNodeLayoutVersion.Supports(LayoutVersion.Feature.AddInodeId, imageVersion )) { long inodeId = @in.ReadLong(); v.Visit(ImageVisitor.ImageElement.InodeId, inodeId); } v.Visit(ImageVisitor.ImageElement.Replication, @in.ReadShort()); v.Visit(ImageVisitor.ImageElement.ModificationTime, FormatDate(@in.ReadLong())); v.Visit(ImageVisitor.ImageElement.PreferredBlockSize, @in.ReadLong()); int numBlocks = @in.ReadInt(); ProcessBlocks(@in, v, numBlocks, skipBlocks); ProcessPermission(@in, v); v.Visit(ImageVisitor.ImageElement.ClientName, FSImageSerialization.ReadString(@in )); v.Visit(ImageVisitor.ImageElement.ClientMachine, FSImageSerialization.ReadString( @in)); // Skip over the datanode descriptors, which are still stored in the // file but are not used by the datanode or loaded into memory int numLocs = @in.ReadInt(); for (int j = 0; j < numLocs; j++) { @in.ReadShort(); @in.ReadLong(); @in.ReadLong(); @in.ReadLong(); @in.ReadInt(); FSImageSerialization.ReadString(@in); FSImageSerialization.ReadString(@in); WritableUtils.ReadEnum <DatanodeInfo.AdminStates>(@in); } v.LeaveEnclosingElement(); } // INodeUnderConstruction v.LeaveEnclosingElement(); }
/// <exception cref="System.IO.IOException"/> public override void ReadFields(DataInput @in) { this.cache = null; expiryDate = WritableUtils.ReadVLong(@in); keyId = WritableUtils.ReadVInt(@in); userId = WritableUtils.ReadString(@in); blockPoolId = WritableUtils.ReadString(@in); blockId = WritableUtils.ReadVLong(@in); int length = WritableUtils.ReadVIntInRange(@in, 0, typeof(BlockTokenSecretManager.AccessMode ).GetEnumConstants().Length); for (int i = 0; i < length; i++) { modes.AddItem(WritableUtils.ReadEnum <BlockTokenSecretManager.AccessMode>(@in)); } }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { this.taskid.ReadFields(@in); SetProgress(@in.ReadFloat()); this.numSlots = @in.ReadInt(); this.runState = WritableUtils.ReadEnum <TaskStatus.State>(@in); SetDiagnosticInfo(StringInterner.WeakIntern(Text.ReadString(@in))); SetStateString(StringInterner.WeakIntern(Text.ReadString(@in))); this.phase = WritableUtils.ReadEnum <TaskStatus.Phase>(@in); this.startTime = @in.ReadLong(); this.finishTime = @in.ReadLong(); counters = new Counters(); this.includeAllCounters = @in.ReadBoolean(); this.outputSize = @in.ReadLong(); counters.ReadFields(@in); nextRecordRange.ReadFields(@in); }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { queueName = StringInterner.WeakIntern(Text.ReadString(@in)); queueState = WritableUtils.ReadEnum <QueueState>(@in); schedulingInfo = StringInterner.WeakIntern(Text.ReadString(@in)); int length = @in.ReadInt(); stats = new JobStatus[length]; for (int i = 0; i < length; i++) { stats[i] = new JobStatus(); stats[i].ReadFields(@in); } int count = @in.ReadInt(); children.Clear(); for (int i_1 = 0; i_1 < count; i_1++) { Org.Apache.Hadoop.Mapreduce.QueueInfo childQueueInfo = new Org.Apache.Hadoop.Mapreduce.QueueInfo (); childQueueInfo.ReadFields(@in); children.AddItem(childQueueInfo); } }
/// <exception cref="System.IO.IOException"/> public override void ReadFields(DataInput @in) { base.ReadFields(@in); jobId.ReadFields(@in); type = WritableUtils.ReadEnum <TaskType>(@in); }