diff --git a/cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java b/cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java index 549d95264b8e..adfa423ee070 100644 --- a/cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java +++ b/cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java @@ -90,13 +90,15 @@ public RemoteTaskExecutor(CConfiguration cConf, MetricsCollectionService metrics this.remoteClient = remoteClientFactory.createRemoteClient(serviceName, httpRequestConfig, Constants.Gateway.INTERNAL_API_VERSION_3); - this.retryStrategy = RetryStrategies.fromConfiguration(cConf, - Constants.Service.TASK_WORKER + "."); this.metricsCollectionService = metricsCollectionService; if (workerType == Type.TASK_WORKER) { this.workerUrl = TASK_WORKER_URL; + this.retryStrategy = RetryStrategies.fromConfiguration(cConf, + Constants.Service.TASK_WORKER + "."); } else { this.workerUrl = SYSTEM_WORKER_URL; + this.retryStrategy = RetryStrategies.fromConfiguration(cConf, + Constants.Service.SYSTEM_WORKER + "."); } } diff --git a/cdap-common/src/main/resources/cdap-default.xml b/cdap-common/src/main/resources/cdap-default.xml index 1f097f7fa48a..99f5696a4830 100644 --- a/cdap-common/src/main/resources/cdap-default.xml +++ b/cdap-common/src/main/resources/cdap-default.xml @@ -4251,6 +4251,51 @@ + + + + system.worker.retry.policy.base.delay.ms + 100 + + The base delay between retries in milliseconds + + + + + system.worker.retry.policy.max.delay.ms + 2000 + + The maximum delay between retries in milliseconds + + + + + + system.worker.retry.policy.max.retries + 2147483647 + + The maximum number of retries to attempt before aborting + + + + + + system.worker.retry.policy.max.time.secs + 300 + + The maximum elapsed time in seconds before retries are aborted + + + + + system.worker.retry.policy.type + exponential.backoff + + The type of retry policy for programs. Allowed options: + "none", "fixed.delay", or "exponential.backoff". + + +