/** Receive a reportedBlock copy response from the input stream */ private void receiveResponse(DataInputStream in) throws IOException { long startTime = Time.monotonicNow(); BlockOpResponseProto response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); while (response.getStatus() == Status.IN_PROGRESS) { // read intermediate responses response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); // Stop waiting for slow block moves. Even if it stops waiting, // the actual move may continue. if (stopWaitingForResponse(startTime)) { throw new IOException("Block move timed out"); } } String logInfo = "reportedBlock move is failed"; DataTransferProtoUtil.checkBlockOpStatus(response, logInfo, true); }
/** Receive a reportedBlock copy response from the input stream */ private void receiveResponse(DataInputStream in) throws IOException { long startTime = Time.monotonicNow(); BlockOpResponseProto response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); while (response.getStatus() == Status.IN_PROGRESS) { // read intermediate responses response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); // Stop waiting for slow block moves. Even if it stops waiting, // the actual move may continue. if (stopWaitingForResponse(startTime)) { throw new IOException("Block move timed out"); } } String logInfo = "block move is failed"; DataTransferProtoUtil.checkBlockOpStatus(response, logInfo); }
/** Receive a reportedBlock copy response from the input stream */ private void receiveResponse(DataInputStream in) throws IOException { long startTime = Time.monotonicNow(); BlockOpResponseProto response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); while (response.getStatus() == Status.IN_PROGRESS) { // read intermediate responses response = BlockOpResponseProto.parseFrom(vintPrefixed(in)); // Stop waiting for slow block moves. Even if it stops waiting, // the actual move may continue. if (stopWaitingForResponse(startTime)) { throw new IOException("Block move timed out"); } } String logInfo = "block move is failed"; DataTransferProtoUtil.checkBlockOpStatus(response, logInfo); }