Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache-github/trunk' into reduce-produc…
Browse files Browse the repository at this point in the history
…e-allocations-lz4

* apache-github/trunk: (243 commits)
  KAFKA-12590: Remove deprecated kafka.security.auth.Authorizer, SimpleAclAuthorizer and related classes in 3.0 (apache#10450)
  KAFKA-3968: fsync the parent directory of a segment file when the file is created (apache#10405)
  KAFKA-12283: disable flaky testMultipleWorkersRejoining to stabilize build (apache#10408)
  MINOR: remove KTable.to from the docs (apache#10464)
  MONOR: Remove redudant LocalLogManager (apache#10325)
  MINOR: support ImplicitLinkedHashCollection#sort (apache#10456)
  KAFKA-12587 Remove KafkaPrincipal#fromString for 3.0 (apache#10447)
  KAFKA-12426: Missing logic to create partition.metadata files in RaftReplicaManager (apache#10282)
  MINOR: Improve reproducability of raft simulation tests (apache#10422)
  KAFKA-12474: Handle failure to write new session keys gracefully (apache#10396)
  KAFKA-12593: Fix Apache License headers (apache#10452)
  MINOR: Fix typo in MirrorMaker v2 documentation (apache#10433)
  KAFKA-12600: Remove deprecated config value `default` for client config `client.dns.lookup` (apache#10458)
  KAFKA-12952: Remove deprecated LogConfig.Compact (apache#10451)
  Initial commit (apache#10454)
  KAFKA-12575: Eliminate Log.isLogDirOffline boolean attribute (apache#10430)
  KAFKA-8405; Remove deprecated `kafka-preferred-replica-election` command (apache#10443)
  MINOR: Fix docs for end-to-end record latency metrics (apache#10449)
  MINOR Replaced File with Path in LogSegmentData. (apache#10424)
  KAFKA-12583: Upgrade netty to 4.1.62.Final
  ...
  • Loading branch information
ijuma committed Apr 4, 2021
2 parents d7c43a1 + 976e78e commit 1621ca0
Show file tree
Hide file tree
Showing 961 changed files with 43,389 additions and 19,298 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ jmh-benchmarks/generated
jmh-benchmarks/src/main/generated
streams/src/generated
raft/src/generated
raft/.jqwik-database
core/src/generated
metadata/src/generated
31 changes: 25 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ def doValidation() {
'''
}

def doTest() {
sh '''
./gradlew -PscalaVersion=$SCALA_VERSION unitTest integrationTest \
def doTest(target = "unitTest integrationTest") {
sh """
./gradlew -PscalaVersion=$SCALA_VERSION ${target} \
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \
-PignoreFailures=true -PmaxParallelForks=2 -PmaxTestRetries=1 -PmaxTestRetryFailures=5
'''
"""
junit '**/build/test-results/**/TEST-*.xml'
}

def doStreamsArchetype() {
echo 'Verify that Kafka Streams archetype compiles'

sh '''
./gradlew streams:install clients:install connect:json:install connect:api:install \
|| { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }
./gradlew streams:publishToMavenLocal clients:publishToMavenLocal connect:json:publishToMavenLocal connect:api:publishToMavenLocal \
|| { echo 'Could not publish kafka-streams.jar (and dependencies) locally to Maven'; exit 1; }
'''

VERSION = sh(script: 'grep "^version=" gradle.properties | cut -d= -f 2', returnStdout: true).trim()
Expand Down Expand Up @@ -158,6 +158,25 @@ pipeline {
echo 'Skipping Kafka Streams archetype test for Java 15'
}
}

stage('ARM') {
agent { label 'arm4' }
options {
timeout(time: 2, unit: 'HOURS')
timestamps()
}
environment {
SCALA_VERSION=2.12
}
steps {
setupGradle()
doValidation()
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
doTest('unitTest')
}
echo 'Skipping Kafka Streams archetype test for ARM build'
}
}
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Apache Kafka
Copyright 2020 The Apache Software Foundation.
Copyright 2021 The Apache Software Foundation.

This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).

This distribution has a binary dependency on jersey, which is available under the CDDL
License. The source code of jersey can be found at https://github.com/jersey/jersey/.

This distribution has a binary test dependency on jqwik, which is available under
the Eclipse Public License 2.0. The source code can be found at
https://github.com/jlink/jqwik.

The streams-scala (streams/streams-scala) module was donated by Lightbend and the original code was copyrighted by them:
Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com>
Copyright (C) 2017-2018 Alexis Seigneurin.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ Generate coverage for a single module, i.e.:
### Building a binary release gzipped tar ball ###
./gradlew clean releaseTarGz

The above command will fail if you haven't set up the signing key. To bypass signing the artifact, you can run:

./gradlew clean releaseTarGz -x signArchives

The release file can be found inside `./core/build/distributions/`.

### Building auto generated messages ###
Expand All @@ -81,6 +77,15 @@ fail due to code changes. You can just run:

./gradlew processMessages processTestMessages

### Running a Kafka broker in ZooKeeper mode

./bin/zookeeper-server-start.sh config/zookeeper.properties
./bin/kafka-server-start.sh config/server.properties

### Running a Kafka broker in KRaft (Kafka Raft metadata) mode

See [config/kraft/README.md](https://github.com/apache/kafka/blob/trunk/config/kraft/README.md).

### Cleaning the build ###
./gradlew clean

Expand Down Expand Up @@ -125,6 +130,12 @@ build directory (`${project_dir}/bin`) clashes with Kafka's scripts directory an
to avoid known issues with this configuration.

### Publishing the jar for all version of Scala and for all projects to maven ###
The recommended command is:

./gradlewAll publish

For backwards compatibility, the following also works:

./gradlewAll uploadArchives

Please note for this to work you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`) and assign the following variables
Expand Down Expand Up @@ -167,6 +178,12 @@ Please note for this to work you should create/update user maven settings (typic


### Installing the jars to the local Maven repository ###
The recommended command is:

./gradlewAll publishToMavenLocal

For backwards compatibility, the following also works:

./gradlewAll install

### Building the test jar ###
Expand Down Expand Up @@ -221,6 +238,13 @@ The following options should be set with a `-P` switch, for example `./gradlew -
* `enableTestCoverage`: enables test coverage plugins and tasks, including bytecode enhancement of classes required to track said
coverage. Note that this introduces some overhead when running tests and hence why it's disabled by default (the overhead
varies, but 15-20% is a reasonable estimate).
* `scalaOptimizerMode`: configures the optimizing behavior of the scala compiler, the value should be one of `none`, `method`, `inline-kafka` or
`inline-scala` (the default is `inline-kafka`). `none` is the scala compiler default, which only eliminates unreachable code. `method` also
includes method-local optimizations. `inline-kafka` adds inlining of methods within the kafka packages. Finally, `inline-scala` also
includes inlining of methods within the scala library (which avoids lambda allocations for methods like `Option.exists`). `inline-scala` is
only safe if the Scala library version is the same at compile time and runtime. Since we cannot guarantee this for all cases (for example, users
may depend on the kafka jar for integration tests where they may include a scala library with a different version), we don't enable it by
default. See https://www.lightbend.com/blog/scala-inliner-optimizer for more details.

### Dependency Analysis ###

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

exec $(dirname $0)/kafka-run-class.sh kafka.admin.PreferredReplicaLeaderElectionCommand "$@"
exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.shell.MetadataShell "$@"
14 changes: 13 additions & 1 deletion bin/kafka-run-class.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ should_include_file() {
base_dir=$(dirname $0)/..

if [ -z "$SCALA_VERSION" ]; then
SCALA_VERSION=2.13.4
SCALA_VERSION=2.13.5
if [[ -f "$base_dir/gradle.properties" ]]; then
SCALA_VERSION=`grep "^scalaVersion=" "$base_dir/gradle.properties" | cut -d= -f 2`
fi
Expand Down Expand Up @@ -135,6 +135,18 @@ do
CLASSPATH="$CLASSPATH":"$file"
done

for file in "$base_dir"/shell/build/libs/kafka-shell*.jar;
do
if should_include_file "$file"; then
CLASSPATH="$CLASSPATH":"$file"
fi
done

for dir in "$base_dir"/shell/build/dependant-libs-${SCALA_VERSION}*;
do
CLASSPATH="$CLASSPATH:$dir/*"
done

for file in "$base_dir"/tools/build/libs/kafka-tools*.jar;
do
if should_include_file "$file"; then
Expand Down
17 changes: 0 additions & 17 deletions bin/windows/kafka-preferred-replica-election.bat

This file was deleted.

2 changes: 1 addition & 1 deletion bin/windows/kafka-run-class.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set BASE_DIR=%CD%
popd

IF ["%SCALA_VERSION%"] EQU [""] (
set SCALA_VERSION=2.13.4
set SCALA_VERSION=2.13.5
)

IF ["%SCALA_BINARY_VERSION%"] EQU [""] (
Expand Down
Loading

0 comments on commit 1621ca0

Please sign in to comment.