You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2016/09/01 21:21:20 UTC

[jira] [Updated] (PIG-5020) Give file location for loadcaster related warning and errors

     [ https://issues.apache.org/jira/browse/PIG-5020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Noguchi updated PIG-5020:
------------------------------
    Attachment: pig-5020-v01.patch

Work in progress.

With the patch and using a sample code used in PIG-4974 (before the fix), 

(1) pig compiler will now show (LogicalPlan.java was somehow not logging before) 

{panel}
2016-09-01 17:12:17,271 \[main] WARN  org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning NO_LOAD_FUNCTION_FOR_CASTING_BYTEARRAY 1 time(s).
{panel}

(2) With {{-Daggregate.warning=false}}, it'll expand the above as 
{panel}
2016-09-01 17:17:00,921 \[main] WARN  org.apache.pig.newplan.BaseOperatorPlan - Cannot resolve load function to use for casting from bytearray to chararray at <file ./test.pig, line 3, column 32>
{panel}

(3) And when the job fail due to not having a loadcaster, it'll show 

{panel}
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1075: Received a bytearray from the UDF or Union from two different Loaders. Cannot determine how to convert the bytearray to string for \[e\[3,32]]
{panel}

Difference is the last part {{for \[e\[3,32]]}} where it shows the alias, line number and column.

> Give file location for loadcaster related warning and errors
> ------------------------------------------------------------
>
>                 Key: PIG-5020
>                 URL: https://issues.apache.org/jira/browse/PIG-5020
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>         Attachments: pig-5020-v01.patch
>
>
> Loadcaster can be null due to bug like PIG-4974, or due to valid reasons when bytearray is returned by UDF or bytearray coming from union-ed relation with two different loadcasters.
> And when casting fails at runtime, it's sometimes not straightforward to find the corresponding typecast that's failing in your script.
> {noformat}
> Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1075: Received a bytearray from the UDF or Union from two different Loaders. Cannot determine how to convert the bytearray to string.
>         at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNextString(POCast.java:1122)
> {noformat}
> Maybe we can add source location when possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)