tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-638: ExecutionBlock must be sorted by start time in querydetail.jsp. (hyoungjunkim via hyunsik)
Date Sat, 01 Mar 2014 08:03:31 GMT
Repository: incubator-tajo
Updated Branches:
  refs/heads/master c573b6fcf -> 4238dd22d


TAJO-638: ExecutionBlock must be sorted by start time in querydetail.jsp. (hyoungjunkim via
hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/4238dd22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/4238dd22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/4238dd22

Branch: refs/heads/master
Commit: 4238dd22d524d87ebbc0200d9a538f2b3f131ca9
Parents: c573b6f
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Sat Mar 1 15:37:41 2014 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Sat Mar 1 15:37:41 2014 +0900

----------------------------------------------------------------------
 CHANGES.txt                                     |  3 ++
 .../main/java/org/apache/tajo/util/JSPUtil.java | 13 +++++++-
 .../main/resources/webapps/admin/cluster.jsp    | 35 ++++++++------------
 .../resources/webapps/worker/querytasks.jsp     |  4 ++-
 4 files changed, 32 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/4238dd22/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index bbf66a4..1ca6620 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -130,6 +130,9 @@ Release 0.8.0 - unreleased
 
   IMPROVEMENTS
 
+    TAJO-638: ExecutionBlock must be sorted by start time in querydetail.jsp.
+    (hyoungjunkim via hyunsik)
+
     TAJO-589: Add fine grained progress indicator for each task.
     (hyoungjunkim via hyunsik)
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/4238dd22/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/JSPUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/JSPUtil.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/JSPUtil.java
index c73647e..58a3550 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/JSPUtil.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/util/JSPUtil.java
@@ -113,7 +113,18 @@ public class JSPUtil {
     Collections.sort(subQueryList, new Comparator<SubQuery>() {
       @Override
       public int compare(SubQuery subQuery1, SubQuery subQuery2) {
-        return subQuery1.getId().toString().compareTo(subQuery2.getId().toString());
+        long q1StartTime = subQuery1.getStartTime();
+        long q2StartTime = subQuery2.getStartTime();
+
+        q1StartTime = (q1StartTime == 0 ? Long.MAX_VALUE : q1StartTime);
+        q2StartTime = (q2StartTime == 0 ? Long.MAX_VALUE : q2StartTime);
+
+        int result = compareLong(q1StartTime, q2StartTime);
+        if (result == 0) {
+          return subQuery1.getId().toString().compareTo(subQuery2.getId().toString());
+        } else {
+          return result;
+        }
       }
     });
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/4238dd22/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/cluster.jsp
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/cluster.jsp b/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/cluster.jsp
index 88a9f04..f454c66 100644
--- a/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/cluster.jsp
+++ b/tajo-core/tajo-core-backend/src/main/resources/webapps/admin/cluster.jsp
@@ -19,10 +19,10 @@
 %>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 
-<%@ page import="org.apache.tajo.master.TajoMaster" %>
-<%@ page import="org.apache.tajo.master.rm.Worker" %>
-<%@ page import="org.apache.tajo.master.rm.WorkerResource" %>
-<%@ page import="org.apache.tajo.master.rm.WorkerState" %>
+<%@ page import="java.util.*" %>
+<%@ page import="org.apache.tajo.webapp.StaticHttpServer" %>
+<%@ page import="org.apache.tajo.master.*" %>
+<%@ page import="org.apache.tajo.master.rm.*" %>
 <%@ page import="org.apache.tajo.util.JSPUtil" %>
 <%@ page import="org.apache.tajo.webapp.StaticHttpServer" %>
 <%@ page import="java.util.*" %>
@@ -59,7 +59,8 @@
     if (state == WorkerState.LOST) {
       if (inactiveWorker.getResource().isQueryMasterMode()) {
         deadQueryMasters.add(inactiveWorker);
-      } else {
+      }
+      if (inactiveWorker.getResource().isTaskRunnerMode()) {
         deadWorkers.add(inactiveWorker);
       }
     } else if (state == WorkerState.DECOMMISSIONED) {
@@ -92,7 +93,7 @@
   } else {
 %>
   <table width="100%" class="border_table" border="1">
-    <tr><th>No</th><th>QueryMaster</th><th>Client Port</th><th>Running
Query</th><th>Heap(free/max)</th><th>Heartbeat</th><th>Status</th></tr>
+    <tr><th>No</th><th>QueryMaster</th><th>Client Port</th><th>Running
Query</th><th>Heap(free/total/max)</th><th>Heartbeat</th><th>Status</th></tr>
 
 <%
     int no = 1;
@@ -105,7 +106,7 @@
       <td><a href='<%=queryMasterHttp%>'><%=queryMaster.getHostName()
+ ":" + queryMaster.getQueryMasterPort()%></a></td>
       <td width='100' align='center'><%=queryMaster.getClientPort()%></td>
       <td width='200' align='right'><%=resource.getNumQueryMasterTasks()%></td>
-      <td width='200' align='center'><%=resource.getFreeHeap()/1024/1024%>/<%=resource.getMaxHeap()/1024/1024%>
MB</td>
+      <td width='200' align='center'><%=resource.getFreeHeap()/1024/1024%>/<%=resource.getTotalHeap()/1024/1024%>/<%=resource.getMaxHeap()/1024/1024%>
MB</td>
       <td width='100' align='right'><%=JSPUtil.getElapsedTime(queryMaster.getLastHeartbeatTime(),
System.currentTimeMillis())%></td>
       <td width='100' align='center'><%=queryMaster.getState()%></td>
     </tr>
@@ -124,18 +125,15 @@
 %>
   <hr/>
   <h3>Dead QueryMaster</h3>
-  <table width="100%" class="border_table" border="1">
-    <tr><th>No</th><th>QueryMaster</th><th>Client Port</th><th>Status</th></tr>
+  <table width="300" class="border_table" border="1">
+    <tr><th>No</th><th>QueryMaster</th>
 <%
       int no = 1;
       for(Worker queryMaster: deadQueryMasters) {
-        WorkerResource resource = queryMaster.getResource();
 %>
     <tr>
       <td width='30' align='right'><%=no++%></td>
       <td><%=queryMaster.getHostName() + ":" + queryMaster.getQueryMasterPort()%></td>
-      <td><%=queryMaster.getClientPort()%></td>
-      <td align='center'><%=queryMaster.getState()%></td>
     </tr>
 <%
       } //end fo for
@@ -157,7 +155,7 @@
   } else {
 %>
   <table width="100%" class="border_table" border="1">
-    <tr><th>No</th><th>Worker</th><th>PullServer<br/>Port</th><th>Running
Tasks</th><th>Memory Resource<br/>(used/total)</th><th>Disk
Resource<br/>(used/total)</th></th><th>Heap(free/max)</th><th>Heartbeat</th><th>Status</th></tr>
+    <tr><th>No</th><th>Worker</th><th>PullServer<br/>Port</th><th>Running
Tasks</th><th>Memory Resource<br/>(used/total)</th><th>Disk
Resource<br/>(used/total)</th><th>Heap<br/>(free/total/max)</th><th>Heartbeat</th><th>Status</th></tr>
 <%
     int no = 1;
     for(Worker worker: liveWorkers) {
@@ -171,7 +169,7 @@
       <td width='100' align='right'><%=resource.getNumRunningTasks()%></td>
       <td width='150' align='center'><%=resource.getUsedMemoryMB()%>/<%=resource.getMemoryMB()%></td>
       <td width='100' align='center'><%=resource.getUsedDiskSlots()%>/<%=resource.getDiskSlots()%></td>
-      <td width='100' align='center'><%=resource.getFreeHeap()/1024/1024%>/<%=resource.getMaxHeap()/1024/1024%>
MB</td>
+      <td width='200' align='center'><%=resource.getFreeHeap()/1024/1024%>/<%=resource.getTotalHeap()/1024/1024%>/<%=resource.getMaxHeap()/1024/1024%>
MB</td>
       <td width='100' align='right'><%=JSPUtil.getElapsedTime(worker.getLastHeartbeatTime(),
System.currentTimeMillis())%></td>
       <td width='100' align='center'><%=worker.getState()%></td>
     </tr>
@@ -195,8 +193,8 @@
 <%
   } else {
 %>
-  <table width="100%" class="border_table" border="1">
-    <tr><th>No</th><th>Worker</th><th>PullServer Port</th><th>Running
Tasks</th><th>Memory Resource</th><th>Disk Resource</th></th><th>Heap(free/max)</th><th>Heartbeat</th><th>Status</th></tr>
+  <table width="300" class="border_table" border="1">
+    <tr><th>No</th><th>Worker</th></tr>
 <%
       int no = 1;
       for(Worker worker: deadWorkers) {
@@ -205,11 +203,6 @@
     <tr>
       <td width='30' align='right'><%=no++%></td>
       <td><%=worker.getHostName() + ":" + worker.getPeerRpcPort()%></td>
-      <td width='150' align='center'><%=worker.getPullServerPort()%></td>
-      <td width='100' align='right'><%=resource.getUsedMemoryMB()%>/<%=resource.getMemoryMB()%></td>
-      <td width='100' align='right'><%=resource.getUsedDiskSlots()%>/<%=resource.getDiskSlots()%></td>
-      <td width='100' align='left'><%=resource.getFreeHeap()/1024/1024%>/<%=resource.getMaxHeap()/1024/1024%>
MB</td>
-      <td width='100' align='center'><%=worker.getState()%></td>
     </tr>
 <%
       } //end fo for

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/4238dd22/tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querytasks.jsp
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querytasks.jsp
b/tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querytasks.jsp
index 0a287ee..744c014 100644
--- a/tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querytasks.jsp
+++ b/tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querytasks.jsp
@@ -100,7 +100,7 @@
 
   SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
-  String url = "querytasks.jsp?queryId=" + queryId + "&ebid=" + ebid + "&sortOrder="
+ nextSortOrder + "&sort=";
+  String url = "querytasks.jsp?queryId=" + queryId + "&ebid=" + ebid + "&status="
+ status + "&sortOrder=" + nextSortOrder + "&sort=";
   QueryUnit[] queryUnits = subQuery.getQueryUnits();
 
 
@@ -176,6 +176,8 @@
         <option value="RUNNING" <%="RUNNING".equals(status) ? "selected" : ""%>>RUNNING</option>
         <option value="SUCCEEDED" <%="SUCCEEDED".equals(status) ? "selected" : ""%>>SUCCEEDED</option>
     </select>
+    &nbsp;&nbsp;
+    <input type="submit" value="Filter">
     <input type="hidden" name="queryId" value="<%=paramQueryId%>"/>
     <input type="hidden" name="ebid" value="<%=paramEbId%>"/>
     <input type="hidden" name="sort" value="<%=sort%>"/>


Mime
View raw message