You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/07/21 12:13:05 UTC
[jira] [Updated] (SPARK-9059) Update Python Direct Kafka Word count
examples to show the use of HasOffsetRanges
[ https://issues.apache.org/jira/browse/SPARK-9059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen updated SPARK-9059:
-----------------------------
Priority: Minor (was: Major)
Description:
Update Python examples of Direct Kafka word count to access the offset ranges using HasOffsetRanges and print it. For example in Scala,
{code}
var offsetRanges: Array[OffsetRange] = _
...
directKafkaDStream.foreachRDD { rdd =>
offsetRanges = rdd.asInstanceOf[HasOffsetRanges]
}
...
transformedDStream.foreachRDD { rdd =>
// some operation
println("Processed ranges: " + offsetRanges)
}
{code}
See https://spark.apache.org/docs/latest/streaming-kafka-integration.html for more info, and the master source code for more updated information on python.
was:
Update Scala, Java and Python examples of Direct Kafka word count to access the offset ranges using HasOffsetRanges and print it. For example in Scala,
{code}
var offsetRanges: Array[OffsetRange] = _
...
directKafkaDStream.foreachRDD { rdd =>
offsetRanges = rdd.asInstanceOf[HasOffsetRanges]
}
...
transformedDStream.foreachRDD { rdd =>
// some operation
println("Processed ranges: " + offsetRanges)
}
{code}
See https://spark.apache.org/docs/latest/streaming-kafka-integration.html for more info, and the master source code for more updated information on python.
Summary: Update Python Direct Kafka Word count examples to show the use of HasOffsetRanges (was: Update Direct Kafka Word count examples to show the use of HasOffsetRanges)
Updating this to be about Python only as the rest is seemingly covered in SPARK-8390 already
> Update Python Direct Kafka Word count examples to show the use of HasOffsetRanges
> ---------------------------------------------------------------------------------
>
> Key: SPARK-9059
> URL: https://issues.apache.org/jira/browse/SPARK-9059
> Project: Spark
> Issue Type: Sub-task
> Components: Streaming
> Reporter: Tathagata Das
> Priority: Minor
> Labels: starter
>
> Update Python examples of Direct Kafka word count to access the offset ranges using HasOffsetRanges and print it. For example in Scala,
>
> {code}
> var offsetRanges: Array[OffsetRange] = _
> ...
> directKafkaDStream.foreachRDD { rdd =>
> offsetRanges = rdd.asInstanceOf[HasOffsetRanges]
> }
> ...
> transformedDStream.foreachRDD { rdd =>
> // some operation
> println("Processed ranges: " + offsetRanges)
> }
> {code}
> See https://spark.apache.org/docs/latest/streaming-kafka-integration.html for more info, and the master source code for more updated information on python.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org