Skip to content

Commit

Permalink
HDDS-3102. ozone getconf command should use the GenericCli parent cla…
Browse files Browse the repository at this point in the history
…ss (#1410)
  • Loading branch information
amaliujia committed Sep 18, 2020
1 parent 68d1ab0 commit ce0c072
Show file tree
Hide file tree
Showing 10 changed files with 297 additions and 304 deletions.

This file was deleted.

This file was deleted.

33 changes: 33 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/basic/getconf.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 ***
Documentation Smoketest ozone cluster startup
Library OperatingSystem
Resource ../commonlib.robot
Test Timeout 5 minutes

*** Test Cases ***
Ozone getconf OM
${result} = Execute ozone getconf ozonemanagers
Should contain ${result} om

Ozone getconf SCM
${result} = Execute ozone getconf storagecontainermanagers
Should contain ${result} scm

Ozone getconf configration keys
${result} = Execute ozone getconf confKey endpoint.token
Should contain ${result} Configuration endpoint.token is missing
2 changes: 1 addition & 1 deletion hadoop-ozone/dist/src/shell/ozone/ozone
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function ozonecmd_case
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
;;
getconf)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.OzoneGetConf;
HADOOP_CLASSNAME=org.apache.hadoop.ozone.conf.OzoneGetConf;
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
;;
om)
Expand Down
8 changes: 4 additions & 4 deletions hadoop-ozone/dist/src/shell/ozone/stop-ozone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ else
exit 1
fi

#SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-)
#SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-)
#SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-)
#SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-)
#if [[ ${SECURITY_ENABLED} == "kerberos" || ${SECURITY_AUTHORIZATION_ENABLED} == "true" ]]; then
# echo "Ozone is not supported in a security enabled cluster."
# exit 1
Expand All @@ -66,7 +66,7 @@ hadoop_uservar_su ozone datanode "${HADOOP_HDFS_HOME}/bin/ozone" \

#---------------------------------------------------------
# Ozone Manager nodes
OM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf -ozonemanagers 2>/dev/null)
OM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf ozonemanagers 2>/dev/null)
echo "Stopping Ozone Manager nodes [${OM_NODES}]"
if [[ "${OM_NODES}" == "0.0.0.0" ]]; then
OM_NODES=$(hostname)
Expand All @@ -81,7 +81,7 @@ hadoop_uservar_su hdfs om "${HADOOP_HDFS_HOME}/bin/ozone" \

#---------------------------------------------------------
# Ozone storagecontainermanager nodes
SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf -storagecontainermanagers 2>/dev/null)
SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf storagecontainermanagers 2>/dev/null)
echo "Stopping storage container manager nodes [${SCM_NODES}]"
hadoop_uservar_su hdfs scm "${HADOOP_HDFS_HOME}/bin/ozone" \
--workers \
Expand Down

0 comments on commit ce0c072

Please sign in to comment.