Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # dev >> Re: Review Request 14013: Added support for Scala 2.10 builds while maintaining compatibility with 2.8.x


+
Neha Narkhede 2013-09-08, 16:59
Copy link to this message
-
Re: Review Request 14013: Added support for Scala 2.10 builds while maintaining compatibility with 2.8.x


> On Sept. 8, 2013, 4:56 p.m., Neha Narkhede wrote:
> > core/build.sbt, line 26
> > <https://reviews.apache.org/r/14013/diff/2/?file=349260#file349260line26>
> >
> >     Does Scala 2.10 require scalatest 1.9.1?
> >     How about Scala 2.9.x ?
>
> Christopher Freeman wrote:
>     There wasn't a 2.10 build of scalatest version 1.8 so I needed to use one of the newer versions with a 2.10 build.  For the other cross build cases, they will continue to work with the same version of scalatest that they did previously.

Makes sense. Thanks!
- Neha
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14013/#review25977
-----------------------------------------------------------
On Sept. 9, 2013, 12:40 a.m., Christopher Freeman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14013/
> -----------------------------------------------------------
>
> (Updated Sept. 9, 2013, 12:40 a.m.)
>
>
> Review request for kafka and Neha Narkhede.
>
>
> Bugs: KAFKA-1046
>     https://issues.apache.org/jira/browse/KAFKA-1046
>
>
> Repository: kafka
>
>
> Description
> -------
>
> This RB contains necessary changes to the kafka source code to support Scala 2.10.x while still maintaining support for Scala 2.8.x
>
> The existing cause of source incompatibility between 2.8.x and 2.10.x was primarily due to the use of implicit conversions in the scala.collection.JavaConversions object.  Many of them where deprecated (and replaced with differently named methods) and the deprecated methods where removed in 2.10.  I avoided the source incompatibility by importing the implicits with a wild card.
>
> Scala annotations moved to a different package in 2.9 and the reference to the old location was removed in 2.10.  I couldn't think of a source compatible way to support both in Annotations.scala so since this source file is very small, I created two copies and configured sbt to use the one appropriate for when building for a particular Scala version.
>
> I also typed many of the catch block case statements with :Throwable.  This change isn't required but starting with Scala 2.9, the compiler will emit warnings if the type is emitted.  Otherwise "case e =>" and case "e: Throwable =>" are equivalent.
>
>
>  
>
>
> Diffs
> -----
>
>   core/build.sbt c54cf44
>   core/src/main/scala/kafka/Kafka.scala dafb1ee
>   core/src/main/scala/kafka/admin/AddPartitionsCommand.scala 5757c32
>   core/src/main/scala/kafka/admin/AdminUtils.scala c399bc7
>   core/src/main/scala/kafka/admin/CreateTopicCommand.scala 21c1186
>   core/src/main/scala/kafka/admin/DeleteTopicCommand.scala 3da4518
>   core/src/main/scala/kafka/admin/ListTopicCommand.scala c760cc0
>   core/src/main/scala/kafka/admin/PreferredReplicaLeaderElectionCommand.scala d5de5f3
>   core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala aa61fa1
>   core/src/main/scala/kafka/client/ClientUtils.scala cc526ec
>   core/src/main/scala/kafka/cluster/Broker.scala b03dea2
>   core/src/main/scala/kafka/consumer/ConsoleConsumer.scala 719beb5
>   core/src/main/scala/kafka/consumer/ConsumerFetcherManager.scala fa6b213
>   core/src/main/scala/kafka/consumer/SimpleConsumer.scala 4395fe3
>   core/src/main/scala/kafka/consumer/TopicCount.scala c8e8406
>   core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala e7a692a
>   core/src/main/scala/kafka/consumer/ZookeeperTopicEventWatcher.scala df83baa
>   core/src/main/scala/kafka/controller/ControllerChannelManager.scala ed1ce0b
>   core/src/main/scala/kafka/controller/KafkaController.scala ab18b7a
>   core/src/main/scala/kafka/controller/PartitionStateMachine.scala a084830
>   core/src/main/scala/kafka/controller/ReplicaStateMachine.scala c964857
>   core/src/main/scala/kafka/javaapi/FetchRequest.scala b475240
>   core/src/main/scala/kafka/javaapi/Implicits.scala ee0a71d
 
+
Jun Rao 2013-09-08, 22:51
+
Neha Narkhede 2013-09-09, 16:41
+
Neha Narkhede 2013-09-09, 16:23