List of usage examples for org.apache.hadoop.record RecordOutput writeInt
public void writeInt(int i, String tag) throws IOException;
From source file:crunch.MaxTemperature.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.writeInt(listeners, "listeners"); _rio_a.writeInt(plays, "plays"); _rio_a.writeInt(scrobbles, "scrobbles"); _rio_a.writeInt(radioPlays, "radioPlays"); _rio_a.writeInt(skips, "skips"); _rio_a.endRecord(this, _rio_tag); }//w w w.ja va 2 s . c o m
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)); }/*ww w . ja va 2 s. c o 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); }