mirror of https://github.com/apache/druid.git
use terminateWithIds in terminate
This commit is contained in:
parent
1d81ad2946
commit
ebc66df27d
|
@ -155,9 +155,7 @@ public class EC2AutoScalingStrategy implements AutoScalingStrategy
|
|||
}
|
||||
|
||||
try {
|
||||
log.info("Terminating instances[%s]", instances);
|
||||
amazonEC2Client.terminateInstances(
|
||||
new TerminateInstancesRequest(
|
||||
return terminateWithIds(
|
||||
Lists.transform(
|
||||
instances,
|
||||
new Function<Instance, String>()
|
||||
|
@ -169,21 +167,6 @@ public class EC2AutoScalingStrategy implements AutoScalingStrategy
|
|||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return new AutoScalingData(
|
||||
Lists.transform(
|
||||
ips,
|
||||
new Function<String, String>()
|
||||
{
|
||||
@Override
|
||||
public String apply(@Nullable String input)
|
||||
{
|
||||
return String.format("%s:%s", input, config.getWorkerPort());
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue