Class: Hive::Thrift::ThriftHive::Processor

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

Instance Method Summary collapse

Methods inherited from ThriftHiveMetastore::Processor

#process_add_index, #process_add_partition, #process_alter_database, #process_alter_index, #process_alter_partition, #process_alter_table, #process_append_partition, #process_append_partition_by_name, #process_cancel_delegation_token, #process_create_database, #process_create_role, #process_create_table, #process_create_type, #process_drop_database, #process_drop_index_by_name, #process_drop_partition, #process_drop_partition_by_name, #process_drop_role, #process_drop_table, #process_drop_type, #process_get_all_databases, #process_get_all_tables, #process_get_config_value, #process_get_database, #process_get_databases, #process_get_delegation_token, #process_get_delegation_token_with_signature, #process_get_fields, #process_get_index_by_name, #process_get_index_names, #process_get_indexes, #process_get_partition, #process_get_partition_by_name, #process_get_partition_names, #process_get_partition_names_ps, #process_get_partition_with_auth, #process_get_partitions, #process_get_partitions_by_filter, #process_get_partitions_ps, #process_get_partitions_ps_with_auth, #process_get_partitions_with_auth, #process_get_privilege_set, #process_get_role_names, #process_get_schema, #process_get_table, #process_get_tables, #process_get_type, #process_get_type_all, #process_grant_privileges, #process_grant_role, #process_list_privileges, #process_list_roles, #process_partition_name_to_spec, #process_partition_name_to_vals, #process_renew_delegation_token, #process_revoke_privileges, #process_revoke_role

Methods inherited from FacebookService::Processor

#process_aliveSince, #process_getCounter, #process_getCounters, #process_getCpuProfile, #process_getName, #process_getOption, #process_getOptions, #process_getStatus, #process_getStatusDetails, #process_getVersion, #process_reinitialize, #process_setOption, #process_shutdown

Instance Method Details

#process_execute(seqid, iprot, oprot) ⇒ Object


149
150
151
152
153
154
155
156
157
158
# File 'lib/thrift/thrift_hive.rb', line 149

def process_execute(seqid, iprot, oprot)
  args = read_args(iprot, Execute_args)
  result = Execute_result.new()
  begin
    @handler.execute(args.query)
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'execute', seqid)
end

#process_fetchAll(seqid, iprot, oprot) ⇒ Object


182
183
184
185
186
187
188
189
190
191
# File 'lib/thrift/thrift_hive.rb', line 182

def process_fetchAll(seqid, iprot, oprot)
  args = read_args(iprot, FetchAll_args)
  result = FetchAll_result.new()
  begin
    result.success = @handler.fetchAll()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'fetchAll', seqid)
end

#process_fetchN(seqid, iprot, oprot) ⇒ Object


171
172
173
174
175
176
177
178
179
180
# File 'lib/thrift/thrift_hive.rb', line 171

def process_fetchN(seqid, iprot, oprot)
  args = read_args(iprot, FetchN_args)
  result = FetchN_result.new()
  begin
    result.success = @handler.fetchN(args.numRows)
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'fetchN', seqid)
end

#process_fetchOne(seqid, iprot, oprot) ⇒ Object


160
161
162
163
164
165
166
167
168
169
# File 'lib/thrift/thrift_hive.rb', line 160

def process_fetchOne(seqid, iprot, oprot)
  args = read_args(iprot, FetchOne_args)
  result = FetchOne_result.new()
  begin
    result.success = @handler.fetchOne()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'fetchOne', seqid)
end

#process_getClusterStatus(seqid, iprot, oprot) ⇒ Object


215
216
217
218
219
220
221
222
223
224
# File 'lib/thrift/thrift_hive.rb', line 215

def process_getClusterStatus(seqid, iprot, oprot)
  args = read_args(iprot, GetClusterStatus_args)
  result = GetClusterStatus_result.new()
  begin
    result.success = @handler.getClusterStatus()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'getClusterStatus', seqid)
end

#process_getQueryPlan(seqid, iprot, oprot) ⇒ Object


226
227
228
229
230
231
232
233
234
235
# File 'lib/thrift/thrift_hive.rb', line 226

def process_getQueryPlan(seqid, iprot, oprot)
  args = read_args(iprot, GetQueryPlan_args)
  result = GetQueryPlan_result.new()
  begin
    result.success = @handler.getQueryPlan()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'getQueryPlan', seqid)
end

#process_getSchema(seqid, iprot, oprot) ⇒ Object


193
194
195
196
197
198
199
200
201
202
# File 'lib/thrift/thrift_hive.rb', line 193

def process_getSchema(seqid, iprot, oprot)
  args = read_args(iprot, GetSchema_args)
  result = GetSchema_result.new()
  begin
    result.success = @handler.getSchema()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'getSchema', seqid)
end

#process_getThriftSchema(seqid, iprot, oprot) ⇒ Object


204
205
206
207
208
209
210
211
212
213
# File 'lib/thrift/thrift_hive.rb', line 204

def process_getThriftSchema(seqid, iprot, oprot)
  args = read_args(iprot, GetThriftSchema_args)
  result = GetThriftSchema_result.new()
  begin
    result.success = @handler.getThriftSchema()
  rescue ::Hive::Thrift::HiveServerException => ex
    result.ex = ex
  end
  write_result(result, oprot, 'getThriftSchema', seqid)
end