You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Aman Omer (Jira)" <ji...@apache.org> on 2019/12/09 07:14:00 UTC
[jira] [Comment Edited] (SPARK-30169) Eliminate warnings in Kafka
connector
[ https://issues.apache.org/jira/browse/SPARK-30169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16991197#comment-16991197 ]
Aman Omer edited comment on SPARK-30169 at 12/9/19 7:13 AM:
------------------------------------------------------------
{code:java}
@Deprecated
public ConsumerRecords<K, V> poll(long timeoutMs) {
return this.poll(this.time.timer(timeoutMs), false);
}
public ConsumerRecords<K, V> poll(Duration timeout) {
return this.poll(this.time.timer(timeout), true);
}
{code}
{code:java}
default Timer timer(long timeoutMs) {
return new Timer(this, timeoutMs);
}
default Timer timer(Duration timeout) {
return this.timer(timeout.toMillis());
}
{code}
I think it should be ok to convert *poll(0) -> poll(MockTimer.timer(0), false)*
was (Author: aman_omer):
{code:java}
@Deprecated
public ConsumerRecords<K, V> poll(long timeoutMs) {
return this.poll(this.time.timer(timeoutMs), false);
}
public ConsumerRecords<K, V> poll(Duration timeout) {
return this.poll(this.time.timer(timeout), true);
}
{code}
{code:java}
default Timer timer(long timeoutMs) {
return new Timer(this, timeoutMs);
}
default Timer timer(Duration timeout) {
return this.timer(timeout.toMillis());
}
{code}
I think it should be ok to convert *poll(0) -> poll(Duration.ZERO)*
> Eliminate warnings in Kafka connector
> -------------------------------------
>
> Key: SPARK-30169
> URL: https://issues.apache.org/jira/browse/SPARK-30169
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Maxim Gekk
> Priority: Minor
>
> *Eliminate compilation warnings (10) in module external/kafka-0-10*:
> 1. spark/external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/ConsumerStrategy.scala
> {code:java}
> Line:108
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> Line:162
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> {code}
> 2. spark/external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaDataConsumer.scala
> {code:java}
> Line:206
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> {code}
> 3. spark/external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/DirectKafkaStreamSuite.scala
> {code:java}
> Line:258
> method poll in trait Consumer is deprecated: see corresponding Javadoc for more information.
> Line:314
> method poll in trait Consumer is deprecated: see corresponding Javadoc for more information.
> Line:476
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> {code}
> 4. spark/external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/KafkaTestUtils.scala
> {code:java}
> Line:60
> class ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line:88
> class ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line:100
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line:178
> method createTopic in object AdminUtils is deprecated (since 1.1.0): This method is deprecated and will be replaced by kafka.zk.AdminZkClient.
> {code}
> *Eliminate compilation warnings (13) in module external/kafka-0-10-sql*:
> 1. spark/external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaDataConsumer.scala
> {code}
> Line:74
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> {code}
> 2. spark/external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReader.scala
> {code}
> Line:119
> method poll in trait Consumer is deprecated: see corresponding Javadoc for more information.
> Line:382
> method poll in trait Consumer is deprecated: see corresponding Javadoc for more information.
> {code}
> 3. spark/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaTestUtils.scala
> {code}
> Line:84
> class ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line:118
> class ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line:246
> class ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line: 458
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> Line: 472
> method poll in class KafkaConsumer is deprecated: see corresponding Javadoc for more information.
> Line: 581
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line: 582
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line: 583
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line: 583
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> Line: 607
> object ZkUtils in package utils is deprecated (since 2.0.0): This is an internal class that is no longer used by Kafka and will be removed in a future release. Please use org.apache.kafka.clients.admin.AdminClient instead.
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org