public final class MetaDataFormatUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_DELIM |
static String |
LINE_DELIM |
Modifier and Type | Method and Description |
---|---|
protected static void |
formatOutput(String name,
String value,
StringBuilder tableInfo,
boolean isOutputPadded)
Prints the name value pair
It the output is padded then unescape the value, so it could be printed in multiple lines.
|
static String |
getAllColumnsInformation(List<FieldSchema> cols,
boolean printHeader,
boolean isOutputPadded,
List<ColumnStatisticsObj> colStats)
Write formatted information about the given columns to a string
|
static String |
getAllColumnsInformation(List<FieldSchema> cols,
List<FieldSchema> partCols,
boolean printHeader,
boolean isOutputPadded,
boolean showPartColsSep)
Write formatted information about the given columns, including partition
columns to a string
|
static String[] |
getColumnsHeader(List<ColumnStatisticsObj> colStats) |
static String |
getConstraintsInformation(PrimaryKeyInfo pkInfo,
ForeignKeyInfo fkInfo) |
static MetaDataFormatter |
getFormatter(HiveConf conf) |
static String |
getIndexColumnsHeader() |
static String |
getIndexInformation(Index index,
boolean isOutputPadded) |
static String |
getPartitionInformation(Partition part) |
static String |
getTableInformation(Table table,
boolean isOutputPadded) |
public static final String FIELD_DELIM
public static final String LINE_DELIM
public static String getAllColumnsInformation(List<FieldSchema> cols, boolean printHeader, boolean isOutputPadded, List<ColumnStatisticsObj> colStats)
cols
- - list of columnsprintHeader
- - if header should be includedisOutputPadded
- - make it more human readable by setting indentation
with spaces. Turned off for use by HiveServer2colStats
- public static String getAllColumnsInformation(List<FieldSchema> cols, List<FieldSchema> partCols, boolean printHeader, boolean isOutputPadded, boolean showPartColsSep)
cols
- - list of columnspartCols
- - list of partition columnsprintHeader
- - if header should be includedisOutputPadded
- - make it more human readable by setting indentation
with spaces. Turned off for use by HiveServer2public static String getConstraintsInformation(PrimaryKeyInfo pkInfo, ForeignKeyInfo fkInfo)
protected static void formatOutput(String name, String value, StringBuilder tableInfo, boolean isOutputPadded)
name
- The field name to printvalue
- The value t printtableInfo
- The target builderisOutputPadded
- Should the value printed as a padded string?public static String[] getColumnsHeader(List<ColumnStatisticsObj> colStats)
public static String getIndexColumnsHeader()
public static MetaDataFormatter getFormatter(HiveConf conf)
Copyright © 2021 The Apache Software Foundation. All rights reserved.