KYLIN-1149 add a sleep when wrong url is got from yarn
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7e7edff9 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7e7edff9 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7e7edff9 Branch: refs/heads/master Commit: 7e7edff9f5d0097045ffbd561753c437e04b34c3 Parents: f3214dd Author: shaofengshi <shaofeng...@apache.org> Authored: Tue Nov 24 11:31:09 2015 +0800 Committer: shaofengshi <shaofeng...@apache.org> Committed: Tue Nov 24 13:41:01 2015 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/7e7edff9/job/src/main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java ---------------------------------------------------------------------- diff --git a/job/src/main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java b/job/src/main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java index e2c0aa0..a3c411b 100644 --- a/job/src/main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java +++ b/job/src/main/java/org/apache/kylin/job/tools/HadoopStatusGetter.java @@ -85,6 +85,7 @@ public class HadoopStatusGetter { redirect = h.getValue(); if (isValidURL(redirect) == false) { log.info("Get invalid redirect url, skip it: " + redirect); + Thread.sleep(1000l); continue; } } else { @@ -97,6 +98,7 @@ public class HadoopStatusGetter { if (isValidURL(redirect) == false) { log.info("Get invalid redirect url, skip it: " + redirect); + Thread.sleep(1000l); continue; } } @@ -110,6 +112,8 @@ public class HadoopStatusGetter { url = redirect; log.debug("Job " + mrJobId + " check redirect url " + url + ".\n"); } + } catch (InterruptedException e) { + log.error(e.getMessage()); } finally { get.releaseConnection(); }