List of usage examples for org.apache.hadoop.record RecordOutput writeLong
public void writeLong(long l, String tag) throws IOException;
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"); {/*ww w . j a v a2s . c o m*/ _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); }
From source file:fm.last.darling.io.records.NSpacePoint.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(timestamp, "timestamp"); {//from w w w . j ava 2 s. c o m _rio_a.startMap(dimensions, "dimensions"); java.util.Set<java.util.Map.Entry<String, String>> _rio_es1 = dimensions.entrySet(); for (java.util.Iterator<java.util.Map.Entry<String, String>> _rio_midx1 = _rio_es1 .iterator(); _rio_midx1.hasNext();) { java.util.Map.Entry<String, String> _rio_me1 = _rio_midx1.next(); String _rio_k1 = _rio_me1.getKey(); String _rio_v1 = _rio_me1.getValue(); _rio_a.writeString(_rio_k1, "_rio_k1"); _rio_a.writeString(_rio_v1, "_rio_v1"); } _rio_a.endMap(dimensions, "dimensions"); } _rio_a.writeString(unit, "unit"); _rio_a.endRecord(this, _rio_tag); }
From source file:net.thecubic.mockbi.MockBISummaryKey.java
License:Apache License
@Override public void serialize(RecordOutput ro, String ctx) throws IOException { ro.startRecord(this, ctx); ro.writeLong(timeSeriesBin.getTime() / 1000L, "timeSeriesBin"); ro.writeLong(timeSeriesInterval.longValue() / 1000L, "timeSeriesInterval"); ro.writeInt(binLevel, "binLevel"); // HADOOP-7889 TreeMap<String, String> tempmap = new TreeMap<String, String>(); for (String key : analysisParams.keySet()) { tempmap.put(key, analysisParams.get(key)); }/* w ww. j ava2 s. co m*/ ro.startMap(tempmap, "analysisParams"); for (String key : analysisParams.keySet()) { ro.writeString(key, "key"); ro.writeString(analysisParams.get(key), "value"); } ro.endMap(tempmap, "analysisParams"); ro.endRecord(this, ctx); }