Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
7544b53
Merge remote-tracking branch 'refs/remotes/apache/trunk'
mgarmes Dec 20, 2016
d38df2a
KAFKA-3355
mgarmes Dec 22, 2016
a36aa06
KAFKA-3355 GetOffsetShell command doesn't work with SASL enabled.
Jan 5, 2017
6c83939
KAFKA-4709:Error message from Struct.validate() should include the na…
Aegeaner Feb 16, 2017
022d201
MINOR: Move compression stream construction into CompressionType
hachikuji Feb 16, 2017
505af6b
KAFKA-4484: Set more conservative default values on RocksDB for memor…
dguy Feb 16, 2017
a887379
KAFKA-4775; Fix findbugs warnings in kafka-tools
cmccabe Feb 17, 2017
1f2ee5f
KAFKA-4340; Follow-up fixing system test failures and handling non de…
becketqin Feb 17, 2017
fc1cfe4
MINOR: Remove Struct from Request/Response classes
ijuma Feb 17, 2017
1f1e794
KAFKA-4317: Regularly checkpoint StateStore changelog offsets
dguy Feb 17, 2017
a515e93
HOTFIX: ClassCastException in request logging
hachikuji Feb 18, 2017
d734f4e
MINOR: Replace for with foreach loop in common module
Feb 18, 2017
c6fcc72
MINOR: Increase consumer init timeout in throttling test
Feb 18, 2017
916edc3
KAFKA-4774; Inner classes which don't need a reference to the outer c…
cmccabe Feb 18, 2017
dcea498
KAFKA-4777; Backoff properly in consumer heartbeat thread if no broke…
Feb 18, 2017
d24d932
HOTFIX: ClassCastException in Request error logging
original-brownbear Feb 18, 2017
3db3d73
MINOR: Fixed 3 inner classes without instance reference to be static
original-brownbear Feb 20, 2017
e41e782
KAFKA-4776; Implement graceful handling for improperly formed compres…
hachikuji Feb 20, 2017
3b8b7a4
MINOR: Fix NPE handling unknown APIs in NodeApiVersions.toString
hachikuji Feb 21, 2017
f48e8c1
MINOR: Add build_eclipse to .gitignore
cshannon Feb 21, 2017
8bd0648
MINOR: Remove unused MessageWriter and CompressionFactory
hachikuji Feb 21, 2017
7b302ad
KAFKA-4752: Fixed bandwidth calculation
Feb 21, 2017
696b1d3
KAFKA-4757; NetworkClient should log request details at trace level w…
cmccabe Feb 22, 2017
913c09e
KAFKA-4708; Fix transient failure in BrokerApiVersionsCommandTest.che…
cmccabe Feb 22, 2017
5916ef0
KAFKA-4786; Wait for heartbeat thread to terminate in consumer close
rajinisivaram Feb 22, 2017
015f1d7
MINOR: Move ProtoUtils methods to ApiKeys
ijuma Feb 22, 2017
5a2abc5
KAFKA-4788: Revert "KAFKA-4092: retention.bytes should not be allowed…
ijuma Feb 23, 2017
3428bc1
MINOR: Reduce stream thread metrics overhead
enothereska Feb 23, 2017
6a55d41
HOTFIX: add js template to upgrade.html
guozhangwang Feb 23, 2017
1ed4b48
KAFKA-4198; Fix race condition in KafkaServer.shutdown()
original-brownbear Feb 24, 2017
01898eb
MINOR: Code quality improvements to Config classes
kamalcph Feb 24, 2017
0be3a72
MINOR: fixed javadoc typo in KafkaProducer.partitionsFor
jpdaigle Feb 24, 2017
2a7b18a
KAFKA-4779; Fix security upgrade system test to be non-disruptive
rajinisivaram Feb 24, 2017
151b236
KAFKA-4494: Reduce startup and rebalance time by batching restoration…
dguy Feb 24, 2017
0483a0b
MINOR: Fix transient failure of testCannotSendToInternalTopic
ijuma Feb 24, 2017
4352444
MINOR: Fixed Non-Final Close Method + its Duplication
original-brownbear Feb 24, 2017
b917af1
MINOR: Make it impossible to invoke `Request.body` without an explici…
ijuma Feb 24, 2017
3749832
MINOR: Ensure consumer calls poll() if requests are outstanding
hachikuji Feb 24, 2017
5b22b53
MINOR: Fix potential integer overflow and String.format issue
ijuma Feb 25, 2017
5b682ba
MINOR: Use API hyperlinks in 'Kafka Protocol Guide' to facilitate nav…
vahidhashemian Feb 26, 2017
9260e85
KAFKA-4806; Prevent double logging of ConsumerConfig
Gacko Feb 27, 2017
9231cc4
KAFKA-4744: Increased timeout for bounce test
enothereska Feb 27, 2017
8e6fbe8
MINOR: Make asJsonSchema() and asConnectSchema() methods public
C0urante Feb 28, 2017
f3fab2e
KAFKA-4809: docker/run_tests.sh should set up /opt/kafka-dev to be th…
cmccabe Feb 28, 2017
d0e436c
MINOR: improve license header check by providing head file instead of…
mjsax Feb 28, 2017
e31c0c9
MINOR: Fix typo in javadoc of `flatMapValues`
Feb 28, 2017
a10d7b1
KAFKA-4789: Added support to ProcessorTopologyTestDriver to forward t…
hrafzali Feb 28, 2017
de05c9d
MINOR: Add code quality checks (and suppressions) to checkstyle.xml
dguy Feb 28, 2017
c9872cb
KAFKA-4773; The Kafka build should run findbugs
cmccabe Feb 28, 2017
0fba529
KAFKA-4677 Follow Up: add optimization to StickyTaskAssignor for roll…
dguy Mar 1, 2017
b380a82
MINOR: improve MinTimestampTrackerTest and fix NPE when null element …
dguy Mar 1, 2017
ef92bb4
MINOR: Minor reduce unnecessary calls to time.millisecond (part 2)
enothereska Mar 1, 2017
1b902b4
KAFKA4811; ReplicaFetchThread may fail to create due to existing metric
huxihx Mar 2, 2017
ca06862
KAFKA-2358: Cluster collection returning methods never return null
sslavic Mar 2, 2017
9e65b25
KAFKA-4652: Added tests for KStreamBuilder
bbejeck Mar 2, 2017
59779aa
MINOR: Fix typo in GlobalKTable javadocs
Mar 2, 2017
670980e
KAFKA-4800: Streams State transition ASCII diagrams need fixing and p…
Mar 2, 2017
a3c45b0
KAFKA-4631; Request metadata in consumer if topic/partitions unavailable
rajinisivaram Mar 3, 2017
573a6f3
KAFKA-2857; Retry querying the consumer group while initializing
vahidhashemian Mar 3, 2017
2e92f9b
MINOR: Bump version to 0.11.0.0-SNAPSHOT
ijuma Mar 3, 2017
4b1415c
MINOR: Fix tests/docker/Dockerfile
cmccabe Mar 4, 2017
d2792e3
KAFKA-2857; MINOR: Follow up to
vahidhashemian Mar 4, 2017
d9b784e
KAFKA-4796; Fix some findbugs warnings in Kafka Java client
cmccabe Mar 4, 2017
5781feb
KAFKA-3182; Fix testSocketsCloseOnShutdown transient failures
original-brownbear Mar 4, 2017
adb70da
KAFKA-4820; ConsumerNetworkClient.send() should not require global lock
lindong28 Mar 4, 2017
b7378d5
MINOR: Standardised benchmark params for consumer and streams
Mar 5, 2017
580bebe
KAFKA-4826: Fix some findbugs warnings in Kafka Streams
cmccabe Mar 5, 2017
3e69ef6
KAFKA-4276: Add REST configuration in connector properties
Mar 5, 2017
b127250
KAFKA-4567 - Connect Producer and Consumer ignore ssl parameters…
soenkeliebau Mar 5, 2017
5b013d9
KAFKA-4828: ProcessorTopologyTestDriver does not work when using through
hrafzali Mar 6, 2017
f111f2a
MINOR: additional refactoring around the use of Errors
vahidhashemian Mar 6, 2017
79f8503
KAFKA-3989; Initial support for adding a JMH benchmarking module
bbejeck Mar 6, 2017
63010cb
KAFKA-4266; ReassignPartitionsClusterTest: ensure ZK publication is c…
benstopford Mar 6, 2017
2064a2a
HOTFIX: fix broken link for wordcount demo example
mjsax Mar 6, 2017
5cf491c
KAFKA-3155; Avoid long overflow in RecordBatch#maybeExpire
original-brownbear Mar 6, 2017
81f9e13
MINOR: Rename RecordBatch to ProducerBatch to free the name for KIP-98
hachikuji Mar 7, 2017
146edd5
KAFKA-4851: only search available segments during Segments.segments(f…
dguy Mar 7, 2017
c6bccdd
KAFKA-4841; NetworkClient should only consider a connection to have f…
lindong28 Mar 8, 2017
29084a9
KAFKA-4722: Add application.id to StreamThread name
sharad-develop Mar 8, 2017
f7354e7
MINOR: Add varint serde utilities for new message format
hachikuji Mar 8, 2017
022bf12
MINOR: Use ConcurrentMap for ConsumerNetworkClient UnsentRequests
hachikuji Mar 8, 2017
537f98a
KAFKA-4745; Remove unnecessary flush in KafkaLZ4BlockOutputStream.clo…
Mar 9, 2017
294018a
KAFKA-4864; added correct zookeeper nodes for security migrator
simplesteph Mar 9, 2017
65650ba
MINOR: Introduce NetworkClient.hasInFlightRequests
ijuma Mar 9, 2017
dbcbd79
KAFKA-4467: Run tests on travis-ci using docker
raghavgautam Mar 10, 2017
7565dcd
KAFKA-4861; GroupMetadataManager record is rejected if broker configu…
ijuma Mar 10, 2017
c063561
MINOR: KStream: fix typo in javadoc
Mar 10, 2017
dfa2ef4
KAFKA-4738: Remove generic type of class ClientState
sharad-develop Mar 10, 2017
0011a3d
MINOR: increase RocksDb parallelism
Mar 10, 2017
046519d
MINOR: incorrect javadoc formatting
acoburn Mar 11, 2017
cd69daa
KAFKA-4769: Add Float serializer, deserializer, serde
Mar 13, 2017
85e7a0a
KAFKA-4657: Improve test coverage of CompositeReadOnlyWindowStore
adyach Mar 13, 2017
2a9c18a
KAFKA-4891; kafka.request.logger TRACE regression
onurkaraman Mar 13, 2017
d3b8ff0
HOTFIX: Fix apache headers in float serde class files
guozhangwang Mar 13, 2017
9e4548d
KAFKA-4863; Querying window store may return unwanted keys
dguy Mar 14, 2017
52a15d7
KAFKA-4783: Add ByteArrayConverter (KIP-128)
ewencp Mar 15, 2017
7a29ed3
KAFKA 3355 update
mgarmes Mar 15, 2017
962c378
HOTFIX: Fix header in ByteArrayConverter
ijuma Mar 15, 2017
b9f8124
MINOR: Improve log4j on stream thread and stream process
guozhangwang Mar 15, 2017
be11272
MINOR: Fix a documentation typo
vahidhashemian Mar 15, 2017
7c38fc0
fix and tests (status: PASS)
mgarmes Mar 16, 2017
c659e8e
rebase
mgarmes Mar 16, 2017
d1bc11f
Merge branch 'master' of https://github.com/garmes-gdev/kafka
mgarmes Mar 16, 2017
3e8bfca
fix
mgarmes Mar 16, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dist
*classes
target/
build/
build_eclipse/
.gradle/
lib_managed/
src_managed/
Expand Down
54 changes: 54 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Licensed 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.

sudo: required
dist: trusty
language: java

env:
- _DUCKTAPE_OPTIONS="--subset 0 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 1 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 2 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 3 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 4 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 5 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 6 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 7 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 8 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 9 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 10 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 11 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 12 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 13 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 14 --subsets 15"

jdk:
- oraclejdk8

before_install:
- gradle wrapper

script:
- ./gradlew rat
- ./gradlew releaseTarGz && /bin/bash ./tests/docker/run_tests.sh

services:
- docker

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,26 @@ Please note for this to work you should create/update `${GRADLE_USER_HOME}/gradl
### Determining if any dependencies could be updated ###
./gradlew dependencyUpdates

### Running checkstyle on the java code ###
### Running code quality checks ###
There are two code quality analysis tools that we regularly run, findbugs and checkstyle.

#### Checkstyle
Checkstyle enforces a consistent coding style in Kafka.
You can run checkstyle using:

./gradlew checkstyleMain checkstyleTest

This will most commonly be useful for automated builds where the full resources of the host running the build and tests
may not be dedicated to Kafka's build.
The checkstyle warnings will be found in `reports/checkstyle/reports/main.html` and `reports/checkstyle/reports/test.html` files in the
subproject build directories. They are also are printed to the console. The build will fail if Checkstyle fails.

#### Findbugs
Findbugs uses static analysis to look for bugs in the code.
You can run findbugs using:

./gradlew findbugsMain findbugsTest -x test

The findbugs warnings will be found in `reports/findbugs/main.html` and `reports/findbugs/test.html` files in the subproject build
directories. Currently, findbugs warnings do not cause the build to fail.

### Common build options ###

Expand Down
62 changes: 61 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ buildscript {
classpath "org.ajoberstar:grgit:1.7.0"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'org.scoverage:gradle-scoverage:2.1.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}

Expand Down Expand Up @@ -109,7 +110,8 @@ if (new File('.git').exists()) {
'gradlew.bat',
'**/README.md',
'**/id_rsa',
'**/id_rsa.pub'
'**/id_rsa.pub',
'checkstyle/suppressions.xml'
])
}
}
Expand All @@ -124,6 +126,7 @@ subprojects {
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'

sourceCompatibility = 1.7

Expand Down Expand Up @@ -272,9 +275,24 @@ subprojects {
checkstyle {
configFile = new File(rootDir, "checkstyle/checkstyle.xml")
configProperties = [importControlFile: "$rootDir/checkstyle/import-control.xml"]
// version 7.x requires Java 8
toolVersion = '6.19'
}
test.dependsOn('checkstyleMain', 'checkstyleTest')

findbugs {
toolVersion = "3.0.1"
excludeFilter = file("$rootDir/gradle/findbugs-exclude.xml")
ignoreFailures = true
}

tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}

// Ignore core since its a scala project
if (it.path != ':core') {
// NOTE: Gradles Jacoco plugin does not support "offline instrumentation" this means that classes mocked by PowerMock
Expand Down Expand Up @@ -805,6 +823,48 @@ project(':streams:examples') {
}
}

project(':jmh-benchmarks') {

apply plugin: 'com.github.johnrengelman.shadow'

shadowJar {
baseName = 'kafka-jmh-benchmarks-all'
classifier = null
version = null
}

dependencies {
compile project(':clients')
compile project(':streams')
compile 'org.openjdk.jmh:jmh-core:1.17.5'
compile 'org.openjdk.jmh:jmh-generator-annprocess:1.17.5'
compile 'org.openjdk.jmh:jmh-core-benchmarks:1.17.5'
}

jar {
manifest {
attributes "Main-Class": "org.openjdk.jmh.Main"
}
}


task jmh(type: JavaExec, dependsOn: [':jmh-benchmarks:clean', ':jmh-benchmarks:shadowJar']) {

main="-jar"

doFirst {
if (System.getProperty("jmhArgs")) {
args System.getProperty("jmhArgs").split(',')
}
args = [shadowJar.archivePath, *args]
}
}

javadoc {
enabled = false
}
}

project(':log4j-appender') {
archivesBaseName = "kafka-log4j-appender"

Expand Down
40 changes: 38 additions & 2 deletions checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<module name="FileTabCharacter"/>

<!-- header -->
<module name="RegexpHeader">
<property name="header" value="/\*\*\nLicensed to the Apache.*"/>
<module name="Header">
<property name="headerFile" value="checkstyle/java.header" />
</module>

<module name="TreeWalker">
Expand Down Expand Up @@ -93,5 +93,41 @@
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>

<!-- code quality -->
<module name="MethodLength"/>
<module name="ParameterNumber">
<!-- default is 8 -->
<property name="max" value="10"/>
</module>
<module name="ClassDataAbstractionCoupling">
<!-- default is 7 -->
<property name="max" value="15"/>
</module>
<module name="BooleanExpressionComplexity">
<!-- default is 3 -->
<property name="max" value="4"/>
</module>

<module name="ClassFanOutComplexity">
<!-- default is 20 -->
<property name="max" value="35"/>
</module>
<module name="CyclomaticComplexity">
<!-- default is 10-->
<property name="max" value="15"/>
</module>
<module name="JavaNCSS">
<!-- default is 50 -->
<property name="methodMaximum" value="100"/>
</module>
<module name="NPathComplexity">
<!-- default is 200 -->
<property name="max" value="500"/>
</module>
</module>

<module name="SuppressionFilter">
<property name="file" value="checkstyle/suppressions.xml"/>
</module>
</module>
13 changes: 13 additions & 0 deletions checkstyle/import-control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@
</subpackage>
</subpackage>

<subpackage name="jmh">
<allow pkg="org.openjdk.jmh.annotations" />
<allow pkg="org.openjdk.jmh.runner" />
<allow pkg="org.openjdk.jmh.runner.options" />
<allow pkg="org.apache.kafka.common" />
<allow pkg="org.apache.kafka.streams" />
<allow pkg="org.github.jamm" />
</subpackage>

<subpackage name="log4jappender">
<allow pkg="org.apache.log4j" />
<allow pkg="org.apache.kafka.clients" />
Expand Down Expand Up @@ -212,6 +221,10 @@
<allow pkg="org.apache.kafka.connect.storage" />
</subpackage>

<subpackage name="converters">
<allow pkg="org.apache.kafka.connect.storage" />
</subpackage>

<subpackage name="runtime">
<allow pkg="org.apache.kafka.connect" />
<allow pkg="org.reflections"/>
Expand Down
16 changes: 16 additions & 0 deletions checkstyle/java.header
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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.
*/
Loading