org.apache.hadoop.hive.ql.metadata.formatting
Class MetaDataFormatUtils

java.lang.Object
  extended by org.apache.hadoop.hive.ql.metadata.formatting.MetaDataFormatUtils

public final class MetaDataFormatUtils
extends Object

This class provides methods to format table and index information.


Field Summary
static String FIELD_DELIM
           
static String LINE_DELIM
           
 
Method Summary
static String getAllColumnsInformation(org.apache.hadoop.hive.metastore.api.Index index)
           
static String getAllColumnsInformation(List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols, boolean printHeader, boolean isOutputPadded)
          Write formatted information about the given columns to a string
static String getAllColumnsInformation(List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols, List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols, boolean printHeader, boolean isOutputPadded, boolean showPartColsSep)
          Write formatted information about the given columns, including partition columns to a string
static String[] getColumnsHeader()
           
static MetaDataFormatter getFormatter(HiveConf conf)
           
static String getIndexColumnsHeader()
           
static String getPartitionInformation(Partition part)
           
static String getTableInformation(Table table)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_DELIM

public static final String FIELD_DELIM
See Also:
Constant Field Values

LINE_DELIM

public static final String LINE_DELIM
See Also:
Constant Field Values
Method Detail

getAllColumnsInformation

public static String getAllColumnsInformation(List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols,
                                              boolean printHeader,
                                              boolean isOutputPadded)
Write formatted information about the given columns to a string

Parameters:
cols - - list of columns
printHeader - - if header should be included
isOutputPadded - - make it more human readable by setting indentation with spaces. Turned off for use by HiveServer2
Returns:
string with formatted column information

getAllColumnsInformation

public static String getAllColumnsInformation(List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols,
                                              List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols,
                                              boolean printHeader,
                                              boolean isOutputPadded,
                                              boolean showPartColsSep)
Write formatted information about the given columns, including partition columns to a string

Parameters:
cols - - list of columns
partCols - - list of partition columns
printHeader - - if header should be included
isOutputPadded - - make it more human readable by setting indentation with spaces. Turned off for use by HiveServer2
Returns:
string with formatted column information

getAllColumnsInformation

public static String getAllColumnsInformation(org.apache.hadoop.hive.metastore.api.Index index)

getPartitionInformation

public static String getPartitionInformation(Partition part)

getTableInformation

public static String getTableInformation(Table table)

getColumnsHeader

public static String[] getColumnsHeader()

getIndexColumnsHeader

public static String getIndexColumnsHeader()

getFormatter

public static MetaDataFormatter getFormatter(HiveConf conf)


Copyright © 2014 The Apache Software Foundation. All rights reserved.