org.apache.hadoop.hive.ql.metadata.formatting
Interface MetaDataFormatter

All Known Implementing Classes:
JsonMetaDataFormatter

public interface MetaDataFormatter

Interface to format table and index information. We can format it for human readability (lines of text) or for machine readability (json).


Method Summary
 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 isPretty, boolean isOutputPadded)
          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)
          Describe a database.
 void showDatabases(DataOutputStream out, List<String> databases)
          Show the databases
 void showTablePartitons(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.
 

Method Detail

error

void error(OutputStream out,
           String msg,
           int errorCode,
           String sqlState)
           throws HiveException
Write an error message.

Parameters:
sqlState - if null, will be ignored
Throws:
HiveException

error

void error(OutputStream out,
           String errorMessage,
           int errorCode,
           String sqlState,
           String errorDetail)
           throws HiveException
Parameters:
sqlState - if null, will be skipped in output
errorDetail - usually string version of some Exception, if null, will be ignored
Throws:
HiveException

showTables

void showTables(DataOutputStream out,
                Set<String> tables)
                throws HiveException
Show a list of tables.

Throws:
HiveException

describeTable

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 isPretty,
                   boolean isOutputPadded)
                   throws HiveException
Describe table.

Parameters:
out -
colPath -
tableName -
tbl -
part -
cols -
isFormatted - - describe with formatted keyword
isExt -
isPretty -
isOutputPadded - - if true, add spacing and indentation
Throws:
HiveException

showTableStatus

void showTableStatus(DataOutputStream out,
                     Hive db,
                     HiveConf conf,
                     List<Table> tbls,
                     Map<String,String> part,
                     Partition par)
                     throws HiveException
Show the table status.

Throws:
HiveException

showTablePartitons

void showTablePartitons(DataOutputStream out,
                        List<String> parts)
                        throws HiveException
Show the table partitions.

Throws:
HiveException

showDatabases

void showDatabases(DataOutputStream out,
                   List<String> databases)
                   throws HiveException
Show the databases

Throws:
HiveException

showDatabaseDescription

void showDatabaseDescription(DataOutputStream out,
                             String database,
                             String comment,
                             String location,
                             String ownerName,
                             String ownerType,
                             Map<String,String> params)
                             throws HiveException
Describe a database.

Throws:
HiveException


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