You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "smiklosovic (via GitHub)" <gi...@apache.org> on 2023/02/02 13:41:14 UTC

[GitHub] [cassandra] smiklosovic commented on a diff in pull request #1950: WIP: Initial implementation of cassandra-conf with nodetool example - CASSANDRA-17773

smiklosovic commented on code in PR #1950:
URL: https://github.com/apache/cassandra/pull/1950#discussion_r1094546931


##########
bin/cassandra-conf.sh:
##########
@@ -0,0 +1,167 @@
+#!/bin/sh -x
+
+# 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.
+
+# A script to include the cassandra.in.sh file, set NUMACTL, and load 
+#          $CASSANDRA_CONF/cassandra-env.sh"
+#
+# Defines a validate_env() function to verify critical environment vars are set
+# and display them if desired
+
+## Environment variables:
+# CASSANDRA_ENV_DEBUG: Show all var settings during the validate_env() call.
+# CASSANDRA_ENV_PRESERVE: A list of environment variables to preserve from being set
+#       by $CASSANDRA_CONF/cassandra-env.sh"
+# CASSANDRA_ENV_SHOW: A list of additional environment variables to display during validate_env.
+
+## validate_env
+## Args:  Arguments are additional environment variables to show.
+##
+## Validates that required environment variables are set. 
+## Required Environment Vars:
+##      CASSANDRA_INCLUDE
+##      CASSANDRA_HOME
+##      CASSANDRA_LOG_DIR
+## 
+## Environment Vars:
+##      CASSANDRA_ENV_DEBUG   Enables display of variables if this var is set.
+##      CASSANDRA_ENV_SHOW    List of additional variables to display.
+##
+validate_env() {
+    retval=0
+    if [ -n "$CASSANDRA_ENV_DEBUG" ] ; then
+        echo ""

Review Comment:
   @Claudenw I dont think this is necessary. Same empty line after the closing "------" is redundant. 



-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org