if (!blockLocationInfoMsg.hasOwnerExecutorId()) { throw new BlockFetchException(new Throwable( "Block " + blockIdWildcard + " location unknown: " + "The block state is " + blockLocationInfoMsg.getState())); final String blockId = blockLocationInfoMsg.getBlockId(); final String targetExecutorId = blockLocationInfoMsg.getOwnerExecutorId(); if (targetExecutorId.equals(executorId) || targetExecutorId.equals(REMOTE_FILE_STORE)) {
/** * <code>optional .protobuf.BlockLocationInfoMsg blockLocationInfoMsg = 9;</code> */ public Builder mergeBlockLocationInfoMsg(org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg value) { if (blockLocationInfoMsgBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100) && blockLocationInfoMsg_ != org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance()) { blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.newBuilder(blockLocationInfoMsg_).mergeFrom(value).buildPartial(); } else { blockLocationInfoMsg_ = value; } onChanged(); } else { blockLocationInfoMsgBuilder_.mergeFrom(value); } bitField0_ |= 0x00000100; return this; } /**
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getBlockIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, state_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getOwnerExecutorIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance(); } else { blockLocationInfoMsgBuilder_.clear();
blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance(); } else { blockLocationInfoMsgBuilder_.clear();
if (!blockLocationInfoMsg.hasOwnerExecutorId()) { throw new BlockFetchException(new Throwable( "Block " + blockIdWildcard + " location unknown: " + "The block state is " + blockLocationInfoMsg.getState())); final String blockId = blockLocationInfoMsg.getBlockId(); final String targetExecutorId = blockLocationInfoMsg.getOwnerExecutorId(); if (targetExecutorId.equals(executorId) || targetExecutorId.equals(REMOTE_FILE_STORE)) {
/** * Registers a request for the block location. * If the location is already known, reply the location instantly. * * @param requestId the ID of the block location request. * @param messageContext the message context to reply. */ void registerRequest(final long requestId, final MessageContext messageContext) { final ControlMessage.BlockLocationInfoMsg.Builder infoMsgBuilder = ControlMessage.BlockLocationInfoMsg.newBuilder() .setRequestId(requestId) .setBlockId(blockIdOrWildcard); locationFuture.whenComplete((location, throwable) -> { if (throwable == null) { infoMsgBuilder.setOwnerExecutorId(location); } else { infoMsgBuilder.setState( convertBlockState(((AbsentBlockException) throwable).getState())); } messageContext.reply( ControlMessage.Message.newBuilder() .setId(RuntimeIdManager.generateMessageId()) .setListenerId(MessageEnvironment.EXECUTOR_MESSAGE_LISTENER_ID) .setType(ControlMessage.MessageType.BlockLocationInfo) .setBlockLocationInfoMsg(infoMsgBuilder.build()) .build()); }); }
/** * Registers a request for the block location. * If the location is already known, reply the location instantly. * * @param requestId the ID of the block location request. * @param messageContext the message context to reply. */ void registerRequest(final long requestId, final MessageContext messageContext) { final ControlMessage.BlockLocationInfoMsg.Builder infoMsgBuilder = ControlMessage.BlockLocationInfoMsg.newBuilder() .setRequestId(requestId) .setBlockId(blockIdOrWildcard); locationFuture.whenComplete((location, throwable) -> { if (throwable == null) { infoMsgBuilder.setOwnerExecutorId(location); } else { infoMsgBuilder.setState( convertBlockState(((AbsentBlockException) throwable).getState())); } messageContext.reply( ControlMessage.Message.newBuilder() .setId(RuntimeIdManager.generateMessageId()) .setListenerId(MessageEnvironment.EXECUTOR_MESSAGE_LISTENER_ID) .setType(ControlMessage.MessageType.BlockLocationInfo) .setBlockLocationInfoMsg(infoMsgBuilder.build()) .build()); }); }
public org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg result = new org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.requestId_ = requestId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.blockId_ = blockId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.state_ = state_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.ownerExecutorId_ = ownerExecutorId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg result = new org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.requestId_ = requestId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.blockId_ = blockId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.state_ = state_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.ownerExecutorId_ = ownerExecutorId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getBlockIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, state_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getOwnerExecutorIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance()) return this; if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasBlockId()) { bitField0_ |= 0x00000002; blockId_ = other.blockId_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasOwnerExecutorId()) { bitField0_ |= 0x00000008; ownerExecutorId_ = other.ownerExecutorId_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private void initFields() { type_ = org.apache.nemo.runtime.common.comm.ControlMessage.MessageType.TaskStateChanged; id_ = 0L; listenerId_ = ""; taskStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.TaskStateChangedMsg.getDefaultInstance(); scheduleTaskMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ScheduleTaskMsg.getDefaultInstance(); blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance(); dataSizeMetricMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.DataSizeMetricMsg.getDefaultInstance(); requestBlockLocationMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestBlockLocationMsg.getDefaultInstance(); blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance(); executorFailedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ExecutorFailedMsg.getDefaultInstance(); containerFailedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ContainerFailedMsg.getDefaultInstance(); metricMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.MetricMsg.getDefaultInstance(); dataCollected_ = org.apache.nemo.runtime.common.comm.ControlMessage.DataCollectMessage.getDefaultInstance(); requestbroadcastVariableMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestBroadcastVariableMessage.getDefaultInstance(); broadcastVariableMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.InMasterBroadcastVariableMessage.getDefaultInstance(); pipeInitMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.PipeInitMessage.getDefaultInstance(); requestPipeLocMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestPipeLocationMessage.getDefaultInstance(); pipeLocInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.PipeLocationInfoMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
/** * <code>optional .protobuf.BlockLocationInfoMsg blockLocationInfoMsg = 9;</code> */ public Builder mergeBlockLocationInfoMsg(org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg value) { if (blockLocationInfoMsgBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100) && blockLocationInfoMsg_ != org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance()) { blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.newBuilder(blockLocationInfoMsg_).mergeFrom(value).buildPartial(); } else { blockLocationInfoMsg_ = value; } onChanged(); } else { blockLocationInfoMsgBuilder_.mergeFrom(value); } bitField0_ |= 0x00000100; return this; } /**
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance()) return this; if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasBlockId()) { bitField0_ |= 0x00000002; blockId_ = other.blockId_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasOwnerExecutorId()) { bitField0_ |= 0x00000008; ownerExecutorId_ = other.ownerExecutorId_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private void initFields() { type_ = org.apache.nemo.runtime.common.comm.ControlMessage.MessageType.TaskStateChanged; id_ = 0L; listenerId_ = ""; taskStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.TaskStateChangedMsg.getDefaultInstance(); scheduleTaskMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ScheduleTaskMsg.getDefaultInstance(); blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance(); dataSizeMetricMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.DataSizeMetricMsg.getDefaultInstance(); requestBlockLocationMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestBlockLocationMsg.getDefaultInstance(); blockLocationInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg.getDefaultInstance(); executorFailedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ExecutorFailedMsg.getDefaultInstance(); containerFailedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.ContainerFailedMsg.getDefaultInstance(); metricMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.MetricMsg.getDefaultInstance(); dataCollected_ = org.apache.nemo.runtime.common.comm.ControlMessage.DataCollectMessage.getDefaultInstance(); requestbroadcastVariableMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestBroadcastVariableMessage.getDefaultInstance(); broadcastVariableMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.InMasterBroadcastVariableMessage.getDefaultInstance(); pipeInitMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.PipeInitMessage.getDefaultInstance(); requestPipeLocMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.RequestPipeLocationMessage.getDefaultInstance(); pipeLocInfoMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.PipeLocationInfoMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
public Builder toBuilder() { return newBuilder(this); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getBlockIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(3, state_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getOwnerExecutorIdBytes()); } getUnknownFields().writeTo(output); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, requestId_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getBlockIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(3, state_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getOwnerExecutorIdBytes()); } getUnknownFields().writeTo(output); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.nemo.runtime.common.comm.ControlMessage.BlockLocationInfoMsg prototype) {