<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page errorPage="error_page.jsp" %> <%@page import="java.util.*" %> <%@page import="org.apache.hadoop.hive.metastore.*, org.apache.hadoop.hive.metastore.api.*, org.apache.hadoop.hive.conf.HiveConf, org.apache.hadoop.hive.ql.session.SessionState, java.util.*, org.apache.hadoop.hive.ql.*, org.apache.hadoop.hive.cli.*" %> <% String db= request.getParameter("db"); String table= request.getParameter("table"); HiveConf hiveConf = new HiveConf(SessionState.class); HiveMetaStoreClient client = new HiveMetaStoreClient(hiveConf); org.apache.hadoop.hive.metastore.api.Table t = client.getTable(db, table); StorageDescriptor sd = t.getSd(); List bcols = sd.getBucketCols(); List fsc = sd.getCols(); List ord = sd.getSortCols(); Partition p = null;//How do we get this info? %> HWI Hive Web Interface-Schema Browser

<%=table%>

ColsSize: <%= sd.getColsSize()%>
Input Format: <%= sd.getInputFormat() %>
Output Format: <%= sd.getOutputFormat() %>
Is Compressed?: <%= sd.isCompressed() %>
Location: <%= sd.getLocation() %>
Number Of Buckets: <%= sd.getNumBuckets() %>

Field Schema

<% for (FieldSchema fs: fsc ) {%> <% } %>
Name Type Comment
<%=fs.getName() %> <%=fs.getType() %> <%=fs.getComment() %>
<% for (String col: bcols ) {%> <% } %>
Bucket Columns
<%=col%>

Sort Columns

<% for (Order o: ord ) {%> <% } %>
Column Order
<%= o.getCol() %> <%= o.getOrder() %>

Parameters

<% for ( String key: sd.getParameters().keySet() ){ %> <% } %>
Name Value
<%=key%> <%=sd.getParameters().get(key)%>

SerDe Info

<% SerDeInfo si = sd.getSerdeInfo(); %> Name:<%= si.getName() %>
Lib: <%= si.getSerializationLib() %>
<% for (String key: si.getParameters().keySet() ) { %> <% } %>
Name value
<%= key %> <%= si.getParameters().get(key) %>

Partition Information

<% for (FieldSchema fieldSchema: t.getPartitionKeys() ){ %> <% } %>
Name Type Comment
<%= fieldSchema.getName() %> <%= fieldSchema.getType() %> <%= fieldSchema.getComment() %>
<% client.close(); %>