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 2020/03/31 00:27:35 UTC

[GitHub] [incubator-gobblin] htran1 commented on a change in pull request #2942: GOBBLIN-1101(DSS-25241): Enhance bulk api retry for ExceedQuota

htran1 commented on a change in pull request #2942: GOBBLIN-1101(DSS-25241): Enhance bulk api retry for ExceedQuota
URL: https://github.com/apache/incubator-gobblin/pull/2942#discussion_r400572661
 
 

 ##########
 File path: gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/BulkResultIterator.java
 ##########
 @@ -144,3 +178,24 @@ private void closeCsvReader() {
     }
   }
 }
+
+class OpenAndSeekException extends Exception {
+  private boolean _isCurrentExceptionExceedQuota;
+  public OpenAndSeekException(String msg, Throwable rootCause) {
+    super(msg, rootCause);
+    if (rootCause instanceof AsyncApiException &&
+        ((AsyncApiException) rootCause).getExceptionCode() == AsyncExceptionCode.ExceededQuota) {
+      _isCurrentExceptionExceedQuota = true;
+    }
+  }
+  public OpenAndSeekException(String msg, Throwable rootCause, Exception currentException) {
+    super(msg, rootCause);
+    if (currentException instanceof AsyncApiException &&
+        ((AsyncApiException) currentException).getExceptionCode() == AsyncExceptionCode.ExceededQuota) {
+      _isCurrentExceptionExceedQuota = true;
+    }
+  }
+  public boolean isCurrentExceptionExceedQuta() {
 
 Review comment:
   Quta -> Quota

----------------------------------------------------------------
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