From 34886141d8a0a60d84b31d85d5ba2eeaff4744bf Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Wed, 13 Dec 2017 14:38:54 +0100 Subject: Set timeout for internal deployment in one place Use barrier timeout as basis for timeout, in the same way we do for external deployments. --- .../src/main/java/com/yahoo/config/provision/Deployer.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'config-provisioning') diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java b/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java index 77faa45ebe5..111073aca77 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java @@ -11,8 +11,20 @@ import java.util.Optional; */ public interface Deployer { + + /** + * Creates a new deployment from the active application, if available. Will use the default timeout for deployment. + * + * @param application the active application to be redeployed + * @return a new deployment from the local active, or empty if a local active application + * was not present for this id (meaning it either is not active or active on another + * node in the config server cluster) + */ + Optional deployFromLocalActive(ApplicationId application); + /** - * Creates a new deployment from the active application, if available. + * Creates a new deployment from the active application, if available. Prefer {@link #deployFromLocalActive(ApplicationId)} + * if possible, this method is for testing and will override the default timeout for deployment. * * @param application the active application to be redeployed * @param timeout the timeout to use for each individual deployment operation -- cgit v1.2.3