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

All Known Implementing Classes:
JsonMetaDataFormatter, TextMetaDataFormatter

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).


Field Summary
static int CONFLICT
          Conflict error code.
static int ERROR
          Generic error code.
static int MISSING
          Missing error code.
 
Method Summary
 void consoleError(SessionState.LogHelper console, String msg, int errorCode)
          Write a console error message.
 void consoleError(SessionState.LogHelper console, String msg, String detail, int errorCode)
          Write a console error message.
 void describeTable(DataOutputStream out, String colPath, String tableName, Table tbl, Partition part, List<FieldSchema> cols, boolean isFormatted, boolean isExt)
          Describe table.
 void error(OutputStream out, String msg, int errorCode)
          Write an error message.
 void logInfo(OutputStream out, String msg, int errorCode)
          Write a log info message.
 void logWarn(OutputStream out, String msg, int errorCode)
          Write a log warn message.
 void showDatabaseDescription(DataOutputStream out, String database, String comment, String location, 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.
 

Field Detail

ERROR

static final int ERROR
Generic error code. This and the other error codes are designed to match the HTTP status codes.

See Also:
Constant Field Values

MISSING

static final int MISSING
Missing error code.

See Also:
Constant Field Values

CONFLICT

static final int CONFLICT
Conflict error code.

See Also:
Constant Field Values
Method Detail

error

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

Throws:
HiveException

logWarn

void logWarn(OutputStream out,
             String msg,
             int errorCode)
             throws HiveException
Write a log warn message.

Throws:
HiveException

logInfo

void logInfo(OutputStream out,
             String msg,
             int errorCode)
             throws HiveException
Write a log info message.

Throws:
HiveException

consoleError

void consoleError(SessionState.LogHelper console,
                  String msg,
                  int errorCode)
Write a console error message.


consoleError

void consoleError(SessionState.LogHelper console,
                  String msg,
                  String detail,
                  int errorCode)
Write a console error message.


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<FieldSchema> cols,
                   boolean isFormatted,
                   boolean isExt)
                   throws HiveException
Describe table.

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,
                             Map<String,String> params)
                             throws HiveException
Describe a database.

Throws:
HiveException


Copyright © 2011 The Apache Software Foundation