kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Add missing deprecations on old request objects
Date Thu, 10 Aug 2017 00:31:50 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d2a2b80cc -> 23df2199d


MINOR: Add missing deprecations on old request objects

Author: Jason Gustafson <jason@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #3651 from hachikuji/add-missing-request-deprecations


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/23df2199
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/23df2199
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/23df2199

Branch: refs/heads/trunk
Commit: 23df2199d78d799851a797f9c90c74e3bbc464f5
Parents: d2a2b80
Author: Jason Gustafson <jason@confluent.io>
Authored: Thu Aug 10 01:31:41 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Thu Aug 10 01:31:41 2017 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/api/FetchResponse.scala            | 2 ++
 core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala  | 2 ++
 core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala | 2 ++
 core/src/main/scala/kafka/api/OffsetCommitRequest.scala      | 2 ++
 core/src/main/scala/kafka/api/OffsetCommitResponse.scala     | 2 ++
 core/src/main/scala/kafka/api/OffsetFetchRequest.scala       | 2 ++
 core/src/main/scala/kafka/api/OffsetFetchResponse.scala      | 2 ++
 core/src/main/scala/kafka/api/OffsetRequest.scala            | 2 ++
 core/src/main/scala/kafka/api/OffsetResponse.scala           | 2 ++
 core/src/main/scala/kafka/api/ProducerRequest.scala          | 2 ++
 core/src/main/scala/kafka/api/ProducerResponse.scala         | 2 ++
 core/src/main/scala/kafka/api/TopicMetadataRequest.scala     | 2 ++
 core/src/main/scala/kafka/api/TopicMetadataResponse.scala    | 2 ++
 13 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/FetchResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/FetchResponse.scala b/core/src/main/scala/kafka/api/FetchResponse.scala
index 0f677f1..b5ef912 100644
--- a/core/src/main/scala/kafka/api/FetchResponse.scala
+++ b/core/src/main/scala/kafka/api/FetchResponse.scala
@@ -73,6 +73,7 @@ case class TopicData(topic: String, partitionData: Seq[(Int, FetchResponsePartit
   val headerSize = TopicData.headerSize(topic)
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object FetchResponse {
 
   // The request version is used to determine which fields we can expect in the response
@@ -115,6 +116,7 @@ object FetchResponse {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class FetchResponse(correlationId: Int,
                          data: Seq[(TopicAndPartition, FetchResponsePartitionData)],
                          requestVersion: Int = 0,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala b/core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala
index b3616fa..2f197bc 100644
--- a/core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala
+++ b/core/src/main/scala/kafka/api/GroupCoordinatorRequest.scala
@@ -23,6 +23,7 @@ import kafka.network.{RequestOrResponseSend, RequestChannel}
 import kafka.network.RequestChannel.Response
 import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object GroupCoordinatorRequest {
   val CurrentVersion = 0.shortValue
   val DefaultClientId = ""
@@ -40,6 +41,7 @@ object GroupCoordinatorRequest {
 
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class GroupCoordinatorRequest(group: String,
                                    versionId: Short = GroupCoordinatorRequest.CurrentVersion,
                                    correlationId: Int = 0,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala b/core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala
index 782eebb..7fd5fe3 100644
--- a/core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala
+++ b/core/src/main/scala/kafka/api/GroupCoordinatorResponse.scala
@@ -21,6 +21,7 @@ import java.nio.ByteBuffer
 import kafka.cluster.BrokerEndPoint
 import org.apache.kafka.common.protocol.Errors
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object GroupCoordinatorResponse {
   val CurrentVersion = 0
 
@@ -40,6 +41,7 @@ object GroupCoordinatorResponse {
 
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class GroupCoordinatorResponse (coordinatorOpt: Option[BrokerEndPoint], error: Errors,
correlationId: Int)
   extends RequestOrResponse() {
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetCommitRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetCommitRequest.scala b/core/src/main/scala/kafka/api/OffsetCommitRequest.scala
index e598500..5aaf0ec 100644
--- a/core/src/main/scala/kafka/api/OffsetCommitRequest.scala
+++ b/core/src/main/scala/kafka/api/OffsetCommitRequest.scala
@@ -28,6 +28,7 @@ import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
 import scala.collection._
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetCommitRequest extends Logging {
   val CurrentVersion: Short = 2
   val DefaultClientId = ""
@@ -88,6 +89,7 @@ object OffsetCommitRequest extends Logging {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetCommitRequest(groupId: String,
                                requestInfo: immutable.Map[TopicAndPartition, OffsetAndMetadata],
                                versionId: Short = OffsetCommitRequest.CurrentVersion,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetCommitResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetCommitResponse.scala b/core/src/main/scala/kafka/api/OffsetCommitResponse.scala
index ace480a..07adc76 100644
--- a/core/src/main/scala/kafka/api/OffsetCommitResponse.scala
+++ b/core/src/main/scala/kafka/api/OffsetCommitResponse.scala
@@ -23,6 +23,7 @@ import kafka.utils.Logging
 import kafka.common.TopicAndPartition
 import org.apache.kafka.common.protocol.Errors
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetCommitResponse extends Logging {
   val CurrentVersion: Short = 0
 
@@ -42,6 +43,7 @@ object OffsetCommitResponse extends Logging {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetCommitResponse(commitStatus: Map[TopicAndPartition, Errors],
                                 correlationId: Int = 0)
     extends RequestOrResponse() {

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetFetchRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetFetchRequest.scala b/core/src/main/scala/kafka/api/OffsetFetchRequest.scala
index 310860f..23bbad1 100644
--- a/core/src/main/scala/kafka/api/OffsetFetchRequest.scala
+++ b/core/src/main/scala/kafka/api/OffsetFetchRequest.scala
@@ -26,6 +26,7 @@ import kafka.network.RequestChannel.Response
 import kafka.utils.Logging
 import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetFetchRequest extends Logging {
   val CurrentVersion: Short = 2
   val DefaultClientId = ""
@@ -51,6 +52,7 @@ object OffsetFetchRequest extends Logging {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetFetchRequest(groupId: String,
                               requestInfo: Seq[TopicAndPartition],
                               versionId: Short = OffsetFetchRequest.CurrentVersion,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetFetchResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetFetchResponse.scala b/core/src/main/scala/kafka/api/OffsetFetchResponse.scala
index 0691503..b875dcc 100644
--- a/core/src/main/scala/kafka/api/OffsetFetchResponse.scala
+++ b/core/src/main/scala/kafka/api/OffsetFetchResponse.scala
@@ -25,6 +25,7 @@ import kafka.utils.Logging
 
 import org.apache.kafka.common.protocol.Errors
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetFetchResponse extends Logging {
 
   def readFrom(buffer: ByteBuffer): OffsetFetchResponse = {
@@ -55,6 +56,7 @@ object OffsetFetchResponse extends Logging {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetFetchResponse(requestInfo: Map[TopicAndPartition, OffsetMetadataAndError],
                                requestVersion: Int = OffsetFetchRequest.CurrentVersion,
                                correlationId: Int = 0,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetRequest.scala b/core/src/main/scala/kafka/api/OffsetRequest.scala
index 876022c..bc5b66d 100644
--- a/core/src/main/scala/kafka/api/OffsetRequest.scala
+++ b/core/src/main/scala/kafka/api/OffsetRequest.scala
@@ -26,6 +26,7 @@ import kafka.network.RequestChannel.Response
 import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetRequest {
   val CurrentVersion = 0.shortValue
   val DefaultClientId = ""
@@ -57,6 +58,7 @@ object OffsetRequest {
 
 case class PartitionOffsetRequestInfo(time: Long, maxNumOffsets: Int)
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetRequest(requestInfo: Map[TopicAndPartition, PartitionOffsetRequestInfo],
                          versionId: Short = OffsetRequest.CurrentVersion,
                          correlationId: Int = 0,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/OffsetResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/OffsetResponse.scala b/core/src/main/scala/kafka/api/OffsetResponse.scala
index 8d23d41..95a31d5 100644
--- a/core/src/main/scala/kafka/api/OffsetResponse.scala
+++ b/core/src/main/scala/kafka/api/OffsetResponse.scala
@@ -23,6 +23,7 @@ import kafka.api.ApiUtils._
 import org.apache.kafka.common.protocol.Errors
 
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object OffsetResponse {
 
   def readFrom(buffer: ByteBuffer): OffsetResponse = {
@@ -52,6 +53,7 @@ case class PartitionOffsetsResponse(error: Errors, offsets: Seq[Long]) {
 }
 
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class OffsetResponse(correlationId: Int,
                           partitionErrorAndOffsets: Map[TopicAndPartition, PartitionOffsetsResponse])
     extends RequestOrResponse() {

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/ProducerRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/ProducerRequest.scala b/core/src/main/scala/kafka/api/ProducerRequest.scala
index 38fef5b..13ed16c 100644
--- a/core/src/main/scala/kafka/api/ProducerRequest.scala
+++ b/core/src/main/scala/kafka/api/ProducerRequest.scala
@@ -26,6 +26,7 @@ import kafka.network.{RequestOrResponseSend, RequestChannel}
 import kafka.network.RequestChannel.Response
 import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object ProducerRequest {
   val CurrentVersion = 2.shortValue
 
@@ -54,6 +55,7 @@ object ProducerRequest {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class ProducerRequest(versionId: Short = ProducerRequest.CurrentVersion,
                            correlationId: Int,
                            clientId: String,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/ProducerResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/ProducerResponse.scala b/core/src/main/scala/kafka/api/ProducerResponse.scala
index b09c73b..2d3c9cc 100644
--- a/core/src/main/scala/kafka/api/ProducerResponse.scala
+++ b/core/src/main/scala/kafka/api/ProducerResponse.scala
@@ -25,6 +25,7 @@ import scala.collection.Map
 import kafka.common.TopicAndPartition
 import kafka.api.ApiUtils._
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object ProducerResponse {
   // readFrom assumes that the response is written using V2 format
   def readFrom(buffer: ByteBuffer): ProducerResponse = {
@@ -49,6 +50,7 @@ object ProducerResponse {
 
 case class ProducerResponseStatus(var error: Errors, offset: Long, timestamp: Long = Message.NoTimestamp)
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class ProducerResponse(correlationId: Int,
                             status: Map[TopicAndPartition, ProducerResponseStatus],
                             requestVersion: Int = 0,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/TopicMetadataRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/TopicMetadataRequest.scala b/core/src/main/scala/kafka/api/TopicMetadataRequest.scala
index 032ff77..80107aa 100644
--- a/core/src/main/scala/kafka/api/TopicMetadataRequest.scala
+++ b/core/src/main/scala/kafka/api/TopicMetadataRequest.scala
@@ -25,11 +25,13 @@ import kafka.network.RequestChannel.Response
 import kafka.utils.Logging
 import org.apache.kafka.common.protocol.{ApiKeys, Errors}
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object TopicMetadataRequest extends Logging {
   val CurrentVersion = 0.shortValue
   val DefaultClientId = ""
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class TopicMetadataRequest(versionId: Short,
                                 correlationId: Int,
                                 clientId: String,

http://git-wip-us.apache.org/repos/asf/kafka/blob/23df2199/core/src/main/scala/kafka/api/TopicMetadataResponse.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/api/TopicMetadataResponse.scala b/core/src/main/scala/kafka/api/TopicMetadataResponse.scala
index f2f89e0..5447ea0 100644
--- a/core/src/main/scala/kafka/api/TopicMetadataResponse.scala
+++ b/core/src/main/scala/kafka/api/TopicMetadataResponse.scala
@@ -20,6 +20,7 @@ package kafka.api
 import kafka.cluster.BrokerEndPoint
 import java.nio.ByteBuffer
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 object TopicMetadataResponse {
 
   def readFrom(buffer: ByteBuffer): TopicMetadataResponse = {
@@ -33,6 +34,7 @@ object TopicMetadataResponse {
   }
 }
 
+@deprecated("This object has been deprecated and will be removed in a future release.", "1.0.0")
 case class TopicMetadataResponse(brokers: Seq[BrokerEndPoint],
                                  topicsMetadata: Seq[TopicMetadata],
                                  correlationId: Int)


Mime
View raw message