<%-- 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. --%> <%@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(); %>