@Override public void onMessage(final ControlMessage.Message message) { try { switch (message.getType()) { case BlockStateChanged: final ControlMessage.BlockStateChangedMsg blockStateChangedMsg = message.getBlockStateChangedMsg(); final String blockId = blockStateChangedMsg.getBlockId(); onBlockStateChanged(blockId, convertBlockState(blockStateChangedMsg.getState()), blockStateChangedMsg.getLocation()); break; default: throw new IllegalMessageException( new Exception("This message should not be received by " + BlockManagerMaster.class.getName() + ":" + message.getType())); } } catch (final Exception e) { throw new RuntimeException(e); } }
/** * <code>optional .protobuf.BlockStateChangedMsg blockStateChangedMsg = 6;</code> */ public Builder mergeBlockStateChangedMsg(org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg value) { if (blockStateChangedMsgBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && blockStateChangedMsg_ != org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance()) { blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.newBuilder(blockStateChangedMsg_).mergeFrom(value).buildPartial(); } else { blockStateChangedMsg_ = value; } onChanged(); } else { blockStateChangedMsgBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; return this; } /**
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getExecutorIdBytes()); } 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, getLocationBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance(); } else { blockStateChangedMsgBuilder_.clear();
blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance(); } else { blockStateChangedMsgBuilder_.clear();
store.writeBlock(block); final ControlMessage.BlockStateChangedMsg.Builder blockStateChangedMsgBuilder = ControlMessage.BlockStateChangedMsg.newBuilder() .setExecutorId(executorId) .setBlockId(blockId)
store.writeBlock(block); final ControlMessage.BlockStateChangedMsg.Builder blockStateChangedMsgBuilder = ControlMessage.BlockStateChangedMsg.newBuilder() .setExecutorId(executorId) .setBlockId(blockId)
ControlMessage.BlockStateChangedMsg.newBuilder() .setExecutorId(executorId) .setBlockId(blockId)
ControlMessage.BlockStateChangedMsg.newBuilder() .setExecutorId(executorId) .setBlockId(blockId)
public org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg result = new org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.executorId_ = executorId_; 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.location_ = location_; 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 .computeBytesSize(1, getExecutorIdBytes()); } 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, getLocationBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
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 org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg buildPartial() { org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg result = new org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.executorId_ = executorId_; 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.location_ = location_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance()) return this; if (other.hasExecutorId()) { bitField0_ |= 0x00000001; executorId_ = other.executorId_; onChanged(); } if (other.hasBlockId()) { bitField0_ |= 0x00000002; blockId_ = other.blockId_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasLocation()) { bitField0_ |= 0x00000008; location_ = other.location_; 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 mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance()) return this; if (other.hasExecutorId()) { bitField0_ |= 0x00000001; executorId_ = other.executorId_; onChanged(); } if (other.hasBlockId()) { bitField0_ |= 0x00000002; blockId_ = other.blockId_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasLocation()) { bitField0_ |= 0x00000008; location_ = other.location_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public void onMessage(final ControlMessage.Message message) { try { switch (message.getType()) { case BlockStateChanged: final ControlMessage.BlockStateChangedMsg blockStateChangedMsg = message.getBlockStateChangedMsg(); final String blockId = blockStateChangedMsg.getBlockId(); onBlockStateChanged(blockId, convertBlockState(blockStateChangedMsg.getState()), blockStateChangedMsg.getLocation()); break; default: throw new IllegalMessageException( new Exception("This message should not be received by " + BlockManagerMaster.class.getName() + ":" + message.getType())); } } catch (final Exception e) { throw new RuntimeException(e); } }
/** * <code>optional .protobuf.BlockStateChangedMsg blockStateChangedMsg = 6;</code> */ public Builder mergeBlockStateChangedMsg(org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg value) { if (blockStateChangedMsgBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && blockStateChangedMsg_ != org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.getDefaultInstance()) { blockStateChangedMsg_ = org.apache.nemo.runtime.common.comm.ControlMessage.BlockStateChangedMsg.newBuilder(blockStateChangedMsg_).mergeFrom(value).buildPartial(); } else { blockStateChangedMsg_ = value; } onChanged(); } else { blockStateChangedMsgBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; return this; } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getExecutorIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getBlockIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(3, state_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getLocationBytes()); } getUnknownFields().writeTo(output); }
public Builder toBuilder() { return newBuilder(this); }