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: us...@infra.apache.org With regards, Apache Git Services