Java 8 DataOutput - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DataOutput class.

This code example shows how to use the following methods: writeBoolean
    blacklistReport = Text.readString(in);
  } 
 
  @Override 
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, name);
    out.writeBoolean(isBlacklisted);
    Text.writeString(out, reasonForBlacklist);
    Text.writeString(out, blacklistReport);
  } 
 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: writeBoolean
  /** 
   * GenericCounter ::= keyName isDistinctDisplayName [displayName] value 
   */ 
  @Override 
  public synchronized void write(DataOutput out) throws IOException {
    Text.writeString(out, name);
    boolean distinctDisplayName = ! name.equals(displayName);
    out.writeBoolean(distinctDisplayName);
    if (distinctDisplayName) {
      Text.writeString(out, displayName);
    } 
    WritableUtils.writeVLong(out, value);
  } 
 
  @Override 
  public synchronized String getName() {
    return name;
  } 
 
  @Override 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: writeBoolean
  } 
  public boolean shouldDie() { 
    return shouldDie;
  } 
  public void write(DataOutput out) throws IOException {
    out.writeBoolean(shouldDie);
    if (t != null) {
      out.writeBoolean(true);
      out.writeBoolean(t.isMapTask());
      t.write(out);
    } else { 
      out.writeBoolean(false);
    } 
  } 
  public void readFields(DataInput in) throws IOException {
    shouldDie = in.readBoolean();
    boolean taskComing = in.readBoolean();
    if (taskComing) {
      boolean isMap = in.readBoolean();
      if (isMap) {
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: write
 
  /** 
   */ 
  @Override 
  public void write(DataOutput out) throws IOException {
    WritableUtils.writeVInt(out, keyId);
    WritableUtils.writeVLong(out, expiryDate);
    if (keyBytes == null) {
      WritableUtils.writeVInt(out, -1);
    } else { 
      WritableUtils.writeVInt(out, keyBytes.length);
      out.write(keyBytes);
    } 
  } 
 
  /** 
   */ 
  @Override 
  public void readFields(DataInput in) throws IOException {
    keyId = WritableUtils.readVInt(in);
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: writeInt, writeLong, writeUTF
   
  @Override 
  public void write(DataOutput out) throws IOException {
    LOG.debug("Writing NMTokenIdentifier to RPC layer: " + this);
    ApplicationId applicationId = appAttemptId.getApplicationId();
    out.writeLong(applicationId.getClusterTimestamp());
    out.writeInt(applicationId.getId());
    out.writeInt(appAttemptId.getAttemptId());
    out.writeUTF(this.nodeId.toString());
    out.writeUTF(this.appSubmitter);
    out.writeInt(this.keyId);
  } 
 
  @Override 
  public void readFields(DataInput in) throws IOException {
    appAttemptId =
        ApplicationAttemptId.newInstance( 
            ApplicationId.newInstance(in.readLong(), in.readInt()),
            in.readInt());
    String[] hostAddr = in.readUTF().split(":");
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 DataOutput Questions & Answers:

See Code Examples for Java 8 DataOutput Methods: