You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Russell Jurney (Created) (JIRA)" <ji...@apache.org> on 2012/02/07 04:01:00 UTC

[jira] [Created] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

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


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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney updated PIG-2515:
--------------------------------

    Attachment: PIG-2515.patch

Patch to make CustomFormatToISO catch exceptions on parsing dates and return null instead of dying.
                
> 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
>              Labels: date, datetime, datetimes, fun, happy, pants, pig, piggybank
>         Attachments: 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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney updated PIG-2515:
--------------------------------

    Status: Patch Available  (was: Reopened)

This patch adds log errors before returning null on a parse exception.

This patch does not include the test that is in .2.patch.  I don't know how to combine patches and I already committed that one locally.  Poop.
                
> 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217772#comment-13217772 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

What is the API to use to throw warnings?
                
> 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.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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206625#comment-13206625 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

Will do re: tests.  Does this patch complain/warn about the problem records?
                
> 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.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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Daniel Dai (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2515:
----------------------------

      Resolution: Fixed
    Hadoop Flags: Reviewed
          Status: Resolved  (was: Patch Available)

Patch is already committed to 0.10/trunk.
                
> 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-2505.3.patch, PIG-2505.4.patch, 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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney updated PIG-2515:
--------------------------------

    Attachment: PIG-2515.logs.patch

This patches CustomFormatToISO to log warning before returning null on a parse error exception.

This patch does not include the test Dmitriy wrote.  I am not good at git and patch.  I wish I could just submit a pull request.  Down with svn, up with github.
                
> 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218713#comment-13218713 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

The previous patch IS intended for inclusion.
                
> 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-2505.3.patch, 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Daniel Dai (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229775#comment-13229775 ] 

Daniel Dai commented on PIG-2515:
---------------------------------

Patch does not apply. Is some part of the patch already committed?
                
> 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-2505.3.patch, PIG-2505.4.patch, 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218734#comment-13218734 ] 

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

Minor - don't need this anymore. 
{code}
private static final Log log = LogFactory.getLog(CustomFormatToISO.class);
{code}


                
> 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-2505.3.patch, 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

        

[jira] [Assigned] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Dmitriy V. Ryaboy (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitriy V. Ryaboy reassigned PIG-2515:
--------------------------------------

    Assignee: Russell Jurney
    
> 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
>         Attachments: 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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney updated PIG-2515:
--------------------------------

    Attachment: PIG-2505.3.patch

Changed from log to warn, again missing tests that are included in previous commit.
                
> 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-2505.3.patch, 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

        

[jira] [Reopened] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney reopened PIG-2515:
---------------------------------


Adding log warnings for returning null on an erroneous parse fail execution exception submodule problem definition.
                
> 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.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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Dmitriy V. Ryaboy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitriy V. Ryaboy updated PIG-2515:
-----------------------------------

    Attachment: PIG-2515.2.patch

Attaching a version of the patch with a test.
Russ, please start writing tests :).

All piggybank tests pass.

Committing to 10 and trunk.
                
> 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
>         Attachments: PIG-2515.2.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

        

[jira] [Updated] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell Jurney updated PIG-2515:
--------------------------------

    Attachment: PIG-2505.4.patch

This patch works.  It does warnings, but I can't see them.  It still doesn't include Dmitriy's unit tests, but the other patch from him does.
                
> 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-2505.3.patch, PIG-2505.4.patch, 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206638#comment-13206638 ] 

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

Does not look like there is a warning Russell, it would be good to include that so the Counters pick it up automatically.
{code}
        DateTime result;
        try {
            result = parser.parseDateTime(date);
        } catch(Exception e) {
            //warn(message, PigWarning)
            return null;
        }
{code}


                
> 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.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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217775#comment-13217775 ] 

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

http://pig.apache.org/docs/r0.9.1/api/org/apache/pig/EvalFunc.html#warn%28java.lang.String,%20java.lang.Enum%29
                
> 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.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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218689#comment-13218689 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

I can't find docs on the actual meaning of PigWarning.UDF_WARNING_1 or the others, so I am using that one.
                
> 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218728#comment-13218728 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

The previous patch fails to build. Oh man I suck at JIRA.
                
> 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-2505.3.patch, 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

        

[jira] [Commented] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Russell Jurney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218747#comment-13218747 ] 

Russell Jurney commented on PIG-2515:
-------------------------------------

Ok, patch 4 has the code for main/, and part of patch 2 contains the unit tests.
                
> 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-2505.3.patch, PIG-2505.4.patch, 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

        

[jira] [Resolved] (PIG-2515) Make CustomFormatToISO return null on Exception in parsing dates

Posted by "Dmitriy V. Ryaboy (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitriy V. Ryaboy resolved PIG-2515.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11
                   0.10
    
> 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.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