Refactored code for scheduling changes

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_scheduling@354 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IConnectionEntry.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IConnectionEntry.java
index 9e3cbbe..ec05d0b 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IConnectionEntry.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IConnectionEntry.java
@@ -24,8 +24,6 @@
 
     SelectionKey getSelectionKey();
 
-    void setDataReceiveListener(IDataReceiveListener listener);
-
     void attach(Object attachment);
 
     Object getAttachment();
@@ -38,11 +36,5 @@
 
     UUID getStageId();
 
-    void setJobId(UUID jobId);
-
-    void setStageId(UUID stageId);
-
     boolean aborted();
-
-    void abort();
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IEndpointDataWriterFactory.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IEndpointDataWriterFactory.java
similarity index 89%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IEndpointDataWriterFactory.java
rename to hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IEndpointDataWriterFactory.java
index 45c589a..59edd97 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IEndpointDataWriterFactory.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IEndpointDataWriterFactory.java
@@ -12,9 +12,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.dataflow;
+package edu.uci.ics.hyracks.api.comm;
 
-import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
 public interface IEndpointDataWriterFactory {
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiver.java
similarity index 61%
copy from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
copy to hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiver.java
index 1fb0465..8ae10c4 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiver.java
@@ -12,7 +12,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.resources;
+package edu.uci.ics.hyracks.api.comm;
 
-public interface ITimeSharedResource {
+import java.util.BitSet;
+
+import edu.uci.ics.hyracks.api.exceptions.HyracksException;
+
+public interface IReceiver {
+    public void setReceiverEventListener(IReceiverEventListener listener) throws HyracksException;
+
+    public void init(int sender) throws HyracksException;
+
+    public ISenderProxy getReadySender(BitSet senderMask, int senderIndexPreference);
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiverEventListener.java
similarity index 76%
copy from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
copy to hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiverEventListener.java
index 1fb0465..98c083e 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/IReceiverEventListener.java
@@ -12,7 +12,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.resources;
+package edu.uci.ics.hyracks.api.comm;
 
-public interface ITimeSharedResource {
+public interface IReceiverEventListener {
+    public void notifySenderAvailability(int sender);
+
+    public void notifySenderCount(int senderCount);
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISender.java
similarity index 82%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
rename to hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISender.java
index 1fb0465..88c8f27 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISender.java
@@ -12,7 +12,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.resources;
+package edu.uci.ics.hyracks.api.comm;
 
-public interface ITimeSharedResource {
+public interface ISender {
+    public IFrameWriter createSenderWriter(int receiverIndex);
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISenderProxy.java
similarity index 78%
copy from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
copy to hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISenderProxy.java
index 1fb0465..6b40bae 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ITimeSharedResource.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/comm/ISenderProxy.java
@@ -12,7 +12,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.resources;
+package edu.uci.ics.hyracks.api.comm;
 
-public interface ITimeSharedResource {
+import java.nio.ByteBuffer;
+
+public interface ISenderProxy {
+    public ByteBuffer getReadBuffer();
+
+    public int getSenderIndex();
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IConnectorDescriptor.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IConnectorDescriptor.java
index 362306a..2fd317b 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IConnectorDescriptor.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IConnectorDescriptor.java
@@ -20,6 +20,7 @@
 import org.json.JSONObject;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.constraints.IConstraintExpressionAcceptor;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/IResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/IResource.java
deleted file mode 100644
index 2d76c26..0000000
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/IResource.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.api.resources;
-
-import java.io.Serializable;
-
-public interface IResource extends Serializable {
-}
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ISpaceSharedResource.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ISpaceSharedResource.java
deleted file mode 100644
index 3a6f930..0000000
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/resources/ISpaceSharedResource.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.api.resources;
-
-public interface ISpaceSharedResource {
-
-}
\ No newline at end of file
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCClientInterface.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCClientInterface.java
new file mode 100644
index 0000000..6ed9847
--- /dev/null
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCClientInterface.java
@@ -0,0 +1,61 @@
+package edu.uci.ics.hyracks.control.cc;
+
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.EnumSet;
+import java.util.UUID;
+
+import edu.uci.ics.hyracks.api.client.ClusterControllerInfo;
+import edu.uci.ics.hyracks.api.client.IHyracksClientInterface;
+import edu.uci.ics.hyracks.api.job.JobFlag;
+import edu.uci.ics.hyracks.api.job.JobStatus;
+
+public class CCClientInterface extends UnicastRemoteObject implements IHyracksClientInterface {
+    private static final long serialVersionUID = 1L;
+
+    private final ClusterControllerService ccs;
+
+    public CCClientInterface(ClusterControllerService ccs) throws RemoteException {
+        this.ccs = ccs;
+    }
+
+    @Override
+    public ClusterControllerInfo getClusterControllerInfo() throws Exception {
+        return ccs.getClusterControllerInfo();
+    }
+
+    @Override
+    public void createApplication(String appName) throws Exception {
+        ccs.createApplication(appName);
+    }
+
+    @Override
+    public void startApplication(String appName) throws Exception {
+        ccs.startApplication(appName);
+    }
+
+    @Override
+    public void destroyApplication(String appName) throws Exception {
+        ccs.destroyApplication(appName);
+    }
+
+    @Override
+    public UUID createJob(String appName, byte[] jobSpec, EnumSet<JobFlag> jobFlags) throws Exception {
+        return ccs.createJob(appName, jobSpec, jobFlags);
+    }
+
+    @Override
+    public JobStatus getJobStatus(UUID jobId) throws Exception {
+        return ccs.getJobStatus(jobId);
+    }
+
+    @Override
+    public void start(UUID jobId) throws Exception {
+        ccs.start(jobId);
+    }
+
+    @Override
+    public void waitForCompletion(UUID jobId) throws Exception {
+        ccs.waitForCompletion(jobId);
+    }
+}
\ No newline at end of file
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCDriver.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCDriver.java
index 3e36a37..c181501 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCDriver.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/CCDriver.java
@@ -16,7 +16,7 @@
 
 import org.kohsuke.args4j.CmdLineParser;
 
-import edu.uci.ics.hyracks.api.control.CCConfig;
+import edu.uci.ics.hyracks.control.common.base.CCConfig;
 
 public class CCDriver {
     public static void main(String args[]) throws Exception {
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/ClusterControllerService.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/ClusterControllerService.java
index a4aa482..c550ecc 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/ClusterControllerService.java
@@ -33,15 +33,9 @@
 
 import edu.uci.ics.hyracks.api.client.ClusterControllerInfo;
 import edu.uci.ics.hyracks.api.client.IHyracksClientInterface;
-import edu.uci.ics.hyracks.api.control.CCConfig;
-import edu.uci.ics.hyracks.api.control.IClusterController;
-import edu.uci.ics.hyracks.api.control.INodeController;
-import edu.uci.ics.hyracks.api.control.NodeParameters;
 import edu.uci.ics.hyracks.api.exceptions.HyracksException;
 import edu.uci.ics.hyracks.api.job.JobFlag;
 import edu.uci.ics.hyracks.api.job.JobStatus;
-import edu.uci.ics.hyracks.api.job.profiling.om.JobProfile;
-import edu.uci.ics.hyracks.api.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.control.cc.application.CCApplicationContext;
 import edu.uci.ics.hyracks.control.cc.job.IJobStatusConditionVariable;
 import edu.uci.ics.hyracks.control.cc.job.JobRun;
@@ -64,7 +58,13 @@
 import edu.uci.ics.hyracks.control.cc.scheduler.naive.NaiveScheduler;
 import edu.uci.ics.hyracks.control.cc.web.WebServer;
 import edu.uci.ics.hyracks.control.common.AbstractRemoteService;
+import edu.uci.ics.hyracks.control.common.base.CCConfig;
+import edu.uci.ics.hyracks.control.common.base.IClusterController;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
+import edu.uci.ics.hyracks.control.common.base.NodeParameters;
 import edu.uci.ics.hyracks.control.common.context.ServerContext;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.StageletProfile;
 
 public class ClusterControllerService extends AbstractRemoteService implements IClusterController,
         IHyracksClientInterface {
@@ -94,6 +94,8 @@
 
     private final Timer timer;
 
+    private final CCClientInterface ccci;
+
     public ClusterControllerService(CCConfig ccConfig) throws Exception {
         this.ccConfig = ccConfig;
         nodeRegistry = new LinkedHashMap<String, NodeControllerState>();
@@ -106,13 +108,14 @@
         jobQueue = new JobQueue();
         scheduler = new NaiveScheduler(this);
         this.timer = new Timer(true);
+        ccci = new CCClientInterface(this);
     }
 
     @Override
     public void start() throws Exception {
         LOGGER.log(Level.INFO, "Starting ClusterControllerService");
         Registry registry = LocateRegistry.createRegistry(ccConfig.port);
-        registry.rebind(IHyracksClientInterface.class.getName(), this);
+        registry.rebind(IHyracksClientInterface.class.getName(), ccci);
         registry.rebind(IClusterController.class.getName(), this);
         webServer.setPort(ccConfig.httpPort);
         webServer.start();
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/NodeControllerState.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/NodeControllerState.java
index e69281b..6763451 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/NodeControllerState.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/NodeControllerState.java
@@ -4,7 +4,7 @@
 import java.util.Set;
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class NodeControllerState {
     private final INodeController nodeController;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobAttempt.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobAttempt.java
index 284c92f..5f5b89e 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobAttempt.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/JobAttempt.java
@@ -7,9 +7,9 @@
 import java.util.UUID;
 
 import edu.uci.ics.hyracks.api.job.JobPlan;
-import edu.uci.ics.hyracks.api.job.profiling.om.JobProfile;
 import edu.uci.ics.hyracks.control.cc.scheduler.IJobAttemptSchedulerState;
 import edu.uci.ics.hyracks.control.cc.scheduler.IScheduler;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobProfile;
 
 public class JobAttempt {
     private final JobRun jobRun;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManager.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManager.java
deleted file mode 100644
index ef87c4f..0000000
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManager.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.control.cc.job.manager;
-
-import java.util.EnumSet;
-import java.util.Map;
-import java.util.UUID;
-
-import edu.uci.ics.hyracks.api.job.JobFlag;
-import edu.uci.ics.hyracks.api.job.JobSpecification;
-import edu.uci.ics.hyracks.api.job.JobStatus;
-
-public interface IJobManager {
-    public void createJob(UUID jobId, String appName, JobSpecification jobSpec, EnumSet<JobFlag> jobFlags)
-            throws Exception;
-
-    public void start(UUID jobId) throws Exception;
-
-    public void notifyStageletComplete(UUID jobId, UUID stageId, int attempt, String nodeId,
-            Map<String, Long> statistics) throws Exception;
-
-    public void notifyStageletFailure(UUID jobId, UUID stageId, int attempt, String nodeId) throws Exception;
-
-    public JobStatus getJobStatus(UUID jobId);
-
-    public void waitForCompletion(UUID jobId) throws Exception;
-
-    public void notifyNodeFailure(String nodeId) throws Exception;
-
-    public void registerNode(String nodeId) throws Exception;
-
-    public void reportProfile(String id, Map<UUID, Map<String, Long>> counterDump) throws Exception;
-
-    public IJobManagerQueryInterface getQueryInterface();
-}
\ No newline at end of file
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManagerQueryInterface.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManagerQueryInterface.java
deleted file mode 100644
index fbdf941..0000000
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/IJobManagerQueryInterface.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.control.cc.job.manager;
-
-import java.util.UUID;
-
-import org.json.JSONArray;
-import org.json.JSONObject;
-
-public interface IJobManagerQueryInterface {
-    public JSONArray getAllJobSummaries() throws Exception;
-
-    public JSONObject getJobSpecification(UUID jobId) throws Exception;
-
-    public JSONObject getJobPlan(UUID jobId) throws Exception;
-
-    public JSONObject getJobProfile(UUID jobId, int attempt) throws Exception;
-}
\ No newline at end of file
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/events/ReportProfilesEvent.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/events/ReportProfilesEvent.java
index 21c16c8..beb8732 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/events/ReportProfilesEvent.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/job/manager/events/ReportProfilesEvent.java
@@ -18,10 +18,10 @@
 import java.util.Map;
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.job.profiling.om.JobProfile;
 import edu.uci.ics.hyracks.control.cc.ClusterControllerService;
 import edu.uci.ics.hyracks.control.cc.job.JobAttempt;
 import edu.uci.ics.hyracks.control.cc.job.JobRun;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobProfile;
 
 public class ReportProfilesEvent implements Runnable {
     private final ClusterControllerService ccs;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteOp.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteOp.java
index c0a35cb..ec15186 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteOp.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteOp.java
@@ -14,7 +14,7 @@
  */
 package edu.uci.ics.hyracks.control.cc.remote;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public interface RemoteOp<T> {
     public String getNodeId();
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteRunner.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteRunner.java
index 9bd4375..a37c786 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteRunner.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/RemoteRunner.java
@@ -18,9 +18,9 @@
 import java.util.Vector;
 import java.util.concurrent.Semaphore;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.ClusterControllerService;
 import edu.uci.ics.hyracks.control.cc.NodeControllerState;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class RemoteRunner {
     public static <T, R> R runRemote(ClusterControllerService ccs, final RemoteOp<T>[] remoteOps,
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationDestroyer.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationDestroyer.java
index f8ca6af..52e726c 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationDestroyer.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationDestroyer.java
@@ -14,8 +14,8 @@
  */
 package edu.uci.ics.hyracks.control.cc.remote.ops;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class ApplicationDestroyer implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationStarter.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationStarter.java
index af61249..d6a1d26 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationStarter.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/ApplicationStarter.java
@@ -14,8 +14,8 @@
  */
 package edu.uci.ics.hyracks.control.cc.remote.ops;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class ApplicationStarter implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobCompleteNotifier.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobCompleteNotifier.java
index 81a8610..88a94ec 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobCompleteNotifier.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobCompleteNotifier.java
@@ -16,8 +16,8 @@
 
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class JobCompleteNotifier implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobletAborter.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobletAborter.java
index b50aa8e..7885dcd 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobletAborter.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/JobletAborter.java
@@ -16,8 +16,8 @@
 
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class JobletAborter implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase1Installer.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase1Installer.java
index 2fe67ac..0373864 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase1Installer.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase1Installer.java
@@ -19,13 +19,13 @@
 import java.util.UUID;
 
 import edu.uci.ics.hyracks.api.comm.Endpoint;
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.api.dataflow.ActivityNodeId;
 import edu.uci.ics.hyracks.api.dataflow.OperatorDescriptorId;
 import edu.uci.ics.hyracks.api.dataflow.PortInstanceId;
 import edu.uci.ics.hyracks.api.job.JobPlan;
 import edu.uci.ics.hyracks.api.util.JavaSerializationUtils;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class Phase1Installer implements RemoteOp<Map<PortInstanceId, Endpoint>> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase2Installer.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase2Installer.java
index 99d7c9f..3f1c251 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase2Installer.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase2Installer.java
@@ -19,13 +19,13 @@
 import java.util.UUID;
 
 import edu.uci.ics.hyracks.api.comm.Endpoint;
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.api.dataflow.ActivityNodeId;
 import edu.uci.ics.hyracks.api.dataflow.OperatorDescriptorId;
 import edu.uci.ics.hyracks.api.dataflow.PortInstanceId;
 import edu.uci.ics.hyracks.api.job.JobPlan;
 import edu.uci.ics.hyracks.api.util.JavaSerializationUtils;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class Phase2Installer implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase3Installer.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase3Installer.java
index 02f9aa1..3d98f0f 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase3Installer.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/Phase3Installer.java
@@ -16,8 +16,8 @@
 
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class Phase3Installer implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/StageStarter.java b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/StageStarter.java
index d62254b..b614235 100644
--- a/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/StageStarter.java
+++ b/hyracks-control-cc/src/main/java/edu/uci/ics/hyracks/control/cc/remote/ops/StageStarter.java
@@ -16,8 +16,8 @@
 
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.control.INodeController;
 import edu.uci.ics.hyracks.control.cc.remote.RemoteOp;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
 
 public class StageStarter implements RemoteOp<Void> {
     private String nodeId;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/CCConfig.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/CCConfig.java
similarity index 96%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/CCConfig.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/CCConfig.java
index 4d9b5a0..0ae1d71 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/CCConfig.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/CCConfig.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import org.kohsuke.args4j.Option;
 
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/IClusterController.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/IClusterController.java
similarity index 86%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/IClusterController.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/IClusterController.java
index 9023cee..02b8f9e 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/IClusterController.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/IClusterController.java
@@ -12,14 +12,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import java.rmi.Remote;
 import java.util.List;
 import java.util.UUID;
 
-import edu.uci.ics.hyracks.api.job.profiling.om.JobProfile;
-import edu.uci.ics.hyracks.api.job.profiling.om.StageletProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.StageletProfile;
 
 public interface IClusterController extends Remote {
     public NodeParameters registerNode(INodeController nodeController) throws Exception;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/INodeController.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/INodeController.java
similarity index 97%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/INodeController.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/INodeController.java
index d0269fc..8fd79f3 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/INodeController.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/INodeController.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import java.rmi.Remote;
 import java.util.Map;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NCConfig.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NCConfig.java
similarity index 97%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NCConfig.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NCConfig.java
index 4a0f64d..54139c5 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NCConfig.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NCConfig.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import java.io.Serializable;
 
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeCapability.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeCapability.java
similarity index 94%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeCapability.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeCapability.java
index 88efc1f..74893c6 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeCapability.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeCapability.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import java.io.Serializable;
 
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeParameters.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeParameters.java
similarity index 96%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeParameters.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeParameters.java
index 8745b32..786e719 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/control/NodeParameters.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/base/NodeParameters.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.control;
+package edu.uci.ics.hyracks.control.common.base;
 
 import java.io.Serializable;
 
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/AbstractProfile.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/AbstractProfile.java
similarity index 95%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/AbstractProfile.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/AbstractProfile.java
index 6ef57a6..74d6000 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/AbstractProfile.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/AbstractProfile.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.job.profiling.om;
+package edu.uci.ics.hyracks.control.common.job.profiling.om;
 
 import java.io.Serializable;
 import java.util.HashMap;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobProfile.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobProfile.java
similarity index 95%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobProfile.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobProfile.java
index 53ad0ad..77ac2b5 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobProfile.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobProfile.java
@@ -1,4 +1,4 @@
-package edu.uci.ics.hyracks.api.job.profiling.om;
+package edu.uci.ics.hyracks.control.common.job.profiling.om;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobletProfile.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobletProfile.java
similarity index 96%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobletProfile.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobletProfile.java
index 66a203c..f847cf9 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/JobletProfile.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/JobletProfile.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.job.profiling.om;
+package edu.uci.ics.hyracks.control.common.job.profiling.om;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/StageletProfile.java b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/StageletProfile.java
similarity index 95%
rename from hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/StageletProfile.java
rename to hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/StageletProfile.java
index cb43f66..33beaf6 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/profiling/om/StageletProfile.java
+++ b/hyracks-control-common/src/main/java/edu/uci/ics/hyracks/control/common/job/profiling/om/StageletProfile.java
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package edu.uci.ics.hyracks.api.job.profiling.om;
+package edu.uci.ics.hyracks.control.common.job.profiling.om;
 
 import java.util.UUID;
 
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Joblet.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Joblet.java
index 6cc7450..f4fa95b 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Joblet.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Joblet.java
@@ -31,10 +31,10 @@
 import edu.uci.ics.hyracks.api.job.IOperatorEnvironment;
 import edu.uci.ics.hyracks.api.job.profiling.counters.ICounter;
 import edu.uci.ics.hyracks.api.job.profiling.counters.ICounterContext;
-import edu.uci.ics.hyracks.api.job.profiling.om.JobletProfile;
-import edu.uci.ics.hyracks.api.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.api.resources.IDeallocatable;
 import edu.uci.ics.hyracks.control.common.job.profiling.counters.Counter;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobletProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.control.nc.io.IOManager;
 import edu.uci.ics.hyracks.control.nc.io.ManagedWorkspaceFileFactory;
 import edu.uci.ics.hyracks.control.nc.resources.DefaultDeallocatableRegistry;
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NCDriver.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NCDriver.java
index d8c978a..f413168 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NCDriver.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NCDriver.java
@@ -18,7 +18,7 @@
 
 import edu.uci.ics.dcache.client.DCacheClient;
 import edu.uci.ics.dcache.client.DCacheClientConfig;
-import edu.uci.ics.hyracks.api.control.NCConfig;
+import edu.uci.ics.hyracks.control.common.base.NCConfig;
 
 public class NCDriver {
     public static void main(String args[]) throws Exception {
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
index 2702386..0bb3904 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/NodeControllerService.java
@@ -49,20 +49,15 @@
 import edu.uci.ics.hyracks.api.application.INCApplicationContext;
 import edu.uci.ics.hyracks.api.comm.Endpoint;
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksRootContext;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.control.IClusterController;
-import edu.uci.ics.hyracks.api.control.INodeController;
-import edu.uci.ics.hyracks.api.control.NCConfig;
-import edu.uci.ics.hyracks.api.control.NodeCapability;
-import edu.uci.ics.hyracks.api.control.NodeParameters;
 import edu.uci.ics.hyracks.api.dataflow.ActivityNodeId;
 import edu.uci.ics.hyracks.api.dataflow.Direction;
 import edu.uci.ics.hyracks.api.dataflow.IActivityNode;
 import edu.uci.ics.hyracks.api.dataflow.IConnectorDescriptor;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.IOperatorDescriptor;
 import edu.uci.ics.hyracks.api.dataflow.IOperatorNodePushable;
 import edu.uci.ics.hyracks.api.dataflow.OperatorDescriptorId;
@@ -77,12 +72,17 @@
 import edu.uci.ics.hyracks.api.job.JobPlan;
 import edu.uci.ics.hyracks.api.job.JobSpecification;
 import edu.uci.ics.hyracks.api.job.profiling.counters.ICounter;
-import edu.uci.ics.hyracks.api.job.profiling.om.JobProfile;
-import edu.uci.ics.hyracks.api.job.profiling.om.JobletProfile;
-import edu.uci.ics.hyracks.api.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.control.common.AbstractRemoteService;
 import edu.uci.ics.hyracks.control.common.application.ApplicationContext;
+import edu.uci.ics.hyracks.control.common.base.IClusterController;
+import edu.uci.ics.hyracks.control.common.base.INodeController;
+import edu.uci.ics.hyracks.control.common.base.NCConfig;
+import edu.uci.ics.hyracks.control.common.base.NodeCapability;
+import edu.uci.ics.hyracks.control.common.base.NodeParameters;
 import edu.uci.ics.hyracks.control.common.context.ServerContext;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.JobletProfile;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.control.nc.application.NCApplicationContext;
 import edu.uci.ics.hyracks.control.nc.comm.ConnectionManager;
 import edu.uci.ics.hyracks.control.nc.comm.DemuxDataReceiveListenerFactory;
@@ -266,7 +266,7 @@
                             Endpoint endpoint = new Endpoint(connectionManager.getNetworkAddress(), i);
                             endpointList.add(endpoint);
                             DemuxDataReceiveListenerFactory drlf = new DemuxDataReceiveListenerFactory(stagelet, jobId,
-                                    stageId);
+                                    attempt, stageId, conn.getConnectorId());
                             connectionManager.acceptConnection(endpoint.getEndpointId(), drlf);
                             PortInstanceId piId = new PortInstanceId(op.getOperatorId(), Direction.INPUT, plan
                                     .getTaskInputMap().get(hanId).get(j), i);
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
index eb283c2..157b0a7 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
@@ -36,9 +36,9 @@
 import edu.uci.ics.hyracks.api.io.IWorkspaceFileFactory;
 import edu.uci.ics.hyracks.api.job.profiling.counters.ICounter;
 import edu.uci.ics.hyracks.api.job.profiling.counters.ICounterContext;
-import edu.uci.ics.hyracks.api.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.api.resources.IDeallocatable;
 import edu.uci.ics.hyracks.control.common.job.profiling.counters.Counter;
+import edu.uci.ics.hyracks.control.common.job.profiling.om.StageletProfile;
 import edu.uci.ics.hyracks.control.nc.io.IOManager;
 import edu.uci.ics.hyracks.control.nc.io.ManagedWorkspaceFileFactory;
 import edu.uci.ics.hyracks.control.nc.resources.DefaultDeallocatableRegistry;
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionEntry.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionEntry.java
index e49f435..d44fadd 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionEntry.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionEntry.java
@@ -129,7 +129,6 @@
         }
     }
 
-    @Override
     public void setDataReceiveListener(IDataReceiveListener listener) {
         this.recvListener = listener;
     }
@@ -163,7 +162,6 @@
         return jobId;
     }
 
-    @Override
     public void setJobId(UUID jobId) {
         this.jobId = jobId;
     }
@@ -173,12 +171,10 @@
         return stageId;
     }
 
-    @Override
     public void setStageId(UUID stageId) {
         this.stageId = stageId;
     }
 
-    @Override
     public void abort() {
         aborted = true;
     }
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionManager.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionManager.java
index 717144d..658f229 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionManager.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/ConnectionManager.java
@@ -307,7 +307,7 @@
                         if (!pendingAbortConnections.isEmpty()) {
                             for (IConnectionEntry ce : pendingAbortConnections) {
                                 SelectionKey key = ce.getSelectionKey();
-                                ce.abort();
+                                ((ConnectionEntry) ce).abort();
                                 ((ConnectionEntry) ce).dispatch(key);
                                 key.cancel();
                                 ce.close();
@@ -352,7 +352,8 @@
     private class InitialDataReceiveListener implements IDataReceiveListener {
         @Override
         public void dataReceived(IConnectionEntry entry) throws IOException {
-            ByteBuffer buffer = entry.getReadBuffer();
+            ConnectionEntry ce = (ConnectionEntry) entry;
+            ByteBuffer buffer = ce.getReadBuffer();
             buffer.flip();
             IDataReceiveListener newListener = null;
             if (buffer.remaining() >= INITIAL_MESSAGE_LEN) {
@@ -367,28 +368,28 @@
                 synchronized (ConnectionManager.this) {
                     connectionReceiver = pendingConnectionReceivers.get(endpointID);
                     if (connectionReceiver == null) {
-                        entry.close();
+                        ce.close();
                         return;
                     }
                 }
 
-                newListener = connectionReceiver.getDataReceiveListener(endpointID, entry, senderId);
-                entry.setDataReceiveListener(newListener);
-                entry.setJobId(connectionReceiver.getJobId());
-                entry.setStageId(connectionReceiver.getStageId());
+                newListener = connectionReceiver.getDataReceiveListener(endpointID, ce, senderId);
+                ce.setDataReceiveListener(newListener);
+                ce.setJobId(connectionReceiver.getJobId());
+                ce.setStageId(connectionReceiver.getStageId());
                 synchronized (ConnectionManager.this) {
-                    connections.add(entry);
+                    connections.add(ce);
                 }
                 byte[] ack = new byte[4];
                 ByteBuffer ackBuffer = ByteBuffer.wrap(ack);
                 ackBuffer.clear();
                 ackBuffer.putInt(FrameConstants.SIZE_LEN);
                 ackBuffer.flip();
-                entry.write(ackBuffer);
+                ce.write(ackBuffer);
             }
             buffer.compact();
             if (newListener != null && buffer.remaining() > 0) {
-                newListener.dataReceived(entry);
+                newListener.dataReceived(ce);
             }
         }
 
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/DemuxDataReceiveListenerFactory.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/DemuxDataReceiveListenerFactory.java
index 32c8991..cb6e936 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/DemuxDataReceiveListenerFactory.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/DemuxDataReceiveListenerFactory.java
@@ -28,6 +28,7 @@
 import edu.uci.ics.hyracks.api.comm.IDataReceiveListener;
 import edu.uci.ics.hyracks.api.comm.IDataReceiveListenerFactory;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
+import edu.uci.ics.hyracks.api.dataflow.ConnectorDescriptorId;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
 public class DemuxDataReceiveListenerFactory implements IDataReceiveListenerFactory, IConnectionDemultiplexer,
@@ -38,13 +39,18 @@
     private final int frameSize;
     private IConnectionEntry senders[];
     private int openSenderCount;
-    private UUID jobId;
-    private UUID stageId;
+    private final UUID jobId;
+    private final int attempt;
+    private final UUID stageId;
+    private final ConnectorDescriptorId cdId;
 
-    public DemuxDataReceiveListenerFactory(IHyracksStageletContext ctx, UUID jobId, UUID stageId) {
+    public DemuxDataReceiveListenerFactory(IHyracksStageletContext ctx, UUID jobId, int attempt, UUID stageId,
+            ConnectorDescriptorId cdId) {
         frameSize = ctx.getFrameSize();
         this.jobId = jobId;
+        this.attempt = attempt;
         this.stageId = stageId;
+        this.cdId = cdId;
         readyBits = new BitSet();
         senders = null;
         openSenderCount = 0;
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/Sender.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/Sender.java
new file mode 100644
index 0000000..8f4c846
--- /dev/null
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/comm/Sender.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2009-2010 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.hyracks.control.nc.comm;
+
+import java.util.UUID;
+
+import edu.uci.ics.hyracks.api.comm.IFrameWriter;
+import edu.uci.ics.hyracks.api.comm.ISender;
+import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
+import edu.uci.ics.hyracks.api.dataflow.ConnectorDescriptorId;
+
+public class Sender implements ISender {
+    private final IHyracksStageletContext ctx;
+
+    private final UUID jobId;
+
+    private final int attempt;
+
+    private final UUID stageId;
+
+    private final ConnectorDescriptorId cdId;
+
+    private final int senderIndex;
+
+    public Sender(IHyracksStageletContext ctx, UUID jobId, int attempt, UUID stageId, ConnectorDescriptorId cdId,
+            int senderIndex) {
+        this.ctx = ctx;
+        this.jobId = jobId;
+        this.attempt = attempt;
+        this.stageId = stageId;
+        this.cdId = cdId;
+        this.senderIndex = senderIndex;
+    }
+
+    @Override
+    public IFrameWriter createSenderWriter(int receiverIndex) {
+        return null;
+    }
+
+    public UUID getJobId() {
+        return jobId;
+    }
+
+    public int getAttempt() {
+        return attempt;
+    }
+
+    public UUID getStageId() {
+        return stageId;
+    }
+
+    public ConnectorDescriptorId getConnectorDescriptorId() {
+        return cdId;
+    }
+
+    public int getSenderIndex() {
+        return senderIndex;
+    }
+}
\ No newline at end of file
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/IOFuture.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/IOFuture.java
deleted file mode 100644
index bd6462d..0000000
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/io/IOFuture.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.control.nc.io;
-
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-
-public final class IOFuture {
-    private boolean complete;
-
-    private Exception exception;
-
-    public synchronized void reset() {
-        complete = false;
-        exception = null;
-    }
-
-    public synchronized void synchronize() throws HyracksDataException, InterruptedException {
-        while (!complete) {
-            try {
-                wait();
-            } catch (InterruptedException e) {
-                throw e;
-            }
-        }
-        if (exception != null) {
-            throw new HyracksDataException(exception);
-        }
-    }
-
-    public synchronized boolean isComplete() {
-        return complete;
-    }
-
-    public synchronized void notifySuccess() {
-        complete = true;
-        notifyAll();
-    }
-
-    public synchronized void notifyFailure(Exception e) {
-        complete = true;
-        exception = e;
-        notifyAll();
-    }
-}
\ No newline at end of file
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/HashDataWriter.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/HashDataWriter.java
index 44dd84c..2f1c8e7 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/HashDataWriter.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/HashDataWriter.java
@@ -17,9 +17,9 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.ITuplePartitionComputer;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningConnectorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningConnectorDescriptor.java
index b814867..882ee16 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningConnectorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningConnectorDescriptor.java
@@ -15,10 +15,10 @@
 package edu.uci.ics.hyracks.dataflow.std.connectors;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.ITuplePartitionComputerFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningMergingConnectorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningMergingConnectorDescriptor.java
index 36f8d5b..5e73e23 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningMergingConnectorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNHashPartitioningMergingConnectorDescriptor.java
@@ -15,10 +15,10 @@
 package edu.uci.ics.hyracks.dataflow.std.connectors;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryComparator;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.ITuplePartitionComputerFactory;
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNRangePartitioningConnectorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNRangePartitioningConnectorDescriptor.java
index e108396..e085f29 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNRangePartitioningConnectorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNRangePartitioningConnectorDescriptor.java
@@ -18,10 +18,10 @@
 import java.nio.ByteBuffer;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.api.job.JobSpecification;
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNReplicatingConnectorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNReplicatingConnectorDescriptor.java
index 37f68b7..deb8d8d 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNReplicatingConnectorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/MToNReplicatingConnectorDescriptor.java
@@ -17,10 +17,10 @@
 import java.nio.ByteBuffer;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.api.job.JobSpecification;
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/OneToOneConnectorDescriptor.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/OneToOneConnectorDescriptor.java
index a038a40..640ce35 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/OneToOneConnectorDescriptor.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/connectors/OneToOneConnectorDescriptor.java
@@ -15,13 +15,13 @@
 package edu.uci.ics.hyracks.dataflow.std.connectors;
 
 import edu.uci.ics.hyracks.api.comm.IConnectionDemultiplexer;
+import edu.uci.ics.hyracks.api.comm.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.comm.IFrameReader;
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
 import edu.uci.ics.hyracks.api.constraints.IConstraintExpressionAcceptor;
 import edu.uci.ics.hyracks.api.constraints.expressions.PartitionCountExpression;
 import edu.uci.ics.hyracks.api.constraints.expressions.RelationalExpression;
 import edu.uci.ics.hyracks.api.context.IHyracksStageletContext;
-import edu.uci.ics.hyracks.api.dataflow.IEndpointDataWriterFactory;
 import edu.uci.ics.hyracks.api.dataflow.IOperatorDescriptor;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
diff --git a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
index 2bb1d80..b2b75b9 100644
--- a/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
+++ b/hyracks-examples/hyracks-integration-tests/src/test/java/edu/uci/ics/hyracks/tests/integration/AbstractIntegrationTest.java
@@ -22,11 +22,11 @@
 
 import edu.uci.ics.hyracks.api.client.HyracksLocalConnection;
 import edu.uci.ics.hyracks.api.client.IHyracksClientConnection;
-import edu.uci.ics.hyracks.api.control.CCConfig;
-import edu.uci.ics.hyracks.api.control.NCConfig;
 import edu.uci.ics.hyracks.api.job.JobFlag;
 import edu.uci.ics.hyracks.api.job.JobSpecification;
 import edu.uci.ics.hyracks.control.cc.ClusterControllerService;
+import edu.uci.ics.hyracks.control.common.base.CCConfig;
+import edu.uci.ics.hyracks.control.common.base.NCConfig;
 import edu.uci.ics.hyracks.control.nc.NodeControllerService;
 
 public abstract class AbstractIntegrationTest {