Author: gates
Date: Tue Apr  1 16:44:17 2008
New Revision: 643649

URL: http://svn.apache.org/viewvc?rev=643649&view=rev
Log:
Removed typeName from Operator and its subclasses, as it is unnecessary.


Modified:
    
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java
    
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/POFilter.java
    
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/ConstantExpression.java
    
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/POProject.java
    
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/binaryExprOps/comparators/GreaterThanExpr.java
    incubator/pig/branches/types/src/org/apache/pig/impl/plan/Operator.java
    incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java
    incubator/pig/branches/types/test/org/apache/pig/test/TestOperatorPlan.java

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java 
(original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java 
Tue Apr  1 16:44:17 2008
@@ -80,11 +80,6 @@
     }
 
     @Override
-    public String typeName() {
-        return "LOSort";
-    }
-
-    @Override
     public Schema getSchema() throws IOException {
         if (!mIsSchemaComputed && (null == mSchema)) {
             // get our parent's schema

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/POFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/POFilter.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/POFilter.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/POFilter.java
 Tue Apr  1 16:44:17 2008
@@ -145,11 +145,6 @@
        }
 
        @Override
-       public String typeName() {
-               return getClass().getName();
-       }
-
-       @Override
        public void visit(PhyPlanVisitor v) throws ParseException {
                v.visitFilter(this);
        }

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/ConstantExpression.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/ConstantExpression.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/ConstantExpression.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/ConstantExpression.java
 Tue Apr  1 16:44:17 2008
@@ -54,11 +54,6 @@
        }
 
        @Override
-       public String typeName() {
-               return getClass().getName();
-       }
-
-       @Override
        public void visit(ExprPlanVisitor v) throws ParseException {
                v.visitConstant(this);
        }

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/POProject.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/POProject.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/POProject.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/POProject.java
 Tue Apr  1 16:44:17 2008
@@ -73,11 +73,6 @@
        }
 
        @Override
-       public String typeName() {
-               return getClass().getName();
-       }
-
-       @Override
        public void visit(ExprPlanVisitor v) throws ParseException {
                v.visitProject(this);
        }

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/binaryExprOps/comparators/GreaterThanExpr.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/binaryExprOps/comparators/GreaterThanExpr.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/binaryExprOps/comparators/GreaterThanExpr.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/topLevelOperators/expressionOperators/binaryExprOps/comparators/GreaterThanExpr.java
 Tue Apr  1 16:44:17 2008
@@ -29,11 +29,6 @@
        }
 
        @Override
-       public String typeName() {
-               return getClass().getName();
-       }
-
-       @Override
        public void visit(ExprPlanVisitor v) throws ParseException {
                v.visitGreaterThan(this);
        }

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/plan/Operator.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/plan/Operator.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- incubator/pig/branches/types/src/org/apache/pig/impl/plan/Operator.java 
(original)
+++ incubator/pig/branches/types/src/org/apache/pig/impl/plan/Operator.java Tue 
Apr  1 16:44:17 2008
@@ -80,10 +80,6 @@
 
     public abstract String name();
 
-    public String typeName() {
-        return this.getClass().getName();
-    }
-
     @Override
     public String toString() {
         StringBuilder msg = new StringBuilder();

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java 
(original)
+++ incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java 
Tue Apr  1 16:44:17 2008
@@ -133,7 +133,7 @@
         if (mFromEdges.get(from) != null &&
                 !from.supportsMultipleOutputs()) {
             throw new IOException("Attempt to give operator of type " +
-                from.typeName() + " multiple outputs.  This operator does "
+                from.getClass().getName() + " multiple outputs.  This operator 
does "
                 + "not support multiple outputs.");
         }
 
@@ -142,7 +142,7 @@
         if (mToEdges.get(to) != null &&
                 !to.supportsMultipleInputs()) {
             throw new IOException("Attempt to give operator of type " +
-                from.typeName() + " multiple inputs.  This operator does "
+                from.getClass().getName() + " multiple inputs.  This operator 
does "
                 + "not support multiple inputs.");
         }
 

Modified: 
incubator/pig/branches/types/test/org/apache/pig/test/TestOperatorPlan.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestOperatorPlan.java?rev=643649&r1=643648&r2=643649&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestOperatorPlan.java 
(original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestOperatorPlan.java 
Tue Apr  1 16:44:17 2008
@@ -82,9 +82,6 @@
             return mName;
         }
 
-        public String typeName() {
-            return "Single";
-        }
     }
 
     class MultiOperator extends TOperator {
@@ -108,9 +105,6 @@
             return mName;
         }
 
-        public String typeName() {
-            return "Multi";
-        }
     }
 
     class TPlan extends OperatorPlan<TOperator> {
@@ -323,7 +317,8 @@
         try {
             plan.connect(bogus, ops[1]);
         } catch (IOException ioe) {
-            assertEquals("Attempt to give operator of type Single " +
+            assertEquals("Attempt to give operator of type " +
+                "org.apache.pig.test.TestOperatorPlan$SingleOperator " +
                 "multiple inputs.  This operator does "
                 + "not support multiple inputs.", ioe.getMessage());
             sawError = true;
@@ -337,13 +332,15 @@
         try {
             plan.connect(ops[0], bogus);
         } catch (IOException ioe) {
-            assertEquals("Attempt to give operator of type Single " +
+            assertEquals("Attempt to give operator of type " +
+                "org.apache.pig.test.TestOperatorPlan$SingleOperator " +
                 "multiple outputs.  This operator does "
                 + "not support multiple outputs.", ioe.getMessage());
             sawError = true;
         }
         assertTrue("Should have caught an error when we tried to connect a "
-            + "second output to a Single", sawError);
+            + "second output to a " +
+            "org.apache.pig.test.TestOperatorPlan$SingleOperator", sawError);
         plan.remove(bogus);
 
         // Successor for ops[1] should be ops[2]


Reply via email to