@Override
 public void write(DataOutput dataOutput) throws IOException {
   dataOutput.writeLong(leftCoordinate);
   Text.writeString(dataOutput, samRecord);
   Text.writeString(dataOutput, rfname);
   // Text.writeString(dataOutput, sqTag);
 }
 /** Serialize a {@link PermissionStatus} from its base components. */
 public static void write(
     DataOutput out, String username, String groupname, FsPermission permission)
     throws IOException {
   Text.writeString(out, username);
   Text.writeString(out, groupname);
   permission.write(out);
 }
  /* (non-Javadoc)
   * @see org.apache.hadoop.io.Writable#write(java.io.DataOutput)
   */
  public void write(DataOutput out) throws IOException {
    out.writeInt(deleteList.size());
    for (Term term : deleteList) {
      Text.writeString(out, term.field());
      Text.writeString(out, term.text());
    }

    String[] files = dir.list();
    RAMDirectoryUtil.writeRAMFiles(out, dir, files);
  }
Esempio n. 4
0
  public final void write(DataOutput out) throws IOException {
    Text.writeString(out, id); // write url

    out.writeInt(content.length); // write content
    out.write(content);

    Text.writeString(out, contentType); // write contentType

    metadata.write(out); // write metadata
  }
Esempio n. 5
0
 public void write(DataOutput out) throws IOException {
   out.writeInt(this.locId);
   Text.writeString(out, this.country);
   Text.writeString(out, this.region);
   Text.writeString(out, this.city);
   Text.writeString(out, this.postalCode);
   out.writeInt(this.latitude);
   out.writeInt(this.longitude);
   out.writeInt(this.metroCode);
   out.writeInt(this.areaCode);
 }
Esempio n. 6
0
  public final void write(DataOutput out) throws IOException {
    out.writeInt(VERSION);

    Text.writeString(out, url); // write url
    Text.writeString(out, base); // write base

    out.writeInt(content.length); // write content
    out.write(content);

    Text.writeString(out, contentType); // write contentType

    metadata.write(out); // write metadata
  }
Esempio n. 7
0
 public void write(DataOutput out) throws IOException {
   if (activeTrackers.size() == 0) {
     out.writeInt(numActiveTrackers);
     out.writeInt(0);
   } else {
     out.writeInt(activeTrackers.size());
     out.writeInt(activeTrackers.size());
     for (String tracker : activeTrackers) {
       Text.writeString(out, tracker);
     }
   }
   if (blacklistedTrackersInfo.size() == 0) {
     out.writeInt(numBlacklistedTrackers);
     out.writeInt(blacklistedTrackersInfo.size());
   } else {
     out.writeInt(blacklistedTrackersInfo.size());
     out.writeInt(blacklistedTrackersInfo.size());
     for (BlackListInfo tracker : blacklistedTrackersInfo) {
       tracker.write(out);
     }
   }
   out.writeInt(numExcludedNodes);
   out.writeLong(ttExpiryInterval);
   out.writeInt(map_tasks);
   out.writeInt(reduce_tasks);
   out.writeInt(max_map_tasks);
   out.writeInt(max_reduce_tasks);
   out.writeLong(used_memory);
   out.writeLong(max_memory);
   WritableUtils.writeEnum(out, state);
 }
Esempio n. 8
0
 @Override
 public void write(DataOutput out) throws IOException {
   super.write(out);
   Text.writeString(out, splitClass);
   split.write(out);
   split = null;
 }
 //////////////////////////////////////////////////
 // Writable
 //////////////////////////////////////////////////
 @Override
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, getPath().toString(), Text.DEFAULT_MAX_LEN);
   out.writeLong(getLen());
   out.writeBoolean(isDirectory());
   out.writeShort(getReplication());
   out.writeLong(getBlockSize());
   out.writeLong(getModificationTime());
   out.writeLong(getAccessTime());
   getPermission().write(out);
   Text.writeString(out, getOwner(), Text.DEFAULT_MAX_LEN);
   Text.writeString(out, getGroup(), Text.DEFAULT_MAX_LEN);
   out.writeBoolean(isSymlink());
   if (isSymlink()) {
     Text.writeString(out, getSymlink().toString(), Text.DEFAULT_MAX_LEN);
   }
 }
 @Override
 public void write(DataOutput out) throws IOException {
   out.writeLong(length);
   out.writeInt(indexDirs.size());
   for (Path p : indexDirs) {
     Text.writeString(out, p.toString());
   }
 }
Esempio n. 11
0
 //////////////////////////////////////////////
 // Writable
 //////////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   taskid.write(out);
   out.writeFloat(progress);
   WritableUtils.writeEnum(out, runState);
   Text.writeString(out, diagnosticInfo);
   Text.writeString(out, stateString);
   WritableUtils.writeEnum(out, phase);
   out.writeLong(startTime);
   out.writeLong(finishTime);
   out.writeBoolean(includeCounters);
   out.writeLong(outputSize);
   if (includeCounters) {
     counters.write(out);
   }
   nextRecordRange.write(out);
   out.writeBoolean(runOnGPU);
 }
Esempio n. 12
0
  @Override
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, queueName);
    WritableUtils.writeEnum(out, queueState);

    if (schedulingInfo != null) {
      Text.writeString(out, schedulingInfo);
    } else {
      Text.writeString(out, "N/A");
    }
    out.writeInt(stats.length);
    for (JobStatus stat : stats) {
      stat.write(out);
    }
    out.writeInt(children.size());
    for (QueueInfo childQueueInfo : children) {
      childQueueInfo.write(out);
    }
  }
Esempio n. 13
0
 @Override
 public void localizeConfiguration(JobConf conf) throws IOException {
   super.localizeConfiguration(conf);
   Path localSplit = new Path(new Path(getJobFile()).getParent(), "split.dta");
   LOG.debug("Writing local split to " + localSplit);
   DataOutputStream out = FileSystem.getLocal(conf).create(localSplit);
   Text.writeString(out, splitClass);
   split.write(out);
   out.close();
 }
Esempio n. 14
0
 public void write(DataOutput __dataOut) throws IOException {
   if (null == this.r_regionkey) {
     __dataOut.writeBoolean(true);
   } else {
     __dataOut.writeBoolean(false);
     __dataOut.writeInt(this.r_regionkey);
   }
   if (null == this.r_name) {
     __dataOut.writeBoolean(true);
   } else {
     __dataOut.writeBoolean(false);
     Text.writeString(__dataOut, r_name);
   }
   if (null == this.r_comment) {
     __dataOut.writeBoolean(true);
   } else {
     __dataOut.writeBoolean(false);
     Text.writeString(__dataOut, r_comment);
   }
 }
Esempio n. 15
0
 //////////////////////////////////////////////
 // Writable
 //////////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   taskid.write(out);
   out.writeFloat(progress);
   Text.writeString(out, state);
   out.writeLong(startTime);
   out.writeLong(finishTime);
   WritableUtils.writeStringArray(out, diagnostics);
   counters.write(out);
   WritableUtils.writeEnum(out, currentStatus);
   if (currentStatus == TIPStatus.RUNNING) {
     WritableUtils.writeVInt(out, runningAttempts.size());
     TaskAttemptID t[] = new TaskAttemptID[0];
     t = runningAttempts.toArray(t);
     for (int i = 0; i < t.length; i++) {
       t[i].write(out);
     }
   } else if (currentStatus == TIPStatus.COMPLETE) {
     successfulAttempt.write(out);
   }
 }
Esempio n. 16
0
 @Override
 public void write(DataOutput out) throws IOException {
   super.write(out);
   Text.writeString(out, jtIdentifier);
 }
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, broker);
   Text.writeString(out, topic);
   out.writeInt(partition);
   out.writeLong(lastCommit);
 }
Esempio n. 18
0
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, url);
   out.writeFloat(score);
 }
Esempio n. 19
0
 @Override
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, trackerName);
   Text.writeString(out, reasonForBlackListing);
   Text.writeString(out, blackListReport);
 }
 @Override
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, queueName);
   WritableUtils.writeStringArray(out, operations);
 }
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, queryString);
   out.writeLong(from);
   out.writeLong(size);
 }
Esempio n. 22
0
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, this.url);
   out.writeLong(this.pageview);
 }
Esempio n. 23
0
 @Override
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, predicate.getClass().getName());
   predicate.write(out);
 }
Esempio n. 24
0
 public void write(DataOutput out) throws IOException {
   Text.writeString(out, this.url);
   Text.writeString(out, this.referrer);
   out.writeLong(this.time);
 }
 public void write(DataOutput out) throws IOException {
   out.writeLong(offset);
   Text.writeString(out, fileName);
 }
Esempio n. 26
0
 /**
  * Serializes this pair.
  *
  * @param out where to write the raw byte representation
  */
 public void write(DataOutput out) throws IOException {
   out.writeLong(leftElement);
   Text.writeString(out, rightElement);
 }
Esempio n. 27
0
 public void write(DataOutput out) throws IOException {
   input.write(out);
   Text.writeString(out, output);
 }
Esempio n. 28
0
 public void write(DataOutput dataOutput) throws IOException {
   Text.writeString(dataOutput, productId1);
   Text.writeString(dataOutput, productId2);
 }