joshfischer1108 commented on a change in pull request #3426: WIP: Updated to
support Kubernetes 1.16
URL: https://github.com/apache/incubator-heron/pull/3426#discussion_r361853285
##########
File path:
heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/AppsV1Controller.java
##########
@@ -97,20 +95,13 @@ boolean submit(PackingPlan packingPlan) {
for (PackingPlan.ContainerPlan containerPlan :
packingPlan.getContainers()) {
numberOfInstances = Math.max(numberOfInstances,
containerPlan.getInstances().size());
}
- final V1beta1StatefulSet statefulSet =
createStatefulSet(containerResource, numberOfInstances);
+ final V1StatefulSet statefulSet = createStatefulSet(containerResource,
numberOfInstances);
try {
- final Response response =
- client.createNamespacedStatefulSetCall(getNamespace(), statefulSet,
null,
- null, null).execute();
- if (!response.isSuccessful()) {
- LOG.log(Level.SEVERE, "Error creating topology message: " +
response.message());
- KubernetesUtils.logResponseBodyIfPresent(LOG, response);
- // construct a message based on the k8s API server response
- throw new TopologySubmissionException(
- KubernetesUtils.errorMessageFromResponse(response));
- }
- } catch (IOException | ApiException e) {
+ final V1StatefulSet response =
+ client.createNamespacedStatefulSet(getNamespace(), statefulSet, null,
Review comment:
Should we check if the response is successful here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services