pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r748356 - in /hadoop/pig/trunk/src/org/apache/pig: PigWarning.java backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
Date Fri, 27 Feb 2009 00:14:13 GMT
Author: sms
Date: Fri Feb 27 00:14:12 2009
New Revision: 748356

URL: http://svn.apache.org/viewvc?rev=748356&view=rev
Log:
PIG-591: Error handling phase four

Modified:
    hadoop/pig/trunk/src/org/apache/pig/PigWarning.java
    hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java

Modified: hadoop/pig/trunk/src/org/apache/pig/PigWarning.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/PigWarning.java?rev=748356&r1=748355&r2=748356&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/PigWarning.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/PigWarning.java Fri Feb 27 00:14:12 2009
@@ -22,40 +22,41 @@
  * 
  */
 public enum PigWarning {
-	DID_NOT_FIND_LOAD_ONLY_MAP_PLAN,
-	DIVIDE_BY_ZERO,
-	FIELD_DISCARDED,
-	GROUP_BY_INCOMPATIBLE_TYPES,
-	IMPLICIT_CAST_TO_BAG,
-	IMPLICIT_CAST_TO_CHARARRAY,
-	IMPLICIT_CAST_TO_DOUBLE,
-	IMPLICIT_CAST_TO_FLOAT,
-	IMPLICIT_CAST_TO_INT,
-	IMPLICIT_CAST_TO_LONG,
-	IMPLICIT_CAST_TO_MAP,
-	IMPLICIT_CAST_TO_TUPLE,
-	TOO_LARGE_FOR_INT,
-	MULTI_LEAF_MAP,
-	MULTI_LEAF_REDUCE,
-	NON_PACKAGE_REDUCE_PLAN_ROOT,
-	NON_EMPTY_COMBINE_PLAN,
-	PROGRESS_REPORTER_NOT_PROVIDED,
-	REDUCE_PLAN_NOT_EMPTY_WHILE_MAP_PLAN_UNDER_PROCESS,
-	UDF_WARNING_1, //placeholder for UDF warnings
-	UDF_WARNING_2, //placeholder for UDF warnings
-	UDF_WARNING_3, //placeholder for UDF warnings
-	UDF_WARNING_4, //placeholder for UDF warnings
-	UDF_WARNING_5, //placeholder for UDF warnings
-	UDF_WARNING_6, //placeholder for UDF warnings
-	UDF_WARNING_7, //placeholder for UDF warnings
-	UDF_WARNING_8, //placeholder for UDF warnings
-	UDF_WARNING_9, //placeholder for UDF warnings
-	UDF_WARNING_10, //placeholder for UDF warnings
-	UDF_WARNING_11,	//placeholder for UDF warnings
-	UDF_WARNING_12,	//placeholder for UDF warnings
-	UNABLE_TO_CREATE_FILE_TO_SPILL,
-	UNABLE_TO_SPILL,
-	UNABLE_TO_CLOSE_SPILL_FILE,
-	UNREACHABLE_CODE_BOTH_MAP_AND_REDUCE_PLANS_PROCESSED,
-	USING_OVERLOADED_FUNCTION;
+    ACCESSING_NON_EXISTENT_FIELD,
+    DID_NOT_FIND_LOAD_ONLY_MAP_PLAN,
+    DIVIDE_BY_ZERO,
+    FIELD_DISCARDED,
+    GROUP_BY_INCOMPATIBLE_TYPES,
+    IMPLICIT_CAST_TO_BAG,
+    IMPLICIT_CAST_TO_CHARARRAY,
+    IMPLICIT_CAST_TO_DOUBLE,
+    IMPLICIT_CAST_TO_FLOAT,
+    IMPLICIT_CAST_TO_INT,
+    IMPLICIT_CAST_TO_LONG,
+    IMPLICIT_CAST_TO_MAP,
+    IMPLICIT_CAST_TO_TUPLE,
+    TOO_LARGE_FOR_INT,
+    MULTI_LEAF_MAP,
+    MULTI_LEAF_REDUCE,
+    NON_PACKAGE_REDUCE_PLAN_ROOT,
+    NON_EMPTY_COMBINE_PLAN,
+    PROGRESS_REPORTER_NOT_PROVIDED,
+    REDUCE_PLAN_NOT_EMPTY_WHILE_MAP_PLAN_UNDER_PROCESS,
+    UDF_WARNING_1, //placeholder for UDF warnings
+    UDF_WARNING_2, //placeholder for UDF warnings
+    UDF_WARNING_3, //placeholder for UDF warnings
+    UDF_WARNING_4, //placeholder for UDF warnings
+    UDF_WARNING_5, //placeholder for UDF warnings
+    UDF_WARNING_6, //placeholder for UDF warnings
+    UDF_WARNING_7, //placeholder for UDF warnings
+    UDF_WARNING_8, //placeholder for UDF warnings
+    UDF_WARNING_9, //placeholder for UDF warnings
+    UDF_WARNING_10, //placeholder for UDF warnings
+    UDF_WARNING_11,	//placeholder for UDF warnings
+    UDF_WARNING_12,	//placeholder for UDF warnings
+    UNABLE_TO_CREATE_FILE_TO_SPILL,
+    UNABLE_TO_SPILL,
+    UNABLE_TO_CLOSE_SPILL_FILE,
+    UNREACHABLE_CODE_BOTH_MAP_AND_REDUCE_PLANS_PROCESSED,
+    USING_OVERLOADED_FUNCTION;
 }

Modified: hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java?rev=748356&r1=748355&r2=748356&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
Fri Feb 27 00:14:12 2009
@@ -22,6 +22,7 @@
 import java.util.ArrayList;
 
 import org.apache.pig.PigException;
+import org.apache.pig.PigWarning;
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.data.BagFactory;
 import org.apache.pig.data.DataBag;
@@ -147,8 +148,10 @@
             try {
                 ret = inpValue.get(columns.get(0));
             } catch (ExecException ee) {
-                log.warn("Attempt to access field " + 
-                    " which was not found in the input");
+                if(pigLogger != null) {
+                    pigLogger.warn(this,"Attempt to access field " + 
+                            "which was not found in the input", PigWarning.ACCESSING_NON_EXISTENT_FIELD);
+                }
                 res.returnStatus = POStatus.STATUS_OK;
                 ret = null;
             }
@@ -159,8 +162,10 @@
                 try { 
                     objList.add(inpValue.get(i)); 
                 } catch (ExecException ee) {
-                    log.warn("Attempt to access field " + i +
-                        " which was not found in the input");
+                    if(pigLogger != null) {
+                        pigLogger.warn(this,"Attempt to access field " + i +
+                                " which was not found in the input", PigWarning.ACCESSING_NON_EXISTENT_FIELD);
+                    }
                     objList.add(null);
                 }
             }



Mime
View raw message