tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [13/48] git commit: TAJO-802: No partition columns in WEB catalog page. (Hyoungjun Kim via hyunsik)
Date Tue, 20 May 2014 18:46:11 GMT
TAJO-802: No partition columns in WEB catalog page. (Hyoungjun Kim via hyunsik)


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

Branch: refs/heads/window_function
Commit: 6cc5006d5ffbc88aa7b34c18d762c69f8c347418
Parents: 8321d26
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Tue Apr 29 13:55:17 2014 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Tue Apr 29 13:55:17 2014 +0900

----------------------------------------------------------------------
 CHANGES                                         |  3 +++
 .../resources/webapps/admin/catalogview.jsp     | 22 ++++++++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/6cc5006d/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2134b54..4879124 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,6 +19,9 @@ Release 0.9.0 - unreleased
 
   BUG FIXES
 
+    TAJO-802: No partition columns in WEB catalog page. 
+    (Hyoungjun Kim via hyunsik)
+
     TAJO-766: Test failures in TestExecExternalShellCommand. (jihoon)
 
   SUB TASKS

http://git-wip-us.apache.org/repos/asf/tajo/blob/6cc5006d/tajo-core/src/main/resources/webapps/admin/catalogview.jsp
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/resources/webapps/admin/catalogview.jsp b/tajo-core/src/main/resources/webapps/admin/catalogview.jsp
index 29fd05c..a70c55b 100644
--- a/tajo-core/src/main/resources/webapps/admin/catalogview.jsp
+++ b/tajo-core/src/main/resources/webapps/admin/catalogview.jsp
@@ -22,6 +22,7 @@
 <%@ page import="org.apache.tajo.catalog.CatalogService" %>
 <%@ page import="org.apache.tajo.catalog.Column" %>
 <%@ page import="org.apache.tajo.catalog.TableDesc" %>
+<%@ page import="org.apache.tajo.catalog.partition.PartitionMethodDesc" %>
 <%@ page import="org.apache.tajo.master.TajoMaster" %>
 <%@ page import="org.apache.tajo.util.FileUtil" %>
 <%@ page import="org.apache.tajo.webapp.StaticHttpServer" %>
@@ -134,16 +135,33 @@
         out.write("<tr><td width='30' align='right'>" + columnIndex + "</td><td
width='320'>" + eachColumn.getSimpleName() + "</td><td width='150'>" + eachColumn.getDataType().getType()
+ "</td></tr>");
         columnIndex++;
       }
+      out.write("</table>");
+      out.write("</div>");
 
+      if (tableDesc.getPartitionMethod() != null) {
+        PartitionMethodDesc partition = tableDesc.getPartitionMethod();
+        List<Column> partitionColumns = partition.getExpressionSchema().getColumns();
+        String partitionColumnStr = "";
+        String prefix = "";
+        for (Column eachColumn: partitionColumns) {
+          partitionColumnStr += prefix + eachColumn.toString();
+          prefix = "<br/>";
+        }
+        out.write("<div style='margin-top:10px'>");
+        out.write("  <div style=''>Partition</div>");
+        out.write("  <table border='1' class='border_table'>");
+        out.write("    <tr><td width='100'>Type</td><td width='410'>"
+ partition.getPartitionType().name() + "</td></tr>");
+        out.write("    <tr><td>Columns</td><td>" + partitionColumnStr
+ "</td></tr>");
+        out.write("  </table>");
+        out.write("</div>");
+      }
       String optionStr = "";
       String prefix = "";
       for(Map.Entry<String, String> entry: tableDesc.getMeta().toMap().entrySet())
{
         optionStr += prefix + "'" + entry.getKey() + "'='" + entry.getValue() + "'";
         prefix = "<br/>";
       }
-      out.write("</table>");
 %>
-          </div>
           <div style='margin-top:10px'>
             <div style=''>Detail</div>
             <table border="1" class='border_table'>


Mime
View raw message