當前位置: 首頁>>代碼示例>>Java>>正文


Java WritableUtils.writeEnum方法代碼示例

本文整理匯總了Java中org.apache.hadoop.io.WritableUtils.writeEnum方法的典型用法代碼示例。如果您正苦於以下問題:Java WritableUtils.writeEnum方法的具體用法?Java WritableUtils.writeEnum怎麽用?Java WritableUtils.writeEnum使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.hadoop.io.WritableUtils的用法示例。


在下文中一共展示了WritableUtils.writeEnum方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
public void write(DataOutput out) throws IOException {
  Text.writeString(out, jobFile);
  taskId.write(out);
  out.writeInt(partition);
  out.writeInt(numSlotsRequired);
  taskStatus.write(out);
  skipRanges.write(out);
  out.writeBoolean(skipping);
  out.writeBoolean(jobCleanup);
  if (jobCleanup) {
    WritableUtils.writeEnum(out, jobRunStateForCleanup);
  }
  out.writeBoolean(jobSetup);
  out.writeBoolean(writeSkipRecs);
  out.writeBoolean(taskCleanup);
  Text.writeString(out, user);
  out.writeInt(encryptedSpillKey.length);
  extraData.write(out);
  out.write(encryptedSpillKey);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:21,代碼來源:Task.java

示例2: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
public synchronized void write(DataOutput out) throws IOException {
  jobid.write(out);
  out.writeFloat(setupProgress);
  out.writeFloat(mapProgress);
  out.writeFloat(reduceProgress);
  out.writeFloat(cleanupProgress);
  WritableUtils.writeEnum(out, runState);
  out.writeLong(startTime);
  Text.writeString(out, user);
  WritableUtils.writeEnum(out, priority);
  Text.writeString(out, schedulingInfo);
  out.writeLong(finishTime);
  out.writeBoolean(isRetired);
  Text.writeString(out, historyFile);
  Text.writeString(out, jobName);
  Text.writeString(out, trackingUrl);
  Text.writeString(out, jobFile);
  out.writeBoolean(isUber);

  // Serialize the job's ACLs
  out.writeInt(jobACLs.size());
  for (Entry<JobACL, AccessControlList> entry : jobACLs.entrySet()) {
    WritableUtils.writeEnum(out, entry.getKey());
    entry.getValue().write(out);
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:27,代碼來源:JobStatus.java

示例3: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
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);
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:21,代碼來源:TaskReport.java

示例4: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@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);
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:20,代碼來源:QueueInfo.java

示例5: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
public void write(DataOutput out) throws IOException {
  Bytes.writeByteArray(out, column);
  WritableUtils.writeEnum(out, dataType);
  if (startValue != null) {
    out.writeBoolean(true);
    WritableUtils.writeEnum(out, startType);
    Bytes.writeByteArray(out, startValue);
  } else {
    out.writeBoolean(false);
  }

  if (stopValue != null) {
    out.writeBoolean(true);
    WritableUtils.writeEnum(out, stopType);
    Bytes.writeByteArray(out, stopValue);
  } else {
    out.writeBoolean(false);
  }

}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:22,代碼來源:Range.java

示例6: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
@InterfaceAudience.Private
public void write(DataOutput out) throws IOException {
  out.writeLong(blockSize);
  out.writeInt(bytesPerChecksum);
  out.writeInt(writePacketSize);
  out.writeShort(replication);
  out.writeInt(fileBufferSize);
  WritableUtils.writeEnum(out, checksumType);
}
 
開發者ID:nucypher,項目名稱:hadoop-oss,代碼行數:11,代碼來源:FsServerDefaults.java

示例7: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
public void write(DataOutput out) throws IOException {
  taskid.write(out);
  out.writeFloat(progress);
  out.writeInt(numSlots);
  WritableUtils.writeEnum(out, runState);
  Text.writeString(out, diagnosticInfo);
  Text.writeString(out, stateString);
  WritableUtils.writeEnum(out, phase);
  out.writeLong(startTime);
  out.writeLong(finishTime);
  out.writeBoolean(includeAllCounters);
  out.writeLong(outputSize);
  counters.write(out);
  nextRecordRange.write(out);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:16,代碼來源:TaskStatus.java

示例8: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
public void write(DataOutput out) throws IOException {
  taskId.write(out); 
  WritableUtils.writeVInt(out, idWithinJob);
  out.writeBoolean(isMap);
  WritableUtils.writeEnum(out, status); 
  WritableUtils.writeString(out, taskTrackerHttp);
  WritableUtils.writeVInt(out, taskRunTime);
  WritableUtils.writeVInt(out, eventId);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:10,代碼來源:TaskCompletionEvent.java

示例9: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
public void write(DataOutput out) throws IOException {
  WritableUtils.writeVLong(out, expiryDate);
  WritableUtils.writeVInt(out, keyId);
  WritableUtils.writeString(out, userId);
  WritableUtils.writeString(out, blockPoolId);
  WritableUtils.writeVLong(out, blockId);
  WritableUtils.writeVInt(out, modes.size());
  for (AccessMode aMode : modes) {
    WritableUtils.writeEnum(out, aMode);
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:13,代碼來源:BlockTokenIdentifier.java

示例10: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
public void write(DataOutput dataOutput) throws IOException {
  super.write(dataOutput);
  Bytes.writeByteArray(dataOutput, qualifier);
  WritableUtils.writeEnum(dataOutput, type);
  dataOutput.writeInt(offset);
  dataOutput.writeInt(length);
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:9,代碼來源:IndexDescriptor.java

示例11: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
public void write(DataOutput out) throws IOException {
	this.value.write(out);
	WritableUtils.writeEnum(out, this.kpi);
}
 
開發者ID:liuhaozzu,項目名稱:big_data,代碼行數:6,代碼來源:MapWritableValue.java

示例12: write

import org.apache.hadoop.io.WritableUtils; //導入方法依賴的package包/類
@Override
public void write(DataOutput out) throws IOException {
  super.write(out);
  jobId.write(out);
  WritableUtils.writeEnum(out, type);
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:7,代碼來源:TaskID.java


注:本文中的org.apache.hadoop.io.WritableUtils.writeEnum方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。