tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [1/4] TEZ-1594. Initial TezUI into TEZ-8 branch (jeagles)
Date Fri, 19 Sep 2014 16:26:15 GMT
Repository: tez
Updated Branches:
  refs/heads/TEZ-8 625450cf1 -> cf3318e1b


http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/login.html
----------------------------------------------------------------------
diff --git a/tez-ui/original/login.html b/tez-ui/original/login.html
new file mode 100644
index 0000000..dc0a89d
--- /dev/null
+++ b/tez-ui/original/login.html
@@ -0,0 +1,51 @@
+<!-- /**
+ * 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.
+ */ -->
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>TEZ UI</title>
+    <script src="lib/jquery.js"></script>
+    <script src="/jquery-cookie/jquery.cookie.js"></script>
+    <script src="login.js"></script>
+    <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
+    <script type="text/javascript" charset="utf8" src="lib/jquery.dataTables.min.js"></script>
+    <script>
+      function f(){
+        var hostname=document.getElementById('sid').value;
+        var port=document.getElementById('port_id').value;
+        if(hostname.length==0)
+        alert("hostname can't be blank");
+        else if(port.length==0)
+        alert("port number can't be blank");
+        else{
+          window.sessionStorage.setItem('hostname',hostname);
+          window.sessionStorage.setItem('port',port);
+          window.open("application_page.html");
+        }
+      }
+    </script>
+  </head>
+
+  <body>
+    SERVER HOSTNAME: <input type="text" id="sid">
+    <br/>
+    SERVER PORT: <input type="text" id="port_id">
+    <br/>
+    <input type = "button" onclick="f()" value="Log in">
+  </body>

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/task_attempt_page.html
----------------------------------------------------------------------
diff --git a/tez-ui/original/task_attempt_page.html b/tez-ui/original/task_attempt_page.html
new file mode 100644
index 0000000..e827588
--- /dev/null
+++ b/tez-ui/original/task_attempt_page.html
@@ -0,0 +1,60 @@
+<!-- /**
+ * 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.
+ */ -->
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>TEZ UI</title>
+    <script src="lib/jquery.js"></script>
+    <script src="task_attempt_page.js"></script>
+    <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
+    <script type="text/javascript" charset="utf8" src="lib/jquery.dataTables.min.js"></script>
+  </head>
+
+  <body>
+    <div>
+      <center><h2 id=taskattemptid>Task Attempt Id</h2></center>
+      <table id='task_attempt_overview' class='display'>
+        <caption>Task Attempt Overview</caption>
+        <thead>
+          <tr>
+            <th>Task Attempt Id</th>	
+            <th>Start Time</th>
+            <th>End Time</th>
+            <th>Time Taken</th>
+            <th>Status</th>
+            <th>Progress Logs</th>
+            <th>Completed Logs</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div id="counters">
+      <table id='counter' class='display'>
+        <thead>
+          <tr>
+            <th>Counter Group</th>
+            <th>Counters</th>
+          </tr>
+        </thead>
+        <tbody id="counterbody">
+        </tbody>
+      </table>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/task_attempt_page.js
----------------------------------------------------------------------
diff --git a/tez-ui/original/task_attempt_page.js b/tez-ui/original/task_attempt_page.js
new file mode 100644
index 0000000..160f6c0
--- /dev/null
+++ b/tez-ui/original/task_attempt_page.js
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+$(document).ready( function () {
+  var task_attempt_id=window.sessionStorage.getItem('taskattemptid');
+  var hostname=window.sessionStorage.getItem('hostname');
+  var port=window.sessionStorage.getItem('port');
+  var taurl="http://"+hostname+":"+port+"/ws/v1/timeline/TEZ_TASK_ATTEMPT_ID/"+task_attempt_id;
+
+  $.getJSON(taurl, function(task_attempt) {
+    $('#taskattemptid').text("Task Attempt Id - " + task_attempt_id);
+    var task_attempt_table=$('#task_attempt_overview').DataTable({
+      "paging": false,
+      "searching": false,
+      "ordering": false,
+      "info": false,
+      });
+    var taskAttemptStartEpoch=task_attempt.otherinfo.startTime;
+    var taskAttemptStartTime=new Date(taskAttemptStartEpoch);
+    var taskAttemptEndEpoch=task_attempt.otherinfo.endTime;
+    var taskAttemptEndTime=new Date(taskAttemptEndEpoch);
+    var inProgressLogs='<a href=http://'+task_attempt.otherinfo.inProgressLogsURL+'>
inProgressLog</a>';
+    var completedLogs='<a href='+task_attempt.otherinfo.completedLogsURL+'> completeLog</a>';
+    task_attempt_table.row.add([task_attempt.entity, taskAttemptStartTime.toGMTString(),
taskAttemptEndTime.toGMTString(), task_attempt.otherinfo.timeTaken, task_attempt.otherinfo.status,
inProgressLogs, completedLogs]);
+    task_attempt_table.draw();
+
+    var counterGroupNum = 0;
+    $.each(task_attempt.otherinfo.counters.counterGroups, function(i, counterGroup){
+      $("<th>Counters</th></tr></thead><tbody><th>" +
counterGroup.counterGroupDisplayName + "</th>");
+      $("<tr><th>Counters</th></tr></thead><tbody><th>"
+ counterGroup.counterGroupDisplayName + "</th><td class='table'><table id='countergroup"
+ counterGroupNum + "'><thead><tr><th>Name</th><th>Value</th></tr></thead></table></td></tr>").appendTo('#counterbody');
+      var counterGroupDT = $('#countergroup' + counterGroupNum).DataTable();
+      counterGroupNum++;
+      $.each(counterGroup.counters, function(i, counter) {
+        counterGroupDT.row.add([counter.counterDisplayName, counter.counterValue]);
+      });
+      counterGroupDT.draw();
+    });
+    counters_table=$('#counter').DataTable(
+        { "paging": false,
+          "searching": false,
+          "ordering": false,
+          "info": false,
+        });
+  });
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/task_page.html
----------------------------------------------------------------------
diff --git a/tez-ui/original/task_page.html b/tez-ui/original/task_page.html
new file mode 100644
index 0000000..f6751ab
--- /dev/null
+++ b/tez-ui/original/task_page.html
@@ -0,0 +1,72 @@
+<!-- /**
+ * 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.
+ */ -->
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>TEZ UI</title>
+    <script src="lib/jquery.js"></script>
+    <script src="task_page.js"></script>
+    <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
+    <script type="text/javascript" charset="utf8" src="lib/jquery.dataTables.min.js"></script>
+  </head>
+
+  <body>
+    <div>
+      <center><h2 id=taskid>Task Id</h2></center>
+      <table id='task_overview' class='display'>
+        <caption>Task Overview</caption>
+        <thead>
+          <tr>
+            <th>Task Id</th>	
+            <th>Start Time</th>
+            <th>End Time</th>
+            <th>Time Taken</th>
+            <th>Status</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div>
+      <table id='task_attempts' class='display'>
+        <caption>Task Attempts</caption>
+        <thead>
+          <tr>
+            <th>Task Attempt Id</th>	
+            <th>Start Time</th>
+            <th>End Time</th>
+            <th>Time Taken</th>
+            <th>Status</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div id="counters">
+      <table id='counter' class='display'>
+        <thead>
+          <tr>
+            <th>Counter Group</th>
+            <th>Counters</th>
+          </tr>
+        </thead>
+        <tbody id="counterbody">
+        </tbody>
+      </table>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/task_page.js
----------------------------------------------------------------------
diff --git a/tez-ui/original/task_page.js b/tez-ui/original/task_page.js
new file mode 100644
index 0000000..400ce66
--- /dev/null
+++ b/tez-ui/original/task_page.js
@@ -0,0 +1,76 @@
+/**
+ * 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.
+ */
+$(document).ready( function () {
+  var task_id=window.sessionStorage.getItem('taskid');
+  var hostname=window.sessionStorage.getItem('hostname');
+  var port=window.sessionStorage.getItem('port');
+  var turl="http://"+hostname+":"+port+"/ws/v1/timeline/TEZ_TASK_ID/"+task_id;
+
+  $.getJSON(turl, function(task) {
+    $('#taskid').text("Task Id - " + task_id);
+    var task_table=$('#task_overview').DataTable({
+      "paging": false,
+      "searching": false,
+      "ordering": false,
+      "info": false,
+      });
+    var taskStartEpoch=task.otherinfo.startTime;
+    var taskStartTime=new Date(taskStartEpoch);
+    var taskEndEpoch=task.otherinfo.endTime;
+    var taskEndTime=new Date(taskEndEpoch);
+    var startTime, status, scheduledTime, endTime, diagnostics;
+    task_table.row.add([task.entity, taskStartTime.toGMTString(), taskEndTime.toGMTString(),
task.otherinfo.timeTaken, task.otherinfo.status]);
+    task_table.draw();
+
+    var task_attempts_table=$('#task_attempts').DataTable();
+    var turl='http://'+hostname+':'+port+'/ws/v1/timeline/TEZ_TASK_ATTEMPT_ID?primaryFilter=TEZ_TASK_ID:'
+ task_id;
+    $.getJSON(turl, function(task_attempts) {
+      $.each(task_attempts.entities, function(i, task_attempt) {
+        var callback='tcallback("'+ task_attempt.entity+'");>';			
+        var task_attempt_id_cell='<a href="task_attempt_page.html" onclick='+ callback
+ task_attempt.entity +" </a>";
+        var taskAttemptStartEpoch=task_attempt.otherinfo.startTime;
+        var taskAttemptStartTime=new Date(taskAttemptStartEpoch);
+        var taskAttemptEndEpoch=task_attempt.otherinfo.endTime;
+        var taskAttemptEndTime=new Date(taskAttemptEndEpoch);
+        task_attempts_table.row.add([task_attempt_id_cell, taskAttemptStartTime.toGMTString(),
taskAttemptEndTime.toGMTString(), task_attempt.otherinfo.timeTaken, task_attempt.otherinfo.status]);
+      });
+      task_attempts_table.draw();
+    });
+
+    var counterGroupNum = 0;
+    $.each(task.otherinfo.counters.counterGroups, function(i, counterGroup){
+      $("<th>Counters</th></tr></thead><tbody><th>" +
counterGroup.counterGroupDisplayName + "</th>");
+      $("<tr><th>Counters</th></tr></thead><tbody><th>"
+ counterGroup.counterGroupDisplayName + "</th><td class='table'><table id='countergroup"
+ counterGroupNum + "'><thead><tr><th>Name</th><th>Value</th></tr></thead></table></td></tr>").appendTo('#counterbody');
+      var counterGroupDT = $('#countergroup' + counterGroupNum).DataTable();
+      counterGroupNum++;
+      $.each(counterGroup.counters, function(i, counter) {
+        counterGroupDT.row.add([counter.counterDisplayName, counter.counterValue]);
+      });
+      counterGroupDT.draw();
+    });
+    counters_table=$('#counter').DataTable(
+        { "paging": false,
+          "searching": false,
+          "ordering": false,
+          "info": false,
+        });
+  });
+});
+function tcallback(id) {
+	window.sessionStorage.setItem('taskattemptid',id);
+}

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/user_guide.txt
----------------------------------------------------------------------
diff --git a/tez-ui/original/user_guide.txt b/tez-ui/original/user_guide.txt
new file mode 100644
index 0000000..e0f41f3
--- /dev/null
+++ b/tez-ui/original/user_guide.txt
@@ -0,0 +1,18 @@
+/**
+ * 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.
+ */
+Please open the TEZ_UI_LOGIN.html as the first page, and enter the server hostname and server
port(usually is 8188).

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/vertex_page.html
----------------------------------------------------------------------
diff --git a/tez-ui/original/vertex_page.html b/tez-ui/original/vertex_page.html
new file mode 100644
index 0000000..8e703a0
--- /dev/null
+++ b/tez-ui/original/vertex_page.html
@@ -0,0 +1,73 @@
+<!-- /**
+ * 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.
+ */ -->
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>TEZ UI</title>
+    <script src="lib/jquery.js"></script>
+    <script src="vertex_page.js"></script>
+    <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
+    <script type="text/javascript" charset="utf8" src="lib/jquery.dataTables.min.js"></script>
+  </head>
+
+  <body>
+    <div>
+      <center><h2 id=vertexid>Vertex Id</h2></center>
+      <table id="vertex_overview" class="display">
+        <caption>Vertex Overview</caption>
+        <thead>
+          <tr>
+            <th>Vertex Id</th>
+            <th>Name</th>
+            <th>Start Time</th>
+            <th>End Time</th>
+            <th>Time Taken</th>
+            <th>Task Count</th>
+            <th>Status</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div>
+      <table id="tasks" class="display">
+        <thead>
+          <tr>
+            <th>Task Id</th>	
+            <th>Start Time</th>
+            <th>End Time</th>
+            <th>Time Taken</th>
+            <th>Status</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div id="counters">
+      <table id='counter' class='display'>
+        <thead>
+          <tr>
+            <th>Counter Group</th>
+            <th>Counters</th>
+          </tr>
+        </thead>
+        <tbody id="counterbody">
+        </tbody>
+      </table>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/tez/blob/cf3318e1/tez-ui/original/vertex_page.js
----------------------------------------------------------------------
diff --git a/tez-ui/original/vertex_page.js b/tez-ui/original/vertex_page.js
new file mode 100644
index 0000000..0da3018
--- /dev/null
+++ b/tez-ui/original/vertex_page.js
@@ -0,0 +1,76 @@
+/**
+ * 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.
+ */
+$(document).ready( function () {
+	var vertex_id=window.sessionStorage.getItem('vertid');
+	var hostname=window.sessionStorage.getItem('hostname');
+	var port=window.sessionStorage.getItem('port');
+	var vurl='http://'+hostname+':'+port+'/ws/v1/timeline/TEZ_VERTEX_ID/'+vertex_id;
+
+  $.getJSON(vurl, function(vertex) {
+    $('#vertexid').text("Vertex Id - " + vertex_id);
+
+    var vertex_table=$('#vertex_overview').DataTable(
+      { "paging": false,
+        "searching": false,
+        "ordering": false,
+        "info": false,
+      });
+    vertexStartEpoch=vertex.otherinfo.startTime;
+    vertexStartTime=new Date(vertexStartEpoch);
+    vertexEndEpoch=vertex.otherinfo.endTime;
+    vertexEndTime=new Date(vertexEndEpoch);
+    vertex_table.row.add([vertex.entity, vertex.otherinfo.vertexName, vertexStartTime.toGMTString(),
vertexEndTime.toGMTString(), vertex.otherinfo.timeTaken, vertex.otherinfo.numTasks, vertex.otherinfo.status]);
+    vertex_table.draw();
+
+    var task_table=$('#tasks').DataTable();
+    var turl='http://'+hostname+':'+port+'/ws/v1/timeline/TEZ_TASK_ID?primaryFilter=TEZ_VERTEX_ID:'
+ vertex_id;
+    $.getJSON(turl, function(tasks) {
+      $.each(tasks.entities, function(i, task) {
+        var callback='tcallback("'+ task.entity+'");>';			
+        var task_id_cell='<a href="task_page.html" onclick='+ callback + task.entity +"
</a>";
+        var taskStartEpoch=task.otherinfo.startTime;
+        var taskStartTime=new Date(taskStartEpoch);
+        var taskEndEpoch=task.otherinfo.endTime;
+        var taskEndTime=new Date(taskEndEpoch);
+        task_table.row.add([task_id_cell, taskStartTime.toGMTString(), taskEndTime.toGMTString(),
task.otherinfo.timeTaken, task.otherinfo.status]);
+      });
+      task_table.draw();
+    });
+
+    var counterGroupNum = 0;
+    $.each(vertex.otherinfo.counters.counterGroups, function(i, counterGroup){
+      $("<th>Counters</th></tr></thead><tbody><th>" +
counterGroup.counterGroupDisplayName + "</th>");
+      $("<tr><th>Counters</th></tr></thead><tbody><th>"
+ counterGroup.counterGroupDisplayName + "</th><td class='table'><table id='countergroup"
+ counterGroupNum + "'><thead><tr><th>Name</th><th>Value</th></tr></thead></table></td></tr>").appendTo('#counterbody');
+      var counterGroupDT = $('#countergroup' + counterGroupNum).DataTable();
+      counterGroupNum++;
+      $.each(counterGroup.counters, function(i, counter) {
+        counterGroupDT.row.add([counter.counterDisplayName, counter.counterValue]);
+      });
+      counterGroupDT.draw();
+    });
+    counters_table=$('#counter').DataTable(
+        { "paging": false,
+          "searching": false,
+          "ordering": false,
+          "info": false,
+        });
+  });
+});
+function tcallback(id) {
+	window.sessionStorage.setItem('taskid',id);
+}


Mime
View raw message