List of usage examples for org.apache.hadoop.io DoubleWritable write
@Override public void write(DataOutput out) throws IOException
From source file:HistogramBucket.java
License:Apache License
@Override public void write(DataOutput d) throws IOException { attribute.write(d);//from w ww .ja v a 2 s . c om LongWritable arraySize = new LongWritable(splits.size()); arraySize.write(d); for (DoubleWritable w : splits) { w.write(d); } }
From source file:com.marcolotz.MRComponents.SerializerConverter.java
License:Creative Commons License
/*** * Writes a double to the output./*from w w w. j a v a2 s .c om*/ * @param outputDouble * @param out * @throws IOException */ public static void writeDouble(double outputDouble, DataOutput out) throws IOException { DoubleWritable writtenDouble = new DoubleWritable(outputDouble); writtenDouble.write(out); }
From source file:edu.ub.ahstfg.kmeans.document.DocumentCentroid.java
License:Open Source License
@Override public void write(DataOutput out) throws IOException { WritableConverter.shortArray2ArrayWritable(keywordVector).write(out); WritableConverter.shortArray2ArrayWritable(termVector).write(out); DoubleWritable dist = new DoubleWritable(distance); dist.write(out); }