Example usage for org.apache.hadoop.io LongWritable get

List of usage examples for org.apache.hadoop.io LongWritable get

Introduction

In this page you can find the example usage for org.apache.hadoop.io LongWritable get.

Prototype

public long get() 

Source Link

Document

Return the value of this LongWritable.

Usage

From source file:org.mrgeo.mapreduce.ingestvector.CalculateZoomReducer.java

License:Apache License

@Override
public void reduce(final TileIdZoomWritable key, final Iterable<LongWritable> it, final Context context) {
    long count = 0;

    int zoom = key.getZoom();
    for (LongWritable l : it) {
        count += l.get();
    }//from  w w  w  .java 2 s  . c  om

    counts[zoom] = Math.max(counts[zoom], count);
}

From source file:org.openflamingo.mapreduce.aggregator.LongMaxAggregator.java

License:Apache License

@Override
public void aggregate(LongWritable value) {
    long val = value.get();
    if (val > max) {
        max = val;
    }/* w  w w  .  j a va  2  s  .c o  m*/
}

From source file:org.openflamingo.mapreduce.aggregator.LongMaxAggregator.java

License:Apache License

@Override
public void setAggregatedValue(LongWritable value) {
    max = value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongMinAggregator.java

License:Apache License

@Override
public void aggregate(LongWritable value) {
    long val = value.get();
    if (val < min) {
        min = val;
    }/*from   w ww . ja v a  2s . c  om*/
}

From source file:org.openflamingo.mapreduce.aggregator.LongMinAggregator.java

License:Apache License

@Override
public void setAggregatedValue(LongWritable value) {
    min = value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongOverwriteAggregator.java

License:Apache License

@Override
public void aggregate(LongWritable value) {
    result = value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongOverwriteAggregator.java

License:Apache License

@Override
public void setAggregatedValue(LongWritable value) {
    result = value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongProductAggregator.java

License:Apache License

@Override
public void aggregate(LongWritable value) {
    product *= value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongProductAggregator.java

License:Apache License

@Override
public void setAggregatedValue(LongWritable value) {
    product = value.get();
}

From source file:org.openflamingo.mapreduce.aggregator.LongSumAggregator.java

License:Apache License

@Override
public void aggregate(LongWritable value) {
    sum += value.get();
}