[ 
https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217923#comment-13217923
 ] 

Prashant Kommireddi commented on PIG-2515:
------------------------------------------

Thanks Russell, just looked at the new patch. It does not use warn(String msg, 
Enum warningEnum) from EvalFunc. Rather commons logging is being used. 

{code}
 try {
            result = parser.parseDateTime(date);
        } catch(Exception e) {
            warn("Could not parse date: " + date + " with format: " + format, 
PigWarning.UDF_WARNING_1);  //Use appropriate warning enum
            return null;
        }
{code}

Using commons logging could very easily fill up disk space on each of the data 
nodes (rendering the cluster inoperable until disk space is cleared) if there 
were a large number of parse exceptions.

                
> Make CustomFormatToISO return null on Exception in parsing dates
> ----------------------------------------------------------------
>
>                 Key: PIG-2515
>                 URL: https://issues.apache.org/jira/browse/PIG-2515
>             Project: Pig
>          Issue Type: Improvement
>          Components: piggybank
>    Affects Versions: 0.9.1, 0.9.2, 0.10, 0.11
>            Reporter: Russell Jurney
>            Assignee: Russell Jurney
>              Labels: date, datetime, datetimes, fun, happy, pants, pig, 
> piggybank
>             Fix For: 0.10, 0.11
>
>         Attachments: PIG-2515.2.patch, PIG-2515.logs.patch, PIG-2515.patch
>
>
> Dates are often ugly and malformed, and it is highly inconvenient for 
> CustomFormatToISO to kill an entire run because a single date does not 
> format.  As other string utilities in piggybank return null on error, so 
> should CustomFormatToISO.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to