[ https://issues.apache.org/jira/browse/PIG-5354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Koji Noguchi updated PIG-5354: ------------------------------ Attachment: pig-5354-v02.patch {quote} Yes. Apart from logs, the toString() is stored in configs, vertex descriptors and shown in Tez UI as well. Adding line= and offset= will be unnecessary repetition making it long and get it truncated more and make it not very readable there when there are too many aliases. {quote} Got it. Uploading a new patch (pig-5354-v02.patch). Since we can no longer rely on java's AbstractCollection toString()calling toString() on every items, I had to write the equivalent that prints out with line= and offset=. > Show fieldname and a line number for casting errors > --------------------------------------------------- > > Key: PIG-5354 > URL: https://issues.apache.org/jira/browse/PIG-5354 > Project: Pig > Issue Type: Improvement > Reporter: Koji Noguchi > Assignee: Koji Noguchi > Priority: Trivial > Attachments: pig-5354-v01.patch, pig-5354-v02.patch > > > One user had large number of casting in one foreach and wasn't able to tell > which casting was causing this error from the error message. > {noformat} > 2018-08-03 17:45:17,716 [ERROR] [TezChild] |runtime.PigProcessor|: > Encountered exception while processing: > org.apache.pig.backend.executionengine.ExecException: ERROR 0: Exception > while executing (Name: myprojection: Split - scope-41552 Operator Key: > scope-41552): org.apache.pig.backend.executionengine.ExecException: ERROR > 1074: Problem with formatting. Could not convert thisisnotanumber to Long. > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:315) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POSplit.getNextTuple(POSplit.java:208) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POSplit.runPipeline(POSplit.java:254) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POSplit.processPlan(POSplit.java:235) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POSplit.getNextTuple(POSplit.java:227) > at > org.apache.pig.backend.hadoop.executionengine.tez.runtime.PigProcessor.runPipeline(PigProcessor.java:378) > at > org.apache.pig.backend.hadoop.executionengine.tez.runtime.PigProcessor.run(PigProcessor.java:243) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1953) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1074: > Problem with formatting. Could not convert thisisnotanumber to Long. > at org.apache.pig.data.DataType.toLong(DataType.java:911) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.castBytesToLong(POCast.java:851) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNextLong(POCast.java:764) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:349) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getInputData(POForEach.java:531) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:398) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNextTuple(POForEach.java:343) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:305) > ... 19 more > Caused by: java.lang.NumberFormatException: For input string: > "thisisnotanumber" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.lang.Long.parseLong(Long.java:589) > at java.lang.Long.valueOf(Long.java:803) > at org.apache.pig.data.DataType.toLong(DataType.java:880) > ... 26 more > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)