Skip to content

Commit 36857ad

Browse files
Vatsal23082000lacikaaa
authored andcommittedAug 24, 2022
CB-17015 Ephemeral Disk in Data Mart and Real-time Data Mart Data Hub Clusters
- Added the Ephermeral disk storage size value to IMPALA_DATACACHE_CAPACITY_PARAM. Testing - Covered changes with unit tests. - Made changes as per the review.
1 parent 6ee7456 commit 36857ad

File tree

12 files changed

+145
-22
lines changed

12 files changed

+145
-22
lines changed
 

‎cloud-api/src/main/java/com/sequenceiq/cloudbreak/cloud/model/InstanceStoreMetadata.java

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public Integer mapInstanceTypeToInstanceStoreCountNullHandled(String instanceTyp
2828
return instanceStoreCount != null ? instanceStoreCount : 0;
2929
}
3030

31+
public Integer mapInstanceTypeToInstanceSizeNullHandled(String instanceType) {
32+
Integer instanceSize = instaceStoreConfigMap.getOrDefault(instanceType, VolumeParameterConfig.EMPTY).minimumSize();
33+
return instanceSize != null ? instanceSize : 0;
34+
}
35+
3136
public Map<String, VolumeParameterConfig> getInstaceStoreConfigMap() {
3237
return instaceStoreConfigMap;
3338
}

‎core-model/src/main/java/com/sequenceiq/cloudbreak/domain/Template.java

+10
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public class Template implements ProvisionEntity, WorkspaceAwareResource {
7575

7676
private Integer instanceStorageCount;
7777

78+
private Integer instanceStorageSize;
79+
7880
public Template() {
7981
deleted = false;
8082
}
@@ -198,4 +200,12 @@ public Integer getInstanceStorageCount() {
198200
public void setInstanceStorageCount(Integer instanceStorageCount) {
199201
this.instanceStorageCount = instanceStorageCount;
200202
}
203+
204+
public Integer getInstanceStorageSize() {
205+
return instanceStorageSize;
206+
}
207+
208+
public void setInstanceStorageSize(Integer instanceStorageSize) {
209+
this.instanceStorageSize = instanceStorageSize;
210+
}
201211
}

‎core/src/main/java/com/sequenceiq/cloudbreak/core/flow2/stack/provision/service/StackCreationService.java

+2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ public void setInstanceStoreCount(StackCreationContext stackContext) {
285285
Template template = instanceGroup.getTemplate();
286286
if (template != null) {
287287
Integer instanceStorageCount = instanceStoreMetadata.mapInstanceTypeToInstanceStoreCountNullHandled(template.getInstanceType());
288+
Integer instanceStorageSize = instanceStoreMetadata.mapInstanceTypeToInstanceSizeNullHandled(template.getInstanceType());
288289
if (ephemeralVolumeChecker.instanceGroupContainsOnlyDatabaseAndEphemeralVolumes(instanceGroup)) {
289290
LOGGER.debug("Instance storage was already requested. Setting temporary storage in template to: {}. " +
290291
"Group name: {}, Template id: {}, instance type: {}",
@@ -299,6 +300,7 @@ public void setInstanceStoreCount(StackCreationContext stackContext) {
299300
LOGGER.debug("Setting instance storage count in template. " +
300301
"Group name: {}, Template id: {}, instance type: {}", instanceGroup.getGroupName(), template.getId(), template.getInstanceType());
301302
template.setInstanceStorageCount(instanceStorageCount);
303+
template.setInstanceStorageSize(instanceStorageSize);
302304
templateService.savePure(template);
303305
}
304306
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- // CB-17015_Add_InstanceStorageSize_to_Template
2+
-- Migration SQL that makes the change goes here.
3+
4+
ALTER TABLE template ADD COLUMN IF NOT EXISTS instancestoragesize INTEGER;
5+
6+
-- //@UNDO
7+
-- SQL to undo the change goes here.
8+
9+
ALTER TABLE template DROP COLUMN IF EXISTS instancestoragesize;

‎template-manager-cmtemplate/src/main/java/com/sequenceiq/cloudbreak/cmtemplate/configproviders/impala/ImpalaVolumeConfigProvider.java

+47-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.sequenceiq.cloudbreak.cmtemplate.configproviders.impala;
22

33
import static com.sequenceiq.cloudbreak.cmtemplate.configproviders.ConfigUtils.config;
4+
import static com.sequenceiq.cloudbreak.template.VolumeUtils.buildEphemeralVolumePathString;
45
import static com.sequenceiq.cloudbreak.template.VolumeUtils.buildVolumePathStringZeroVolumeHandled;
56

67
import java.util.ArrayList;
@@ -11,6 +12,7 @@
1112

1213
import com.cloudera.api.swagger.model.ApiClusterTemplateConfig;
1314
import com.sequenceiq.cloudbreak.cmtemplate.CmHostGroupRoleConfigProvider;
15+
import com.sequenceiq.cloudbreak.common.type.TemporaryStorage;
1416
import com.sequenceiq.cloudbreak.template.TemplatePreparationObject;
1517
import com.sequenceiq.cloudbreak.template.VolumeUtils;
1618
import com.sequenceiq.cloudbreak.template.views.HostgroupView;
@@ -38,20 +40,51 @@ public List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, HostgroupV
3840
.mapToInt(volume -> volume.getVolumeSize())
3941
.min()
4042
.orElse(0);
43+
int volumeCount = 0;
44+
int temporaryStorageVolumeCount = 0;
45+
int temporaryStorageVolumeSize = 0;
46+
if (hostGroupView != null) {
47+
volumeCount = hostGroupView.getVolumeCount();
48+
if (hostGroupView.getTemporaryStorageVolumeCount() != null) {
49+
temporaryStorageVolumeCount = hostGroupView.getTemporaryStorageVolumeCount();
50+
}
51+
if (hostGroupView.getTemporaryStorageVolumeSize() != null) {
52+
temporaryStorageVolumeSize = hostGroupView.getTemporaryStorageVolumeSize();
53+
}
54+
}
4155

4256
List<ApiClusterTemplateConfig> configs = new ArrayList<>();
43-
configs.add(config(IMPALA_SCRATCH_DIRS_PARAM,
44-
buildVolumePathStringZeroVolumeHandled(hostGroupView.getVolumeCount(), "impala/scratch")));
4557

46-
if (minAttachedVolumeSize > MIN_ATTACHED_VOLUME_SIZE_TO_ENABLE_CACHE_IN_GB
47-
&& hostGroupView.getVolumeCount() > 0) {
48-
long dataCacheCapacityInBytes = VolumeUtils
49-
.convertGBToBytes(Math.min(minAttachedVolumeSize / 2, MAX_IMPALA_DATA_CACHE_SIZE_IN_GB / hostGroupView.getVolumeCount()));
58+
if (checkTemporaryStorage(hostGroupView, temporaryStorageVolumeCount)) {
59+
configs.add(config(IMPALA_SCRATCH_DIRS_PARAM,
60+
buildEphemeralVolumePathString(temporaryStorageVolumeCount, "impala/scratch")));
61+
} else {
62+
configs.add(config(IMPALA_SCRATCH_DIRS_PARAM,
63+
buildVolumePathStringZeroVolumeHandled(volumeCount, "impala/scratch")));
64+
}
5065

66+
if (minAttachedVolumeSize > MIN_ATTACHED_VOLUME_SIZE_TO_ENABLE_CACHE_IN_GB
67+
&& volumeCount > 0) {
5168
configs.add(config(IMPALA_DATACACHE_ENABLED_PARAM, "true"));
52-
configs.add(config(IMPALA_DATACACHE_CAPACITY_PARAM, Long.toString(dataCacheCapacityInBytes)));
53-
configs.add(config(IMPALA_DATACACHE_DIRS_PARAM,
54-
buildVolumePathStringZeroVolumeHandled(hostGroupView.getVolumeCount(), "impala/datacache")));
69+
70+
if (checkTemporaryStorage(hostGroupView, temporaryStorageVolumeCount)) {
71+
long temporaryStoragedataCacheCapacityInBytes = VolumeUtils
72+
.convertGBToBytes(Math.min(temporaryStorageVolumeSize / 2,
73+
MAX_IMPALA_DATA_CACHE_SIZE_IN_GB / temporaryStorageVolumeCount));
74+
75+
configs.add(config(IMPALA_DATACACHE_CAPACITY_PARAM, Long.toString(temporaryStoragedataCacheCapacityInBytes)));
76+
77+
configs.add(config(IMPALA_DATACACHE_DIRS_PARAM,
78+
buildEphemeralVolumePathString(temporaryStorageVolumeCount, "impala/datacache")));
79+
} else {
80+
long dataCacheCapacityInBytes = VolumeUtils
81+
.convertGBToBytes(Math.min(minAttachedVolumeSize / 2, MAX_IMPALA_DATA_CACHE_SIZE_IN_GB / volumeCount));
82+
83+
configs.add(config(IMPALA_DATACACHE_CAPACITY_PARAM, Long.toString(dataCacheCapacityInBytes)));
84+
85+
configs.add(config(IMPALA_DATACACHE_DIRS_PARAM,
86+
buildVolumePathStringZeroVolumeHandled(volumeCount, "impala/datacache")));
87+
}
5588
}
5689
return configs;
5790

@@ -74,4 +107,9 @@ public Set<String> getRoleTypes() {
74107
public boolean sharedRoleType(String roleType) {
75108
return false;
76109
}
110+
111+
private boolean checkTemporaryStorage(HostgroupView hostGroupView, Integer temporaryStorageVolumeCount) {
112+
return hostGroupView != null && hostGroupView.getTemporaryStorage() == TemporaryStorage.EPHEMERAL_VOLUMES && temporaryStorageVolumeCount != 0;
113+
}
77114
}
115+

‎template-manager-cmtemplate/src/test/java/com/sequenceiq/cloudbreak/cmtemplate/CmHostGroupRoleConfigProviderProcessorTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ public void testProcessWhenSharedConfigThenAddVolumeConfig() {
256256
@Test
257257
public void testGetRoleConfigsWithEphemeralVolumes() {
258258
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, Collections.<String>emptySet(),
259-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 1);
259+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 1, 100);
260260
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, Collections.<String>emptySet(),
261-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3);
261+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3, 300);
262262
setup("input/clouderamanager.bp", Builder.builder().withHostgroupViews(Set.of(master, worker)));
263263

264264
underTest.process(templateProcessor, templatePreparator);
@@ -282,9 +282,9 @@ public void testGetRoleConfigsWithEphemeralVolumes() {
282282
@Test
283283
public void testGetRoleConfigsWithAttachedVolumes() {
284284
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, Collections.<String>emptySet(),
285-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0);
285+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0, 0);
286286
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, Collections.<String>emptySet(),
287-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0);
287+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0, 0);
288288
setup("input/clouderamanager.bp", Builder.builder().withHostgroupViews(Set.of(master, worker)));
289289

290290
underTest.process(templateProcessor, templatePreparator);

‎template-manager-cmtemplate/src/test/java/com/sequenceiq/cloudbreak/cmtemplate/configproviders/VolumeConfigProviderTestHelper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public static HostgroupView hostGroupWithVolumeTemplates(int volumeCount, Set<Vo
2222
}
2323

2424
public static HostgroupView hostGroupWithVolumeTemplatesAndTemporaryStorage(int volumeCount, Set<VolumeTemplate> volumeTemplates,
25-
TemporaryStorage temporaryStorage, Integer temporaryStorageVolumeCount) {
25+
TemporaryStorage temporaryStorage, Integer temporaryStorageVolumeCount, Integer temporaryStorageVolumeSize) {
2626
return new HostgroupView("some name", volumeCount, InstanceGroupType.CORE, Collections.EMPTY_SET,
27-
volumeTemplates, temporaryStorage, temporaryStorageVolumeCount);
27+
volumeTemplates, temporaryStorage, temporaryStorageVolumeCount, temporaryStorageVolumeSize);
2828
}
2929

3030
public static TemplatePreparationObject preparatorWithHostGroups(HostgroupView... hostGroups) {

‎template-manager-cmtemplate/src/test/java/com/sequenceiq/cloudbreak/cmtemplate/configproviders/hbase/HbaseVolumeConfigProviderTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class HbaseVolumeConfigProviderTest {
2222
@Test
2323
void getRoleConfigsWithMultipleEphemeralVolumes() {
2424
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2,
25-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3);
25+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3, 300);
2626

2727
List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(HbaseRoles.REGIONSERVER, worker, preparatorWithHostGroups(worker));
2828

@@ -37,7 +37,7 @@ void getRoleConfigsWithMultipleEphemeralVolumes() {
3737
@Test
3838
void getRoleConfigsWithMultipleAttachedVolumes() {
3939
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2,
40-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0);
40+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0, 0);
4141

4242
List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(HbaseRoles.REGIONSERVER, worker, preparatorWithHostGroups(worker));
4343

‎template-manager-cmtemplate/src/test/java/com/sequenceiq/cloudbreak/cmtemplate/configproviders/impala/ImpalaVolumeConfigProviderTest.java

+47
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static com.sequenceiq.cloudbreak.cmtemplate.configproviders.ConfigUtils.config;
44
import static com.sequenceiq.cloudbreak.cmtemplate.configproviders.VolumeConfigProviderTestHelper.hostGroupWithVolumeTemplates;
5+
import static com.sequenceiq.cloudbreak.cmtemplate.configproviders.VolumeConfigProviderTestHelper.hostGroupWithVolumeTemplatesAndTemporaryStorage;
56
import static com.sequenceiq.cloudbreak.cmtemplate.configproviders.VolumeConfigProviderTestHelper.preparatorWithHostGroups;
67
import static org.junit.jupiter.api.Assertions.assertEquals;
78

@@ -12,6 +13,7 @@
1213

1314
import com.cloudera.api.swagger.model.ApiClusterTemplateConfig;
1415
import com.google.common.collect.Sets;
16+
import com.sequenceiq.cloudbreak.common.type.TemporaryStorage;
1517
import com.sequenceiq.cloudbreak.domain.Template;
1618
import com.sequenceiq.cloudbreak.domain.VolumeTemplate;
1719
import com.sequenceiq.cloudbreak.template.views.HostgroupView;
@@ -35,6 +37,21 @@ void testRoleConfigsWithAttachedVolumes100GB() {
3537
);
3638
}
3739

40+
@Test
41+
void testRoleConfigsWithAttachedVolumes100GBAndTemporaryStoragePresent() {
42+
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2, getVolumeTemplates(100), TemporaryStorage.EPHEMERAL_VOLUMES, 3, 300);
43+
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
44+
45+
assertEquals(
46+
List.of(
47+
config("scratch_dirs", "/hadoopfs/ephfs1/impala/scratch,/hadoopfs/ephfs2/impala/scratch,/hadoopfs/ephfs3/impala/scratch"),
48+
config("datacache_enabled", "true"),
49+
config("datacache_capacity", "46170898432"),
50+
config("datacache_dirs", "/hadoopfs/ephfs1/impala/datacache,/hadoopfs/ephfs2/impala/datacache,/hadoopfs/ephfs3/impala/datacache")),
51+
roleConfigs
52+
);
53+
}
54+
3855
@Test
3956
void testRoleConfigsWithAttachedVolumes200GB() {
4057
HostgroupView worker = hostGroupWithVolumeTemplates(3, getVolumeTemplates(200));
@@ -50,6 +67,21 @@ void testRoleConfigsWithAttachedVolumes200GB() {
5067
);
5168
}
5269

70+
@Test
71+
void testRoleConfigsWithAttachedVolumes200GBAndTemporaryStoragePresent() {
72+
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(3, getVolumeTemplates(200), TemporaryStorage.EPHEMERAL_VOLUMES, 1, 300);
73+
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
74+
75+
assertEquals(
76+
List.of(
77+
config("scratch_dirs", "/hadoopfs/ephfs1/impala/scratch"),
78+
config("datacache_enabled", "true"),
79+
config("datacache_capacity", "139586437120"),
80+
config("datacache_dirs", "/hadoopfs/ephfs1/impala/datacache")),
81+
roleConfigs
82+
);
83+
}
84+
5385
@Test
5486
void testRoleConfigsWithAttachedVolumesGreaterThanMaxImapalaCacheVolumeSize() {
5587
HostgroupView worker = hostGroupWithVolumeTemplates(3, getVolumeTemplates(1000));
@@ -65,6 +97,21 @@ void testRoleConfigsWithAttachedVolumesGreaterThanMaxImapalaCacheVolumeSize() {
6597
);
6698
}
6799

100+
@Test
101+
void testRoleConfigsWithAttachedVolumesGreaterThanMaxImapalaCacheVolumeSizeAndTemporaryStoragePresent() {
102+
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(3, getVolumeTemplates(1000), TemporaryStorage.EPHEMERAL_VOLUMES, 1, 300);
103+
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
104+
105+
assertEquals(
106+
List.of(
107+
config("scratch_dirs", "/hadoopfs/ephfs1/impala/scratch"),
108+
config("datacache_enabled", "true"),
109+
config("datacache_capacity", "139586437120"),
110+
config("datacache_dirs", "/hadoopfs/ephfs1/impala/datacache")),
111+
roleConfigs
112+
);
113+
}
114+
68115
@Test
69116
void testRoleConfigsWithAttachedVolumeCountZero() {
70117

‎template-manager-cmtemplate/src/test/java/com/sequenceiq/cloudbreak/cmtemplate/configproviders/yarn/YarnVolumeConfigProviderTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void getRoleConfigsWithoutVolumes() {
5353
@Test
5454
void getRoleConfigsWithMultipleEphemeralVolumes() {
5555
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2,
56-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3);
56+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3, 300);
5757

5858
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(YarnRoles.NODEMANAGER, worker, preparatorWithHostGroups(worker));
5959

@@ -70,7 +70,7 @@ void getRoleConfigsWithMultipleEphemeralVolumes() {
7070
@Test
7171
void getRoleConfigsWithMultipleAttachedVolumes() {
7272
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2,
73-
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0);
73+
Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.ATTACHED_VOLUMES, 0, 0);
7474

7575
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(YarnRoles.NODEMANAGER, worker, preparatorWithHostGroups(worker));
7676

‎template-manager-core/src/main/java/com/sequenceiq/cloudbreak/template/TemplatePreparationObject.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,10 @@ public Builder withHostgroups(Set<HostGroup> hostGroups) {
317317
.collect(Collectors.toSet());
318318
TemporaryStorage temporaryStorage = template == null ? null : template.getTemporaryStorage();
319319
Integer temporaryStorageVolumeCount = template == null ? null : template.getInstanceStorageCount();
320+
Integer temporaryStorageVolumeSize = template == null ? null : template.getInstanceStorageSize();
320321
hostgroupViews.add(new HostgroupView(hostGroup.getName(), volumeCount,
321-
instanceGroup.getInstanceGroupType(), fqdns, volumeTemplates, temporaryStorage, temporaryStorageVolumeCount));
322+
instanceGroup.getInstanceGroupType(), fqdns, volumeTemplates,
323+
temporaryStorage, temporaryStorageVolumeCount, temporaryStorageVolumeSize));
322324
} else {
323325
hostgroupViews.add(new HostgroupView(hostGroup.getName()));
324326
}

‎template-manager-core/src/main/java/com/sequenceiq/cloudbreak/template/views/HostgroupView.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,20 @@ public class HostgroupView {
3434

3535
private final Integer temporaryStorageVolumeCount;
3636

37+
private final Integer temporaryStorageVolumeSize;
38+
3739
public HostgroupView(String name, int volumeCount, InstanceGroupType instanceGroupType, Collection<String> hosts) {
3840
this(name, volumeCount, instanceGroupType, hosts, Collections.emptySet());
3941
}
4042

4143
public HostgroupView(String name, int volumeCount, InstanceGroupType instanceGroupType,
4244
Collection<String> hosts, Set<VolumeTemplate> volumeTemplates) {
43-
this(name, volumeCount, instanceGroupType, hosts, volumeTemplates, null, null);
45+
this(name, volumeCount, instanceGroupType, hosts, volumeTemplates, null, null, null);
4446
}
4547

4648
public HostgroupView(String name, int volumeCount, InstanceGroupType instanceGroupType,
47-
Collection<String> hosts, Set<VolumeTemplate> volumeTemplates, TemporaryStorage temporaryStorage, Integer temporaryStorageVolumeCount) {
49+
Collection<String> hosts, Set<VolumeTemplate> volumeTemplates, TemporaryStorage temporaryStorage,
50+
Integer temporaryStorageVolumeCount, Integer temporaryStorageVolumeSize) {
4851
this.name = name;
4952
this.volumeCount = volumeCount;
5053
instanceGroupConfigured = true;
@@ -61,6 +64,7 @@ public String toString() {
6164
this.volumeTemplates = Collections.unmodifiableSet(volumeTemplates);
6265
this.temporaryStorage = temporaryStorage;
6366
this.temporaryStorageVolumeCount = temporaryStorageVolumeCount;
67+
this.temporaryStorageVolumeSize = temporaryStorageVolumeSize;
6468
}
6569

6670
public HostgroupView(String name, int volumeCount, InstanceGroupType instanceGroupType, Integer nodeCount) {
@@ -73,6 +77,7 @@ public HostgroupView(String name, int volumeCount, InstanceGroupType instanceGro
7377
volumeTemplates = Collections.emptySet();
7478
temporaryStorage = null;
7579
temporaryStorageVolumeCount = null;
80+
temporaryStorageVolumeSize = null;
7681
}
7782

7883
public HostgroupView(String name) {
@@ -85,6 +90,7 @@ public HostgroupView(String name) {
8590
volumeTemplates = Collections.emptySet();
8691
temporaryStorage = null;
8792
temporaryStorageVolumeCount = null;
93+
temporaryStorageVolumeSize = null;
8894
}
8995

9096
public String getName() {
@@ -123,6 +129,10 @@ public Integer getTemporaryStorageVolumeCount() {
123129
return temporaryStorageVolumeCount;
124130
}
125131

132+
public Integer getTemporaryStorageVolumeSize() {
133+
return temporaryStorageVolumeSize;
134+
}
135+
126136
private List<String> filterNullOrEmpty(Collection<String> hosts) {
127137
return hosts.stream().filter(StringUtils::isNotEmpty).collect(Collectors.toList());
128138
}

0 commit comments

Comments
 (0)
Please sign in to comment.