Java Code Examples for org.apache.hadoop.io.WritableUtils#writeEnum()
The following examples show how to use
org.apache.hadoop.io.WritableUtils#writeEnum() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractLayeredNeuralNetwork.java From incubator-retired-horn with Apache License 2.0 | 6 votes |
@Override public void write(DataOutput output) throws IOException { super.write(output); // write regularization weight output.writeFloat(this.regularizationWeight); // write momentum weight output.writeFloat(this.momentumWeight); // write cost function WritableUtils.writeString(output, costFunction.getFunctionName()); // write layer size list output.writeInt(this.layerSizeList.size()); for (Integer aLayerSizeList : this.layerSizeList) { output.writeInt(aLayerSizeList); } WritableUtils.writeEnum(output, this.trainingMethod); WritableUtils.writeEnum(output, this.learningStyle); }
Example 2
Source File: DatanodeInfo.java From hadoop-gpu with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ public void write(DataOutput out) throws IOException { super.write(out); //TODO: move it to DatanodeID once DatanodeID is not stored in FSImage out.writeShort(ipcPort); out.writeLong(capacity); out.writeLong(dfsUsed); out.writeLong(remaining); out.writeLong(lastUpdate); out.writeInt(xceiverCount); Text.writeString(out, location); Text.writeString(out, hostName == null? "": hostName); WritableUtils.writeEnum(out, getAdminState()); }
Example 3
Source File: HeartbeatResponse.java From hadoop-gpu with Apache License 2.0 | 6 votes |
public void write(DataOutput out) throws IOException { out.writeShort(responseId); out.writeInt(heartbeatInterval); if (actions == null) { WritableUtils.writeVInt(out, 0); } else { WritableUtils.writeVInt(out, actions.length); for (TaskTrackerAction action : actions) { WritableUtils.writeEnum(out, action.getActionId()); action.write(out); } } // Write the job ids of the jobs that were recovered out.writeInt(recoveredJobs.size()); for (JobID id : recoveredJobs) { id.write(out); } }
Example 4
Source File: QueueInfo.java From hadoop with Apache License 2.0 | 6 votes |
@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); } }
Example 5
Source File: TaskReport.java From RDFS with Apache License 2.0 | 6 votes |
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); } }
Example 6
Source File: TaskReport.java From hadoop-gpu with Apache License 2.0 | 6 votes |
public void write(DataOutput out) throws IOException { taskid.write(out); out.writeFloat(progress); Text.writeString(out, state); out.writeLong(startTime); out.writeLong(finishTime); out.writeBoolean(runOnGPU); 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); } }
Example 7
Source File: TaskStatus.java From hadoop-gpu with Apache License 2.0 | 6 votes |
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); }
Example 8
Source File: DatanodeInfo.java From RDFS with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ public void write(DataOutput out) throws IOException { super.write(out); //TODO: move it to DatanodeID once DatanodeID is not stored in FSImage out.writeShort(ipcPort); out.writeLong(capacity); out.writeLong(dfsUsed); out.writeLong(remaining); out.writeLong(lastUpdate); out.writeInt(xceiverCount); Text.writeString(out, location); Text.writeString(out, hostName == null? "": hostName); WritableUtils.writeEnum(out, getAdminState()); }
Example 9
Source File: Task.java From RDFS with Apache License 2.0 | 6 votes |
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); Text.writeString(out, username); out.writeBoolean(writeSkipRecs); out.writeBoolean(taskCleanup); extraData.write(out); }
Example 10
Source File: TaskTrackerAction.java From RDFS with Apache License 2.0 | 5 votes |
public void write(DataOutput out) throws IOException { WritableUtils.writeEnum(out, actionType); String className = ""; if (extensible == null) { WritableUtils.writeString(out, className); return; } className = extensible.getClass().getCanonicalName(); WritableUtils.writeString(out, className); extensible.write(out); }
Example 11
Source File: JobStatus.java From RDFS with Apache License 2.0 | 5 votes |
public synchronized void write(DataOutput out) throws IOException { jobid.write(out); out.writeFloat(setupProgress); out.writeFloat(mapProgress); out.writeFloat(reduceProgress); out.writeFloat(cleanupProgress); out.writeInt(runState); out.writeLong(startTime); Text.writeString(out, user); WritableUtils.writeEnum(out, priority); Text.writeString(out, schedulingInfo); }
Example 12
Source File: TaskStatus.java From big-c with Apache License 2.0 | 5 votes |
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); }
Example 13
Source File: TaskStatus.java From hadoop with Apache License 2.0 | 5 votes |
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); }
Example 14
Source File: BlockTokenIdentifier.java From big-c with Apache License 2.0 | 5 votes |
@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); } }
Example 15
Source File: TaskCompletionEvent.java From big-c with Apache License 2.0 | 5 votes |
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); }
Example 16
Source File: FsServerDefaults.java From big-c with Apache License 2.0 | 5 votes |
@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); }
Example 17
Source File: JobStatus.java From hadoop-gpu with Apache License 2.0 | 5 votes |
public synchronized void write(DataOutput out) throws IOException { jobid.write(out); out.writeFloat(setupProgress); out.writeFloat(mapProgress); out.writeFloat(reduceProgress); out.writeFloat(cleanupProgress); out.writeInt(runState); out.writeLong(startTime); Text.writeString(out, user); WritableUtils.writeEnum(out, priority); Text.writeString(out, schedulingInfo); }
Example 18
Source File: ToNumberFunction.java From phoenix with Apache License 2.0 | 4 votes |
@Override public void write(DataOutput output) throws IOException { super.write(output); WritableUtils.writeString(output, formatString); WritableUtils.writeEnum(output, type); }
Example 19
Source File: SingleCellConstructorExpression.java From phoenix with Apache License 2.0 | 4 votes |
@Override public void write(DataOutput output) throws IOException { super.write(output); WritableUtils.writeEnum(output, immutableStorageScheme); }
Example 20
Source File: ToCharFunction.java From phoenix with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void write(DataOutput output) throws IOException { super.write(output); WritableUtils.writeString(output, formatString); WritableUtils.writeEnum(output, type); }