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/PigErrorHandlingFunctionalSpecification ------------------------------------------------------------------------------ The execution pipeline, the operators that form the pipeline and the map reduce classes fall into the back-end. The errors that occur in the back-end are generally at run-time. Exceptions such as `ExecException` and `RunTimeException` fall into this category. These errors will be propagated to the user facing system and an appropriate error message indicating the source of the error will be displayed. === Internal errors === - Any error that is not reported via an explicit exception is indicative of a bug in the system. Such errors are flagged as internal errors and will be reported as possible bugs. + Any error that is not reported via an explicit exception is indicative of a bug in the system. Such errors are flagged as internal errors and will be reported as possible bugs. Any non Hadoop backend error is a bug in Pig. While the aforementioned errors describe a developer's viewpoint of errors, the user is interested in the source of the errors. A classification of the source of errors is given below. @@ -38, +38 @@ == Error codes == - Error codes are categorized into ranges depending on the nature of the error. The following table indicates the ranges for the error types in Pig. Normally, errors due to user input and bugs in the software are not retriable. Errors due to the user environment and remote environment may be retriable based on the context. + Error codes are categorized into ranges depending on the nature of the error. The following table indicates the ranges for the error types in Pig. Normally, errors due to user input and bugs in the software are not retriable. Errors due to the user environment and remote environment may be retriable based on the context. Error codes will be used for documentation to help users address common errors. || '''Error type''' || '''Range''' || || User Input || 1000 - 1999 || @@ -49, +49 @@ || Remote Environment || 6000 - 6999 || - Programmatic access via Java APIs can query if exceptions are retriable or not. For external processes that rely on the return code of the process, the table given below will indicate the status of the process execution. + Programmatic access via Java APIs can query if exceptions are retriable or not. For external processes that rely on the return code of the process, the table given below will indicate the status of the process execution. Front-end exceptions will result in failures as far the user is concerned. Hadoop's errors are not retriable and return fatal error code (2). || '''Status''' || '''Return Code''' || || Successful Execution || 0 || || Retriable error || 1 || || Fatal error || 2 || + + == Error message == + + The format of the error message shown to the user will be as follows: + + ERROR <Error code>: <Error message> + + E.g.: ERROR 1005: The arity of the group by columns do not match. == Requirement on UDF authors == @@ -74, +82 @@ 1. -wagg to turn on warning aggregation; by default warning aggregation is turned off. 2. -v to include printing error messages on screen; by default error messages will be written to client side log. Using -v will also print the messages on the screen - 3. -l directory where the client side log is stored; by default, logs will be stored in the current working directory and named pig_<pid>.log + 3. -l directory where the client side log is stored; by default, logs will be stored in the current working directory and named pig_<datestamp>_<pid>.log. When used in batch mode (i.e., when a script to be executed is provided), the log file name will also contain the name of the script - pig_<datestam>_<pig>_<pig_file>.log. == Compendium of error messages ==
