Skip to content

Commit

Permalink
increase retry interval
Browse files Browse the repository at this point in the history
  • Loading branch information
mchades committed Feb 27, 2024
1 parent d6d6f34 commit 2b52184
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void start() {
protected boolean checkContainerStatus(int retryLimit) {
int nRetry = 0;
boolean isHiveContainerReady = false;
int sleepTimeMillis = 10_000;
while (nRetry++ < retryLimit) {
try {
String[] commandAndArgs = new String[] {"bash", "/tmp/check-status.sh"};
Expand All @@ -83,7 +84,12 @@ protected boolean checkContainerStatus(int retryLimit) {
isHiveContainerReady = true;
break;
}
Thread.sleep(5000);
LOG.info(
"Hive container is not ready, recheck({}/{}) after {}ms",
nRetry,
retryLimit,
sleepTimeMillis);
Thread.sleep(sleepTimeMillis);
} catch (RuntimeException e) {
LOG.error(e.getMessage(), e);
} catch (InterruptedException e) {
Expand Down

0 comments on commit 2b52184

Please sign in to comment.