public final void readFields(DataInput in) throws IOException { metadata.clear(); int sizeOrVersion = in.readInt(); if (sizeOrVersion < 0) { // version version = sizeOrVersion; switch (version) { case VERSION: url = Text.readString(in); base = Text.readString(in); content = new byte[in.readInt()]; in.readFully(content); contentType = Text.readString(in); metadata.readFields(in); break; default: throw new VersionMismatchException((byte) VERSION, (byte) version); } } else { // size byte[] compressed = new byte[sizeOrVersion]; in.readFully(compressed, 0, compressed.length); ByteArrayInputStream deflated = new ByteArrayInputStream(compressed); DataInput inflater = new DataInputStream(new InflaterInputStream(deflated)); readFieldsCompressed(inflater); } }
@Override public void readFields(DataInput dataInput) throws IOException { leftCoordinate = dataInput.readLong(); samRecord = Text.readString(dataInput); rfname = Text.readString(dataInput); // sqTag = Text.readString(dataInput); }
public void readFields(DataInput in) throws IOException { this.locId = in.readInt(); this.country = Text.readString(in); this.region = Text.readString(in); this.city = Text.readString(in); this.postalCode = Text.readString(in); this.latitude = in.readInt(); this.longitude = in.readInt(); this.metroCode = in.readInt(); this.areaCode = in.readInt(); }
/* (non-Javadoc) * @see org.apache.hadoop.io.Writable#readFields(java.io.DataInput) */ public void readFields(DataInput in) throws IOException { resetForm(); int numDeleteTerms = in.readInt(); for (int i = 0; i < numDeleteTerms; i++) { String field = Text.readString(in); String text = Text.readString(in); deleteList.add(new Term(field, text)); } RAMDirectoryUtil.readRAMFiles(in, dir); }
public void readFields(DataInput in) throws IOException { numActiveTrackers = in.readInt(); int numTrackerNames = in.readInt(); if (numTrackerNames > 0) { for (int i = 0; i < numTrackerNames; i++) { String name = Text.readString(in); activeTrackers.add(name); } } numBlacklistedTrackers = in.readInt(); int blackListTrackerInfoSize = in.readInt(); if (blackListTrackerInfoSize > 0) { for (int i = 0; i < blackListTrackerInfoSize; i++) { BlackListInfo info = new BlackListInfo(); info.readFields(in); blacklistedTrackersInfo.add(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(); used_memory = in.readLong(); max_memory = in.readLong(); state = WritableUtils.readEnum(in, JobTracker.State.class); }
public void readFields(DataInput __dataIn) throws IOException { if (__dataIn.readBoolean()) { this.r_regionkey = null; } else { this.r_regionkey = Integer.valueOf(__dataIn.readInt()); } if (__dataIn.readBoolean()) { this.r_name = null; } else { this.r_name = Text.readString(__dataIn); } if (__dataIn.readBoolean()) { this.r_comment = null; } else { this.r_comment = Text.readString(__dataIn); } }
public void readFields(DataInput in) throws IOException { this.taskid.readFields(in); this.progress = in.readFloat(); this.runState = WritableUtils.readEnum(in, State.class); this.diagnosticInfo = Text.readString(in); this.stateString = Text.readString(in); this.phase = WritableUtils.readEnum(in, Phase.class); this.startTime = in.readLong(); this.finishTime = in.readLong(); counters = new Counters(); this.includeCounters = in.readBoolean(); this.outputSize = in.readLong(); if (includeCounters) { counters.readFields(in); } nextRecordRange.readFields(in); this.runOnGPU = in.readBoolean(); }
/** @inheritDoc */ public void readFields(DataInput in) throws IOException { int nResources = in.readInt(); resources = new ARCResource[nResources]; for (int i = 0; i < nResources; i++) { resources[i] = new ARCResource(Text.readString(in), in.readLong()); } size = in.readLong(); hosts = null; }
@Override public void readFields(DataInput in) throws IOException { queueName = StringInterner.weakIntern(Text.readString(in)); queueState = WritableUtils.readEnum(in, QueueState.class); 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 = 0; i < count; i++) { QueueInfo childQueueInfo = new QueueInfo(); childQueueInfo.readFields(in); children.add(childQueueInfo); } }
@Override public void readFields(DataInput in) throws IOException { this.length = in.readLong(); int numDirs = in.readInt(); this.indexDirs = Lists.newLinkedList(); for (int i = 0; i < numDirs; i++) { String path = Text.readString(in); this.indexDirs.add(new Path(path)); } }
@Override public void readFields(DataInput in) throws IOException { String strPath = Text.readString(in, Text.DEFAULT_MAX_LEN); this.path = new Path(strPath); this.length = in.readLong(); this.isdir = in.readBoolean(); this.block_replication = in.readShort(); blocksize = in.readLong(); modification_time = in.readLong(); access_time = in.readLong(); permission.readFields(in); owner = Text.readString(in, Text.DEFAULT_MAX_LEN); group = Text.readString(in, Text.DEFAULT_MAX_LEN); if (in.readBoolean()) { this.symlink = new Path(Text.readString(in, Text.DEFAULT_MAX_LEN)); } else { this.symlink = null; } }
private final void readFieldsCompressed(DataInput in) throws IOException { byte oldVersion = in.readByte(); switch (oldVersion) { case 0: case 1: url = UTF8.readString(in); // read url base = UTF8.readString(in); // read base content = new byte[in.readInt()]; // read content in.readFully(content); contentType = UTF8.readString(in); // read contentType // reconstruct metadata int keySize = in.readInt(); String key; for (int i = 0; i < keySize; i++) { key = UTF8.readString(in); int valueSize = in.readInt(); for (int j = 0; j < valueSize; j++) { metadata.add(key, UTF8.readString(in)); } } break; case 2: url = Text.readString(in); // read url base = Text.readString(in); // read base content = new byte[in.readInt()]; // read content in.readFully(content); contentType = Text.readString(in); // read contentType metadata.readFields(in); // read meta data break; default: throw new VersionMismatchException((byte) 2, oldVersion); } }
@Override public void readFields(DataInput in) throws IOException { clear(); final int termCount = WritableUtils.readVInt(in); for (int i = 0; i < termCount; i++) { final String term = Text.readString(in); final int freq = WritableUtils.readVInt(in); final int bf = WritableUtils.readVInt(in); insert(freq, term); if (bf == 0) continue; final int[] blocks = new int[bf]; blocks[0] = WritableUtils.readVInt(in) - 1; for (int j = 1; j < bf; j++) blocks[j] = WritableUtils.readVInt(in) - blocks[j - 1]; term_blocks.put(term, new TIntHashSet(blocks)); } }
@Override public void readFields(DataInput in) throws IOException { String className = Text.readString(in); try { predicate = (TypeValuePredicate) Class.forName(className).newInstance(); predicate.readFields(in); } catch (InstantiationException e) { throw new IOException( "Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (IllegalAccessException e) { throw new IOException( "Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassNotFoundException e) { throw new IOException( "Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } catch (ClassCastException e) { throw new IOException( "Exception deserialising predicate in " + this.getClass().getName() + ": " + e); } }
public void readFields(DataInput in) throws IOException { this.taskid.readFields(in); this.progress = in.readFloat(); this.state = Text.readString(in); this.startTime = in.readLong(); this.finishTime = in.readLong(); diagnostics = WritableUtils.readStringArray(in); counters = new Counters(); counters.readFields(in); currentStatus = WritableUtils.readEnum(in, TIPStatus.class); if (currentStatus == TIPStatus.RUNNING) { int num = WritableUtils.readVInt(in); for (int i = 0; i < num; i++) { TaskAttemptID t = new TaskAttemptID(); t.readFields(in); runningAttempts.add(t); } } else if (currentStatus == TIPStatus.COMPLETE) { successfulAttempt.readFields(in); } }
public void readFields(DataInput in) throws IOException { broker = Text.readString(in); topic = Text.readString(in); partition = in.readInt(); lastCommit = in.readLong(); }
public void readFields(DataInput in) throws IOException { url = Text.readString(in); score = in.readFloat(); }
public void readFields(DataInput in) throws IOException { this.url = Text.readString(in); this.pageview = in.readLong(); }
public void readFields(DataInput dataInput) throws IOException { this.productId1 = Text.readString(dataInput); this.productId2 = Text.readString(dataInput); }
@Override public void readFields(DataInput in) throws IOException { queueName = StringInterner.weakIntern(Text.readString(in)); operations = WritableUtils.readStringArray(in); }
public void readFields(DataInput in) throws IOException { this.offset = in.readLong(); this.fileName = Text.readString(in); }
public void readFields(DataInput in) throws IOException { this.url = Text.readString(in); this.referrer = Text.readString(in); this.time = in.readLong(); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); splitClass = Text.readString(in); split.readFields(in); }
/** * Deserializes the pair. * * @param in source for raw byte representation */ public void readFields(DataInput in) throws IOException { leftElement = in.readLong(); rightElement = Text.readString(in); }
public void readFields(DataInput in) throws IOException { input.readFields(in); output = Text.readString(in); }
@Override public void readFields(DataInput in) throws IOException { trackerName = Text.readString(in); reasonForBlackListing = Text.readString(in); blackListReport = Text.readString(in); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); this.jtIdentifier = Text.readString(in); }
/** {@inheritDoc} */ public void readFields(DataInput in) throws IOException { username = Text.readString(in); groupname = Text.readString(in); permission = FsPermission.read(in); }
public void readFields(DataInput in) throws IOException { queryString = Text.readString(in); from = in.readLong(); size = in.readLong(); }