Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ private XceiverClientReply sendCommandWithRetry(
LOG.debug(message + " on the pipeline {}.",
processForDebug(request), pipeline);
} else {
LOG.error(message + " on the pipeline {}.",
LOG.warn(message + " on the pipeline {}.",
request.getCmdType(), pipeline);
}
throw ioException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -217,18 +218,25 @@ private boolean isConnectivityIssue(IOException ex) {
}

private void refreshBlockInfo(IOException cause) throws IOException {
LOG.info("Unable to read information for block {} from pipeline {}: {}",
LOG.info("Attempting to update pipeline and block token for block {} from pipeline {}: {}",
blockID, pipelineRef.get().getId(), cause.getMessage());
if (refreshFunction != null) {
LOG.debug("Re-fetching pipeline and block token for block {}", blockID);
BlockLocationInfo blockLocationInfo = refreshFunction.apply(blockID);
if (blockLocationInfo == null) {
LOG.debug("No new block location info for block {}", blockID);
LOG.warn("No new block location info for block {}", blockID);
} else {
LOG.debug("New pipeline for block {}: {}", blockID,
blockLocationInfo.getPipeline());
setPipeline(blockLocationInfo.getPipeline());
LOG.info("New pipeline for block {}: {}", blockID,
blockLocationInfo.getPipeline());

tokenRef.set(blockLocationInfo.getToken());
if (blockLocationInfo.getToken() != null) {
OzoneBlockTokenIdentifier tokenId = new OzoneBlockTokenIdentifier();
tokenId.readFromByteArray(tokenRef.get().getIdentifier());
LOG.info("A new token is added for block {}. Expiry: {}",
blockID, Instant.ofEpochMilli(tokenId.getExpiryDate()));
}
}
} else {
throw cause;
Expand Down