Repository: incubator-griffin
Updated Branches:
  refs/heads/master caa6940cc -> 37b5cbbe1


rename spark.url to resource manager url and log exception stack tree

rename spark.url to resource manager url and log exception stack tree

Author: jasonliaoxiaoge <[email protected]>

This patch had conflicts when merged, resolved by
Committer: William Guo <[email protected]>

Closes #321 from jasonliaoxiaoge/master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/37b5cbbe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/37b5cbbe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/37b5cbbe

Branch: refs/heads/master
Commit: 37b5cbbe10c7e7c26176a4cfafdceba5ef17e3b1
Parents: caa6940
Author: jasonliaoxiaoge <[email protected]>
Authored: Fri Jun 29 22:20:01 2018 +0800
Committer: William Guo <[email protected]>
Committed: Fri Jun 29 22:20:01 2018 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/griffin/core/job/JobServiceImpl.java   | 4 ++--
 .../src/main/java/org/apache/griffin/core/util/YarnNetUtil.java | 4 ++--
 service/src/main/resources/application-dev.properties           | 5 +++--
 service/src/main/resources/application-prod.properties          | 4 ++--
 service/src/main/resources/application.properties               | 5 +++--
 service/src/test/resources/sparkJob.properties                  | 4 ++--
 6 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java 
b/service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
index 6230d2a..521d168 100644
--- a/service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
+++ b/service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
@@ -485,7 +485,7 @@ public class JobServiceImpl implements JobService {
 
     private void setStateByYarn(JobInstanceBean instance) {
         LOGGER.warn("Spark session {} may be overdue! Now we use yarn to 
update state.", instance.getSessionId());
-        String yarnUrl = env.getProperty("spark.uri");
+        String yarnUrl = env.getProperty("yarn.uri");
         boolean success = YarnNetUtil.update(yarnUrl, instance);
         if (!success) {
             if (instance.getState().equals(UNKNOWN)) {
@@ -503,7 +503,7 @@ public class JobServiceImpl implements JobService {
             Object appId = resultMap.get("appId");
             instance.setState(state == null ? null : 
LivySessionStates.State.valueOf(state.toString().toUpperCase()));
             instance.setAppId(appId == null ? null : appId.toString());
-            instance.setAppUri(appId == null ? null : 
env.getProperty("spark.uri") + "/cluster/app/" + appId);
+            instance.setAppUri(appId == null ? null : 
env.getProperty("yarn.uri") + "/cluster/app/" + appId);
             instanceRepo.save(instance);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/main/java/org/apache/griffin/core/util/YarnNetUtil.java
----------------------------------------------------------------------
diff --git 
a/service/src/main/java/org/apache/griffin/core/util/YarnNetUtil.java 
b/service/src/main/java/org/apache/griffin/core/util/YarnNetUtil.java
index 81aace3..e723a15 100644
--- a/service/src/main/java/org/apache/griffin/core/util/YarnNetUtil.java
+++ b/service/src/main/java/org/apache/griffin/core/util/YarnNetUtil.java
@@ -39,7 +39,7 @@ public class YarnNetUtil {
                 restTemplate.put(url + "ws/v1/cluster/apps/" + appId + 
"/state", "{\"state\": \"KILLED\"}");
             }
         } catch (Exception e) {
-            LOGGER.error("delete exception happens by yarn. {}", 
e.getMessage());
+            LOGGER.error("delete exception happens by yarn. {}", e);
         }
     }
 
@@ -53,7 +53,7 @@ public class YarnNetUtil {
             }
             return true;
         } catch (Exception e) {
-            LOGGER.error("update exception happens by yarn. {}", 
e.getMessage());
+            LOGGER.error("update exception happens by yarn. {}", e);
         }
         return false;
     }

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/main/resources/application-dev.properties
----------------------------------------------------------------------
diff --git a/service/src/main/resources/application-dev.properties 
b/service/src/main/resources/application-dev.properties
index 47aea06..1db96c1 100644
--- a/service/src/main/resources/application-dev.properties
+++ b/service/src/main/resources/application-dev.properties
@@ -75,5 +75,6 @@ elasticsearch.scheme = http
 # livy
 livy.uri=http://localhost:8998/batches
 
-# spark-admin
-spark.uri=http://localhost:8088
+# yarn url
+yarn.uri=http://localhost:8088
+

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/main/resources/application-prod.properties
----------------------------------------------------------------------
diff --git a/service/src/main/resources/application-prod.properties 
b/service/src/main/resources/application-prod.properties
index 3cf4cb5..0e513f3 100644
--- a/service/src/main/resources/application-prod.properties
+++ b/service/src/main/resources/application-prod.properties
@@ -75,5 +75,5 @@ elasticsearch.scheme = http
 # livy
 livy.uri=http://localhost:8998/batches
 
-# spark-admin
-spark.uri=http://localhost:8088
\ No newline at end of file
+# yarn url
+yarn.uri=http://localhost:8088
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/main/resources/application.properties
----------------------------------------------------------------------
diff --git a/service/src/main/resources/application.properties 
b/service/src/main/resources/application.properties
index 5b6291a..2726700 100644
--- a/service/src/main/resources/application.properties
+++ b/service/src/main/resources/application.properties
@@ -72,5 +72,6 @@ elasticsearch.scheme = http
 # livy
 livy.uri=http://localhost:8998/batches
 
-# spark-admin
-spark.uri=http://localhost:8088
+# yarn url
+yarn.uri=http://localhost:8088
+

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/37b5cbbe/service/src/test/resources/sparkJob.properties
----------------------------------------------------------------------
diff --git a/service/src/test/resources/sparkJob.properties 
b/service/src/test/resources/sparkJob.properties
index 5872319..38257a1 100644
--- a/service/src/test/resources/sparkJob.properties
+++ b/service/src/test/resources/sparkJob.properties
@@ -43,7 +43,7 @@ spark.yarn.dist.files = hdfs:///home/spark_conf/hive-site.xml
 # livy.uri=http://10.9.246.187:8998/batches
 livy.uri=http://localhost:8998/batches
 
-# spark-admin
+# yarn url
 # spark.uri=http://10.149.247.156:28088
 # spark.uri=http://10.9.246.187:8088
-spark.uri=http://localhost:8088
\ No newline at end of file
+yarn.uri=http://localhost:8088
\ No newline at end of file

Reply via email to