You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/24 03:39:56 UTC
incubator-kylin git commit: KYLIN-1162 be compatible with YARN-2605
Repository: incubator-kylin
Updated Branches:
refs/heads/1.x-staging 2a9c0ccf0 -> 01a78b1ab
KYLIN-1162 be compatible with YARN-2605
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/01a78b1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/01a78b1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/01a78b1a
Branch: refs/heads/1.x-staging
Commit: 01a78b1ab107d4b3621086862811b909ad020f62
Parents: 2a9c0cc
Author: shaofengshi <sh...@apache.org>
Authored: Tue Nov 24 10:39:18 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Nov 24 10:39:51 2015 +0800
----------------------------------------------------------------------
.../kylin/job/tools/HadoopStatusGetter.java | 27 +++++++++++++-------
1 file changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01a78b1a/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 0cd4d43..e2c0aa0 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
@@ -80,16 +80,25 @@ public class HadoopStatusGetter {
client.executeMethod(get);
String redirect = null;
- Header h = get.getResponseHeader("Refresh");
+ Header h = get.getResponseHeader("Location");
if (h != null) {
- String s = h.getValue();
- int cut = s.indexOf("url=");
- if (cut >= 0) {
- redirect = s.substring(cut + 4);
-
- if (isValidURL(redirect) == false) {
- log.info("Get invalid redirect url, skip it: " + redirect);
- continue;
+ redirect = h.getValue();
+ if (isValidURL(redirect) == false) {
+ log.info("Get invalid redirect url, skip it: " + redirect);
+ continue;
+ }
+ } else {
+ h = get.getResponseHeader("Refresh");
+ if (h != null) {
+ String s = h.getValue();
+ int cut = s.indexOf("url=");
+ if (cut >= 0) {
+ redirect = s.substring(cut + 4);
+
+ if (isValidURL(redirect) == false) {
+ log.info("Get invalid redirect url, skip it: " + redirect);
+ continue;
+ }
}
}
}