/** * <code>repeated .alluxio.proto.journal.TaskInfo task_info = 2;</code> */ public Builder addTaskInfo( alluxio.proto.journal.Job.TaskInfo.Builder builderForValue) { if (taskInfoBuilder_ == null) { ensureTaskInfoIsMutable(); taskInfo_.add(builderForValue.build()); onChanged(); } else { taskInfoBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * A wrapper of * {@link alluxio.proto.journal.Job.TaskInfo.Builder#setResult} to take byte[] as input. * * @param builder the builder to update * @param bytes results bytes to set * @return updated builder */ public static alluxio.proto.journal.Job.TaskInfo.Builder setResult( alluxio.proto.journal.Job.TaskInfo.Builder builder, byte[] bytes) { return builder.setResult(com.google.protobuf.ByteString.copyFrom(bytes)); }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { alluxio.proto.journal.Job.TaskInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (alluxio.proto.journal.Job.TaskInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
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(); }
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>repeated .alluxio.proto.journal.TaskInfo task_info = 2;</code> */ public Builder addTaskInfo( int index, alluxio.proto.journal.Job.TaskInfo.Builder builderForValue) { if (taskInfoBuilder_ == null) { ensureTaskInfoIsMutable(); taskInfo_.add(index, builderForValue.build()); onChanged(); } else { taskInfoBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .alluxio.proto.journal.TaskInfo task_info = 2;</code> */ public Builder setTaskInfo( int index, alluxio.proto.journal.Job.TaskInfo.Builder builderForValue) { if (taskInfoBuilder_ == null) { ensureTaskInfoIsMutable(); taskInfo_.set(index, builderForValue.build()); onChanged(); } else { taskInfoBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
public static Builder newBuilder(alluxio.proto.journal.Job.TaskInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
public alluxio.proto.journal.Job.TaskInfo build() { alluxio.proto.journal.Job.TaskInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof alluxio.proto.journal.Job.TaskInfo) { return mergeFrom((alluxio.proto.journal.Job.TaskInfo)other); } else { super.mergeFrom(other); return this; } }
private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**