List of usage examples for org.apache.hadoop.io Text writeString
public static int writeString(DataOutput out, String s) throws IOException
From source file:gaffer.predicate.typevalue.impl.TypeValueRegularExpressionPredicate.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { Text.writeString(out, typePattern.pattern()); Text.writeString(out, valuePattern.pattern()); }
From source file:gaffer.predicate.typevalue.impl.ValueInSetPredicate.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(allowedValues.size());/*from w ww . j a v a 2 s. c om*/ for (String s : allowedValues) { Text.writeString(out, s); } }
From source file:gaffer.statistics.impl.CappedSetOfStrings.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(maxSize);/*from ww w .j a v a 2 s . c o m*/ out.writeBoolean(full); if (!full) { out.writeInt(set.size()); for (String s : set) { Text.writeString(out, s); } } }
From source file:gaffer.statistics.impl.MapFromStringToSetOfStrings.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(map.keySet().size());//from www.j av a 2s. c o m for (String s : map.keySet()) { Text.writeString(out, s); int setSize = map.get(s).size(); out.writeInt(setSize); for (String t : map.get(s)) { Text.writeString(out, t); } } }
From source file:gaffer.statistics.impl.MapOfCounts.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(map.keySet().size());//from w ww.ja v a 2s. com for (String s : map.keySet()) { Text.writeString(out, s); out.writeInt(map.get(s)); } }
From source file:gaffer.statistics.impl.MapOfLongCounts.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(map.keySet().size());// www .j a va2 s . com for (String s : map.keySet()) { Text.writeString(out, s); out.writeLong(map.get(s)); } }
From source file:gaffer.statistics.impl.MapOfMinuteBitMaps.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(map.keySet().size());/*from w ww . java 2 s . c o m*/ for (String s : map.keySet()) { Text.writeString(out, s); map.get(s).write(out); } }
From source file:gaffer.statistics.impl.SetOfStrings.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(this.set.size()); for (String s : this.set) { Text.writeString(out, s); }// www. j a v a 2s. c om }
From source file:gaffer.statistics.SetOfStatistics.java
License:Apache License
public void write(DataOutput out) throws IOException { out.writeInt(nameToStat.keySet().size()); for (String key : nameToStat.keySet()) { Text.writeString(out, key); // If the statistic is one of the internal Gaffer ones, then output the // simple name. Otherwise output the full class name. Statistic stat = nameToStat.get(key); if (StatisticsUtilities.isStatisticInternal(stat)) { Text.writeString(out, stat.getClass().getSimpleName()); } else {//from w w w . ja v a2 s . c o m Text.writeString(out, stat.getClass().getName()); } stat.write(out); } }
From source file:gaffer.statistics.transform.impl.StatisticsRemoverByName.java
License:Apache License
@Override public void write(DataOutput out) throws IOException { out.writeInt(keepRemove.ordinal());/*from w w w. j av a 2 s . co m*/ out.writeInt(names.size()); for (String s : names) { Text.writeString(out, s); } }