jerqi commented on code in PR #374:
URL: https://github.com/apache/incubator-uniffle/pull/374#discussion_r1034381711
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleReadClientImpl.java:
##########
@@ -173,6 +175,29 @@ public CompressedShuffleBlock readShuffleBlockData() {
if (!processedBlockIds.contains(bs.getBlockId())
&& blockIdBitmap.contains(bs.getBlockId())
&& taskIdBitmap.contains(bs.getTaskAttemptId())) {
+ long expectedCrc = -1;
+ long actualCrc = -1;
+ try {
+ long start = System.currentTimeMillis();
+ copyTime.addAndGet(System.currentTimeMillis() - start);
+ start = System.currentTimeMillis();
+ expectedCrc = bs.getCrc();
+ actualCrc = ChecksumUtils.getCrc32(readBuffer, bs.getOffset(),
bs.getLength());
+ crcCheckTime.addAndGet(System.currentTimeMillis() - start);
+ } catch (Exception e) {
+ LOG.warn("Can't read data for blockId[" + bs.getBlockId() + "]", e);
+ }
+ if (expectedCrc != actualCrc) {
+ String errMsg = "Unexpected crc value for blockId[" + bs.getBlockId()
+ + "], expected:" + expectedCrc + ", actual:" + actualCrc;
+ if (shuffleServerInfoList.size() > 1) {
Review Comment:
Could we add some comments here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]