List of usage examples for org.apache.hadoop.io DoubleWritable get
public double get()
From source file:org.mrgeo.pdf.TriangularDistributionPdfCurve.java
License:Apache License
private void _computeCurve(Path[] pdfFiles, Configuration conf) throws IOException { SequenceFile.Reader r = null; _likelihoods = new double[(int) _bin]; int index = 0; try {//from ww w .j ava 2s . c om // Loop through each of the output files from the reduce to process all of // the PDF histogram bins for (Path pdfFile : pdfFiles) { // ignore all the non-part files if (!pdfFile.getName().startsWith("part")) { continue; } r = new SequenceFile.Reader(pdfFile.getFileSystem(conf), pdfFile, conf); DoubleWritable key = new DoubleWritable(); DoubleWritable value = new DoubleWritable(); while (r.next(key, value)) { _likelihoods[index] = value.get(); index++; } } } finally { IOUtils.closeStream(r); } }
From source file:org.openflamingo.mapreduce.aggregator.DoubleMaxAggregator.java
License:Apache License
@Override public void aggregate(DoubleWritable value) { double val = value.get(); if (val > max) { max = val; }//from ww w.j av a2s . c o m }
From source file:org.openflamingo.mapreduce.aggregator.DoubleMaxAggregator.java
License:Apache License
@Override public void setAggregatedValue(DoubleWritable value) { max = value.get(); }
From source file:org.openflamingo.mapreduce.aggregator.DoubleMinAggregator.java
License:Apache License
@Override public void aggregate(DoubleWritable value) { double val = value.get(); if (val < min) { min = val; }/*from w w w . j a va 2 s . c o m*/ }
From source file:org.openflamingo.mapreduce.aggregator.DoubleMinAggregator.java
License:Apache License
@Override public void setAggregatedValue(DoubleWritable value) { min = value.get(); }
From source file:org.openflamingo.mapreduce.aggregator.DoubleOverwriteAggregator.java
License:Apache License
@Override public void aggregate(DoubleWritable value) { result = value.get(); }
From source file:org.openflamingo.mapreduce.aggregator.DoubleOverwriteAggregator.java
License:Apache License
@Override public void setAggregatedValue(DoubleWritable value) { result = value.get(); }
From source file:org.openflamingo.mapreduce.aggregator.DoubleProductAggregator.java
License:Apache License
@Override public void aggregate(DoubleWritable value) { product *= value.get(); }
From source file:org.openflamingo.mapreduce.aggregator.DoubleProductAggregator.java
License:Apache License
@Override public void setAggregatedValue(DoubleWritable value) { product = value.get(); }
From source file:org.pentaho.hadoop.mapreduce.converter.converters.DoubleWritableToDoubleConverter.java
License:Apache License
@Override public Double convert(ValueMetaInterface meta, DoubleWritable obj) throws TypeConversionException { return new Double(obj.get()); }