Class: Hive::Thrift::ThriftHive::Client

Inherits:
ThriftHiveMetastore::Client show all
Includes:
Thrift::Client
Defined in:
lib/thrift/thrift_hive.rb

Instance Method Summary collapse

Methods inherited from ThriftHiveMetastore::Client

#add_index, #add_partition, #alter_database, #alter_index, #alter_partition, #alter_table, #append_partition, #append_partition_by_name, #cancel_delegation_token, #create_database, #create_role, #create_table, #create_type, #drop_database, #drop_index_by_name, #drop_partition, #drop_partition_by_name, #drop_role, #drop_table, #drop_type, #get_all_databases, #get_all_tables, #get_config_value, #get_database, #get_databases, #get_delegation_token, #get_delegation_token_with_signature, #get_fields, #get_index_by_name, #get_index_names, #get_indexes, #get_partition, #get_partition_by_name, #get_partition_names, #get_partition_names_ps, #get_partition_with_auth, #get_partitions, #get_partitions_by_filter, #get_partitions_ps, #get_partitions_ps_with_auth, #get_partitions_with_auth, #get_privilege_set, #get_role_names, #get_schema, #get_table, #get_tables, #get_type, #get_type_all, #grant_privileges, #grant_role, #list_privileges, #list_roles, #partition_name_to_spec, #partition_name_to_vals, #recv_add_index, #recv_add_partition, #recv_alter_database, #recv_alter_index, #recv_alter_partition, #recv_alter_table, #recv_append_partition, #recv_append_partition_by_name, #recv_cancel_delegation_token, #recv_create_database, #recv_create_role, #recv_create_table, #recv_create_type, #recv_drop_database, #recv_drop_index_by_name, #recv_drop_partition, #recv_drop_partition_by_name, #recv_drop_role, #recv_drop_table, #recv_drop_type, #recv_get_all_databases, #recv_get_all_tables, #recv_get_config_value, #recv_get_database, #recv_get_databases, #recv_get_delegation_token, #recv_get_delegation_token_with_signature, #recv_get_fields, #recv_get_index_by_name, #recv_get_index_names, #recv_get_indexes, #recv_get_partition, #recv_get_partition_by_name, #recv_get_partition_names, #recv_get_partition_names_ps, #recv_get_partition_with_auth, #recv_get_partitions, #recv_get_partitions_by_filter, #recv_get_partitions_ps, #recv_get_partitions_ps_with_auth, #recv_get_partitions_with_auth, #recv_get_privilege_set, #recv_get_role_names, #recv_get_schema, #recv_get_table, #recv_get_tables, #recv_get_type, #recv_get_type_all, #recv_grant_privileges, #recv_grant_role, #recv_list_privileges, #recv_list_roles, #recv_partition_name_to_spec, #recv_partition_name_to_vals, #recv_renew_delegation_token, #recv_revoke_privileges, #recv_revoke_role, #renew_delegation_token, #revoke_privileges, #revoke_role, #send_add_index, #send_add_partition, #send_alter_database, #send_alter_index, #send_alter_partition, #send_alter_table, #send_append_partition, #send_append_partition_by_name, #send_cancel_delegation_token, #send_create_database, #send_create_role, #send_create_table, #send_create_type, #send_drop_database, #send_drop_index_by_name, #send_drop_partition, #send_drop_partition_by_name, #send_drop_role, #send_drop_table, #send_drop_type, #send_get_all_databases, #send_get_all_tables, #send_get_config_value, #send_get_database, #send_get_databases, #send_get_delegation_token, #send_get_delegation_token_with_signature, #send_get_fields, #send_get_index_by_name, #send_get_index_names, #send_get_indexes, #send_get_partition, #send_get_partition_by_name, #send_get_partition_names, #send_get_partition_names_ps, #send_get_partition_with_auth, #send_get_partitions, #send_get_partitions_by_filter, #send_get_partitions_ps, #send_get_partitions_ps_with_auth, #send_get_partitions_with_auth, #send_get_privilege_set, #send_get_role_names, #send_get_schema, #send_get_table, #send_get_tables, #send_get_type, #send_get_type_all, #send_grant_privileges, #send_grant_role, #send_list_privileges, #send_list_roles, #send_partition_name_to_spec, #send_partition_name_to_vals, #send_renew_delegation_token, #send_revoke_privileges, #send_revoke_role

Methods inherited from FacebookService::Client

#aliveSince, #getCounter, #getCounters, #getCpuProfile, #getName, #getOption, #getOptions, #getStatus, #getStatusDetails, #getVersion, #recv_aliveSince, #recv_getCounter, #recv_getCounters, #recv_getCpuProfile, #recv_getName, #recv_getOption, #recv_getOptions, #recv_getStatus, #recv_getStatusDetails, #recv_getVersion, #recv_setOption, #reinitialize, #send_aliveSince, #send_getCounter, #send_getCounters, #send_getCpuProfile, #send_getName, #send_getOption, #send_getOptions, #send_getStatus, #send_getStatusDetails, #send_getVersion, #send_reinitialize, #send_setOption, #send_shutdown, #setOption, #shutdown

Instance Method Details

#execute(query) ⇒ Object


17
18
19
20
# File 'lib/thrift/thrift_hive.rb', line 17

def execute(query)
  send_execute(query)
  recv_execute()
end

#fetchAllObject


64
65
66
67
# File 'lib/thrift/thrift_hive.rb', line 64

def fetchAll()
  send_fetchAll()
  return recv_fetchAll()
end

#fetchN(numRows) ⇒ Object


48
49
50
51
# File 'lib/thrift/thrift_hive.rb', line 48

def fetchN(numRows)
  send_fetchN(numRows)
  return recv_fetchN()
end

#fetchOneObject


32
33
34
35
# File 'lib/thrift/thrift_hive.rb', line 32

def fetchOne()
  send_fetchOne()
  return recv_fetchOne()
end

#getClusterStatusObject


112
113
114
115
# File 'lib/thrift/thrift_hive.rb', line 112

def getClusterStatus()
  send_getClusterStatus()
  return recv_getClusterStatus()
end

#getQueryPlanObject


128
129
130
131
# File 'lib/thrift/thrift_hive.rb', line 128

def getQueryPlan()
  send_getQueryPlan()
  return recv_getQueryPlan()
end

#getSchemaObject


80
81
82
83
# File 'lib/thrift/thrift_hive.rb', line 80

def getSchema()
  send_getSchema()
  return recv_getSchema()
end

#getThriftSchemaObject


96
97
98
99
# File 'lib/thrift/thrift_hive.rb', line 96

def getThriftSchema()
  send_getThriftSchema()
  return recv_getThriftSchema()
end

#recv_executeObject


26
27
28
29
30
# File 'lib/thrift/thrift_hive.rb', line 26

def recv_execute()
  result = receive_message(Execute_result)
  raise result.ex unless result.ex.nil?
  return
end

#recv_fetchAllObject

Raises:

  • (::Thrift::ApplicationException)

73
74
75
76
77
78
# File 'lib/thrift/thrift_hive.rb', line 73

def recv_fetchAll()
  result = receive_message(FetchAll_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result')
end

#recv_fetchNObject

Raises:

  • (::Thrift::ApplicationException)

57
58
59
60
61
62
# File 'lib/thrift/thrift_hive.rb', line 57

def recv_fetchN()
  result = receive_message(FetchN_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result')
end

#recv_fetchOneObject

Raises:

  • (::Thrift::ApplicationException)

41
42
43
44
45
46
# File 'lib/thrift/thrift_hive.rb', line 41

def recv_fetchOne()
  result = receive_message(FetchOne_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result')
end

#recv_getClusterStatusObject

Raises:

  • (::Thrift::ApplicationException)

121
122
123
124
125
126
# File 'lib/thrift/thrift_hive.rb', line 121

def recv_getClusterStatus()
  result = receive_message(GetClusterStatus_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result')
end

#recv_getQueryPlanObject

Raises:

  • (::Thrift::ApplicationException)

137
138
139
140
141
142
# File 'lib/thrift/thrift_hive.rb', line 137

def recv_getQueryPlan()
  result = receive_message(GetQueryPlan_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result')
end

#recv_getSchemaObject

Raises:

  • (::Thrift::ApplicationException)

89
90
91
92
93
94
# File 'lib/thrift/thrift_hive.rb', line 89

def recv_getSchema()
  result = receive_message(GetSchema_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result')
end

#recv_getThriftSchemaObject

Raises:

  • (::Thrift::ApplicationException)

105
106
107
108
109
110
# File 'lib/thrift/thrift_hive.rb', line 105

def recv_getThriftSchema()
  result = receive_message(GetThriftSchema_result)
  return result.success unless result.success.nil?
  raise result.ex unless result.ex.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result')
end

#send_execute(query) ⇒ Object


22
23
24
# File 'lib/thrift/thrift_hive.rb', line 22

def send_execute(query)
  send_message('execute', Execute_args, :query => query)
end

#send_fetchAllObject


69
70
71
# File 'lib/thrift/thrift_hive.rb', line 69

def send_fetchAll()
  send_message('fetchAll', FetchAll_args)
end

#send_fetchN(numRows) ⇒ Object


53
54
55
# File 'lib/thrift/thrift_hive.rb', line 53

def send_fetchN(numRows)
  send_message('fetchN', FetchN_args, :numRows => numRows)
end

#send_fetchOneObject


37
38
39
# File 'lib/thrift/thrift_hive.rb', line 37

def send_fetchOne()
  send_message('fetchOne', FetchOne_args)
end

#send_getClusterStatusObject


117
118
119
# File 'lib/thrift/thrift_hive.rb', line 117

def send_getClusterStatus()
  send_message('getClusterStatus', GetClusterStatus_args)
end

#send_getQueryPlanObject


133
134
135
# File 'lib/thrift/thrift_hive.rb', line 133

def send_getQueryPlan()
  send_message('getQueryPlan', GetQueryPlan_args)
end

#send_getSchemaObject


85
86
87
# File 'lib/thrift/thrift_hive.rb', line 85

def send_getSchema()
  send_message('getSchema', GetSchema_args)
end

#send_getThriftSchemaObject


101
102
103
# File 'lib/thrift/thrift_hive.rb', line 101

def send_getThriftSchema()
  send_message('getThriftSchema', GetThriftSchema_args)
end