This is an automated email from the ASF dual-hosted git repository.
ykinash pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/develop by this push:
new b11ed90 [DATALAB] -- fixed bug with wrong count param for Spark
b11ed90 is described below
commit b11ed90082c93663db064dfb1d2d728d5c709764
Author: KinashYurii <[email protected]>
AuthorDate: Thu Jun 24 14:09:07 2021 +0300
[DATALAB] -- fixed bug with wrong count param for Spark
---
.../gcp/computational/SparkComputationalCreateGcp.java | 15 ++++-----------
.../com/epam/datalab/backendapi/util/RequestBuilder.java | 12 +++++++++---
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git
a/services/datalab-model/src/main/java/com/epam/datalab/dto/gcp/computational/SparkComputationalCreateGcp.java
b/services/datalab-model/src/main/java/com/epam/datalab/dto/gcp/computational/SparkComputationalCreateGcp.java
index 57e1d8d..475f100 100644
---
a/services/datalab-model/src/main/java/com/epam/datalab/dto/gcp/computational/SparkComputationalCreateGcp.java
+++
b/services/datalab-model/src/main/java/com/epam/datalab/dto/gcp/computational/SparkComputationalCreateGcp.java
@@ -30,12 +30,10 @@ import java.util.List;
@ToString
public class SparkComputationalCreateGcp extends
ComputationalBase<SparkComputationalCreateGcp> {
- @JsonProperty("dataengine_master_instance_count")
- private String masterDataEngineInstanceCount;
+ @JsonProperty("dataengine_instance_count")
+ private String dataengineInstanceCount;
@JsonProperty("gcp_dataengine_master_size")
private String masterDataEngineInstanceShape;
- @JsonProperty("dataengine_slave_instance_count")
- private String slaveDataEngineInstanceCount;
@JsonProperty("gcp_dataengine_slave_size")
private String slaveDtaEngineInstanceShape;
@@ -54,8 +52,8 @@ public class SparkComputationalCreateGcp extends
ComputationalBase<SparkComputat
@JsonProperty("conf_shared_image_enabled")
private String sharedImageEnabled;
- public SparkComputationalCreateGcp withDataEngineInstanceCount(String
dataEngineInstanceCount) {
- this.masterDataEngineInstanceCount = dataEngineInstanceCount;
+ public SparkComputationalCreateGcp withDataEngineInstanceCount(String
dataengineInstanceCount) {
+ this.dataengineInstanceCount = dataengineInstanceCount;
return this;
}
@@ -69,11 +67,6 @@ public class SparkComputationalCreateGcp extends
ComputationalBase<SparkComputat
return this;
}
- public SparkComputationalCreateGcp withSlaveDataEngineInstanceCount(String
slaveDataEngineInstanceCount) {
- this.slaveDataEngineInstanceCount = slaveDataEngineInstanceCount;
- return this;
- }
-
public SparkComputationalCreateGcp withMasterGPUType(String masterGPUType)
{
this.masterGPUType = masterGPUType;
return this;
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
index acb8add..34bad98 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
@@ -391,7 +391,9 @@ public class RequestBuilder {
switch (cloudProvider) {
case AWS:
computationalCreate = (T)
newResourceSysBaseDTO(userInfo.getName(), cloudProvider,
SparkComputationalCreateAws.class)
-
.withDataEngineInstanceCount(form.getMasterDataEngineInstanceCount())
+ .withDataEngineInstanceCount(String.valueOf(
+
Integer.parseInt(form.getSlaveDataEngineInstanceCount())
+ +
Integer.parseInt(form.getMasterDataEngineInstanceCount())))
.withDataEngineMasterShape(form.getMasterDataEngineInstanceShape())
.withDataEngineSlaveShape(form.getMasterDataEngineInstanceShape())
.withConfig(form.getConfig())
@@ -399,7 +401,9 @@ public class RequestBuilder {
break;
case AZURE:
computationalCreate = (T)
newResourceSysBaseDTO(userInfo.getName(), cloudProvider,
SparkComputationalCreateAzure.class)
-
.withDataEngineInstanceCount(form.getMasterDataEngineInstanceCount())
+ .withDataEngineInstanceCount(String.valueOf(
+
Integer.parseInt(form.getSlaveDataEngineInstanceCount())
+ +
Integer.parseInt(form.getMasterDataEngineInstanceCount())))
.withDataEngineMasterSize(form.getMasterDataEngineInstanceShape())
.withDataEngineSlaveSize(form.getMasterDataEngineInstanceShape())
.withConfig(form.getConfig())
@@ -416,7 +420,9 @@ public class RequestBuilder {
case GCP:
computationalCreate = (T)
newResourceSysBaseDTO(userInfo.getName(), cloudProvider,
SparkComputationalCreateGcp.class)
.withDataEngineInstanceCount(form.getMasterDataEngineInstanceCount())
-
.withSlaveDataEngineInstanceCount(form.getSlaveDataEngineInstanceCount())
+ .withDataEngineInstanceCount(String.valueOf(
+
Integer.parseInt(form.getSlaveDataEngineInstanceCount())
+ +
Integer.parseInt(form.getMasterDataEngineInstanceCount())))
.withDataEngineMasterSize(form.getMasterDataEngineInstanceShape())
.withDataEngineSlaveSize(form.getMasterDataEngineInstanceShape())
.withMasterGPUCount(form.getMasterGpuCount())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]