当前位置: 首页>>代码示例>>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;未经允许,请勿转载。