Skip to content

Commit

Permalink
Merge branch 'trunk' of http://git-wip-us.apache.org/repos/asf/kafka
Browse files Browse the repository at this point in the history
…into trunk

Conflicts:
	core/src/main/scala/kafka/controller/KafkaController.scala
  • Loading branch information
sriramsub committed Feb 24, 2014
2 parents 2d848c5 + 993e1aa commit 5de68ef
Show file tree
Hide file tree
Showing 244 changed files with 7,438 additions and 3,165 deletions.
14 changes: 14 additions & 0 deletions HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
31 changes: 0 additions & 31 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,34 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-----------------------------------------------------------------------

SBT LICENSE

Copyright (c) 2008, 2009, 2010 Mark Harrah, Jason Zaugg
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-----------------------------------------------------------------------
103 changes: 62 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,81 @@
# Apache Kafka #

Apache Kafka
=================
See our [web site](http://kafka.apache.org) for details on the project.

## Building it ##
1. ./sbt update
2. ./sbt package
3. ./sbt assembly-package-dependency
### Building a jar and running it ###
./gradlew jar

To build for a particular version of Scala (either 2.8.0, 2.8.2, 2.9.1, 2.9.2 or 2.10.1), change step 2 above to:
2. ./sbt "++2.8.0 package"
Follow instuctions in http://kafka.apache.org/documentation.html#quickstart

To build for all supported versions of Scala, change step 2 above to:
2. ./sbt +package
### Running unit tests ###
./gradlew test

## Running it ##
Follow instuctions in http://kafka.apache.org/documentation.html#quickstart
### Forcing re-running unit tests w/o code change ###
./gradlew cleanTest test

## Running unit tests ##
./sbt test
### Running a particular unit test ###
./gradlew -Dtest.single=RequestResponseSerializationTest core:test

## Building a binary release zip or gzipped tar ball ##
./sbt release-zip
./sbt release-tar
The release file can be found inside ./target/RELEASE/.
### Building a binary release gzipped tar ball ###
./gradlew clean
./gradlew releaseTarGz

## Other Build Tips ##
Here are some useful sbt commands, to be executed at the sbt command prompt (./sbt). Prefixing with "++<version> " runs the
command for a specific Scala version, prefixing with "+" will perform the action for all versions of Scala, and no prefix
runs the command for the default (2.8.0) version of Scala. -
The release file can be found inside ./core/build/distributions/.

tasks : Lists all the sbt commands and their descriptions
clean : Deletes all generated files (the target directory).
compile : Compile all the sub projects, but not create the jars
test : Run all unit tests in all sub projects
release-zip : Create all the jars, run unit tests and create a deployable release zip
release-tar : Create all the jars, run unit tests and create a deployable release gzipped tar tall
package: Creates jars for src, test, docs etc
projects : List all the sub projects
project sub_project_name : Switch to a particular sub-project. For example, to switch to the core kafka code, use "project core-kafka"
### Cleaning the build ###
./gradlew clean

The following commands can be run only on a particular sub project -
test-only package.test.TestName : Runs only the specified test in the current sub project
run : Provides options to run any of the classes that have a main method. For example, you can switch to project java-examples, and run the examples there by executing "project java-examples" followed by "run"
### Running a task on a particular version of Scala ####
either 2.8.0, 2.8.2, 2.9.1, 2.9.2 or 2.10.1) (If building a jar with a version other than 2.8.0, the scala version variable in bin/kafka-run-class.sh needs to be changed to run quick start.)
./gradlew -PscalaVersion=2.9.1 jar
./gradlew -PscalaVersion=2.9.1 test
./gradlew -PscalaVersion=2.9.1 releaseTarGz

For more details please see the [SBT documentation](https://github.com/harrah/xsbt/wiki)
### Running a task for a specific project ###
This is for 'core', 'perf', 'contrib:hadoop-consumer', 'contrib:hadoop-producer', 'examples' and 'clients'
./gradlew core:jar
./gradlew core:test

## Contribution ##
### Listing all gradle tasks ###
./gradlew tasks

Kafka is a new project, and we are interested in building the community; we would welcome any thoughts or [patches](https://issues.apache.org/jira/browse/KAFKA). You can reach us [on the Apache mailing lists](http://kafka.apache.org/contact.html).
### Building IDE project ####
./gradlew eclipse
./gradlew idea

To contribute follow the instructions here:
* http://kafka.apache.org/contributing.html
### Building the jar for all scala versions and for all projects ###
./gradlew jarAll

We also welcome patches for the website and documentation which can be found here:
* https://svn.apache.org/repos/asf/kafka/site
### Running unit tests for all scala versions and for all projects ###
./gradlew testAll

### Building a binary release gzipped tar ball for all scala versions ###
./gradlew releaseTarGzAll

### Publishing the jar for all version of Scala and for all projects to maven ###
./gradlew uploadArchivesAll

Please note for this to work you should create/update `~/.gradle/gradle.properties` and assign the following variables

mavenUrl=
mavenUsername=
mavenPassword=
signing.keyId=
signing.password=
signing.secretKeyRingFile=

### Building the test jar ###
./gradlew testJar

### Determining how transitive dependencies are added ###
./gradlew core:dependencies --configuration runtime

### Contribution ###

Apache Kafka interested in building the community; we would welcome any thoughts or [patches](https://issues.apache.org/jira/browse/KAFKA). You can reach us [on the Apache mailing lists](http://kafka.apache.org/contact.html).

To contribute follow the instructions here:
* http://kafka.apache.org/contributing.html

We also welcome patches for the website and documentation which can be found here:
* https://svn.apache.org/repos/asf/kafka/site
28 changes: 24 additions & 4 deletions bin/kafka-run-class.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,33 @@ if [ -z "$SCALA_VERSION" ]; then
SCALA_VERSION=2.8.0
fi

# assume all dependencies have been packaged into one jar with sbt-assembly's task "assembly-package-dependency"
for file in $base_dir/core/target/scala-${SCALA_VERSION}/*.jar;
# run ./gradlew copyDependantLibs to get all dependant jars in a local dir
for file in $base_dir/core/build/dependant-libs-${SCALA_VERSION}/*.jar;
do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/perf/target/scala-${SCALA_VERSION}/kafka*.jar;
for file in $base_dir/perf/build/libs//kafka-perf_${SCALA_VERSION}*.jar;
do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/examples/build/libs//kafka-examples*.jar;
do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar;
do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar;
do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/clients/build/libs/kafka-clients*.jar;
do
CLASSPATH=$CLASSPATH:$file
done
Expand All @@ -49,7 +69,7 @@ do
CLASSPATH=$CLASSPATH:$file
done

for file in $base_dir/kafka*.jar;
for file in $base_dir/core/build/libs/kafka_${SCALA_VERSION}*.jar;
do
CLASSPATH=$CLASSPATH:$file
done
Expand Down
35 changes: 0 additions & 35 deletions bin/run-rat.sh

This file was deleted.

Loading

0 comments on commit 5de68ef

Please sign in to comment.