Repository: kylin
Updated Branches:
  refs/heads/2.0.x-hbase0.98 de4ddd143 -> 820616808 (forced update)


KYLIN-2536 replace codehaus jackson with fasterxml

Signed-off-by: lidongsjtu <lid...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a2c4be6e
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a2c4be6e
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a2c4be6e

Branch: refs/heads/2.0.x-hbase0.98
Commit: a2c4be6e858f8599c8235dd11e1b49e3a970864f
Parents: 2e87fb4
Author: etherge <ethe...@163.com>
Authored: Fri Apr 7 18:28:07 2017 +0800
Committer: lidongsjtu <lid...@apache.org>
Committed: Mon Apr 10 14:22:03 2017 +0800

----------------------------------------------------------------------
 .../kylin/engine/mr/common/HadoopStatusGetter.java   | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a2c4be6e/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/HadoopStatusGetter.java
----------------------------------------------------------------------
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/HadoopStatusGetter.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/HadoopStatusGetter.java
index 1107aa5..f31369b 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/HadoopStatusGetter.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/HadoopStatusGetter.java
@@ -43,11 +43,12 @@ import org.apache.http.client.params.AuthPolicy;
 import org.apache.http.impl.auth.SPNegoSchemeFactory;
 import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.DefaultHttpClient;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 /**
  */
 public class HadoopStatusGetter {
@@ -68,8 +69,8 @@ public class HadoopStatusGetter {
         String response = useKerberosAuth ? 
getHttpResponseWithKerberosAuth(url) : getHttpResponse(url);
         logger.debug("Hadoop job " + mrJobId + " status : " + response);
         JsonNode root = new ObjectMapper().readTree(response);
-        RMAppState state = 
RMAppState.valueOf(root.findValue("state").getTextValue());
-        FinalApplicationStatus finalStatus = 
FinalApplicationStatus.valueOf(root.findValue("finalStatus").getTextValue());
+        RMAppState state = 
RMAppState.valueOf(root.findValue("state").textValue());
+        FinalApplicationStatus finalStatus = 
FinalApplicationStatus.valueOf(root.findValue("finalStatus").textValue());
         return Pair.of(state, finalStatus);
     }
 
@@ -84,12 +85,12 @@ public class HadoopStatusGetter {
         System.setProperty("java.security.krb5.conf", krb5ConfigPath);
         System.setProperty("sun.security.krb5.debug", "true");
         System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
-        
+
         DefaultHttpClient client = new DefaultHttpClient();
         AuthSchemeRegistry authSchemeRegistry = new AuthSchemeRegistry();
         authSchemeRegistry.register(AuthPolicy.SPNEGO, new 
SPNegoSchemeFactory(skipPortAtKerberosDatabaseLookup));
         client.setAuthSchemes(authSchemeRegistry);
-        
+
         BasicCredentialsProvider credentialsProvider = new 
BasicCredentialsProvider();
         Credentials useJaasCreds = new Credentials() {
             public String getPassword() {
@@ -102,7 +103,7 @@ public class HadoopStatusGetter {
         };
         credentialsProvider.setCredentials(new AuthScope(null, -1, null), 
useJaasCreds);
         client.setCredentialsProvider(credentialsProvider);
-        
+
         String response = null;
         while (response == null) {
             if (url.startsWith("https://";)) {

Reply via email to