You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/07/08 12:43:12 UTC
[incubator-dlab] branch feature/projects updated: DLAB-856 fixed
bug connected with EMR creation on AWS
This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/feature/projects by this push:
new 613b0a2 DLAB-856 fixed bug connected with EMR creation on AWS
613b0a2 is described below
commit 613b0a2ba8e4ba509ffa0061f55f3be2b775a020
Author: bhliva <bo...@epam.com>
AuthorDate: Mon Jul 8 15:43:03 2019 +0300
DLAB-856 fixed bug connected with EMR creation on AWS
---
.../resources/aws/ComputationalResourceAws.java | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
index 68771ad..222d0b9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
@@ -279,16 +279,18 @@ public class ComputationalResourceAws implements ComputationalAPI {
".");
}
- int slaveSpotInstanceBidPct = formDTO.getSlaveInstanceSpotPctPrice();
- if (formDTO.getSlaveInstanceSpot() && (slaveSpotInstanceBidPct < configuration.getMinEmrSpotInstanceBidPct()
- || slaveSpotInstanceBidPct > configuration.getMaxEmrSpotInstanceBidPct())) {
- log.debug("Creating computational resource {} for user {} fail: Spot instances bidding percentage value " +
- "out of the boundaries. Minimum is {}, maximum is {}",
- formDTO.getName(), userInfo.getName(), configuration.getMinEmrSpotInstanceBidPct(),
- configuration.getMaxEmrSpotInstanceBidPct());
- throw new DlabException("Spot instances bidding percentage value out of the boundaries. Minimum is " +
- configuration.getMinEmrSpotInstanceBidPct() + ", maximum is " +
- configuration.getMaxEmrSpotInstanceBidPct() + ".");
+ if (formDTO.getSlaveInstanceSpotPctPrice() != null){
+ int slaveSpotInstanceBidPct = formDTO.getSlaveInstanceSpotPctPrice();
+ if (formDTO.getSlaveInstanceSpot() && (slaveSpotInstanceBidPct < configuration.getMinEmrSpotInstanceBidPct()
+ || slaveSpotInstanceBidPct > configuration.getMaxEmrSpotInstanceBidPct())) {
+ log.debug("Creating computational resource {} for user {} fail: Spot instances bidding percentage value " +
+ "out of the boundaries. Minimum is {}, maximum is {}",
+ formDTO.getName(), userInfo.getName(), configuration.getMinEmrSpotInstanceBidPct(),
+ configuration.getMaxEmrSpotInstanceBidPct());
+ throw new DlabException("Spot instances bidding percentage value out of the boundaries. Minimum is " +
+ configuration.getMinEmrSpotInstanceBidPct() + ", maximum is " +
+ configuration.getMaxEmrSpotInstanceBidPct() + ".");
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org