[ https://issues.apache.org/jira/browse/FLINK-5488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated FLINK-5488: -------------------------- Description: 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. was: 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. > 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 > 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.4#6332)