sanha commented on a change in pull request #1: [NEMO-26] Implement SourceLocationAwareSchedulingPolicy URL: https://github.com/apache/incubator-nemo/pull/1#discussion_r172721743
########## File path: runtime/master/src/main/java/edu/snu/nemo/runtime/master/BlockManagerMaster.java ########## @@ -435,4 +435,44 @@ void registerRequest(final long requestId, return locationFuture; } } + + + public static BlockState.State convertBlockState(final ControlMessage.BlockStateFromExecutor state) { + switch (state) { + case BLOCK_READY: + return BlockState.State.READY; + case SCHEDULED: + return BlockState.State.SCHEDULED; + case COMMITTED: + return BlockState.State.COMMITTED; + case LOST_BEFORE_COMMIT: + return BlockState.State.LOST_BEFORE_COMMIT; + case LOST: + return BlockState.State.LOST; + case REMOVED: + return BlockState.State.REMOVED; + default: + throw new UnknownExecutionStateException(new Exception("This BlockState is unknown: " + state)); + } + } + + public static ControlMessage.BlockStateFromExecutor convertBlockState(final BlockState.State state) { Review comment: Please add comment about this method. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services