You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/10/25 05:36:23 UTC
[GitHub] terry19850829 opened a new issue #6515: kafka-indexing-service data
loss
terry19850829 opened a new issue #6515: kafka-indexing-service data loss
URL: https://github.com/apache/incubator-druid/issues/6515
druid 0.11.0 release
I use kafka-indexing-service to ingest data from confluent-kafka 4.0.0 (apache kafka 1.0).
All peon tasks complete successed.
And I use a query like below:
{
"queryType": "groupBy",
"dataSource": "transaction_crm_merchant_org_ds",
"granularity": "ALL",
"aggregations": [
{ "type": "longSum", "name": "cnt", "fieldName": "cnt" },
{ "type": "longSum", "name": "amount", "fieldName": "amount" },
{ "type": "longSum", "name": "ef_cnt", "fieldName": "ef_cnt" },
{ "type": "longSum", "name": "ef_amount", "fieldName": "ef_amount" },
{
"type": "cardinality",
"name": "merchant_id",
"fields": [ "merchant_id"],
"byRow": false
}
],
"intervals": [ "2018-10-24T16:00:00.000Z/2018-10-25T04:00:00.000Z" ]
}
I've checked the topic message between intervals in kafka is exactly the messages produced by client (we use a client log file to double check the message counts).
But after ingested into druid. The count is not exactly-once.
It seems that some message is miss. I've never set some filter conditions for ingestion task.
indexing service supervisor config:
```
{
"type": "kafka",
"dataSchema": {
"dataSource": "transaction_crm_merchant_org_ds",
"parser": {
"type": "avro_stream",
"avroBytesDecoder": {
"type": "schema_registry",
"url": "xxx"
},
"parseSpec": {
"timestampSpec": {
"column": "ctime",
"format": "auto"
},
"dimensionsSpec": {
"dimensions": [
"level1",
"level2",
"level3",
"level4",
"level5",
"level6",
"level7",
"level8",
"tags",
"merchant_id",
"pay_way"
]
},
"format": "timeAndDims"
}
},
"metricsSpec": [
{
"type": "count",
"name": "cnt"
},
{
"type": "longSum",
"name": "amount",
"fieldName": "original_amount"
},
{
"type": "javascript",
"name": "ef_amount",
"fieldNames": ["type", "status", "original_amount"],
"fnAggregate" : "function(current, type, status, original_amount) { if (type == 30 && status == 2000 && original_amount >= 200) { return current + original_amount; } else { return current; }}",
"fnCombine" : "function(partialA, partialB) { return partialA + partialB; }",
"fnReset" : "function() { return 0; }"
},
{
"type": "javascript",
"name": "ef_cnt",
"fieldNames": ["type", "status", "original_amount"],
"fnAggregate" : "function(current, type, status, original_amount) { if (type == 30 && status == 2000 && original_amount >= 200) { return current + 1; } else { return current; }}",
"fnCombine" : "function(partialA, partialB) { return partialA + partialB; }",
"fnReset" : "function() { return 0; }"
},
{
"type": "javascript",
"name": "success_cnt",
"fieldNames": ["type", "status", "original_amount"],
"fnAggregate" : "function(current, type, status, original_amount) { if (type == 30 && status == 2000) { return current + 1; } else { return current; }}",
"fnCombine" : "function(partialA, partialB) { return partialA + partialB; }",
"fnReset" : "function() { return 0; }"
},
{
"type": "javascript",
"name": "success_amount",
"fieldNames": ["type", "status", "original_amount"],
"fnAggregate" : "function(current, type, status, original_amount) { if (type == 30 && status == 2000) { return current + original_amount; } else { return current; }}",
"fnCombine" : "function(partialA, partialB) { return partialA + partialB; }",
"fnReset" : "function() { return 0; }"
}
],
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "hour",
"queryGranularity": {"type": "duration", "duration": 5000}
}
},
"tuningConfig": {
"type": "kafka",
"maxRowsPerSegment": 50000000,
"resetOffsetAutomatically": true
},
"ioConfig": {
"topic": "transaction_crm_merchant_org",
"consumerProperties": {
"bootstrap.servers": "xxx"
},
"taskCount": 2,
"replicas": 1,
"taskDuration": "PT1H",
"useEarliestOffset": false,
"lateMessageRejectionPeriod":"PT1H",
"earlyMessageRejectionPeriod":"PT1H"
}
}
```
The cnt and amount metric is not correct.
Any ideas about this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org