sv2000 commented on a change in pull request #2555: [GOBBLIN-683] Add azkaban 
client retry logic.
URL: https://github.com/apache/incubator-gobblin/pull/2555#discussion_r258337554
 
 

 ##########
 File path: 
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
 ##########
 @@ -88,19 +96,23 @@ protected AzkabanClient(String username,
                           String url,
                           long sessionExpireInMin,
                           CloseableHttpClient httpClient,
-                          SessionManager sessionManager)
+                          SessionManager sessionManager,
+                          ExecutorService executorService)
       throws AzkabanClientException {
     this.username = username;
     this.password = password;
     this.url = url;
     this.sessionExpireInMin = sessionExpireInMin;
     this.httpClient = httpClient;
     this.sessionManager = sessionManager;
+    this.executorService = executorService;
     this.initializeClient();
     this.initializeSessionManager();
+    this.intializeExecutorService();
     this.retryer = RetryerBuilder.<AzkabanClientStatus>newBuilder()
         .retryIfExceptionOfType(InvalidSessionException.class)
-        .withWaitStrategy(WaitStrategies.exponentialWait(10, TimeUnit.SECONDS))
+        .withAttemptTimeLimiter(AttemptTimeLimiters.fixedTimeLimit(10, 
TimeUnit.SECONDS, this.executorService))
 
 Review comment:
   Is this really needed? I am a little concerned about creating executor 
service with a fixed thread pool of 300 threads per client. With multiple 
Azkaban executor instances, this can lead to a lot of threads. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to