List of usage examples for java.io DataInput readInt
int readInt() throws IOException;
From source file:ml.shifu.shifu.core.correlation.CorrelationWritable.java
@Override public void readFields(DataInput in) throws IOException { this.columnIndex = in.readInt(); this.sum = in.readDouble(); this.sumSquare = in.readDouble(); this.count = in.readDouble(); int length = in.readInt(); this.xySum = new double[length]; for (int i = 0; i < length; i++) { this.xySum[i] = in.readDouble(); }/*from w w w . ja v a 2 s . c o m*/ length = in.readInt(); this.xxSum = new double[length]; for (int i = 0; i < length; i++) { this.xxSum[i] = in.readDouble(); } length = in.readInt(); this.yySum = new double[length]; for (int i = 0; i < length; i++) { this.yySum[i] = in.readDouble(); } length = in.readInt(); this.adjustCount = new double[length]; for (int i = 0; i < length; i++) { this.adjustCount[i] = in.readDouble(); } length = in.readInt(); this.adjustSumX = new double[length]; for (int i = 0; i < length; i++) { this.adjustSumX[i] = in.readDouble(); } length = in.readInt(); this.adjustSumY = new double[length]; for (int i = 0; i < length; i++) { this.adjustSumY[i] = in.readDouble(); } }
From source file:com.wsc.myexample.decisionForest.MyDataset.java
public void readFields(DataInput in) throws IOException { int nbAttributes = in.readInt(); attributes = new Dataset.Attribute[nbAttributes]; for (int attr = 0; attr < nbAttributes; attr++) { String name = readString(in); attributes[attr] = Dataset.Attribute.valueOf(name); }//from w w w . j av a 2s .com ignored = DFUtils.readIntArray(in); // only CATEGORICAL attributes have values values = new String[nbAttributes][]; for (int attr = 0; attr < nbAttributes; attr++) { if (attributes[attr].isCategorical()) { values[attr] = readStringArray(in); } } labelId = in.readInt(); nbInstances = in.readInt(); }
From source file:com.mongodb.hadoop.mapred.input.MongoInputSplit.java
public void readFields(DataInput in) throws IOException { final ObjectInputStream objIn = new ObjectInputStream((InputStream) in); _mongoURI = new MongoURI(in.readUTF()); _querySpec = (DBObject) JSON.parse(in.readUTF()); _fieldSpec = (DBObject) JSON.parse(in.readUTF()); _sortSpec = (DBObject) JSON.parse(in.readUTF()); _limit = in.readInt(); _skip = in.readInt();/* w ww. j a va 2 s . c om*/ log.info("Deserialized MongoInputSplit ... { length = " + getLength() + ", locations = " + java.util.Arrays.toString(getLocations()) + ", query = " + _querySpec + ", fields = " + _fieldSpec + ", sort = " + _sortSpec + ", limit = " + _limit + ", skip = " + _skip + "}"); objIn.close(); }
From source file:com.chinamobile.bcbsp.sync.SuperStepReportContainer.java
@Override public void readFields(DataInput in) throws IOException { this.partitionId = in.readInt(); this.stageFlag = in.readInt(); int count = in.readInt(); this.dirFlag = new String[count]; for (int i = 0; i < count; i++) { this.dirFlag[i] = Text.readString(in); }/*from ww w . java2s. co m*/ this.judgeFlag = in.readLong(); this.localBarrierNum = in.readInt(); this.port1 = in.readInt(); this.port2 = in.readInt(); count = in.readInt(); this.aggValues = new String[count]; for (int i = 0; i < count; i++) { this.aggValues[i] = Text.readString(in); } this.staffRunTime = in.readLong(); this.sid = in.readInt(); this.currentSuperStep = in.readInt(); this.migrateCost = in.readLong(); this.splitEdgefactor = in.readFloat(); }
From source file:TVA.Hadoop.MapReduce.Historian.File.StandardPointFile.java
/** * Deserializes the point from the underlying data. * /*from w w w. j a v a 2 s . c o m*/ * @param in A DataInput object to read the point from. * @see java.io.DataInput * @see org.apache.hadoop.io.Writable#readFields(java.io.DataInput) * */ public void readFields(DataInput in) throws IOException { this.iTimeTag = in.readInt(); this.Flags = in.readShort(); this.Value = in.readFloat(); this.iPointID = in.readInt(); }
From source file:com.mobicage.rogerthat.registration.ContentBrandingRegistrationWizard.java
@Override public void readFromPickle(int version, DataInput in) throws IOException, PickleException { T.UI();/* www .ja v a2s .c om*/ boolean set = in.readBoolean(); if (set) mCredentials = new Credentials(new Pickle(in.readInt(), in)); set = in.readBoolean(); mEmail = set ? in.readUTF() : null; mTimestamp = in.readLong(); mRegistrationId = in.readUTF(); mInstallationId = in.readUTF(); mDeviceId = in.readUTF(); }
From source file:org.kiji.schema.mapreduce.KijiDelete.java
/** {@inheritDoc} */ @Override// ww w . j a va 2 s .co m public void readFields(DataInput in) throws IOException { // EntityId. final byte[] bytes = new byte[in.readInt()]; in.readFully(bytes); mEntityId = new HBaseEntityId(bytes); // Family/Qualifier/Timestamp. mFamily = (String) readOptionalValue(in, String.class); mQualifier = (String) readOptionalValue(in, String.class); mTimestamp = (Long) readOptionalValue(in, Long.class); mOperation = (KijiDeleteOperation) readOptionalValue(in, KijiDeleteOperation.class); }
From source file:org.apache.hadoop.mapred.SortedRanges.java
public synchronized void readFields(DataInput in) throws IOException { indicesCount = in.readLong();/*from w w w.java2 s .com*/ ranges = new TreeSet<Range>(); int size = in.readInt(); for (int i = 0; i < size; i++) { Range range = new Range(); range.readFields(in); ranges.add(range); } }
From source file:hip.ch3.seqfile.writable.StockPriceWritable.java
@Override public void readFields(DataInput in) throws IOException { symbol = WritableUtils.readString(in); date = WritableUtils.readString(in); open = in.readDouble();//from w ww . ja va2s. c o m high = in.readDouble(); low = in.readDouble(); close = in.readDouble(); low = in.readDouble(); close = in.readDouble(); volume = in.readInt(); adjClose = in.readDouble(); }
From source file:org.apache.hadoop.hbase.HServerInfo.java
public void readFields(DataInput in) throws IOException { this.serverAddress.readFields(in); this.startCode = in.readLong(); this.load.readFields(in); in.readInt(); this.hostname = in.readUTF(); if (sendSequenceIds) { HbaseMapWritable<byte[], Long> sequenceIdsWritable = new HbaseMapWritable<byte[], Long>( flushedSequenceIdByRegion); sequenceIdsWritable.readFields(in); }/*from w w w. j a v a2s. c o m*/ }