Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5232#discussion_r161094149
--- Diff:
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
---
@@ -367,40 +366,31 @@ public ClusterClient retrieve(String applicationID) {
flinkConfiguration,
false);
} catch (Exception e) {
- throw new RuntimeException("Couldn't retrieve Yarn
cluster", e);
+ throw new ClusterRetrieveException("Couldn't retrieve
Yarn cluster", e);
}
}
@Override
- public YarnClusterClient deploySessionCluster(ClusterSpecification
clusterSpecification) {
+ public YarnClusterClient deploySessionCluster(ClusterSpecification
clusterSpecification) throws ClusterDeploymentException {
try {
return deployInternal(
clusterSpecification,
getYarnSessionClusterEntrypoint(),
null);
} catch (Exception e) {
- throw new RuntimeException("Couldn't deploy Yarn
session cluster", e);
+ throw new ClusterDeploymentException("Couldn't deploy
Yarn session cluster", e);
}
}
@Override
- public YarnClusterClient deployJobCluster(ClusterSpecification
clusterSpecification, JobGraph jobGraph) {
+ public YarnClusterClient deployJobCluster(ClusterSpecification
clusterSpecification, JobGraph jobGraph) throws ClusterDeploymentException {
try {
return deployInternal(
clusterSpecification,
getYarnJobClusterEntrypoint(),
jobGraph);
} catch (Exception e) {
- throw new RuntimeException("Could not deploy Yarn job
cluster.", e);
- }
- }
-
- @Override
--- End diff --
Good catch. Will add it.
---