lib/avro/ipc.rb in avro-1.8.2 vs lib/avro/ipc.rb in avro-1.9.0
- old
+ new
@@ -3,13 +3,13 @@
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
@@ -72,14 +72,14 @@
# Raised when an error message is sent by an Avro requestor or responder.
class AvroRemoteException < Avro::AvroError; end
class ConnectionClosedException < Avro::AvroError; end
+ # Base class for the client side of a protocol interaction.
class Requestor
- """Base class for the client side of a protocol interaction."""
- attr_reader :local_protocol, :transport
- attr_accessor :remote_protocol, :remote_hash, :send_protocol
+ attr_reader :local_protocol, :transport, :remote_protocol, :remote_hash
+ attr_accessor :send_protocol
def initialize(local_protocol, transport)
@local_protocol = local_protocol
@transport = transport
@remote_protocol = nil
@@ -191,13 +191,13 @@
# The format of a call response is:
# * response metadata, a map with values of type bytes
# * a one-byte error flag boolean, followed by either:
# * if the error flag is false,
# the message response, serialized per the message's response schema.
- # * if the error flag is true,
+ # * if the error flag is true,
# the error, serialized per the message's error union schema.
- response_metadata = META_READER.read(decoder)
+ _response_metadata = META_READER.read(decoder)
# remote response schema
remote_message_schema = remote_protocol.messages[message_name]
raise AvroError.new("Unknown remote message: #{message_name}") unless remote_message_schema
@@ -255,10 +255,10 @@
unless remote_protocol
return buffer_writer.string
end
# read request using remote protocol
- request_metadata = META_READER.read(buffer_decoder)
+ _request_metadata = META_READER.read(buffer_decoder)
remote_message_name = buffer_decoder.read_string
# get remote and local request schemas so we can do
# schema resolution (one fine day)
remote_message = remote_protocol.messages[remote_message_name]