public static class HiveServer.HiveServerHandler extends HiveMetaStore.HMSHandler implements HiveInterface
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
AUDIT_FORMAT, auditLog
Constructor and Description |
---|
HiveServerHandler()
Construct a new handler.
|
HiveServerHandler(HiveConf conf)
Construct a new handler with the specified hive configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
clean()
Should be called by the client at the end of a session.
|
void |
execute(java.lang.String cmd)
Executes a query.
|
java.util.List<java.lang.String> |
fetchAll()
Fetches all the rows in a result set.
|
java.util.List<java.lang.String> |
fetchN(int numRows)
Fetches numRows rows.
|
java.lang.String |
fetchOne()
Fetches the next row in a query result set.
|
HiveClusterStatus |
getClusterStatus()
Return the status information about the Map-Reduce cluster.
|
QueryPlan |
getQueryPlan() |
Schema |
getSchema()
Return the Hive schema of the query result.
|
com.facebook.fb303.fb_status |
getStatus()
Return the status of the server.
|
Schema |
getThriftSchema()
Return the Thrift schema of the query result.
|
java.lang.String |
getVersion()
Return the version of the server software.
|
add_index, add_partition_with_environment_context, add_partition, add_partitions, alter_database, alter_index, alter_partition_with_environment_context, alter_partition, alter_partitions, alter_table_with_environment_context, alter_table, append_partition_by_name_with_environment_context, append_partition_by_name, append_partition_with_environment_context, append_partition, cancel_delegation_token, create_database, create_index, create_role, create_table_with_environment_context, create_table, create_type, delete_partition_column_statistics, delete_table_column_statistics, drop_database, drop_index_by_name, drop_partition_by_name_with_environment_context, drop_partition_by_name, drop_partition_with_environment_context, drop_partition, drop_role, drop_table_with_environment_context, drop_table, drop_type, endFunction, endFunction, exchange_partition, get_all_databases, get_all_tables, get_column_privilege_set, get_config_value, get_database, get_databases, get_db_privilege_set, get_delegation_token, get_fields, get_index_by_name, get_index_names, get_indexes, get_partition_by_name, get_partition_column_statistics, get_partition_names_ps, get_partition_names, get_partition_privilege_set, get_partition_with_auth, get_partition, get_partitions_by_filter, get_partitions_by_names, get_partitions_ps_with_auth, get_partitions_ps, get_partitions_with_auth, get_partitions, get_privilege_set, get_role_names, get_schema, get_table_column_statistics, get_table_names_by_filter, get_table_objects_by_name, get_table_privilege_set, get_table, get_tables, get_type_all, get_type, get_user_privilege_set, get, getCounters, getCpuProfile, getHiveConf, getIpAddress, getMS, getPrincipalType, getWh, grant_privileges, grant_role, isPartitionMarkedForEvent, list_column_privileges, list_db_privileges, list_global_privileges, list_partition_privileges, list_privileges, list_roles, list_table_privileges, markPartitionForEvent, partition_name_has_valid_characters, partition_name_to_spec, partition_name_to_vals, rename_partition, renew_delegation_token, revoke_privileges, revoke_role, set_table_parameters, set_ugi, setConf, setIpAddress, shutdown, startFunction, startFunction, startMultiTableFunction, startPartitionFunction, startPartitionFunction, startTableFunction, update_partition_column_statistics, update_table_column_statistics
aliveSince, deleteCounter, getCounter, getCpuProfile, getName, getOption, getOptions, getStatusDetails, incrementCounter, incrementCounter, reinitialize, resetCounter, setCounter, setOption
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add_index, add_partition_with_environment_context, add_partition, add_partitions, alter_database, alter_index, alter_partition_with_environment_context, alter_partition, alter_partitions, alter_table_with_environment_context, alter_table, append_partition_by_name_with_environment_context, append_partition_by_name, append_partition_with_environment_context, append_partition, cancel_delegation_token, create_database, create_role, create_table_with_environment_context, create_table, create_type, delete_partition_column_statistics, delete_table_column_statistics, drop_database, drop_index_by_name, drop_partition_by_name_with_environment_context, drop_partition_by_name, drop_partition_with_environment_context, drop_partition, drop_role, drop_table_with_environment_context, drop_table, drop_type, exchange_partition, get_all_databases, get_all_tables, get_config_value, get_database, get_databases, get_delegation_token, get_fields, get_index_by_name, get_index_names, get_indexes, get_partition_by_name, get_partition_column_statistics, get_partition_names_ps, get_partition_names, get_partition_with_auth, get_partition, get_partitions_by_filter, get_partitions_by_names, get_partitions_ps_with_auth, get_partitions_ps, get_partitions_with_auth, get_partitions, get_privilege_set, get_role_names, get_schema, get_table_column_statistics, get_table_names_by_filter, get_table_objects_by_name, get_table, get_tables, get_type_all, get_type, grant_privileges, grant_role, isPartitionMarkedForEvent, list_privileges, list_roles, markPartitionForEvent, partition_name_has_valid_characters, partition_name_to_spec, partition_name_to_vals, rename_partition, renew_delegation_token, revoke_privileges, revoke_role, set_ugi, update_partition_column_statistics, update_table_column_statistics
public HiveServerHandler() throws MetaException
MetaException
- unable to create metastorepublic HiveServerHandler(HiveConf conf) throws MetaException
conf
- caller specified hive configurationMetaException
- unable to create metastorepublic void execute(java.lang.String cmd) throws HiveServerException, org.apache.thrift.TException
execute
in interface ThriftHive.Iface
cmd
- HiveQL query to executeHiveServerException
org.apache.thrift.TException
public void clean()
clean
in interface ThriftHive.Iface
public HiveClusterStatus getClusterStatus() throws HiveServerException, org.apache.thrift.TException
getClusterStatus
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
public Schema getSchema() throws HiveServerException, org.apache.thrift.TException
getSchema
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
public Schema getThriftSchema() throws HiveServerException, org.apache.thrift.TException
getThriftSchema
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
public java.lang.String fetchOne() throws HiveServerException, org.apache.thrift.TException
fetchOne
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
public java.util.List<java.lang.String> fetchN(int numRows) throws HiveServerException, org.apache.thrift.TException
fetchN
in interface ThriftHive.Iface
numRows
- Number of rows to fetch.HiveServerException
- Invalid value for numRows (numRows < 0)org.apache.thrift.TException
public java.util.List<java.lang.String> fetchAll() throws HiveServerException, org.apache.thrift.TException
fetchAll
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
public com.facebook.fb303.fb_status getStatus()
getStatus
in interface com.facebook.fb303.FacebookService.Iface
getStatus
in class HiveMetaStore.HMSHandler
public java.lang.String getVersion()
getVersion
in interface com.facebook.fb303.FacebookService.Iface
getVersion
in class HiveMetaStore.HMSHandler
public QueryPlan getQueryPlan() throws HiveServerException, org.apache.thrift.TException
getQueryPlan
in interface ThriftHive.Iface
HiveServerException
org.apache.thrift.TException
Copyright © 2012 The Apache Software Foundation