surahman commented on a change in pull request #3725:
URL: https://github.com/apache/incubator-heron/pull/3725#discussion_r743766976
##########
File path:
heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
##########
@@ -130,6 +137,18 @@ boolean submit(PackingPlan packingPlan) {
throw new TopologySubmissionException(e.getMessage());
}
+ // Get and then create Persistent Volume Claims from the CLI.
+ persistentVolumeClaimConfigs =
KubernetesContext.getPersistentVolumeClaims(getConfiguration());
+ if (KubernetesContext.getPersistentVolumeClaimDisabled(getConfiguration())
+ && !persistentVolumeClaimConfigs.isEmpty()) {
+ final String message =
+ String.format("Loading Persistent Volume Claim from CLI is disabled:
'%s'", topologyName);
Review comment:
Thank you @nwangtw for taking a look at this! 😄
> This error message is not very clear. From the if statement it looks like
when the PVC configs exist but PVC is disabled, the topology cannot be
submitted? Also, Is it the expected behavior?
You are correct, if a PVC is provided on the CLI but the option is disabled
there will be a hard failure. This is so there are no unwelcome surprises in
the event a topology is expecting for there to be a PVC.
I will try to reword the error message to make it clearer.
> Also, it seems like you have a check of `persistentVolumeClaimConfigs !=
null` later. Do we need to check it here?
Good catch! I need to be more consistent. After `getPersistentVolumeClaims`
is called the data structure will either be empty or fully populated. This was
by design to avoid dealing with `nullptr` issues. I shall affect changes.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]