Skip to content
Closed
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 @@ -589,6 +589,6 @@ public static void validatePath(Path path, Path ancestor) {
"Ancestor should not be null");
Preconditions.checkArgument(
path.normalize().startsWith(ancestor.normalize()),
"Path should be a descendant of " + ancestor);
"Path should be a descendant of %s", ancestor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public void handle(SCMCommand command, OzoneContainer container,
final long containerID = replicateCommand.getContainerID();

Preconditions.checkArgument(sourceDatanodes.size() > 0,
String.format("Replication command is received for container %d "
+ "but the size of source datanodes was 0.", containerID));
"Replication command is received for container %s "
+ "without source datanodes.", containerID);

supervisor.addTask(new ReplicationTask(containerID, sourceDatanodes));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ private ByteString readStateMachineData(
ByteString data = responseProto.getData();
// assert that the response has data in it.
Preconditions
.checkNotNull(data, "read chunk data is null for chunk:" + chunkInfo);
Preconditions.checkState(data.size() == chunkInfo.getLen(), String.format(
"read chunk len=%d does not match chunk expected len=%d for chunk:%s",
data.size(), chunkInfo.getLen(), chunkInfo));
.checkNotNull(data, "read chunk data is null for chunk: %s", chunkInfo);
Preconditions.checkState(data.size() == chunkInfo.getLen(),
"read chunk len=%s does not match chunk expected len=%s for chunk:%s",
data.size(), chunkInfo.getLen(), chunkInfo);
return data;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private OMResponse submitRequestDirectlyToOM(OMRequest request) {
OMClientRequest omClientRequest =
OzoneManagerRatisUtils.createClientRequest(request);
Preconditions.checkState(omClientRequest != null,
"Unrecognized write command type request" + request.toString());
"Unrecognized write command type request: %s", request);
request = omClientRequest.preExecute(ozoneManager);
index = transactionIndex.incrementAndGet();
omClientRequest = OzoneManagerRatisUtils.createClientRequest(request);
Expand Down