Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Note: If you completely new to eclipse, this "follow on screen instructions from here onwards", is usually, few clicks on 'Next', a click on 'Finish', a click on 'OK' and a click on 'Yes' when asked to restart your eclipse.


3. Get the Kafka Source Code :
In eclipse,
Window > Perspective > Open Perspective > Other > Git > Open.
Click on 'Clone a Git repository'.

URI: https://github.com/<your github username>/kafka.git
Host: github.com
Repository Path: /<your github username>/kafka.git

Enter your github user name and password.
Check 'store in secure store'.

Click Next.

Select a branch, the latest is 0.8.2.
Pick all or pick one, it is your choice.
Usually, there should be a default 'master' branch, which is missing in this repo.

Click Next.

Choose local directory where you want to clone the sources.
Directory: ~/MySources/kafka
Initial Branch: 0.8.2 or the one you picked in previous step

Check, Import all existing eclipse projects after clone finishes
Ideally, gradle plugin, if exists, should run eclipse task and import the projects into your workspace.  For now, it is differed until 'Build Model' step.


Click Finish.

 

Link to Upstream Apache Kafka repo :

...


You should see 'kafka' entry appear, with the branch version you selected.
Expand it to find 'Remotes'.
Right click, 'new remote'.
Remote name: apache-kafka
Check, 'configure fetch'

Configure Fetch window:
URI: click 'change'

Source Git Repository window:
URI: https://github.com/apache/kafka.git
Host: github.com
Repository Path: /apache/kafka.git

Enter your github user name and password.
Check 'store in secure store'.

Click Next.

Click Finish.

Click 'Save and Finish'.


4. Let the projects show up :
up  :

Due to this bug,

https://issues.apache.org/jira/browse/KAFKA-1874

Edit ~/MySources/kafka/gradle.properties

Change to scalaVersion=2.11 from scalaVersion=2.10.4


Window > Perspective > Open Perspective > Java > Open.
Kafka project missing.

File > Import > Gradle > Gradle Project

Click Next

Browse - to the local directory of clone, ~/MySources/kafka
Click - Build Model
When done you should see this structure:
kafka
--clients
--contrib
----hadoop-consumer
----hadoop-producer
--core
--examples

Check 'kafka'. It selects all.

Click 'Finish'.

Time for break.

https://issues.apache.org/jira/browse/KAFKA-1873

Error:
Description    Resource    Path    Location    Type
scalatest_2.10-1.9.1.jar of core build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.    core        Unknown    Scala Version Problem

Workaround:
Eclipse - > Preferences - > Scala - > Compiler - > Build manager
uncheck withVersionClasspathVariable

https://issues.apache.org/jira/browse/KAFKA-1874
Missing:
import util.parsing.json.JSON
This results in compilation erros in 'core' and its dependent projects. 


5. Happy Contributing.