Example usage for org.apache.hadoop.record RecordOutput writeBuffer

List of usage examples for org.apache.hadoop.record RecordOutput writeBuffer

Introduction

In this page you can find the example usage for org.apache.hadoop.record RecordOutput writeBuffer.

Prototype

public void writeBuffer(Buffer buf, String tag) throws IOException;

Source Link

Document

Write a buffer to serialized record.

Usage

From source file:com.nexr.data.sdp.rolling.hdfs.LogRecordJT.java

License:Apache License

public void serialize(final org.apache.hadoop.record.RecordOutput _rio_a, final String _rio_tag)
        throws java.io.IOException {
    _rio_a.startRecord(this, _rio_tag);
    _rio_a.writeLong(time, "time");
    {//w ww .java2 s .  c om
        _rio_a.startMap(mapFields, "mapFields");
        java.util.Set<java.util.Map.Entry<String, org.apache.hadoop.record.Buffer>> _rio_es1 = mapFields
                .entrySet();
        for (java.util.Iterator<java.util.Map.Entry<String, org.apache.hadoop.record.Buffer>> _rio_midx1 = _rio_es1
                .iterator(); _rio_midx1.hasNext();) {
            java.util.Map.Entry<String, org.apache.hadoop.record.Buffer> _rio_me1 = _rio_midx1.next();
            String _rio_k1 = _rio_me1.getKey();
            org.apache.hadoop.record.Buffer _rio_v1 = _rio_me1.getValue();
            _rio_a.writeString(_rio_k1, "_rio_k1");
            _rio_a.writeBuffer(_rio_v1, "_rio_v1");
        }
        _rio_a.endMap(mapFields, "mapFields");
    }
    _rio_a.endRecord(this, _rio_tag);
}