You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2019/05/01 06:21:20 UTC

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #2624: [GOBBLIN-760] Improve retrying behavior of throttling client, add more informative …

autumnust commented on a change in pull request #2624: [GOBBLIN-760] Improve retrying behavior of throttling client, add more informative …
URL: https://github.com/apache/incubator-gobblin/pull/2624#discussion_r280011104
 
 

 ##########
 File path: gobblin-restli/gobblin-throttling-service/gobblin-throttling-service-client/src/main/java/org/apache/gobblin/util/limiter/BatchedPermitsRequester.java
 ##########
 @@ -364,10 +393,22 @@ public void onSuccess(Response<PermitAllocation> result) {
       }
     }
 
+    public long elapsedTime() {
+      return System.currentTimeMillis() - this.startTime;
+    }
+
+    public synchronized void clearCallback() {
 
 Review comment:
   Why this method is needed if there's only one on-the-fly request ( corresponding one callback) being existed ? Can't it be simply `clearSemaphore` instead of having a `callbackcleared` method for protection? 

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


With regards,
Apache Git Services