EHPC SDK Auto Released By qianzheng.llc,Version:1.27.0

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-09-27 15:12:27 +08:00
parent 46a517571d
commit f2a390fbc8
19 changed files with 377 additions and 11 deletions

View File

@@ -69,15 +69,15 @@ void SetAutoScaleConfigRequest::setEnableAutoGrow(bool enableAutoGrow)
setParameter("EnableAutoGrow", std::to_string(enableAutoGrow));
}
std::string SetAutoScaleConfigRequest::getSpotPriceLimit()const
float SetAutoScaleConfigRequest::getSpotPriceLimit()const
{
return spotPriceLimit_;
}
void SetAutoScaleConfigRequest::setSpotPriceLimit(const std::string& spotPriceLimit)
void SetAutoScaleConfigRequest::setSpotPriceLimit(float spotPriceLimit)
{
spotPriceLimit_ = spotPriceLimit;
setParameter("SpotPriceLimit", spotPriceLimit);
setParameter("SpotPriceLimit", std::to_string(spotPriceLimit));
}
bool SetAutoScaleConfigRequest::getEnableAutoShrink()const
@@ -146,6 +146,25 @@ void SetAutoScaleConfigRequest::setShrinkIntervalInMinutes(int shrinkIntervalInM
setParameter("ShrinkIntervalInMinutes", std::to_string(shrinkIntervalInMinutes));
}
std::vector<SetAutoScaleConfigRequest::Queues> SetAutoScaleConfigRequest::getQueues()const
{
return queues_;
}
void SetAutoScaleConfigRequest::setQueues(const std::vector<Queues>& queues)
{
queues_ = queues;
int i = 0;
for(int i = 0; i!= queues.size(); i++) {
auto obj = queues.at(i);
std::string str ="Queues."+ std::to_string(i);
setParameter(str + ".SpotStrategy", obj.spotStrategy);
setParameter(str + ".QueueName", obj.queueName);
setParameter(str + ".InstanceType", obj.instanceType);
setParameter(str + ".SpotPriceLimit", std::to_string(obj.spotPriceLimit));
}
}
int SetAutoScaleConfigRequest::getExtraNodesGrowRatio()const
{
return extraNodesGrowRatio_;