Class: ThriftHadoopFileSystem::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/thrift/thrift_hadoop_file_system.rb

Instance Method Summary collapse

Instance Method Details

#append(path) ⇒ Object



90
91
92
93
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 90

def append(path)
  send_append(path)
  return recv_append()
end

#chmod(path, mode) ⇒ Object



250
251
252
253
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 250

def chmod(path, mode)
  send_chmod(path, mode)
  recv_chmod()
end

#chown(path, owner, group) ⇒ Object



265
266
267
268
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 265

def chown(path, owner, group)
  send_chown(path, owner, group)
  recv_chown()
end

#close(out) ⇒ Object



138
139
140
141
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 138

def close(out)
  send_close(out)
  return recv_close()
end

#create(path) ⇒ Object



42
43
44
45
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 42

def create(path)
  send_create(path)
  return recv_create()
end

#createFile(path, mode, overwrite, bufferSize, block_replication, blocksize) ⇒ Object



58
59
60
61
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 58

def createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
  send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
  return recv_createFile()
end

#exists(path) ⇒ Object



202
203
204
205
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 202

def exists(path)
  send_exists(path)
  return recv_exists()
end

#getFileBlockLocations(path, start, length) ⇒ Object



295
296
297
298
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 295

def getFileBlockLocations(path, start, length)
  send_getFileBlockLocations(path, start, length)
  return recv_getFileBlockLocations()
end

#listStatus(path) ⇒ Object



234
235
236
237
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 234

def listStatus(path)
  send_listStatus(path)
  return recv_listStatus()
end

#mkdirs(path) ⇒ Object



186
187
188
189
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 186

def mkdirs(path)
  send_mkdirs(path)
  return recv_mkdirs()
end

#open(path) ⇒ Object



74
75
76
77
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 74

def open(path)
  send_open(path)
  return recv_open()
end

#read(handle, offset, size) ⇒ Object



122
123
124
125
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 122

def read(handle, offset, size)
  send_read(handle, offset, size)
  return recv_read()
end

#recv_appendObject

Raises:

  • (::Thrift::ApplicationException)


99
100
101
102
103
104
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 99

def recv_append()
  result = receive_message(Append_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append failed: unknown result')
end

#recv_chmodObject



259
260
261
262
263
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 259

def recv_chmod()
  result = receive_message(Chmod_result)
  raise result.ouch unless result.ouch.nil?
  return
end

#recv_chownObject



274
275
276
277
278
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 274

def recv_chown()
  result = receive_message(Chown_result)
  raise result.ouch unless result.ouch.nil?
  return
end

#recv_closeObject

Raises:

  • (::Thrift::ApplicationException)


147
148
149
150
151
152
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 147

def recv_close()
  result = receive_message(Close_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'close failed: unknown result')
end

#recv_createObject

Raises:

  • (::Thrift::ApplicationException)


51
52
53
54
55
56
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 51

def recv_create()
  result = receive_message(Create_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create failed: unknown result')
end

#recv_createFileObject

Raises:

  • (::Thrift::ApplicationException)


67
68
69
70
71
72
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 67

def recv_createFile()
  result = receive_message(CreateFile_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'createFile failed: unknown result')
end

#recv_existsObject

Raises:

  • (::Thrift::ApplicationException)


211
212
213
214
215
216
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 211

def recv_exists()
  result = receive_message(Exists_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exists failed: unknown result')
end

#recv_getFileBlockLocationsObject

Raises:

  • (::Thrift::ApplicationException)


304
305
306
307
308
309
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 304

def recv_getFileBlockLocations()
  result = receive_message(GetFileBlockLocations_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getFileBlockLocations failed: unknown result')
end

#recv_listStatusObject

Raises:

  • (::Thrift::ApplicationException)


243
244
245
246
247
248
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 243

def recv_listStatus()
  result = receive_message(ListStatus_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'listStatus failed: unknown result')
end

#recv_mkdirsObject

Raises:

  • (::Thrift::ApplicationException)


195
196
197
198
199
200
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 195

def recv_mkdirs()
  result = receive_message(Mkdirs_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'mkdirs failed: unknown result')
end

#recv_openObject

Raises:

  • (::Thrift::ApplicationException)


83
84
85
86
87
88
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 83

def recv_open()
  result = receive_message(Open_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'open failed: unknown result')
end

#recv_readObject

Raises:

  • (::Thrift::ApplicationException)


131
132
133
134
135
136
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 131

def recv_read()
  result = receive_message(Read_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'read failed: unknown result')
end

#recv_renameObject

Raises:

  • (::Thrift::ApplicationException)


179
180
181
182
183
184
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 179

def recv_rename()
  result = receive_message(Rename_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'rename failed: unknown result')
end

#recv_rmObject

Raises:

  • (::Thrift::ApplicationException)


163
164
165
166
167
168
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 163

def recv_rm()
  result = receive_message(Rm_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'rm failed: unknown result')
end

#recv_setInactivityTimeoutPeriodObject



23
24
25
26
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 23

def recv_setInactivityTimeoutPeriod()
  result = receive_message(SetInactivityTimeoutPeriod_result)
  return
end

#recv_setReplicationObject



289
290
291
292
293
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 289

def recv_setReplication()
  result = receive_message(SetReplication_result)
  raise result.ouch unless result.ouch.nil?
  return
end

#recv_shutdownObject



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

def recv_shutdown()
  result = receive_message(Shutdown_result)
  return
end

#recv_statObject

Raises:

  • (::Thrift::ApplicationException)


227
228
229
230
231
232
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 227

def recv_stat()
  result = receive_message(Stat_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'stat failed: unknown result')
end

#recv_writeObject

Raises:

  • (::Thrift::ApplicationException)


115
116
117
118
119
120
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 115

def recv_write()
  result = receive_message(Write_result)
  return result.success unless result.success.nil?
  raise result.ouch unless result.ouch.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'write failed: unknown result')
end

#rename(path, dest) ⇒ Object



170
171
172
173
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 170

def rename(path, dest)
  send_rename(path, dest)
  return recv_rename()
end

#rm(path, recursive) ⇒ Object



154
155
156
157
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 154

def rm(path, recursive)
  send_rm(path, recursive)
  return recv_rm()
end

#send_append(path) ⇒ Object



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

def send_append(path)
  send_message('append', Append_args, :path => path)
end

#send_chmod(path, mode) ⇒ Object



255
256
257
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 255

def send_chmod(path, mode)
  send_message('chmod', Chmod_args, :path => path, :mode => mode)
end

#send_chown(path, owner, group) ⇒ Object



270
271
272
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 270

def send_chown(path, owner, group)
  send_message('chown', Chown_args, :path => path, :owner => owner, :group => group)
end

#send_close(out) ⇒ Object



143
144
145
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 143

def send_close(out)
  send_message('close', Close_args, :out => out)
end

#send_create(path) ⇒ Object



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

def send_create(path)
  send_message('create', Create_args, :path => path)
end

#send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize) ⇒ Object



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

def send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
  send_message('createFile', CreateFile_args, :path => path, :mode => mode, :overwrite => overwrite, :bufferSize => bufferSize, :block_replication => block_replication, :blocksize => blocksize)
end

#send_exists(path) ⇒ Object



207
208
209
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 207

def send_exists(path)
  send_message('exists', Exists_args, :path => path)
end

#send_getFileBlockLocations(path, start, length) ⇒ Object



300
301
302
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 300

def send_getFileBlockLocations(path, start, length)
  send_message('getFileBlockLocations', GetFileBlockLocations_args, :path => path, :start => start, :length => length)
end

#send_listStatus(path) ⇒ Object



239
240
241
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 239

def send_listStatus(path)
  send_message('listStatus', ListStatus_args, :path => path)
end

#send_mkdirs(path) ⇒ Object



191
192
193
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 191

def send_mkdirs(path)
  send_message('mkdirs', Mkdirs_args, :path => path)
end

#send_open(path) ⇒ Object



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

def send_open(path)
  send_message('open', Open_args, :path => path)
end

#send_read(handle, offset, size) ⇒ Object



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

def send_read(handle, offset, size)
  send_message('read', Read_args, :handle => handle, :offset => offset, :size => size)
end

#send_rename(path, dest) ⇒ Object



175
176
177
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 175

def send_rename(path, dest)
  send_message('rename', Rename_args, :path => path, :dest => dest)
end

#send_rm(path, recursive) ⇒ Object



159
160
161
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 159

def send_rm(path, recursive)
  send_message('rm', Rm_args, :path => path, :recursive => recursive)
end

#send_setInactivityTimeoutPeriod(periodInSeconds) ⇒ Object



19
20
21
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 19

def send_setInactivityTimeoutPeriod(periodInSeconds)
  send_message('setInactivityTimeoutPeriod', SetInactivityTimeoutPeriod_args, :periodInSeconds => periodInSeconds)
end

#send_setReplication(path, replication) ⇒ Object



285
286
287
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 285

def send_setReplication(path, replication)
  send_message('setReplication', SetReplication_args, :path => path, :replication => replication)
end

#send_shutdown(status) ⇒ Object



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

def send_shutdown(status)
  send_message('shutdown', Shutdown_args, :status => status)
end

#send_stat(path) ⇒ Object



223
224
225
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 223

def send_stat(path)
  send_message('stat', Stat_args, :path => path)
end

#send_write(handle, data) ⇒ Object



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

def send_write(handle, data)
  send_message('write', Write_args, :handle => handle, :data => data)
end

#setInactivityTimeoutPeriod(periodInSeconds) ⇒ Object



14
15
16
17
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 14

def setInactivityTimeoutPeriod(periodInSeconds)
  send_setInactivityTimeoutPeriod(periodInSeconds)
  recv_setInactivityTimeoutPeriod()
end

#setReplication(path, replication) ⇒ Object



280
281
282
283
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 280

def setReplication(path, replication)
  send_setReplication(path, replication)
  recv_setReplication()
end

#shutdown(status) ⇒ Object



28
29
30
31
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 28

def shutdown(status)
  send_shutdown(status)
  recv_shutdown()
end

#stat(path) ⇒ Object



218
219
220
221
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 218

def stat(path)
  send_stat(path)
  return recv_stat()
end

#write(handle, data) ⇒ Object



106
107
108
109
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 106

def write(handle, data)
  send_write(handle, data)
  return recv_write()
end