You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/15 05:40:05 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #1667: HDDS-4525. Replace Hadoop variables and functions in Ozone shell scripts with Ozone-specific ones

adoroszlai commented on a change in pull request #1667:
URL: https://github.com/apache/ozone/pull/1667#discussion_r543061256



##########
File path: hadoop-ozone/dist/src/shell/ozone/start-ozone.sh
##########
@@ -64,68 +63,53 @@ if [[ $# -ge 1 ]]; then
       dataStartOpt="$startOpt"
     ;;
     *)
-      hadoop_exit_with_usage 1
+      ozone_exit_with_usage 1
     ;;
   esac
 fi
 
 #Add other possible options
 nameStartOpt="$nameStartOpt $*"
 
-SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-)
-SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getconf -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
-#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>&-)
-#if [[ ${SECURITY_ENABLED} == "kerberos" || ${SECURITY_AUTHORIZATION_ENABLED} == "true" ]]; then
-#  echo "Ozone is not supported in a security enabled cluster."
-#  exit 1
-#fi
+SECURITY_ENABLED=$("${OZONE_HOME}/bin/ozone" getconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-)
+SECURITY_AUTHORIZATION_ENABLED=$("${OZONE_HOME}/bin/ozone" getconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-)
 
 # datanodes (using default workers file)
 
 echo "Starting datanodes"
-hadoop_uservar_su hdfs datanode "${HADOOP_HDFS_HOME}/bin/ozone" \
+ozone_uservar_su hdfs datanode "${OZONE_HOME}/bin/ozone" \
     --workers \
-    --config "${HADOOP_CONF_DIR}" \
+    --config "${OZONE_CONFIG_DIR}" \
     --daemon start \
     datanode ${dataStartOpt}
-(( HADOOP_JUMBO_RETCOUNTER=HADOOP_JUMBO_RETCOUNTER + $? ))
+OZONE_JUMBO_RETCOUNTER=$?

Review comment:
       Yes, this is intentional, please see item 4 in PR description:
   
   > it was incremented for the first and third commands and unconditionally set for the second one, so the result of the first command was lost.  It should be set for the first one instead.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org