Author: pradeepkth
Date: Mon Mar 23 18:01:18 2009
New Revision: 757473

URL: http://svn.apache.org/viewvc?rev=757473&view=rev
Log:
 PIG-627: multiquery support incremental patch (hagleitn via pradeepkth)

Modified:
    hadoop/pig/branches/multiquery/CHANGES.txt
    hadoop/pig/branches/multiquery/src/org/apache/pig/PigServer.java
    
hadoop/pig/branches/multiquery/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/DotPOPrinter.java
    
hadoop/pig/branches/multiquery/src/org/apache/pig/tools/grunt/GruntParser.java

Modified: hadoop/pig/branches/multiquery/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/multiquery/CHANGES.txt?rev=757473&r1=757472&r2=757473&view=diff
==============================================================================
--- hadoop/pig/branches/multiquery/CHANGES.txt (original)
+++ hadoop/pig/branches/multiquery/CHANGES.txt Mon Mar 23 18:01:18 2009
@@ -412,3 +412,5 @@
     PIG-627: multiquery support M2 (hagleitn via pradeepkth)
     
     PIG-627: multiquery support incremental patch (Richard Ding via pradeepkth)
+
+    PIG-627: multiquery support incremental patch (hagleitn via pradeepkth)

Modified: hadoop/pig/branches/multiquery/src/org/apache/pig/PigServer.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/multiquery/src/org/apache/pig/PigServer.java?rev=757473&r1=757472&r2=757473&view=diff
==============================================================================
--- hadoop/pig/branches/multiquery/src/org/apache/pig/PigServer.java (original)
+++ hadoop/pig/branches/multiquery/src/org/apache/pig/PigServer.java Mon Mar 23 
18:01:18 2009
@@ -689,9 +689,11 @@
             if(leaves.size() == 1) {
                 leaf = leaves.get(0);
             } else {
-                // should have exactly one leaf since we asked for a
-                // specific alias.
-                throw new AssertionError("Ceci n'est pas un bug.");
+                for (Iterator<LogicalOperator> it = leaves.iterator(); 
it.hasNext();) {
+                    LogicalOperator leafOp = it.next();
+                    if(leafOp.getAlias().equals(alias))
+                        leaf = leafOp;
+                }
             }
             
             lp = QueryParser.generateStorePlan(scope, lp, "fakefile", 

Modified: 
hadoop/pig/branches/multiquery/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/DotPOPrinter.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/multiquery/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/DotPOPrinter.java?rev=757473&r1=757472&r2=757473&view=diff
==============================================================================
--- 
hadoop/pig/branches/multiquery/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/DotPOPrinter.java
 (original)
+++ 
hadoop/pig/branches/multiquery/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/DotPOPrinter.java
 Mon Mar 23 18:01:18 2009
@@ -100,6 +100,9 @@
                 }
             }
         }
+        else if(op instanceof POSplit) {
+            plans.addAll(((POSplit)op).getPlans());
+        }
 
         return plans;
     }

Modified: 
hadoop/pig/branches/multiquery/src/org/apache/pig/tools/grunt/GruntParser.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/multiquery/src/org/apache/pig/tools/grunt/GruntParser.java?rev=757473&r1=757472&r2=757473&view=diff
==============================================================================
--- 
hadoop/pig/branches/multiquery/src/org/apache/pig/tools/grunt/GruntParser.java 
(original)
+++ 
hadoop/pig/branches/multiquery/src/org/apache/pig/tools/grunt/GruntParser.java 
Mon Mar 23 18:01:18 2009
@@ -213,6 +213,9 @@
 
             if (file.isDirectory()) {
                 mPigServer.explain(alias, format, isVerbose, target);
+                if (script != null) {
+                    discardBatch();
+                }
                 return;
             }
             else {
@@ -220,8 +223,14 @@
                     out = new PrintStream(new FileOutputStream(target));
                 }
                 catch (FileNotFoundException fnfe) {
+                    if (script != null) {
+                        discardBatch();
+                    }
                     throw new ParseException("File not found: " + target);
                 } catch (SecurityException se) {
+                    if (script != null) {
+                        discardBatch();
+                    }
                     throw new ParseException("Cannot access file: " + target);
                 }
             }
@@ -456,7 +465,7 @@
             else
             {    
                 job.killJob();
-                log.error("kill submited.");
+                log.error("kill submitted.");
             }
         }
     }


Reply via email to