Skip to content

Commit

Permalink
Fix the MIMA failed test bya adding a default impl for minRate function
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza Safi committed Aug 27, 2018
1 parent 2b0b1ce commit 85ece1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class PerPartitionConfig extends Serializable {
* from each Kafka partition.
*/
def maxRatePerPartition(topicPartition: TopicPartition): Long
def minRatePerPartition(topicPartition: TopicPartition): Long
def minRatePerPartition(topicPartition: TopicPartition): Long = 1
}

/**
Expand All @@ -46,5 +46,5 @@ private class DefaultPerPartitionConfig(conf: SparkConf)
val minRate = conf.getLong("spark.streaming.kafka.minRatePerPartition", 1)

def maxRatePerPartition(topicPartition: TopicPartition): Long = maxRate
def minRatePerPartition(topicPartition: TopicPartition): Long = minRate
override def minRatePerPartition(topicPartition: TopicPartition): Long = minRate
}
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ class DirectKafkaStreamSuite
} else {
100
}
def minRatePerPartition(tp: TopicPartition) = 1
})
val kafkaStream = getDirectKafkaStream(topic, rateController, ppc)

Expand Down

0 comments on commit 85ece1c

Please sign in to comment.