Added CC info to ICCContext.

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_dev_next@1103 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/ClusterControllerInfo.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/ClusterControllerInfo.java
index 315f9dc..8dd4d6c 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/ClusterControllerInfo.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/client/ClusterControllerInfo.java
@@ -19,16 +19,27 @@
 public class ClusterControllerInfo implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    private int webPort;
+    private final String clientNetAddress;
 
-    public ClusterControllerInfo() {
-    }
+    private final int clientNetPort;
 
-    public void setWebPort(int webPort) {
+    private final int webPort;
+
+    public ClusterControllerInfo(String clientNetAddress, int clientNetPort, int webPort) {
+        this.clientNetAddress = clientNetAddress;
+        this.clientNetPort = clientNetPort;
         this.webPort = webPort;
     }
 
     public int getWebPort() {
         return webPort;
     }
+
+    public String getClientNetAddress() {
+        return clientNetAddress;
+    }
+
+    public int getClientNetPort() {
+        return clientNetPort;
+    }
 }
\ No newline at end of file
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/context/ICCContext.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/context/ICCContext.java
index abd9c20..7466276 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/context/ICCContext.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/context/ICCContext.java
@@ -17,6 +17,10 @@
 import java.util.Map;
 import java.util.Set;
 
+import edu.uci.ics.hyracks.api.client.ClusterControllerInfo;
+
 public interface ICCContext {
+    public ClusterControllerInfo getClusterControllerInfo();
+
     public void getIPAddressNodeMap(Map<String, Set<String>> map) throws Exception;
 }
\ No newline at end of file
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 d3e472b..ebeb8a6 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
@@ -142,6 +142,11 @@
                 GetIpAddressNodeNameMapWork ginmw = new GetIpAddressNodeNameMapWork(ClusterControllerService.this, map);
                 workQueue.scheduleAndSync(ginmw);
             }
+
+            @Override
+            public ClusterControllerInfo getClusterControllerInfo() {
+                return info;
+            }
         };
         sweeper = new DeadNodeSweeper();
         jobCounter = 0;
@@ -155,8 +160,8 @@
         webServer.setPort(ccConfig.httpPort);
         webServer.start();
         workQueue.start();
-        info = new ClusterControllerInfo();
-        info.setWebPort(webServer.getListeningPort());
+        info = new ClusterControllerInfo(ccConfig.clientNetIpAddress, ccConfig.clientNetPort,
+                webServer.getListeningPort());
         timer.schedule(sweeper, 0, ccConfig.heartbeatPeriod);
         jobLog.open();
         LOGGER.log(Level.INFO, "Started ClusterControllerService");