Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ HADOOP_OPTS="-Dhadoop.opts=test"
HDFS_STORAGECONTAINERMANAGER_OPTS="-Dhdfs.scm.opts=test"
HDFS_OM_OPTS="-Dhdfs.om.opts=test"
HDDS_DN_OPTS="-Dhdds.dn.opts=test"
OZONE_SERVER_OPTS="-Dserver.opt=test"

no_proxy=om,scm,s3g,recon,kdc,localhost,127.0.0.1
7 changes: 3 additions & 4 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/dn.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@

*** Settings ***
Documentation Test datanode compatibility
Library BuiltIn
Resource ../lib/os.robot
Resource lib.resource
Test Timeout 5 minutes

*** Test Cases ***
Picks up command line options
Pass Execution If '%{HDDS_DN_OPTS}' == '' Command-line option required for process check
${processes} = List All Processes
${processes} = Wait for server command-line options
Should Contain ${processes} %{HDDS_DN_OPTS}
Should Contain ${processes} %{HADOOP_OPTS}
Check client command-line options
35 changes: 35 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/lib.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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.

*** Settings ***
Library BuiltIn
Library OperatingSystem
Resource ../lib/os.robot

*** Keywords ***
Check server command-line options
${processes} = List All Processes
Should Contain ${processes} %{HADOOP_OPTS}
Should Contain ${processes} %{OZONE_SERVER_OPTS}
RETURN ${processes}

Wait for server command-line options
${processes} = Wait Until Keyword Succeeds 3min 2sec Check server command-line options
RETURN ${processes}

Check client command-line options
Set Environment Variable OZONE_SHELL_SCRIPT_DEBUG true
${output} = Execute ozone sh --help
Should Not Contain ${output} %{OZONE_SERVER_OPTS}
13 changes: 4 additions & 9 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/om.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@

*** Settings ***
Documentation Test om compatibility
Library BuiltIn
Resource ../lib/os.robot
Resource lib.resource
Test Timeout 5 minutes

*** Keywords ***
Check command-line options
${processes} = List All Processes
Should Contain ${processes} %{HDFS_OM_OPTS}
Should Contain ${processes} %{HADOOP_OPTS}

*** Test Cases ***
Picks up command line options
Pass Execution If '%{HDFS_OM_OPTS}' == '' Command-line option required for process check
Wait Until Keyword Succeeds 3min 2sec Check command-line options
${processes} = Wait for server command-line options
Should Contain ${processes} %{HDFS_OM_OPTS}
Check client command-line options

Rejects Atomic Key Rewrite
Execute ozone freon ockg -n1 -t1 -p rewrite
Expand Down
11 changes: 3 additions & 8 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/recon.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@

*** Settings ***
Documentation Test recon compatibility
Library BuiltIn
Resource ../lib/os.robot
Resource lib.resource
Test Timeout 5 minutes

*** Keywords ***
Check command-line options
${processes} = List All Processes
Should Contain ${processes} %{HADOOP_OPTS}

*** Test Cases ***
Picks up command line options
Pass Execution If '%{HADOOP_OPTS}' == '' Command-line option required for process check
Wait Until Keyword Succeeds 3min 2sec Check command-line options
Wait for server command-line options
Check client command-line options
7 changes: 3 additions & 4 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/scm.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@

*** Settings ***
Documentation Test scm compatibility
Library BuiltIn
Resource ../lib/os.robot
Resource lib.resource
Test Timeout 5 minutes

*** Test Cases ***
Picks up command line options
Pass Execution If '%{HDFS_STORAGECONTAINERMANAGER_OPTS}' == '' Command-line option required for process check
${processes} = List All Processes
${processes} = Wait for server command-line options
Should Contain ${processes} %{HDFS_STORAGECONTAINERMANAGER_OPTS}
Should Contain ${processes} %{HADOOP_OPTS}
Check client command-line options
1 change: 1 addition & 0 deletions hadoop-ozone/dist/src/shell/ozone/ozone
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ ozone_suppress_shell_log
ozone_assemble_classpath

ozone_add_client_opts
ozone_add_server_opts

if [[ ${OZONE_WORKER_MODE} = true ]]; then
ozone_worker_mode_execute "${OZONE_HOME}/bin/ozone" "${OZONE_USER_PARAMS[@]}"
Expand Down
12 changes: 12 additions & 0 deletions hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,18 @@ function ozone_add_client_opts
fi
}

## @description Adds the OZONE_SERVER_OPTS variable to OZONE_OPTS if OZONE_SUBCMD_SUPPORTDAEMONIZATION is true
## @audience public
## @stability stable
## @replaceable yes
function ozone_add_server_opts
{
if [[ "${OZONE_SUBCMD_SUPPORTDAEMONIZATION}" == "true" ]] && [[ -n "${OZONE_SERVER_OPTS:-}" ]]; then
ozone_debug "Appending OZONE_SERVER_OPTS onto OZONE_OPTS"
OZONE_OPTS="${OZONE_OPTS} ${OZONE_SERVER_OPTS}"
fi
}

## @description Finish configuring Hadoop specific system properties
## @description prior to executing Java
## @audience private
Expand Down