Github user koeninger commented on a diff in the pull request:
https://github.com/apache/spark/pull/6846#discussion_r32620989
--- Diff:
external/kafka/src/test/java/org/apache/spark/streaming/kafka/JavaDirectKafkaStreamSuite.java
---
@@ -89,6 +90,16 @@ public void testKafkaStream() throws
InterruptedException {
StringDecoder.class,
kafkaParams,
topicToSet(topic1)
+ ).transformToPair(
+ // Make sure you can get offset ranges from the rdd
+ new Function<JavaPairRDD<String, String>, JavaPairRDD<String,
String>>() {
+ @Override
+ public JavaPairRDD<String, String> call(JavaPairRDD<String,
String> rdd) throws Exception {
+ OffsetRange[] offsets =
((HasOffsetRanges)rdd.rdd()).offsetRanges();
--- End diff --
Yeah, there's a separate JIRA for updating the doc. Will probably do that
on the plane back from spark conf, at least for the java/scala side
On Jun 17, 2015 12:30 AM, "Sean Owen" <[email protected]> wrote:
> In
>
external/kafka/src/test/java/org/apache/spark/streaming/kafka/JavaDirectKafkaStreamSuite.java
> <https://github.com/apache/spark/pull/6846#discussion_r32601142>:
>
> > @@ -89,6 +90,16 @@ public void testKafkaStream() throws
InterruptedException {
> > StringDecoder.class,
> > kafkaParams,
> > topicToSet(topic1)
> > + ).transformToPair(
> > + // Make sure you can get offset ranges from the rdd
> > + new Function<JavaPairRDD<String, String>, JavaPairRDD<String,
String>>() {
> > + @Override
> > + public JavaPairRDD<String, String> call(JavaPairRDD<String,
String> rdd) throws Exception {
> > + OffsetRange[] offsets =
((HasOffsetRanges)rdd.rdd()).offsetRanges();
>
> Nit, not worth fixing unless you make another change: space after the
cast.
> Was the intent of the JIRA to add something to an example? this is an
> addition a test which is even better, but I also read that it's users who
> want to know about this too.
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/spark/pull/6846/files#r32601142>.
>
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]