Skip to content

Commit

Permalink
MapR [MS-925] After upgrade to MEP 6.2 (Spark 2.4.0) can no longer (a…
Browse files Browse the repository at this point in the history
…pache#588)

consume Kafka / MapR Streams.
  • Loading branch information
mgorbov authored Oct 23, 2019
1 parent c7e076e commit c5cbbcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ private case class Subscribe[K, V](
val shouldSuppress =
aor != null && aor.asInstanceOf[String].toUpperCase(Locale.ROOT) == "NONE"
try {
if (KafkaUtils.isStreams(currentOffsets.asScala.toMap.map(a => (a._1, a._2.toLong)))) {
consumer.poll(0)

if (KafkaUtils.isStreams(toSeek.asScala.toMap.map(a => (a._1, a._2.toLong)))) {
KafkaUtils.waitForConsumerAssignment(consumer, toSeek.keySet())
} else {
consumer.poll(0) }
}
} catch {
case x: NoOffsetForPartitionException if shouldSuppress =>
logWarning("Catching NoOffsetForPartitionException since " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ private case class Subscribe[K, V](
val shouldSuppress =
aor != null && aor.asInstanceOf[String].toUpperCase(Locale.ROOT) == "NONE"
try {
if (KafkaUtils.isStreams(currentOffsets.asScala.toMap.map(a => (a._1, a._2.toLong)))) {
consumer.poll(0)

if (KafkaUtils.isStreams(toSeek.asScala.toMap.map(a => (a._1, a._2.toLong)))) {
KafkaUtils.waitForConsumerAssignment(consumer, toSeek.keySet())
} else {
consumer.poll(0)
}
} catch {
case x: NoOffsetForPartitionException if shouldSuppress =>
Expand Down

0 comments on commit c5cbbcc

Please sign in to comment.