[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-16 Thread Till Rohrmann (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908841#comment-16908841
 ] 

Till Rohrmann commented on FLINK-13588:
---

Thanks for opening ta PR [~johnlon]. I'll take a look at the PR.

Just curious, where was the build hanging exactly?

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / Task
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Assignee: John Lonergan
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-15 Thread John Lonergan (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908529#comment-16908529
 ] 

John Lonergan commented on FLINK-13588:
---

See [https://github.com/apache/flink/pull/9456]

Hi done the work including test - trivial change.

Unfortunately I cannot verify the test as I couldn't work out how to make the 
existing build including tests on master run to completion without tests 
hanging for ages, and loads of errors.

I am using Java 8 221

Tried maven 3.1.1 and 3.2.5

No idea how to fix.

The following works but doesn't run tests 

{{mvn clean package -DskipTests # this will take up to 10 minutes}}



Also couldn't run test in IntelliJ getting error 

Error:java: invalid flag: --add-exports=java.base/sun.net.util=ALL-UNNAMED

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / Task
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Assignee: John Lonergan
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-14 Thread Till Rohrmann (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16907128#comment-16907128
 ] 

Till Rohrmann commented on FLINK-13588:
---

Great, I've assigned you to this issue [~johnlon]. Now you could open a PR for 
this fix. Ping me and I'll review it. If you don't have time for this, then let 
me know and I'll do it.

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / Task
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Assignee: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-14 Thread John Lonergan (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16907109#comment-16907109
 ] 

John Lonergan commented on FLINK-13588:
---

Hi yes that's how we"fixed" it because it limits the change to a one liner.





> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / Task
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-14 Thread Till Rohrmann (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16907053#comment-16907053
 ] 

Till Rohrmann commented on FLINK-13588:
---

Ah I think I misunderstood the problem. You are proposing to do the following:

{code}
public void handleAsyncException(String message, Throwable exception) {
  if (isRunning) {
getEnvironment().failExternally(new AsyncFlinkException(message, 
exception));
  }
}
{code}
?

If that is the case, then I can assign you to this issue and you could then 
open a PR to fix it.

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / Task
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-08 Thread John Lonergan (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16903278#comment-16903278
 ] 

John Lonergan commented on FLINK-13588:
---

Don't agree.

If there is context then the code should not throw it away. Principal.

Without the exception message I cannot discover why the split failed.

For example we had a failure because of a zero byte avro file in hdfs. The
error message had the filename in it but the code throws it away.

As a result we had to write and run a separate trivial job that brute
forced reading all the files (100k) without flinks help.

The change is justified.
I don't think it's reasonable to throw this away. It looks like the error
handling /logging is a bit inconsistent for sure.

We are now running with a modified version of this class that wraps the
original exception into a runtime exception that includes the cause text.









> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-07 Thread Till Rohrmann (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901925#comment-16901925
 ] 

Till Rohrmann commented on FLINK-13588:
---

I think the rationale is that exceptions which occur after the task has stopped 
running should no longer be relevant and hence don't need to be logged. 
Exceptions could occur when shutting down the task, for example. This is 
expected and should not be reported. Does this make sense [~johnlon]?

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FLINK-13588) StreamTask.handleAsyncException throws away the exception cause

2019-08-06 Thread vinoyang (JIRA)


[ 
https://issues.apache.org/jira/browse/FLINK-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900947#comment-16900947
 ] 

vinoyang commented on FLINK-13588:
--

[~johnlon] I think your opinion is reasonable. I'd like to fix this issue. cc 
[~till.rohrmann]

> StreamTask.handleAsyncException throws away the exception cause
> ---
>
> Key: FLINK-13588
> URL: https://issues.apache.org/jira/browse/FLINK-13588
> Project: Flink
>  Issue Type: Bug
>Affects Versions: 1.8.1
>Reporter: John Lonergan
>Priority: Major
>
> Code below throws the reason 'message' away making it hard to diagnose why a 
> split has failed for instance.
>  
> {code:java}
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L909
> @Override
>   public void handleAsyncException(String message, Throwable exception) {
>   if (isRunning) {
>   // only fail if the task is still running
>   getEnvironment().failExternally(exception);
>   }
> }{code}
>  
> Need to pass the message through so that we see it in logs please.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)