Skip to content

Commit

Permalink
Merge branch 'main' into 4.0-feature-4905
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrr888 committed Dec 2, 2024
2 parents 320fc38 + 7e6ad2d commit 58869b0
Show file tree
Hide file tree
Showing 128 changed files with 1,072 additions and 13,370 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/maven-full-its.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,7 @@ jobs:
with:
distribution: adopt
java-version: 17
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
!~/.m2/repository/org/apache/accumulo
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Show the first log message
run: git log -n1
- name: Build with Maven (Fast Build)
Expand Down Expand Up @@ -97,14 +90,7 @@ jobs:
with:
distribution: adopt
java-version: 17
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
!~/.m2/repository/org/apache/accumulo
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Override DNS to fix IP address for hostname
run: |
ip -br addr
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/maven-on-demand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,7 @@ jobs:
with:
distribution: adopt
java-version: 17
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
!~/.m2/repository/org/apache/accumulo
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Show the first log message
run: git log -n1
- name: Override DNS to fix IP address for hostname
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ jobs:
with:
distribution: adopt
java-version: 17
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
!~/.m2/repository/org/apache/accumulo
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Show the first log message
run: git log -n1
- name: Check for unapproved characters
Expand Down Expand Up @@ -81,14 +74,7 @@ jobs:
with:
distribution: adopt
java-version: ${{ matrix.profile.javaver }}
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
!~/.m2/repository/org/apache/accumulo
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Override DNS to fix IP address for hostname
run: |
ip -br addr
Expand Down
30 changes: 0 additions & 30 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -284,36 +284,6 @@ Files:
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

## Flot 4.2.6 (https://github.com/flot/flot)

Files:
* server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/*

Copyright (c) 2007-2014 IOLA and Ole Laursen

Available under the MIT License
(see server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/LICENSE.txt)

Flot bundles additional works:

jquery.flot.pie.js
Flot plugin for rendering pie charts.

Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

* Created by Brian Medendorp
* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars

jquery.flot.resize.js
* Inline dependency:
* jQuery resize event - v1.1 - 3/14/2010
* http://benalman.com/projects/jquery-resize-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/

## Bootstrap v5.3.2 (https://getbootstrap.com/)

Files:
Expand Down
58 changes: 22 additions & 36 deletions assemble/bin/accumulo-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ Commands:
start Starts Accumulo cluster
stop Stops Accumulo cluster
kill Kills Accumulo cluster
start-non-tservers Deprecated. Starts all services except tservers
start-servers [--all|--tservers|--no-tservers|--sservers [group]|--compactors [group]]
start-servers [--all|--tservers [group]|--sservers [group]|--compactors [group]]
Starts various server types, can optionally specify a group
stop-servers [--all|--tservers| --no-tservers|--sservers [group]|--compactors [group]]
stop-servers [--all|--tservers [group]|--sservers [group]|--compactors [group]]
Starts various server types, can optionally specify a group
start-tservers Deprecated. Starts all tservers on cluster
stop-tservers Deprecated. Stops all tservers on cluster
start-here Starts all services on this node
stop-here Stops all services on this node
EOF
Expand Down Expand Up @@ -273,7 +270,12 @@ function stop_sservers() {

function start_tservers() {
echo "Starting tablet servers ..."
for group in $TSERVER_GROUPS; do
groups=$TSERVER_GROUPS
if [[ -n $1 ]]; then
groups="$1"
echo "Only starting servers for group: ${groups}"
fi
for group in $groups; do
echo "Starting tablet servers for group $group"
count=1
G="TSERVER_HOSTS_${group}"
Expand All @@ -293,9 +295,7 @@ function start_tservers() {
function start_all() {
unset DISPLAY

if [[ $1 != "--no-tservers" ]]; then
start_tservers
fi
start_tservers

for manager in $MANAGER_HOSTS; do
start_service "$manager" manager "1"
Expand Down Expand Up @@ -416,8 +416,12 @@ function kill_service() {
function stop_tservers() {

echo "Stopping unresponsive tablet servers (if any)..."

for group in $TSERVER_GROUPS; do
groups=$TSERVER_GROUPS
if [[ -n $1 ]]; then
groups="$1"
echo "Only stopping servers for group: ${groups}"
fi
for group in $groups; do
echo "Stopping tablet servers for group $group"
G="TSERVER_HOSTS_${group}"
S="TSERVERS_PER_HOST_${group}"
Expand All @@ -429,18 +433,18 @@ function stop_tservers() {
sleep 10

echo "Stopping unresponsive tablet servers hard (if any)..."
for group in $TSERVER_GROUPS; do
for group in $groups; do
G="TSERVER_HOSTS_${group}"
S="TSERVERS_PER_HOST_${group}"
for tserver in ${!G}; do
kill_service "$tserver" tserver "${!S}" "-o" "tserver.group=$group" &
done
echo "Cleaning tablet server entries from zookeeper"
if ! isDebug; then
${accumulo_cmd} org.apache.accumulo.server.util.ZooZap -tservers -group "$group"
fi
done

echo "Cleaning tablet server entries from zookeeper"
if ! isDebug; then
${accumulo_cmd} org.apache.accumulo.server.util.ZooZap -tservers
fi
}

function kill_all() {
Expand Down Expand Up @@ -698,25 +702,10 @@ EOF
parse_config
kill_all
;;
start-non-tservers)
echo "$1 is deprecated. Please use \`start-servers --no-tservers\` instead"
parse_config
start_all --no-tservers
;;
start-tservers)
echo "$1 is deprecated. Please use \`start-servers --tservers\` instead"
parse_config
start_tservers
;;
start-here)
parse_config
start_here
;;
stop-tservers)
echo "$1 is deprecated. Please use \`stop-servers --tservers\` instead"
parse_config
stop_tservers
;;
stop-here)
parse_config
stop_here
Expand All @@ -729,10 +718,7 @@ EOF
start_all
;;
"--tservers")
start_tservers
;;
"--no-tservers")
start_all --no-tservers
start_tservers "${program_args[@]:2}"
;;
"--sservers")
start_sservers "${program_args[@]:2}"
Expand All @@ -753,7 +739,7 @@ EOF
stop_all
;;
"--tservers")
stop_tservers
stop_tservers "${program_args[@]:2}"
;;
"--sservers")
stop_sservers "${program_args[@]:2}"
Expand Down
17 changes: 16 additions & 1 deletion assemble/bin/accumulo-service
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ function get_group() {
echo "${group}"
}

function get_group_overrides() {
service="$1"
group="$2"
if [[ -f "${conf}/${group}-group-env.sh" ]]; then
#shellcheck source=../conf/default-group-env.sh
source "${conf}/${group}-group-env.sh" "${service}"
fi
}

function start_service() {
local service_type=$1
local service_name=$2
Expand All @@ -86,6 +95,12 @@ function start_service() {

group=$(get_group "$@")

#
# Get any resource group overrides, this should
# export ACCUMULO_JAVA_OPTS and PROPERTY_OVERRIDES
#
get_group_overrides "$service_type" "$group"

for ((process_num = 1; process_num <= servers_per_host; process_num++)); do
if [[ ${build_service_name} == "true" ]]; then
service_name="${service_type}_${group}_${process_num}"
Expand Down Expand Up @@ -113,7 +128,7 @@ function start_service() {
rotate_log "$outfile"
rotate_log "$errfile"

nohup "${bin}/accumulo" "$service_type" "$@" >"$outfile" 2>"$errfile" </dev/null &
nohup "${bin}/accumulo" "$service_type" "$@" "${PROPERTY_OVERRIDES[@]}" >"$outfile" 2>"$errfile" </dev/null &
echo "$!" >"${pid_file}"

done
Expand Down
80 changes: 80 additions & 0 deletions assemble/conf/default-group-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#! /usr/bin/env bash
#
# 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
#
# https://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.
#

# This script is called from accumulo-service and serves as a mechanism to set
# ACCUMULO_JAVA_OPTS and provide property overrides for the server processes in
# a resource group. This allows the user to set a base configuration in
# accumulo-env.sh and accumulo.properties and then tailor the configuration of
# the individual processes in a resource group. For example, when you have a
# cluster comprised of sets of servers with different amounts of memory, then
# the user can set default JVM heap settings in accumulo-env.sh, and then
# increase or decrease in this file.
#
# This script will export ACCUMULO_JAVA_OPTS and PROPERTY_OVERRIDES variables
# based on the service type for the default resource group. Additional files can
# be created based on the groups configured in cluster.yaml and should be named
# "{groupName}-group-env.sh". The contents of ACCUMULO_JAVA_OPTS will be appended
# to the JAVA_OPTS variable that is created in accumulo-env.sh, allowing the user
# to override any setting for this resource group. Likewise, the contents of
# PROPERTY_OVERRIDES will be appended to the arguments provided to the server
# class allowing the user to override any Accumulo property for this resource group.
# Overriding the bind address and group name properties would not be advisable as
# this could lead to deployment issues.

# Examples:
#
# Override JVM args
# export ACCUMULO_JAVA_OPTS="-Xms1024m -Xmx1024m"
#
# Override Accumulo properties
# export PROPERTY_OVERRIDES=('-o' 'rpc.backlog=1000' '-o' 'tserver.hold.time.max=10m')

service=$1

case "$service" in
manager)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
monitor)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
gc)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
tserver)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
compactor)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
sserver)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
*)
export ACCUMULO_JAVA_OPTS=""
export PROPERTY_OVERRIDES=()
;;
esac
10 changes: 0 additions & 10 deletions assemble/conf/log4j2-service.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ appender.audit.policies.size.size=512MB
appender.audit.strategy.type = DefaultRolloverStrategy
appender.audit.strategy.max = 10

appender.monitor.type = AccumuloMonitor
appender.monitor.name = MonitorLog
appender.monitor.filter.threshold.type = ThresholdFilter
appender.monitor.filter.threshold.level = warn
#appender.monitor.async = true
#appender.monitor.maxThreads = 2
#appender.monitor.queueSize = 1024

logger.zookeeper.name = org.apache.zookeeper
logger.zookeeper.level = error

Expand All @@ -90,5 +82,3 @@ logger.accumulo.level = debug
rootLogger.level = info
rootLogger.appenderRef.console.ref = STDERR
rootLogger.appenderRef.rolling.ref = LogFiles
rootLogger.appenderRef.monitor.ref = MonitorLog

Loading

0 comments on commit 58869b0

Please sign in to comment.