Class: Voltdb::BulkLoaderFailureCallback

Inherits:
Object
  • Object
show all
Includes:
Java::OrgVoltdbClient::ClientResponse, Java::OrgVoltdbClientVoltBulkLoader::BulkLoaderFailureCallBack
Defined in:
lib/voltdb/callbacks.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ BulkLoaderFailureCallback

Returns a new instance of BulkLoaderFailureCallback.



26
27
28
# File 'lib/voltdb/callbacks.rb', line 26

def initialize(&block)
  @block = block
end

Instance Method Details

#failure_callback(row_handle, field_list, client_response) ⇒ Object

Invoked by the VoltBulkLoader when a insertRow() fails

Parameters:

  • row_handle

    parameter received in the insertRow()

  • field_list (Array)

    array of row objects that were processed

  • client_response (Java::OrgVoltdbClient::ClientResponse)

    response generated by VoltDB indicating the type of failure that occurred

Raises:

  • exceptions from the caller method



37
38
39
40
# File 'lib/voltdb/callbacks.rb', line 37

def failure_callback(row_handle, field_list, client_response)
  client_response.extend(ClientResponseUtils)
  @block.call(row_handle, field_list.to_ary, client_response)
end