POST /topics/brocon HTTP/1.1
Host: kafka-rest.marathon.mesos:8192
Content-Length: 633
Accept-Encoding: gzip, deflate
Accept: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, application/json
User-Agent: python-requests/2.7.0 CPython/2.7.3 Linux/3.13.0-30-generic
Connection: keep-alive
Content-Type: application/vnd.kafka.avro.v1+json
{"value_schema_id": 121, "key_schema_id": null, "records": [{"ts": {"string": "1431637257.883239"}, "uid": {"string": "CJEy5h20lBY6V5QAI3"}, "id_orig_h": {"string": "192.168.225.103"}, "id_orig_p": {"int": 2148}, "id_resp_h": {"string": "85.25.153.26"}, "id_resp_p": {"int": 20050}, "proto": {"string": "tcp"}, "service": null, "duration": null, "orig_bytes": null, "resp_bytes": null, "conn_state": {"string": "S0"}, "local_orig": null, "missed_bytes": {"long": 0}, "history": {"string": "S"}, "orig_pkts": {"long": 1}, "orig_ip_bytes": {"long": 48}, "resp_pkts": {"long": 0}, "resp_ip_bytes": {"long": 0}, "tunnel_parents": null}]}
Raw Response from Kafka Rest API Server:
HTTP/1.1 422
Content-Length: 31
Content-Type: application/json
Server: Jetty(8.1.16.v20140903)
{"error_code":422,"message":""}
Schema As returned from Schema Registry (this isn't what I provided, instead, I am getting the Schema by name prior to to sending the data, and it gets me Schema ID 121 as seen in the request)
{
"fields": [
{
"default": null,
"doc": "Default Bro Schema parse for ts",
"type": [
"null",
"string"
],
"name": "ts"
},
{
"default": null,
"doc": "Default Bro Schema parse for uid",
"type": [
"null",
"string"
],
"name": "uid"
},
{
"default": null,
"doc": "Default Bro Schema parse for id.orig_h",
"type": [
"null",
"string"
],
"name": "id_orig_h"
},
{
"default": null,
"doc": "Default Bro Schema parse for id.orig_p",
"type": [
"null",
"int"
],
"name": "id_orig_p"
},
{
"default": null,
"doc": "Default Bro Schema parse for id.resp_h",
"type": [
"null",
"string"
],
"name": "id_resp_h"
},
{
"default": null,
"doc": "Default Bro Schema parse for id.resp_p",
"type": [
"null",
"int"
],
"name": "id_resp_p"
},
{
"default": null,
"doc": "Default Bro Schema parse for proto",
"type": [
"null",
"string"
],
"name": "proto"
},
{
"default": null,
"doc": "Default Bro Schema parse for service",
"type": [
"null",
"string"
],
"name": "service"
},
{
"default": null,
"doc": "Default Bro Schema parse for duration",
"type": [
"null",
"string"
],
"name": "duration"
},
{
"default": null,
"doc": "Default Bro Schema parse for orig_bytes",
"type": [
"null",
"long"
],
"name": "orig_bytes"
},
{
"default": null,
"doc": "Default Bro Schema parse for resp_bytes",
"type": [
"null",
"long"
],
"name": "resp_bytes"
},
{
"default": null,
"doc": "Default Bro Schema parse for conn_state",
"type": [
"null",
"string"
],
"name": "conn_state"
},
{
"default": null,
"doc": "Default Bro Schema parse for local_orig",
"type": [
"null",
"boolean"
],
"name": "local_orig"
},
{
"default": null,
"doc": "Default Bro Schema parse for missed_bytes",
"type": [
"null",
"long"
],
"name": "missed_bytes"
},
{
"default": null,
"doc": "Default Bro Schema parse for history",
"type": [
"null",
"string"
],
"name": "history"
},
{
"default": null,
"doc": "Default Bro Schema parse for orig_pkts",
"type": [
"null",
"long"
],
"name": "orig_pkts"
},
{
"default": null,
"doc": "Default Bro Schema parse for orig_ip_bytes",
"type": [
"null",
"long"
],
"name": "orig_ip_bytes"
},
{
"default": null,
"doc": "Default Bro Schema parse for resp_pkts",
"type": [
"null",
"long"
],
"name": "resp_pkts"
},
{
"default": null,
"doc": "Default Bro Schema parse for resp_ip_bytes",
"type": [
"null",
"long"
],
"name": "resp_ip_bytes"
},
{
"default": null,
"doc": "Default Bro Schema parse for tunnel_parents",
"type": [
"null",
"string"
],
"name": "tunnel_parents"
}
],
"type": "record",
"name": "brocon1"
}
This is the prettified raw request (as seen above from TCPDump for easy reading):
{
"value_schema_id": 121,
"key_schema_id": null,
"records": [
{
"ts": {
"string": "1431637257.883239"
},
"uid": {
"string": "CJEy5h20lBY6V5QAI3"
},
"id_orig_h": {
"string": "192.168.225.103"
},
"id_orig_p": {
"int": 2148
},
"id_resp_h": {
"string": "85.25.153.26"
},
"id_resp_p": {
"int": 20050
},
"proto": {
"string": "tcp"
},
"service": null,
"duration": null,
"orig_bytes": null,
"resp_bytes": null,
"conn_state": {
"string": "S0"
},
"local_orig": null,
"missed_bytes": {
"long": 0
},
"history": {
"string": "S"
},
"orig_pkts": {
"long": 1
},
"orig_ip_bytes": {
"long": 48
},
"resp_pkts": {
"long": 0
},
"resp_ip_bytes": {
"long": 0
},
"tunnel_parents": null
}
]
}
{"value_schema_id": 121, "key_schema_id": null, "records": [{"ts": ...
{"value_schema_id": 121, "key_schema_id": null, "records": [{"value": {"ts": ...
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/6386d1ce-f550-4e68-a0ae-282fb8049a45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...