Example usage for org.apache.hadoop.io SortedMapWritable SortedMapWritable

List of usage examples for org.apache.hadoop.io SortedMapWritable SortedMapWritable

Introduction

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

Prototype

public SortedMapWritable() 

Source Link

Document

default constructor.

Usage

From source file:org.huahinframework.core.io.Key.java

License:Apache License

/**
 * Returns a value that is used for grouping
 * @return grouping//from w ww  . j av a2s .  c o  m
 */
@SuppressWarnings("rawtypes")
public SortedMapWritable getGrouping() {
    SortedMapWritable smw = new SortedMapWritable();
    for (Entry<WritableComparable, Writable> entry : writableMap.entrySet()) {
        KeyDetail kd = (KeyDetail) entry.getKey();
        if (kd.getGrouping()) {
            smw.put(kd, entry.getValue());
        }
    }

    return smw;
}