Construct the DatasetClientContext object in the HyracksDataset constructor and pass it to the result channel's open method.

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_hyracks_result_distribution@2543 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-client/src/main/java/edu/uci/ics/hyracks/client/dataset/HyracksDataset.java b/hyracks/hyracks-client/src/main/java/edu/uci/ics/hyracks/client/dataset/HyracksDataset.java
index f2bba2a..5727fda 100644
--- a/hyracks/hyracks-client/src/main/java/edu/uci/ics/hyracks/client/dataset/HyracksDataset.java
+++ b/hyracks/hyracks-client/src/main/java/edu/uci/ics/hyracks/client/dataset/HyracksDataset.java
@@ -55,6 +55,8 @@
 
     private final ClientNetworkManager netManager;
 
+    private final DatasetClientContext datasetClientCtx;
+
     private DatasetDirectoryRecord[] knownRecords;
 
     private IDatasetInputChannelMonitor[] monitors;
@@ -73,6 +75,8 @@
 
         netManager = new ClientNetworkManager(nReaders);
 
+        datasetClientCtx = new DatasetClientContext(jobSpec.getFrameSize());
+
         knownRecords = null;
         monitors = null;
     }
@@ -204,7 +208,7 @@
                             getSocketAddress(addr), jobId, i, 100);
 
                     IDatasetInputChannelMonitor monitor = getMontior(i);
-                    resultChannel.open(FRAME_SIZE);
+                    resultChannel.open(datasetClientCtx);
                     resultChannel.registerMonitor(monitor);
 
                     while (!monitor.eosReached()) {