lib/logstash/codecs/avro.rb in logstash-codec-avro-0.1.5 vs lib/logstash/codecs/avro.rb in logstash-codec-avro-2.0.1
- old
+ new
@@ -10,24 +10,24 @@
#
# This plugin is used to serialize Logstash events as
# Avro datums, as well as deserializing Avro datums into
# Logstash events.
#
-# === Encoding
+# ==== Encoding
#
# This codec is for serializing individual Logstash events
# as Avro datums that are Avro binary blobs. It does not encode
# Logstash events into an Avro file.
#
#
-# === Decoding
+# ==== Decoding
#
# This codec is for deserializing individual Avro records. It is not for reading
# Avro files. Avro files have a unique format that must be handled upon input.
#
#
-# === Usage
+# ==== Usage
# Example usage with Kafka input.
#
# [source,ruby]
# ----------------------------------
# input {
@@ -48,14 +48,15 @@
# ----------------------------------
class LogStash::Codecs::Avro < LogStash::Codecs::Base
config_name "avro"
- # schema path to fetch the schema from
+ # schema path to fetch the schema from.
# This can be a 'http' or 'file' scheme URI
# example:
- # http - "http://example.com/schema.avsc"
- # file - "/path/to/schema.avsc"
+ #
+ # * http - `http://example.com/schema.avsc`
+ # * file - `/path/to/schema.avsc`
config :schema_uri, :validate => :string, :required => true
def open_and_read(uri_string)
open(uri_string).read
end