You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dy...@apache.org on 2022/08/16 09:30:13 UTC
[incubator-datalab] 03/04: add number of slave instances for hdinsight
This is an automated email from the ASF dual-hosted git repository.
dyankiv pushed a commit to branch DATALAB-2645
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 7234fbe3c7ee0f6a85d062120a5ee34cbe23e3f0
Author: Denys Yankiv <de...@gmail.com>
AuthorDate: Mon Aug 15 15:56:32 2022 +0300
add number of slave instances for hdinsight
---
.../azure/computational/AzureComputationalResource.java | 16 ++++++++--------
.../resources/azure/ComputationalResourceAzure.java | 2 +-
.../service/impl/InfrastructureTemplateServiceImpl.java | 9 +++++++--
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/services/datalab-model/src/main/java/com/epam/datalab/dto/azure/computational/AzureComputationalResource.java b/services/datalab-model/src/main/java/com/epam/datalab/dto/azure/computational/AzureComputationalResource.java
index 71a8abe04..5ffcc1237 100644
--- a/services/datalab-model/src/main/java/com/epam/datalab/dto/azure/computational/AzureComputationalResource.java
+++ b/services/datalab-model/src/main/java/com/epam/datalab/dto/azure/computational/AzureComputationalResource.java
@@ -27,24 +27,24 @@ public class AzureComputationalResource extends UserComputationalResource {
private final String slaveShape;
@JsonProperty("hdinsight_version")
private final String version;
+ @JsonProperty("hdinsight_slave_count")
+ private final String slaveInstanceCount;
@Builder
public AzureComputationalResource(String computationalName, String computationalId, String imageName,
- String templateName, String status, Date uptime,
- SchedulerJobDTO schedulerJobData, boolean reuploadKeyRequired,
- String instanceId, String masterShape, String slaveShape, String version,
- List<ResourceURL> resourceURL, LocalDateTime lastActivity,
- List<ClusterConfig> config, Map<String, String> tags, int totalInstanceCount) {
+ String templateName, String status, Date uptime,
+ SchedulerJobDTO schedulerJobData, boolean reuploadKeyRequired,
+ String instanceId, String masterShape, String slaveShape, String version,
+ List<ResourceURL> resourceURL, LocalDateTime lastActivity,
+ List<ClusterConfig> config, Map<String, String> tags, int totalInstanceCount, String slaveInstanceCount) {
super(computationalName, computationalId, imageName, templateName, status, uptime, schedulerJobData,
reuploadKeyRequired, resourceURL, lastActivity, tags, totalInstanceCount);
this.instanceId = instanceId;
this.masterShape = masterShape;
this.slaveShape = slaveShape;
-// this.slaveSpot = slaveSpot;
-// this.slaveSpotPctPrice = slaveSpotPctPrice;
-// this.slaveNumber = slaveNumber;
this.version = version;
+ this.slaveInstanceCount = slaveInstanceCount;
this.config = config;
}
}
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/azure/ComputationalResourceAzure.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/azure/ComputationalResourceAzure.java
index ad7886032..514d5f127 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/azure/ComputationalResourceAzure.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/azure/ComputationalResourceAzure.java
@@ -97,9 +97,9 @@ public class ComputationalResourceAzure {
.status(CREATING.toString())
.masterShape(form.getMasterInstanceType())
.slaveShape(form.getSlaveInstanceType())
+ .slaveInstanceCount(form.getSlaveInstanceCount())
.config(form.getConfig())
.version(form.getVersion())
- //.totalInstanceCount(Integer.parseInt(form.getInstanceCount()))
.build();
boolean resourceAdded = computationalService.createDataEngineService(userInfo, form.getName(), form, azureComputationalResource
diff --git a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
index 3e2fcd33c..53ea43e15 100644
--- a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
@@ -142,8 +142,13 @@ public class InfrastructureTemplateServiceImpl implements InfrastructureTemplate
.minDataprocPreemptibleInstanceCount(configuration.getMinDataprocPreemptibleCount())
.build());
case AZURE:
- log.error("Dataengine service is not supported currently for {}", AZURE);
- throw new UnsupportedOperationException("Dataengine service is not supported currently for " + AZURE);
+ return new AzureFullComputationalTemplate(metadataDTO,
+ AzureHDInsightConfiguration.builder()
+ .minHdinsightInstanceCount(configuration.getMinHDInsightInstanceCount())
+ .maxHdinsightInstanceCount(configuration.getMaxHDInsightInstanceCount())
+ .build());
+// log.error("Dataengine service is not supported currently for {}", AZURE);
+// throw new UnsupportedOperationException("Dataengine service is not supported currently for " + AZURE);
default:
throw new UnsupportedOperationException("Dataengine service is not supported currently for " + cloudProvider);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org