1. URLs you need :
Code base:
In a browser goto:
https://github.com/apache/kafka
Fork it: (may require login to your github.com account)
This is your own kafka (, yes) github repo url:
https://github.com/<your github username>/kafka.git
Copy this to clipboard (ctrl/command+c)
2. Install java, eclipse and plugins :
Download and install JDK. I used Oracle JDK 1.7.0_72.
Download latest eclipse. I used Eclipse version Mars M4 to write this up. Unzip and run 'eclipse'.
Help - Install New Software - Work with: enter the url http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site - Select All - Next,
follow the on screen instructions, to finish the installation.
Help - Install New Software - Work with: enter the url http://dist.springsource.com/release/TOOLS/update/e4.4/ - Select All - Next,
follow the on screen instructions, to finish the installation.
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
Click Finish.
Link to Upstream Apache Kafka repo :
Note: Fetch from this repo, to keep your local repo up to date. Recommended, before you check-in your changes.
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 :
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
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
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.