Class: 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_partition, #alter_table, #append_partition, #append_partition_by_name, #create_database, #create_table, #create_type, #drop_database, #drop_index_by_name, #drop_partition, #drop_partition_by_name, #drop_table, #drop_type, #get_all_databases, #get_all_tables, #get_config_value, #get_database, #get_databases, #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_partitions, #get_partitions_by_filter, #get_partitions_ps, #get_schema, #get_table, #get_tables, #get_type, #get_type_all, #partition_name_to_spec, #partition_name_to_vals, #recv_add_index, #recv_add_partition, #recv_alter_partition, #recv_alter_table, #recv_append_partition, #recv_append_partition_by_name, #recv_create_database, #recv_create_table, #recv_create_type, #recv_drop_database, #recv_drop_index_by_name, #recv_drop_partition, #recv_drop_partition_by_name, #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_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_partitions, #recv_get_partitions_by_filter, #recv_get_partitions_ps, #recv_get_schema, #recv_get_table, #recv_get_tables, #recv_get_type, #recv_get_type_all, #recv_partition_name_to_spec, #recv_partition_name_to_vals, #send_add_index, #send_add_partition, #send_alter_partition, #send_alter_table, #send_append_partition, #send_append_partition_by_name, #send_create_database, #send_create_table, #send_create_type, #send_drop_database, #send_drop_index_by_name, #send_drop_partition, #send_drop_partition_by_name, #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_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_partitions, #send_get_partitions_by_filter, #send_get_partitions_ps, #send_get_schema, #send_get_table, #send_get_tables, #send_get_type, #send_get_type_all, #send_partition_name_to_spec, #send_partition_name_to_vals

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



15
16
17
18
# File 'lib/thrift/thrift_hive.rb', line 15

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

#fetchAllObject



62
63
64
65
# File 'lib/thrift/thrift_hive.rb', line 62

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

#fetchN(numRows) ⇒ Object



46
47
48
49
# File 'lib/thrift/thrift_hive.rb', line 46

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

#fetchOneObject



30
31
32
33
# File 'lib/thrift/thrift_hive.rb', line 30

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

#getClusterStatusObject



110
111
112
113
# File 'lib/thrift/thrift_hive.rb', line 110

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

#getQueryPlanObject



126
127
128
129
# File 'lib/thrift/thrift_hive.rb', line 126

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

#getSchemaObject



78
79
80
81
# File 'lib/thrift/thrift_hive.rb', line 78

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

#getThriftSchemaObject



94
95
96
97
# File 'lib/thrift/thrift_hive.rb', line 94

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

#recv_executeObject



24
25
26
27
28
# File 'lib/thrift/thrift_hive.rb', line 24

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

#recv_fetchAllObject

Raises:

  • (::Thrift::ApplicationException)


71
72
73
74
75
76
# File 'lib/thrift/thrift_hive.rb', line 71

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)


55
56
57
58
59
60
# File 'lib/thrift/thrift_hive.rb', line 55

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)


39
40
41
42
43
44
# File 'lib/thrift/thrift_hive.rb', line 39

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)


119
120
121
122
123
124
# File 'lib/thrift/thrift_hive.rb', line 119

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)


135
136
137
138
139
140
# File 'lib/thrift/thrift_hive.rb', line 135

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)


87
88
89
90
91
92
# File 'lib/thrift/thrift_hive.rb', line 87

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)


103
104
105
106
107
108
# File 'lib/thrift/thrift_hive.rb', line 103

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



20
21
22
# File 'lib/thrift/thrift_hive.rb', line 20

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

#send_fetchAllObject



67
68
69
# File 'lib/thrift/thrift_hive.rb', line 67

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

#send_fetchN(numRows) ⇒ Object



51
52
53
# File 'lib/thrift/thrift_hive.rb', line 51

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

#send_fetchOneObject



35
36
37
# File 'lib/thrift/thrift_hive.rb', line 35

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

#send_getClusterStatusObject



115
116
117
# File 'lib/thrift/thrift_hive.rb', line 115

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

#send_getQueryPlanObject



131
132
133
# File 'lib/thrift/thrift_hive.rb', line 131

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

#send_getSchemaObject



83
84
85
# File 'lib/thrift/thrift_hive.rb', line 83

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

#send_getThriftSchemaObject



99
100
101
# File 'lib/thrift/thrift_hive.rb', line 99

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