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

Dian Fu closed FLINK-23931.
---------------------------
    Resolution: Fixed

Merged to
- master via 9652fd3161eb939da94de6d6e87983a739cfcd25
- release-1.13 via 50572fb7fdcc0824149bcd37c00d4f68e7ca4efb

> Format the exception message shown in PythonDriver
> --------------------------------------------------
>
>                 Key: FLINK-23931
>                 URL: https://issues.apache.org/jira/browse/FLINK-23931
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Python
>            Reporter: Dian Fu
>            Assignee: Dian Fu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.14.0, 1.13.3
>
>
> It will show messages like the following if the job could not compile in 
> PythonDriver:
> {code:java}
> 2021-08-24 13:33:45,014 INFO org.apache.flink.client.python.PythonDriver [] - 
> --------------------------- Python Process Started --------------------------
> 2021-08-24 13:33:47,709 INFO org.apache.flink.client.python.PythonDriver [] - 
> Traceback (most recent call last):
> 2021-08-24 13:33:47,709 INFO org.apache.flink.client.python.PythonDriver [] - 
> File 
> "/Users/dianfu/code/src/workspace/pyflink-examples/datastream/test_chaining.py",
>  line 147, in <module>
> 2021-08-24 13:33:47,709 INFO org.apache.flink.client.python.PythonDriver [] - 
> test_chaining_2()
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> File 
> "/Users/dianfu/code/src/workspace/pyflink-examples/datastream/test_chaining.py",
>  line 141, in test_chaining_2
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> statement_set.execute().wait()
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> File 
> "/Users/dianfu/venv/examples-37/lib/python3.7/site-packages/pyflink/table/statement_set.py",
>  line 147, in execute
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> return TableResult(self._j_statement_set.execute())
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> File 
> "/Users/dianfu/venv/examples-37/lib/python3.7/site-packages/py4j/java_gateway.py",
>  line 1286, in __call__
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> answer, self.gateway_client, self.target_id, self.name)
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> File 
> "/Users/dianfu/venv/examples-37/lib/python3.7/site-packages/pyflink/util/exceptions.py",
>  line 158, in deco
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> raise java_exception
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> pyflink.util.exceptions.TableException: 
> org.apache.flink.table.api.TableException: Sink 
> `default_catalog`.`default_database`.`print_3` does not exists
> 2021-08-24 13:33:47,710 INFO org.apache.flink.client.python.PythonDriver [] - 
> at 
> org.apache.flink.table.planner.delegation.PlannerBase.translateToRel(PlannerBase.scala:254)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at 
> org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:182)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at 
> org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:182)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.Iterator$class.foreach(Iterator.scala:891)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
> 2021-08-24 13:33:47,711 INFO org.apache.flink.client.python.PythonDriver [] - 
> at scala.collection.AbstractTraversable.map(Traversable.scala:104)
> {code}
> The format could be improved to make it more readable by removing the prefix 
> **INFO org.apache.flink.client.python.PythonDriver** in each line.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to