Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
leixianming committed Jul 23, 2023
1 parent 50f7132 commit c58a624
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,17 @@ public List<AddBlockEvent> buildBlockEvents(List<ShuffleBlockInfo> shuffleBlockI
+ " bytes");
// Use final temporary variables for closures
final long _memoryUsed = memoryUsed;
final List<ShuffleBlockInfo> finalShuffleBlockInfosPerEvent = shuffleBlockInfoList;
events.add(
new AddBlockEvent(
taskId, shuffleBlockInfosPerEvent, () -> freeAllocatedMemory(_memoryUsed)));
taskId,
shuffleBlockInfosPerEvent,
() -> {
freeAllocatedMemory(_memoryUsed);
for (ShuffleBlockInfo shuffleBlockInfo : finalShuffleBlockInfosPerEvent) {
shuffleBlockInfo.getData().release();
}
}));
}
return events;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public static void encodeShuffleBlockInfo(ShuffleBlockInfo shuffleBlockInfo, Byt
byteBuf.writeLong(shuffleBlockInfo.getTaskAttemptId());
// todo: avoid copy
shuffleBlockInfo.copyDataTo(byteBuf);
shuffleBlockInfo.getData().release();
List<ShuffleServerInfo> shuffleServerInfoList = shuffleBlockInfo.getShuffleServerInfos();
byteBuf.writeInt(shuffleServerInfoList.size());
for (ShuffleServerInfo shuffleServerInfo : shuffleServerInfoList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private static void createShuffleServers() throws Exception {
serverConf.setString("rss.server.hadoop.dfs.replication", "2");
serverConf.setLong("rss.server.disk.capacity", 10L * 1024L * 1024L * 1024L);
serverConf.setBoolean("rss.server.health.check.enable", false);
serverConf.setString("rss.server.tags", "GRPC,GRPC_NETTY");
createMockedShuffleServer(serverConf);
}
enableRecordGetShuffleResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private static void createShuffleServers() throws Exception {
serverConf.setString("rss.server.hadoop.dfs.replication", "2");
serverConf.setLong("rss.server.disk.capacity", 10L * 1024L * 1024L * 1024L);
serverConf.setBoolean("rss.server.health.check.enable", false);
serverConf.setString("rss.server.tags", "GRPC,GRPC_NETTY");
createMockedShuffleServer(serverConf);
}
enableRecordGetShuffleResult();
Expand Down

0 comments on commit c58a624

Please sign in to comment.