Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Pig Wiki" for change 
notification.

The following page has been changed by SanthoshSrinivasan:
http://wiki.apache.org/pig/PigDeveloperCookbook

------------------------------------------------------------------------------
  
   * For `User Errors`, throw `ParseException` that contains meaningful 
message. For batch and interactive processing, catch the exception in Grunt and 
log the exception message to stderr. The same can be done with the developer in 
the embedded case. In debug mode, log the exception stack into the client side 
log.
   * For `Internal Errors`, throw `!RuntimeException` or its derivation. Catch 
the exception in main, log it, including the stack, to the client side log. 
Write failure message to stderr pointing to the log file.
-  * For `Frontend Errors`, throw newly created `FrontendException` that is a 
subclass of RuntimeException. Catch the exception in main, log it, including 
the stack, to the client side log. Write failure message to stderr pointing to 
the log file. In the future, we might find it useful to further subdivide this 
errors in which case we might subclass the `FrontendException` class. 
+  * For `Frontend Errors`, throw `FrontendException` or a subclass of 
`FrontendException`. Catch the exception in main, log it, including the stack, 
to the client side log. Write failure message to stderr pointing to the log 
file. The front-end consists of multiple components - parser, type checker, 
optimizer, translators, etc. All the errors from these components can be 
categorized as front-end errors. Components that are part of the front end will 
throw specific exceptions that capture the context. For example, the parser 
throws a `ParseException`, the type checker will throw a 
`TypeCheckerException`, etc. A list of the exceptions thrown in the front-end 
are as follows.
+ 
+    1. `FrontendException` Generic front-end exception (subclass of 
`PigException`)
+    1. `JobCreationException` Used for indicating errors during Map Reduce job 
creation (subclass of `FrontendException`)
+    1. `LogicalToPhysicalTranslatorException` Used for indicating errors 
during logical plan to physical plan translation (subclass of 
`VisitorException`)
+    1. `MRCompilerException` Used for indicating errors during map reduce plan 
compilation from physical plan (subclass of `VisitorException`)
+    1. `OptimizerException` Used for indicating errors during logical plan 
optimization (subclass of `FrontendException`)
+    1. `PigException` Generic exception in Pig (subclass of `IOException` and 
the superclass of all exceptions in Pig)
+    1. `PlanException` Used for indicating errors during plan/graph operations 
(subclass of `FrontendException`)
+    1. `PlanValidationException` Used for indicating errors during plan 
validation (subclass of `VisitorException`)
+    1. `SchemaMergeException` Used for indicating errors during schema merges 
(subclass of `FrontendException`)
+    1. `TypeCheckerException` Used for indicating errors due to type checking 
(subclass of `VisitorException`)
+    1. `VisitorException` Generic exception used for indicating errors when 
visiting a plan (subclass of `FrontendException`)
+ 
+  
   * For `Backend Errors` there will need to be backend specific way to get the 
error from the backend to the frontend. Once this is done, log the error into 
client side log file and throw `ExecuteException`. Catch the exception in main, 
log it, including the stack, to the client side log. Write failure message to 
stderr pointing to the log file.
   
  == Pig and Eclipse ==

Reply via email to