You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/09/17 20:19:52 UTC

[20/51] [abbrv] flink git commit: [FLINK-2357] [web dashboard] Add view for exceptions

[FLINK-2357] [web dashboard] Add view for exceptions


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

Branch: refs/heads/master
Commit: ba31f83a13d7baa9c922f4a379fd5f4e3e62756c
Parents: 907f773
Author: Piotr Godek <pi...@gmail.com>
Authored: Fri Aug 21 17:42:13 2015 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu Sep 17 14:21:51 2015 +0200

----------------------------------------------------------------------
 .../app/partials/jobs/job.exceptions.jade       | 64 ++++----------------
 .../web-dashboard/app/partials/jobs/job.jade    |  2 +-
 .../web-dashboard/app/scripts/index.coffee      |  1 +
 .../app/scripts/modules/jobs/jobs.ctrl.coffee   |  7 +++
 .../app/scripts/modules/jobs/jobs.svc.coffee    | 22 ++++---
 .../web-dashboard/app/styles/index.styl         | 10 +++
 .../web-dashboard/web/css/index.css             |  9 +++
 flink-runtime-web/web-dashboard/web/js/index.js | 29 ++++++---
 .../web/partials/jobs/job.exceptions.html       | 62 ++++---------------
 .../web-dashboard/web/partials/jobs/job.html    |  2 +-
 10 files changed, 89 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
index ff79fe5..d2a0d58 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
@@ -15,55 +15,15 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
-pre
-  | org.apache.flink.client.program.ProgramInvocationException: The
-  | program execution failed: java.lang.Exception: The data preparation
-  | for task 'Reduce (SUM(2))' , caused an error: Error obtaining the
-  | sorted input: Thread 'SortMerger spilling thread' terminated due to an
-  | exception: The user-defined combiner failed in its 'open()' method.
-  |   at org.apache.flink.runtime.operators.RegularPactTask.run(RegularPactTask.java:472)
-  |   at org.apache.flink.runtime.operators.RegularPactTask.invoke(RegularPactTask.java:360)
-  |   at org.apache.flink.runtime.execution.RuntimeEnvironment.run(RuntimeEnvironment.java:204)
-  |   at java.lang.Thread.run(Thread.java:745)
-  | Caused by: java.lang.RuntimeException: Error obtaining the sorted
-  | input: Thread 'SortMerger spilling thread' terminated due to an
-  | exception: The user-defined combiner failed in its 'open()' method.
-  |   at org.apache.flink.runtime.operators.sort.UnilateralSortMerger.getIterator(UnilateralSortMerger.java:607)
-  |   at org.apache.flink.runtime.operators.RegularPactTask.getInput(RegularPactTask.java:1133)
-  |   at org.apache.flink.runtime.operators.GroupReduceDriver.prepare(GroupReduceDriver.java:94)
-  |   at org.apache.flink.runtime.operators.RegularPactTask.run(RegularPactTask.java:466)
-  |   ... 3 more
-  | Caused by: java.io.IOException: Thread 'SortMerger spilling thread'
-  | terminated due to an exception: The user-defined combiner failed in
-  | its 'open()' method.
-  |   at org.apache.flink.runtime.operators.sort.UnilateralSortMerger$ThreadBase.run(UnilateralSortMerger.java:785)
-  | Caused by: java.io.IOException: The user-defined combiner failed in
-  | its 'open()' method.
-  |   at org.apache.flink.runtime.operators.sort.CombiningUnilateralSortMerger$CombiningSpillingThread.go(CombiningUnilateralSortMerger.java:264)
-  |   at org.apache.flink.runtime.operators.sort.UnilateralSortMerger$ThreadBase.run(UnilateralSortMerger.java:781)
-  | Caused by: java.lang.IllegalStateException: The runtime context has
-  | not been initialized.
-  |   at org.apache.flink.api.common.functions.AbstractRichFunction.getRuntimeContext(AbstractRichFunction.java:49)
-  |   at org.apache.flink.api.scala.operators.ScalaAggregateOperator$AggregatingUdf.open(ScalaAggregateOperator.java:261)
-  |   at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:33)
-  |   at org.apache.flink.runtime.operators.sort.CombiningUnilateralSortMerger$CombiningSpillingThread.go(CombiningUnilateralSortMerger.java:261)
-  |   ... 1 more
-  | 
-  |   at org.apache.flink.client.program.Client.run(Client.java:345)
-  |   at org.apache.flink.client.program.Client.run(Client.java:304)
-  |   at org.apache.flink.client.program.Client.run(Client.java:298)
-  |   at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:55)
-  |   at org.apache.flink.api.scala.ExecutionEnvironment.execute(ExecutionEnvironment.scala:530)
-  |   at com.gmp.MyJob$.main(MyJob.scala:33)
-  |   at com.gmp.MyJob.main(MyJob.scala)
-  |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-  |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
-  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-  |   at java.lang.reflect.Method.invoke(Method.java:483)
-  |   at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:437)
-  |   at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:353)
-  |   at org.apache.flink.client.program.Client.run(Client.java:250)
-  |   at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:374)
-  |   at org.apache.flink.client.CliFrontend.run(CliFrontend.java:347)
-  |   at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1088)
-  |   at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1115)
+.panel.panel-default.panel-multi(ng-repeat="exception in exceptions['all-exceptions']" )
+  .panel-heading.clearfix
+    .panel-title
+      | {{ exception.task }}
+
+  .panel-heading.clearfix
+    .panel-info.thin.last
+      span {{ exception.location }}
+
+  .panel-body
+    pre.exception
+      {{ exception.exception }}

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/partials/jobs/job.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.jade
index 07e7402..083e921 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.jade
@@ -47,7 +47,7 @@ nav.navbar.navbar-default.navbar-fixed-top.navbar-main-additional(ng-if="job")
     li(ui-sref-active='active')
       a(ui-sref=".statistics") Job Accumulators / Statistics
 
-    li(ui-sref-active='active')
+    li(ui-sref-active='active' ng-if="job['end-time'] > -1")
       a(ui-sref=".timeline") Timeline
 
     li(ui-sref-active='active')

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/scripts/index.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/index.coffee b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
index 3d01ef5..d7db7e0 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/index.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
@@ -117,6 +117,7 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
     views:
       details:
         templateUrl: "partials/jobs/job.exceptions.html"
+        controller: 'JobExceptionsController'
 
   .state "single-job.config",
     url: "/config"

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
index 1fc8eae..d6ffdb0 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
@@ -72,3 +72,10 @@ angular.module('flinkApp')
 .controller 'JobTimelineVertexController', ($scope, $state, $stateParams, JobsService) ->
   JobsService.getVertex($stateParams.vertexId).then (data) ->
     $scope.vertex = data
+
+# --------------------------------------
+
+.controller 'JobExceptionsController', ($scope, $state, $stateParams, JobsService) ->
+  JobsService.loadExceptions().then (data) ->
+    $scope.exceptions = data
+

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
index cc5c29b..6624b4f 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
@@ -111,13 +111,9 @@ angular.module('flinkApp')
         .success (jobConfig) ->
           data = angular.extend(data, jobConfig)
 
-          $http.get flinkConfig.jobServer + "/jobs/" + jobid + "/exceptions"
-          .success (exceptions) ->
-            data.exceptions = exceptions
+          currentJob = data
 
-            currentJob = data
-
-            deferreds.job.resolve(data)
+          deferreds.job.resolve(data)
 
     deferreds.job.promise
 
@@ -162,7 +158,6 @@ angular.module('flinkApp')
 
     return null
 
-
   @getVertex = (vertexid) ->
     deferred = $q.defer()
 
@@ -177,4 +172,17 @@ angular.module('flinkApp')
 
     deferred.promise
 
+  @loadExceptions = ->
+    deferred = $q.defer()
+
+    $q.all([deferreds.job.promise]).then (data) =>
+
+      $http.get flinkConfig.jobServer + "/jobs/" + currentJob.jid + "/exceptions"
+      .success (exceptions) ->
+        currentJob.exceptions = exceptions
+
+        deferred.resolve(exceptions)
+
+    deferred.promise
+
   @

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/app/styles/index.styl
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/styles/index.styl b/flink-runtime-web/web-dashboard/app/styles/index.styl
index d23d8c5..608dc3a 100644
--- a/flink-runtime-web/web-dashboard/app/styles/index.styl
+++ b/flink-runtime-web/web-dashboard/app/styles/index.styl
@@ -163,6 +163,10 @@ sidebar-width = 250px
 .panel.panel-multi
   .panel-heading
     padding: 0
+    
+    .panel-info
+      &.thin
+        padding: 8px 10px
 
   .panel-body
     padding: 10px
@@ -249,6 +253,12 @@ sidebar-width = 250px
     color: #d9534f
 
 
+pre.exception
+  border: none
+  background-color: transparent
+  padding: 0
+  margin: 0
+
 @import './job'
 @import './graph'
 @import './timeline'

http://git-wip-us.apache.org/repos/asf/flink/blob/ba31f83a/flink-runtime-web/web-dashboard/web/css/index.css
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/web/css/index.css b/flink-runtime-web/web-dashboard/web/css/index.css
index 854a619..438ff1b 100644
--- a/flink-runtime-web/web-dashboard/web/css/index.css
+++ b/flink-runtime-web/web-dashboard/web/css/index.css
@@ -209,6 +209,9 @@
 .panel.panel-multi .panel-heading {
   padding: 0;
 }
+.panel.panel-multi .panel-heading .panel-info.thin {
+  padding: 8px 10px;
+}
 .panel.panel-multi .panel-body {
   padding: 10px;
   background-color: #fdfdfd;
@@ -291,6 +294,12 @@
 .indicator.indicator-danger {
   color: #d9534f;
 }
+pre.exception {
+  border: none;
+  background-color: transparent;
+  padding: 0;
+  margin: 0;
+}
 .canvas-wrapper {
   border: 1px solid #ddd;
   position: relative;