public class JsonMetaDataFormatter extends Object implements MetaDataFormatter
| Constructor and Description |
|---|
JsonMetaDataFormatter() |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTable(DataOutputStream out,
String colPath,
String tableName,
Table tbl,
Partition part,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols,
boolean isFormatted,
boolean isExt,
boolean isOutputPadded,
List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> colStats,
PrimaryKeyInfo pkInfo,
ForeignKeyInfo fkInfo,
UniqueConstraint ukInfo,
NotNullConstraint nnInfo,
DefaultConstraint dInfo,
CheckConstraint cInfo,
StorageHandlerInfo storageHandlerInfo)
Describe table.
|
void |
error(OutputStream out,
String msg,
int errorCode,
String sqlState)
Write an error message.
|
void |
error(OutputStream out,
String errorMessage,
int errorCode,
String sqlState,
String errorDetail) |
void |
showDatabaseDescription(DataOutputStream out,
String database,
String comment,
String location,
String ownerName,
String ownerType,
Map<String,String> params)
Show the description of a database
|
void |
showDatabases(DataOutputStream out,
List<String> databases)
Show a list of databases
|
void |
showErrors(DataOutputStream out,
org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse response) |
void |
showFullResourcePlan(DataOutputStream out,
org.apache.hadoop.hive.metastore.api.WMFullResourcePlan resourcePlan) |
void |
showResourcePlans(DataOutputStream out,
List<org.apache.hadoop.hive.metastore.api.WMResourcePlan> resourcePlans) |
void |
showTablePartitions(DataOutputStream out,
List<String> parts)
Show the table partitions.
|
void |
showTables(DataOutputStream out,
Set<String> tables)
Show a list of tables.
|
void |
showTableStatus(DataOutputStream out,
Hive db,
HiveConf conf,
List<Table> tbls,
Map<String,String> part,
Partition par)
Show the table status.
|
public void error(OutputStream out, String msg, int errorCode, String sqlState) throws HiveException
error in interface MetaDataFormattersqlState - if null, will be ignoredHiveExceptionpublic void error(OutputStream out, String errorMessage, int errorCode, String sqlState, String errorDetail) throws HiveException
error in interface MetaDataFormattersqlState - if null, will be skipped in outputerrorDetail - usually string version of some Exception, if null, will be ignoredHiveExceptionpublic void showTables(DataOutputStream out, Set<String> tables) throws HiveException
showTables in interface MetaDataFormatterHiveExceptionpublic void describeTable(DataOutputStream out, String colPath, String tableName, Table tbl, Partition part, List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols, boolean isFormatted, boolean isExt, boolean isOutputPadded, List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> colStats, PrimaryKeyInfo pkInfo, ForeignKeyInfo fkInfo, UniqueConstraint ukInfo, NotNullConstraint nnInfo, DefaultConstraint dInfo, CheckConstraint cInfo, StorageHandlerInfo storageHandlerInfo) throws HiveException
describeTable in interface MetaDataFormatterisFormatted - - describe with formatted keywordisOutputPadded - - if true, add spacing and indentationpkInfo - primary key informationfkInfo - foreign keys informationukInfo - unique constraint informationnnInfo - not null constraint informationHiveExceptionpublic void showTableStatus(DataOutputStream out, Hive db, HiveConf conf, List<Table> tbls, Map<String,String> part, Partition par) throws HiveException
MetaDataFormattershowTableStatus in interface MetaDataFormatterHiveExceptionpublic void showTablePartitions(DataOutputStream out, List<String> parts) throws HiveException
showTablePartitions in interface MetaDataFormatterHiveExceptionpublic void showDatabases(DataOutputStream out, List<String> databases) throws HiveException
showDatabases in interface MetaDataFormatterHiveExceptionpublic void showDatabaseDescription(DataOutputStream out, String database, String comment, String location, String ownerName, String ownerType, Map<String,String> params) throws HiveException
showDatabaseDescription in interface MetaDataFormatterHiveExceptionpublic void showResourcePlans(DataOutputStream out, List<org.apache.hadoop.hive.metastore.api.WMResourcePlan> resourcePlans) throws HiveException
showResourcePlans in interface MetaDataFormatterHiveExceptionpublic void showFullResourcePlan(DataOutputStream out, org.apache.hadoop.hive.metastore.api.WMFullResourcePlan resourcePlan) throws HiveException
showFullResourcePlan in interface MetaDataFormatterHiveExceptionpublic void showErrors(DataOutputStream out, org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse response) throws HiveException
showErrors in interface MetaDataFormatterHiveExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.