[jira] [Commented] (FLINK-12586) Stderr and stdout are reversed in OptimizerPlanEnvironment

2019-05-22 Thread Kazunori Shinhira (JIRA)


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

Kazunori Shinhira commented on FLINK-12586:
---

Thank you for your code [~fan_li_ya].

It is exactly what I expected.

It looks good to me.

> Stderr and stdout are reversed in OptimizerPlanEnvironment
> --
>
> Key: FLINK-12586
> URL: https://issues.apache.org/jira/browse/FLINK-12586
> Project: Flink
>  Issue Type: Bug
>  Components: Command Line Client
>Affects Versions: 1.7.2, 1.8.0
>Reporter: Kazunori Shinhira
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In OptimizerPlanEnvironment#getOptimizedPlan method, it looks like that 
> stdout is output as System.err and stderr is output as System.out.
> [https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/program/OptimizerPlanEnvironment.java#L107-L108]
>  
> I think, It should be like as bellow.
> {code:java}
> throw new ProgramInvocationException(
> "The program plan could not be fetched - the program aborted pre-maturely."
> + "\n\nSystem.err: " + (stdout.length() == 0 ? "(none)" : stderr)
> + "\n\nSystem.out: " + (stderr.length() == 0 ? "(none)" : stdout));
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-12586) Stderr and stdout are reversed in OptimizerPlanEnvironment

2019-05-22 Thread Liya Fan (JIRA)


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

Liya Fan commented on FLINK-12586:
--

Hi [~shinhira_kazunori], thanks for finding this problem. I have provided a 
fix. Please take a look.

> Stderr and stdout are reversed in OptimizerPlanEnvironment
> --
>
> Key: FLINK-12586
> URL: https://issues.apache.org/jira/browse/FLINK-12586
> Project: Flink
>  Issue Type: Bug
>  Components: Command Line Client
>Affects Versions: 1.7.2, 1.8.0
>Reporter: Kazunori Shinhira
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In OptimizerPlanEnvironment#getOptimizedPlan method, it looks like that 
> stdout is output as System.err and stderr is output as System.out.
> [https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/program/OptimizerPlanEnvironment.java#L107-L108]
>  
> I think, It should be like as bellow.
> {code:java}
> throw new ProgramInvocationException(
> "The program plan could not be fetched - the program aborted pre-maturely."
> + "\n\nSystem.err: " + (stdout.length() == 0 ? "(none)" : stderr)
> + "\n\nSystem.out: " + (stderr.length() == 0 ? "(none)" : stdout));
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)