Example usage for org.apache.hadoop.io Text writeString

List of usage examples for org.apache.hadoop.io Text writeString

Introduction

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

Prototype

public static int writeString(DataOutput out, String s) throws IOException 

Source Link

Document

Write a UTF8 encoded string to out

Usage

From source file:gaffer.graph.Edge.java

License:Apache License

public void write(DataOutput out) throws IOException {
    Text.writeString(out, sourceType);
    Text.writeString(out, sourceValue);
    Text.writeString(out, destinationType);
    Text.writeString(out, destinationValue);
    Text.writeString(out, summaryType);
    Text.writeString(out, summarySubType);
    out.writeBoolean(directed);/*  w w w.j  ava  2  s .c o m*/
    Text.writeString(out, visibility);
    out.writeLong(startDate.getTime());
    out.writeLong(endDate.getTime());
}

From source file:gaffer.graph.Entity.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Text.writeString(out, entityType);
    Text.writeString(out, entityValue);
    Text.writeString(out, summaryType);
    Text.writeString(out, summarySubType);
    Text.writeString(out, visibility);
    out.writeLong(startDate.getTime());/*w  ww.j av a  2  s .c o m*/
    out.writeLong(endDate.getTime());
}

From source file:gaffer.graph.transform.impl.ListOfTransforms.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    out.writeInt(list.size());/*ww w. ja v  a2s . c  om*/
    for (Transform transform : list) {
        Text.writeString(out, transform.getClass().getName());
        transform.write(out);
    }
}

From source file:gaffer.predicate.CombinedPredicates.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Text.writeString(out, predicate1.getClass().getName());
    predicate1.write(out);/*from w w  w. j  a  v a 2s . com*/
    Text.writeString(out, predicate2.getClass().getName());
    predicate2.write(out);
    out.writeInt(combine.ordinal());
}

From source file:gaffer.predicate.summarytype.impl.RegularExpressionPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Text.writeString(out, summaryTypePattern.pattern());
    Text.writeString(out, summarySubTypePattern.pattern());
}

From source file:gaffer.predicate.summarytype.impl.SummaryTypeAndSubTypeInSetPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    out.writeInt(allowedSummaryTypesAndSubTypes.size());
    for (Pair<String> pair : allowedSummaryTypesAndSubTypes) {
        Text.writeString(out, pair.getFirst());
        Text.writeString(out, pair.getSecond());
    }/*from   w w  w. j  a va  2  s. c  o  m*/
}

From source file:gaffer.predicate.summarytype.impl.SummaryTypeInSetPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    out.writeInt(allowedSummaryTypes.size());
    for (String s : allowedSummaryTypes) {
        Text.writeString(out, s);
    }/*from   ww  w.  java2s.  c o  m*/
}

From source file:gaffer.predicate.typevalue.impl.TypeInSetPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    out.writeInt(allowedTypes.size());// w ww.j  a v  a2  s.c om
    for (String s : allowedTypes) {
        Text.writeString(out, s);
    }
}

From source file:gaffer.predicate.typevalue.impl.TypeRegularExpressionPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Text.writeString(out, pattern.pattern());
}

From source file:gaffer.predicate.typevalue.impl.TypeValueInSetPredicate.java

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    out.writeInt(allowedTypeValues.size());
    for (Pair<String> pair : allowedTypeValues) {
        Text.writeString(out, pair.getFirst());
        Text.writeString(out, pair.getSecond());
    }/*  www . j  a  v a2s  .  c  om*/
}