[ https://issues.apache.org/jira/browse/KAFKA-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14312598#comment-14312598 ]
Jay Kreps commented on KAFKA-1926: ---------------------------------- Hey [~tongli] this is a great bug to start with. Basically there is a bunch of code in core/src/main/kafka/utils/Utils.scala that duplicates clients/src/main/org/apache/kafka/common/utils/Utils.java. We want to do an intelligent dedupe. I think for each scala utility it should either: a. Be determined to be unused or not really very general purpose and hence deleted or moved to the class where it is used, or else b. Get converted to Java and moved to Utils.java c. Or, if it is server specific or very scala dependent then moved to a new class called ScalaUtils (which may just provide a convenient wrapper for the java version if it needs to be in both places). > Replace kafka.utils.Utils with o.a.k.common.utils.Utils > ------------------------------------------------------- > > Key: KAFKA-1926 > URL: https://issues.apache.org/jira/browse/KAFKA-1926 > Project: Kafka > Issue Type: Improvement > Reporter: Jay Kreps > Labels: newbie > > There is currently a lot of duplication between the Utils class in common and > the one in core. > Our plan has been to deprecate duplicate code in the server and replace it > with the new common code. > As such we should evaluate each method in the scala Utils and do one of the > following: > 1. Migrate it to o.a.k.common.utils.Utils if it is a sensible general purpose > utility in active use that is not Kafka-specific. If we migrate it we should > really think about the API and make sure there is some test coverage. A few > things in there are kind of funky and we shouldn't just blindly copy them > over. > 2. Create a new class ServerUtils or ScalaUtils in kafka.utils that will hold > any utilities that really need to make use of Scala features to be convenient. > 3. Delete it if it is not used, or has a bad api. -- This message was sent by Atlassian JIRA (v6.3.4#6332)