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_r362137719
##########
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:
Nothing off the top of my head that would make it any better. It looks like
the client handles printing out enough information. We can always come back
and add more logging if we run into issues or someone requests it.
----------------------------------------------------------------
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