result = result && (hasJobId() == other.hasJobId()); if (hasJobId()) { result = result && (getJobId() == other.getJobId()); result = result && (hasTaskId() == other.hasTaskId()); if (hasTaskId()) { result = result && (getTaskId() == other.getTaskId()); result = result && (hasStatus() == other.hasStatus()); if (hasStatus()) { result = result && status_ == other.status_; result = result && (hasErrorMessage() == other.hasErrorMessage()); if (hasErrorMessage()) { result = result && getErrorMessage() .equals(other.getErrorMessage()); result = result && (hasResult() == other.hasResult()); if (hasResult()) { result = result && getResult() .equals(other.getResult());
/** * @param taskInfo the protocol buffer task information to convert * @return the {@link TaskInfo} version of the given protocol buffer task info */ public static TaskInfo fromProto(Job.TaskInfo taskInfo) { Preconditions.checkState(taskInfo.hasJobId(), "Deserializing protocol task info with unset jobId"); Preconditions.checkState(taskInfo.hasTaskId(), "Deserializing protocol task info with unset taskId"); Preconditions.checkState(taskInfo.hasStatus(), "Deserializing protocol task info with unset status"); TaskInfo info = new TaskInfo() .setJobId(taskInfo.getJobId()) .setTaskId(taskInfo.getTaskId()) .setStatus(fromProto(taskInfo.getStatus())) .setErrorMessage(taskInfo.getErrorMessage()); if (taskInfo.hasResult()) { info.setResult(taskInfo.getResult().toByteArray()); } return info; }
hash = (19 * hash) + getDescriptor().hashCode(); if (hasJobId()) { hash = (37 * hash) + JOB_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getJobId()); if (hasTaskId()) { hash = (37 * hash) + TASK_ID_FIELD_NUMBER; hash = (53 * hash) + getTaskId(); if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (hasErrorMessage()) { hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); if (hasResult()) { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode();
public Builder mergeFrom(alluxio.proto.journal.Job.TaskInfo other) { if (other == alluxio.proto.journal.Job.TaskInfo.getDefaultInstance()) return this; if (other.hasJobId()) { setJobId(other.getJobId()); } if (other.hasTaskId()) { setTaskId(other.getTaskId()); } if (other.hasStatus()) { setStatus(other.getStatus()); } if (other.hasErrorMessage()) { bitField0_ |= 0x00000008; errorMessage_ = other.errorMessage_; onChanged(); } if (other.hasResult()) { setResult(other.getResult()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * @param taskInfo the task to convert to proto * @return the protocol buffer version of this task info */ public static Job.TaskInfo toProto(TaskInfo taskInfo) { Job.TaskInfo.Builder builder = Job.TaskInfo.newBuilder() .setJobId(taskInfo.getJobId()) .setTaskId(taskInfo.getTaskId()) .setStatus(toProto(taskInfo.getStatus())); if (taskInfo.getErrorMessage() != null) { builder.setErrorMessage(taskInfo.getErrorMessage()); } if (taskInfo.getResult() != null) { alluxio.util.proto.ProtoUtils.setResult(builder, SerializationUtils.serialize(taskInfo.getResult(), "Failed to serialize task result")); } return builder.build(); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
/** * <code>optional bytes result = 5;</code> */ public Builder clearResult() { bitField0_ = (bitField0_ & ~0x00000010); result_ = getDefaultInstance().getResult(); onChanged(); return this; } public final Builder setUnknownFields(
/** * <code>optional string error_message = 4;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**