Repository: flink
Updated Branches:
  refs/heads/master e4807621b -> 3a4fc537d


http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.html
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/web/partials/jobs/job.html 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.html
index 22730ac..b842954 100644
--- a/flink-runtime-web/web-dashboard/web/partials/jobs/job.html
+++ b/flink-runtime-web/web-dashboard/web/partials/jobs/job.html
@@ -37,10 +37,9 @@ limitations under the License.
 </nav>
 <nav ng-if="job" class="navbar navbar-default navbar-fixed-top 
navbar-main-additional">
   <ul class="nav nav-tabs">
-    <li ui-sref-active="active"><a ui-sref=".plan">Plan</a></li>
+    <li ui-sref-active="active"><a ui-sref=".plan">Overview</a></li>
     <li ui-sref-active="active"><a ui-sref=".timeline">Timeline</a></li>
     <li ui-sref-active="active"><a ui-sref=".exceptions">Exceptions</a></li>
-    <li ui-sref-active="active"><a ui-sref=".properties">Properties</a></li>
     <li ui-sref-active="active"><a ui-sref=".config">Configuration</a></li>
   </ul>
 </nav>

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
index 580898b..71712ac 100644
--- a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
+++ b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
@@ -24,6 +24,7 @@ limitations under the License.
   <nav class="navbar navbar-default navbar-secondary-additional">
     <ul class="nav nav-tabs">
       <li ui-sref-active="active"><a ui-sref=".subtasks({nodeid: 
nodeid})">Subtasks</a></li>
+      <li ui-sref-active="active"><a ui-sref=".metrics({nodeid: 
nodeid})">Metrics</a></li>
       <li ui-sref-active="active"><a ui-sref=".taskmanagers({nodeid: 
nodeid})">TaskManagers</a></li>
       <li ui-sref-active="active"><a ui-sref=".accumulators({nodeid: 
nodeid})">Accumulators</a></li>
       <li ui-sref-active="active"><a ui-sref=".checkpoints({nodeid: 
nodeid})">Checkpoints</a></li>

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
----------------------------------------------------------------------
diff --git 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
new file mode 100644
index 0000000..a780f31
--- /dev/null
+++ 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.metrics.html
@@ -0,0 +1,45 @@
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<p ng-if="!nodeid" class="p-info"><em>Select operator in the job graph above 
to see the metrics</em></p>
+<nav ng-if="nodeid" class="navbar navbar-default navbar-secondary-additional 
navbar-secondary-additional-2">
+  <div class="navbar-info">{{ vertex.name }}</div>
+  <div class="navbar-info">{{ nodeid }}</div>
+  <div ng-if="availableMetrics.length" class="dropup add-metrics">
+    <button type="button" data-toggle="dropdown" class="btn btn-default 
navbar-btn dropdown-toggle">
+      Add metric
+      &nbsp;<span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu dropdown-menu-right metric-menu">
+      <li ng-repeat="metric in availableMetrics track by $index"><a 
ng-click="addMetric(metric)">{{ metric.id }}</a></li>
+    </ul>
+  </div>
+  <div ng-if="!availableMetrics.length" class="dropup add-metrics">
+    <button type="button" data-toggle="dropdown" disabled="disabled" 
class="btn btn-default navbar-btn dropdown-toggle"><i>No metrics 
available</i></button>
+  </div>
+</nav>
+<div ng-if="nodeid &amp;&amp; metrics.length == 0" class="row metric-row">
+  <p class="p-info"><em>No metrics selected</em></p>
+</div>
+<ul ng-if="nodeid &amp;&amp; metrics.length &gt; 0" dnd-list="metrics" 
dnd-drop="dropped(event, index, item, external, type, external)" 
class="metric-row">
+  <li ng-repeat="metric in metrics track by metric.id" dnd-draggable="metric" 
dnd-dragstart="dragStart()" dnd-dragend="dragEnd()" dnd-canceled="dragEnd()" 
ng-class="{big: metric.size != 'small'}" class="metric-col">
+    <metrics-graph metric="metric" window="window" 
get-values="getValues(metric.id)" remove-metric="removeMetric(metric)" 
set-metric-size="setMetricSize"></metrics-graph>
+  </li>
+</ul>
+<div class="clearfix"></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.overview.html
----------------------------------------------------------------------
diff --git 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.overview.html
 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.overview.html
deleted file mode 100644
index 4d05cc3..0000000
--- 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.overview.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<table class="table table-body-hover table-clickable table-activable">
-  <thead>
-    <tr>
-      <th>Start Time</th>
-      <th>End Time</th>
-      <th>Duration</th>
-      <th>Name</th>
-      <th>Bytes received</th>
-      <th>Records received</th>
-      <th>Bytes sent</th>
-      <th>Records sent</th>
-      <th>Tasks</th>
-      <th>Status</th>
-    </tr>
-  </thead>
-  <tbody ng-repeat="v in job.vertices" ng-class="{ active: v.id == nodeid }" 
ng-click="changeNode(v.id)">
-    <tr ng-if="v.type == 'regular'">
-      <td><span ng-if="v['start-time'] &gt; -1">{{ v['start-time'] | 
amDateFormat:'YYYY-MM-DD, H:mm:ss' }}</span></td>
-      <td><span ng-if="v['end-time'] &gt; -1">{{ v['end-time'] | 
amDateFormat:'YYYY-MM-DD, H:mm:ss' }}</span></td>
-      <td><span ng-if="v.duration &gt; -1" title="{{v.duration | 
humanizeDuration:false}}">{{v.duration | humanizeDuration:true}}</span></td>
-      <td class="td-long">{{ v.name | humanizeText }}</td>
-      <td title="{{v.metrics['read-bytes']}} bytes">{{ v.metrics['read-bytes'] 
| humanizeBytes }}</td>
-      <td>{{ v.metrics['read-records'] | number }}</td>
-      <td title="{{v.metrics['write-bytes']}} bytes">{{ 
v.metrics['write-bytes'] | humanizeBytes }}</td>
-      <td>{{ v.metrics['write-records'] | number }}</td>
-      <td>
-        <div class="label-group">
-          <bs-label status="{{status}}" ng-repeat="(index, status) in 
stateList">{{v.tasks[status]}}</bs-label>
-        </div>
-      </td>
-      <td> 
-        <bs-label status="{{v.status}}">{{v.status}}</bs-label>
-      </td>
-    </tr>
-    <tr ng-if="nodeid &amp;&amp; v.id == nodeid">
-      <td colspan="10">
-        <div ng-include=" 'partials/jobs/job.plan.node.subtasks.html' "></div>
-      </td>
-    </tr>
-  </tbody>
-</table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.subtasks.html
----------------------------------------------------------------------
diff --git 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.subtasks.html
 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.subtasks.html
index 4d05cc3..8261bdc 100644
--- 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.subtasks.html
+++ 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.subtasks.html
@@ -28,6 +28,7 @@ limitations under the License.
       <th>Records received</th>
       <th>Bytes sent</th>
       <th>Records sent</th>
+      <th>Parallelism</th>
       <th>Tasks</th>
       <th>Status</th>
     </tr>
@@ -42,6 +43,7 @@ limitations under the License.
       <td>{{ v.metrics['read-records'] | number }}</td>
       <td title="{{v.metrics['write-bytes']}} bytes">{{ 
v.metrics['write-bytes'] | humanizeBytes }}</td>
       <td>{{ v.metrics['write-records'] | number }}</td>
+      <td>{{ v.parallelism }}</td>
       <td>
         <div class="label-group">
           <bs-label status="{{status}}" ng-repeat="(index, status) in 
stateList">{{v.tasks[status]}}</bs-label>
@@ -52,7 +54,7 @@ limitations under the License.
       </td>
     </tr>
     <tr ng-if="nodeid &amp;&amp; v.id == nodeid">
-      <td colspan="10">
+      <td colspan="11">
         <div ng-include=" 'partials/jobs/job.plan.node.subtasks.html' "></div>
       </td>
     </tr>

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.taskmanagers.html
----------------------------------------------------------------------
diff --git 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.taskmanagers.html
 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.taskmanagers.html
index 8991ebd..f322ac4 100644
--- 
a/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.taskmanagers.html
+++ 
b/flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.taskmanagers.html
@@ -28,6 +28,7 @@ limitations under the License.
       <th>Records received</th>
       <th>Bytes sent</th>
       <th>Records sent</th>
+      <th>Parallelism</th>
       <th>Tasks</th>
       <th>Status</th>
     </tr>
@@ -42,6 +43,7 @@ limitations under the License.
       <td>{{ v.metrics['read-records'] | number }}</td>
       <td title="{{v.metrics['write-bytes']}} bytes">{{ 
v.metrics['write-bytes'] | humanizeBytes }}</td>
       <td>{{ v.metrics['write-records'] | number }}</td>
+      <td>{{ v.parallelism }}</td>
       <td>
         <div class="label-group">
           <bs-label status="{{status}}" ng-repeat="(index, status) in 
stateList">{{v.tasks[status]}}</bs-label>
@@ -52,7 +54,7 @@ limitations under the License.
       </td>
     </tr>
     <tr ng-if="nodeid &amp;&amp; v.id == nodeid">
-      <td colspan="10">
+      <td colspan="11">
         <div ng-include=" 'partials/jobs/job.plan.node.taskmanagers.html' 
"></div>
       </td>
     </tr>

http://git-wip-us.apache.org/repos/asf/flink/blob/3a4fc537/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
----------------------------------------------------------------------
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
index 8f9da8a..2065a16 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
@@ -29,6 +29,7 @@ import org.apache.flink.configuration.Configuration;
 import org.apache.flink.runtime.io.network.partition.ResultPartitionType;
 import org.apache.flink.runtime.jobgraph.DistributionPattern;
 import org.apache.flink.runtime.jobgraph.InputFormatVertex;
+import org.apache.flink.runtime.jobgraph.JobEdge;
 import org.apache.flink.runtime.jobgraph.JobGraph;
 import org.apache.flink.runtime.jobgraph.JobVertex;
 import org.apache.flink.runtime.jobgraph.JobVertexID;
@@ -386,25 +387,28 @@ public class StreamingJobGraphGenerator {
                
downStreamConfig.setNumberOfInputs(downStreamConfig.getNumberOfInputs() + 1);
 
                StreamPartitioner<?> partitioner = edge.getPartitioner();
+               JobEdge jobEdge = null;
                if (partitioner instanceof ForwardPartitioner) {
-                       downStreamVertex.connectNewDataSetAsInput(
+                       jobEdge = downStreamVertex.connectNewDataSetAsInput(
                                headVertex,
                                DistributionPattern.POINTWISE,
                                ResultPartitionType.PIPELINED,
                                true);
                } else if (partitioner instanceof RescalePartitioner){
-                       downStreamVertex.connectNewDataSetAsInput(
+                       jobEdge = downStreamVertex.connectNewDataSetAsInput(
                                headVertex,
                                DistributionPattern.POINTWISE,
                                ResultPartitionType.PIPELINED,
                                true);
                } else {
-                       downStreamVertex.connectNewDataSetAsInput(
+                       jobEdge = downStreamVertex.connectNewDataSetAsInput(
                                        headVertex,
                                        DistributionPattern.ALL_TO_ALL,
                                        ResultPartitionType.PIPELINED,
                                        true);
                }
+               // set strategy name so that web interface can show it.
+               jobEdge.setShipStrategyName(partitioner.toString());
 
                if (LOG.isDebugEnabled()) {
                        LOG.debug("CONNECTED: {} - {} -> {}", 
partitioner.getClass().getSimpleName(),

Reply via email to