commit | 88b4d32ed370f9c5a2e72594837117641cb57a62 | [log] [tgz] |
---|---|---|
author | madhusudancs@gmail.com <madhusudancs@gmail.com@123451ca-8445-de46-9d55-352943316053> | Fri Mar 08 07:03:26 2013 +0000 |
committer | madhusudancs@gmail.com <madhusudancs@gmail.com@123451ca-8445-de46-9d55-352943316053> | Fri Mar 08 07:03:26 2013 +0000 |
tree | 1f8301e001e76db3062f41e4e343393f5a982043 | |
parent | f5cfdff9a0a41e324044cec7e7993a5bed597bbc [diff] |
Supply only frame size to NetworkOutputChannel not the whole context. git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_hyracks_result_distribution@3063 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-comm/src/main/java/edu/uci/ics/hyracks/comm/channels/NetworkOutputChannel.java b/hyracks/hyracks-comm/src/main/java/edu/uci/ics/hyracks/comm/channels/NetworkOutputChannel.java index df910be..812a2de 100644 --- a/hyracks/hyracks-comm/src/main/java/edu/uci/ics/hyracks/comm/channels/NetworkOutputChannel.java +++ b/hyracks/hyracks-comm/src/main/java/edu/uci/ics/hyracks/comm/channels/NetworkOutputChannel.java
@@ -19,7 +19,6 @@ import java.util.Deque; import edu.uci.ics.hyracks.api.comm.IFrameWriter; -import edu.uci.ics.hyracks.api.context.IHyracksTaskContext; import edu.uci.ics.hyracks.api.exceptions.HyracksDataException; import edu.uci.ics.hyracks.net.buffers.IBufferAcceptor; import edu.uci.ics.hyracks.net.protocols.muxdemux.ChannelControlBlock; @@ -40,9 +39,9 @@ ccb.getWriteInterface().setEmptyBufferAcceptor(new WriteEmptyBufferAcceptor()); } - public void setTaskContext(IHyracksTaskContext ctx) { + public void setFrameSize(int frameSize) { for (int i = 0; i < nBuffers; ++i) { - emptyStack.push(ByteBuffer.allocateDirect(ctx.getFrameSize())); + emptyStack.push(ByteBuffer.allocateDirect(frameSize)); } }
diff --git a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/partitions/PartitionManager.java b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/partitions/PartitionManager.java index e532a0b..ea88a75 100644 --- a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/partitions/PartitionManager.java +++ b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/partitions/PartitionManager.java
@@ -98,7 +98,7 @@ List<IPartition> pList = partitionMap.get(partitionId); if (pList != null && !pList.isEmpty()) { IPartition partition = pList.get(0); - writer.setTaskContext(partition.getTaskContext()); + writer.setFrameSize(partition.getTaskContext().getFrameSize()); partition.writeTo(writer); if (!partition.isReusable()) { partitionMap.remove(partitionId);