Import Kafka source code to Scala IDE and kafkascala

Source: Internet
Author: User
Tags scala ide

Import Kafka source code to Scala IDE and kafkascala

After one night of tossing, I finally went to Scala IDE (Eclipse and Sacla plug-in) to view the source code of the Apache Kafka project.

My environment is: win7 32-bit, Scala IDE: 4.0.0, Apache Kafka: 0.8.1.1 (added a gradlew. bat file in version 0.8.2)

After downloading Scala IDE, I started to find the source code of Apache Kafka. At the beginning has been using kafka latest engineering source code kafka-0.8.2-beta-src.tgz, but Scala IDE has been unable to open this project, because the kafka-0.8.2-beta-src.tgz after decompression, did not directly support IDE engineering files, need to use sbteclipse, gradle and other tools are built. Then the problem arises. I followed the steps on the official website to run Ivy and the gradlew eclipse command, and I always reported an error. It was uncomfortable to solve the problem one after another. Slowly I gave up the kafka-0.8.2-beta-src.tgz project package, it must be a problem, so building the project is too troublesome. Then I downloaded the kafka-0.8.1.1-src.tgz project, a look, the file is quite full, just missing a gradlew. bat file, I decisively copy a gradlew from kafka-0.8.2-beta-src.tgz. bat to the files decompressed by the kafka-0.8.1.1-src.tgz project. Then run gradlew eclipse in the kafka-0.8.1.1-src.tgz decompressed folder, and finally started to build the eclipse project normally. Using Scala to import the built projects is also successful.

I learned about Kafka, because when I was working on a Mina-based project, I used the message queue to process it as rabbitmq. I came to learn about Kafka when I encountered many problems. Apache has many great projects, so it is really nice to learn more. There is also such an open-source project, which is not very convenient for many of us and will be improved slowly.

Some problems encountered:

1. Run gradlew eclipse under the kafka-0.8.2-beta-src project error:

[Org. gradle. wrapper. GradleWrapperMain not found]

2. Download gradle, configure the environment variables, run gradle eclipse under the kafka-0.8.2-beta-src project error, and every attempt to solve an error, and will report a new error, endless:

[Cocould not find property 'ext 'on settings]




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.