Apache kafka 流集:有没有办法使用流集统计卡夫卡主题中的记录
我使用Streamset作为摄取工具,将记录从Oracle数据库拉到Kafka主题。现在,我想通过流集本身使用它,还想计算卡夫卡主题中的记录数Apache kafka 流集:有没有办法使用流集统计卡夫卡主题中的记录,apache-kafka,streamsets,Apache Kafka,Streamsets,我使用Streamset作为摄取工具,将记录从Oracle数据库拉到Kafka主题。现在,我想通过流集本身使用它,还想计算卡夫卡主题中的记录数 我该怎么做呢。请提供帮助您可以使用StreamSets Data Collector的历史REST API检索每个阶段的记录计数数据。例如,以下是给定管道最后一次运行的计数器。我正在使用优秀的工具在命令行解析JSON $ curl -s -u admin:admin -H 'X-Requested-By:sdc' http://localhost:186
我该怎么做呢。请提供帮助您可以使用StreamSets Data Collector的
历史
REST API检索每个阶段的记录计数数据。例如,以下是给定管道最后一次运行的计数器。我正在使用优秀的工具在命令行解析JSON
$ curl -s -u admin:admin -H 'X-Requested-By:sdc' http://localhost:18630/rest/v1/pipeline/RedshiftStreamingwithKinesisFirehose537add73-bb16-4358-a26a-a51576dea32b/history | jq -r .[0].metrics | jq .counters
{
"pipeline.batchCount.counter": {
"count": 1029
},
"pipeline.batchErrorMessages.counter": {
"count": 0
},
"pipeline.batchErrorRecords.counter": {
"count": 0
},
"pipeline.batchInputRecords.counter": {
"count": 648226
},
"pipeline.batchOutputRecords.counter": {
"count": 648226
},
"stage.ExpressionEvaluator_01.errorRecords.counter": {
"count": 0
},
"stage.ExpressionEvaluator_01.inputRecords.counter": {
"count": 648226
},
"stage.ExpressionEvaluator_01.outputRecords.counter": {
"count": 648226
},
"stage.ExpressionEvaluator_01.stageErrors.counter": {
"count": 0
},
"stage.ExpressionEvaluator_01:ExpressionEvaluator_01OutputLane15561338960790.outputRecords.counter": {
"count": 648226
},
"stage.FieldOrder_01.errorRecords.counter": {
"count": 0
},
"stage.FieldOrder_01.inputRecords.counter": {
"count": 648226
},
"stage.FieldOrder_01.outputRecords.counter": {
"count": 648226
},
"stage.FieldOrder_01.stageErrors.counter": {
"count": 0
},
"stage.FieldOrder_01:FieldOrder_01OutputLane15561351879260.outputRecords.counter": {
"count": 648226
},
"stage.FieldTypeConverter_01.errorRecords.counter": {
"count": 0
},
"stage.FieldTypeConverter_01.inputRecords.counter": {
"count": 648226
},
"stage.FieldTypeConverter_01.outputRecords.counter": {
"count": 648226
},
"stage.FieldTypeConverter_01.stageErrors.counter": {
"count": 0
},
"stage.FieldTypeConverter_01:FieldTypeConverter_01OutputLane15560499048280.outputRecords.counter": {
"count": 648226
},
"stage.KinesisFirehose_01.errorRecords.counter": {
"count": 0
},
"stage.KinesisFirehose_01.inputRecords.counter": {
"count": 648226
},
"stage.KinesisFirehose_01.outputRecords.counter": {
"count": 648226
},
"stage.KinesisFirehose_01.stageErrors.counter": {
"count": 0
},
"stage.MySQLBinaryLog_01.errorRecords.counter": {
"count": 0
},
"stage.MySQLBinaryLog_01.inputRecords.counter": {
"count": 0
},
"stage.MySQLBinaryLog_01.outputRecords.counter": {
"count": 648226
},
"stage.MySQLBinaryLog_01.stageErrors.counter": {
"count": 0
},
"stage.MySQLBinaryLog_01:MySQLBinaryLog_01OutputLane15561313696850.outputRecords.counter": {
"count": 648226
},
"stage.StreamSelector_01.errorRecords.counter": {
"count": 0
},
"stage.StreamSelector_01.inputRecords.counter": {
"count": 648226
},
"stage.StreamSelector_01.outputRecords.counter": {
"count": 648226
},
"stage.StreamSelector_01.stageErrors.counter": {
"count": 0
},
"stage.StreamSelector_01:StreamSelector_01OutputLane1556133811620.outputRecords.counter": {
"count": 0
},
"stage.StreamSelector_01:StreamSelector_01OutputLane1556133816638.outputRecords.counter": {
"count": 648226
},
"stage.Trash_01.errorRecords.counter": {
"count": 0
},
"stage.Trash_01.inputRecords.counter": {
"count": 0
},
"stage.Trash_01.outputRecords.counter": {
"count": 0
},
"stage.Trash_01.stageErrors.counter": {
"count": 0
}
}
谢谢你的回复。如果我错了,请纠正我。因此,基本上,上述信息是streamsets预览中的任何信息。对吗?这是历史面板上的信息-你能帮我一些其他的方法吗?你在找什么?它需要与上述内容有什么不同?您是否研究了其他可用的调用-Help/RESTful-APIOk。如果处理器没有办法,那么我也接受你的答案。谢谢:)