flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5488) yarnClient should be closed in AbstractYarnClusterDescriptor for error conditions
Date Mon, 01 May 2017 17:35:04 GMT

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

Ted Yu commented on FLINK-5488:
-------------------------------

Here is another example from AbstractYarnClusterDescriptor#retrieve() :
{code}
      return createYarnClusterClient(this, yarnClient, appReport, flinkConfiguration, sessionFilesDir,
false);
    } catch (Exception e) {
      throw new RuntimeException("Couldn't retrieve Yarn cluster", e);
{code}

> yarnClient should be closed in AbstractYarnClusterDescriptor for error conditions
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-5488
>                 URL: https://issues.apache.org/jira/browse/FLINK-5488
>             Project: Flink
>          Issue Type: Bug
>          Components: YARN
>            Reporter: Ted Yu
>
> Here is one example:
> {code}
>     if(jobManagerMemoryMb > maxRes.getMemory() ) {
>       failSessionDuringDeployment(yarnClient, yarnApplication);
>       throw new YarnDeploymentException("The cluster does not have the requested resources
for the JobManager available!\n"
>         + "Maximum Memory: " + maxRes.getMemory() + "MB Requested: " + jobManagerMemoryMb
+ "MB. " + NOTE);
>     }
> {code}
> yarnClient implements Closeable.
> It should be closed in situations where exception is thrown.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message