Changes

Jump to: navigation, search

Kafka with ELK on swarm

1,382 bytes added, 22:06, 12 March 2019
no edit summary
</dependency>
</source>
 
 
=AVRO=
 
http://avro.apache.org/docs/current/spec.html#schemas<br>
 
<pre>
{"type": "typeName" ...attributes...}
</pre>
A typeName értéke lehet primitív típus vagy összetett típus.
 
Összetett típusok: records, enums, arrays, maps, unions, fixed
 
A record típus
* name: a JSON string providing the name of the record (required).
* namespace, a JSON string that qualifies the name;
* doc: a JSON string providing documentation to the user of this schema (optional).
* aliases: a JSON array of strings, providing alternate names for this record (optional).
* fields: a JSON array, listing fields (required). Each field is a JSON object with the following attributes:
** name: a JSON string providing the name of the field (required), and
** doc: a JSON string describing this field for users (optional).
** type: A JSON object defining a schema, or a JSON string naming a record definition (required).
 
 
<source lang="java">
package com.ippontech.kafkatutorials;
 
class Person(
String firstName;
String lastName;
Date birthDate;
)
</source>
 
<pre>
{
"type": "record",
"name": "Person",
"namespace": "com.ippontech.kafkatutorials",
"fields": [
{
"name": "firstName",
"type": "string"
},
{
"name": "lastName",
"type": "string"
},
{
"name": "birthDate",
"type": "long"
}
]
}
</pre>

Navigation menu