Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/17744#discussion_r113697866
--- Diff:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockHandler.java
---
@@ -93,14 +92,25 @@ protected void handleMessage(
OpenBlocks msg = (OpenBlocks) msgObj;
checkAuth(client, msg.appId);
- List<ManagedBuffer> blocks = Lists.newArrayList();
- long totalBlockSize = 0;
- for (String blockId : msg.blockIds) {
- final ManagedBuffer block = blockManager.getBlockData(msg.appId,
msg.execId, blockId);
- totalBlockSize += block != null ? block.size() : 0;
- blocks.add(block);
- }
- long streamId = streamManager.registerStream(client.getClientId(),
blocks.iterator());
+ Iterator<ManagedBuffer> iter = new Iterator<ManagedBuffer>() {
+ private int index = 0;
+
+ @Override
+ public boolean hasNext() {
+ return index < msg.blockIds.length;
+ }
+
+ @Override
+ public ManagedBuffer next() {
+ final ManagedBuffer block =
blockManager.getBlockData(msg.appId, msg.execId,
+ msg.blockIds[index]);
--- End diff --
You are right I missed that when I did a quick skim originally of this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]