cleanup rewriter

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_job_rewriter@2969 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
index 4d6abcf..573f105 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/ActivityClusterGraphRewriter.java
@@ -39,6 +39,7 @@
 
 public class ActivityClusterGraphRewriter implements Serializable {
     private static final long serialVersionUID = 1L;
+    private static String ONE_TO_ONE_CONNECTOR = "OneToOneConnectorDescriptor";
 
     public void rewrite(ActivityClusterGraph acg) {
         acg.getActivityMap().clear();
@@ -170,16 +171,13 @@
                                 .get(outputConn.getConnectorId());
                         IActivity newActivity = endPoints.getRight().getLeft();
                         SuperActivity existingSuperActivity = invertedActivitySuperActivityMap.get(newActivity);
-                        if (outputConn.getClass().getName().contains("OneToOneConnectorDescriptor")) {
+                        if (outputConn.getClass().getName().contains(ONE_TO_ONE_CONNECTOR)) {
                             /**
                              * expend the super activity cluster on an one-to-one out-bound connection
                              */
                             if (existingSuperActivity == null) {
                                 superActivity.addActivity(newActivity);
                                 toBeExpended.add(newActivity);
-                                if (newActivity.getClass().getName().contains("SortActivity")) {
-                                    System.out.println(newActivity);
-                                }
                                 invertedActivitySuperActivityMap.put(newActivity, superActivity);
                             } else {
                                 /**
@@ -248,7 +246,7 @@
             int consumerPort = endPoints.getRight().getRight();
             RecordDescriptor recordDescriptor = connRecordDesc.get(connectorId);
             IConnectorDescriptor conn = connMap.get(connectorId);
-            if (conn.getClass().getName().contains("OneToOneConnectorDescriptor")) {
+            if (conn.getClass().getName().contains(ONE_TO_ONE_CONNECTOR)) {
                 /**
                  * connection edge between inner activities
                  */
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivity.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivity.java
index ce5214d..f78cfda 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivity.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivity.java
@@ -122,6 +122,6 @@
     
     @Override
     public String toString(){
-        return getActivityMap().toString();
+        return getActivityMap().values().toString();
     }
 }
\ No newline at end of file
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
index 10842bd..a1a0f1a 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
@@ -217,7 +217,7 @@
 
     @Override
     public String getDisplayName() {
-        return "Meta Activity";
+        return "Super Activity " + parent.getActivityMap().values().toString();
     }
 
 }