mirror of
https://github.com/apache/druid.git
synced 2025-03-04 08:19:40 +00:00
* Improved Java 17 support and Java runtime docs. 1) Add a "Java runtime" doc page with information about supported Java versions, garbage collection, and strong encapsulation.. 2) Update asm and equalsverifier to versions that support Java 17. 3) Add additional "--add-opens" lines to surefire configuration, so tests can pass successfully under Java 17. 4) Switch openjdk15 tests to openjdk17. 5) Update FrameFile to specifically mention Java runtime incompatibility as the cause of not being able to use Memory.map. 6) Update SegmentLoadDropHandler to log an error for Errors too, not just Exceptions. This is important because an IllegalAccessError is encountered when the correct "--add-opens" line is not provided, which would otherwise be silently ignored. 7) Update example configs to use druid.indexer.runner.javaOptsArray instead of druid.indexer.runner.javaOpts. (The latter is deprecated.) * Adjustments. * Use run-java in more places. * Add run-java. * Update .gitignore. * Exclude hadoop-client-api. Brought in when building on Java 17. * Swap one more usage of java. * Fix the run-java script. * Fix flag. * Include link to Temurin. * Spelling. * Update examples/bin/run-java Co-authored-by: Xavier Léauté <xl+github@xvrl.net> Co-authored-by: Xavier Léauté <xl+github@xvrl.net>
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/bash -eu
|
|
|
|
# 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.
|
|
|
|
if [ "$#" -gt 1 ]
|
|
then
|
|
>&2 echo "usage: $0 [conf-dir]"
|
|
exit 1
|
|
fi
|
|
|
|
PWD="$(pwd)"
|
|
WHEREAMI="$(dirname "$0")"
|
|
|
|
if [ "$#" -lt 1 ] || [ "x$1" = "x" ]
|
|
then
|
|
CONFDIR="$WHEREAMI"/../conf
|
|
else
|
|
CONFDIR="$1"
|
|
fi
|
|
|
|
CONFDIR="$(cd "$CONFDIR" && pwd)/zk"
|
|
WHEREAMI="$(cd "$WHEREAMI" && pwd)"
|
|
|
|
LOG_DIR="${DRUID_LOG_DIR:=${WHEREAMI}/../log}"
|
|
# Remove possible ending slash
|
|
if [[ $LOG_DIR == */ ]];
|
|
then
|
|
LOG_DIR=${LOG_DIR%?}
|
|
fi
|
|
if [ ! -d "$LOG_DIR" ]; then mkdir -p $LOG_DIR; fi
|
|
|
|
echo "Running [ZooKeeper], logging to [$LOG_DIR/zookeeper.log] if no changes made to log4j2.xml"
|
|
|
|
cd "$WHEREAMI/.."
|
|
exec "$WHEREAMI"/run-java "-Ddruid.log.path=$LOG_DIR" `cat "$CONFDIR"/jvm.config | xargs` \
|
|
-cp "$WHEREAMI/../lib/*:$CONFDIR" \
|
|
-Dzookeeper.jmx.log4j.disable=true \
|
|
org.apache.zookeeper.server.quorum.QuorumPeerMain \
|
|
"$CONFDIR"/zoo.cfg
|