errose28 commented on a change in pull request #1928:
URL: https://github.com/apache/ozone/pull/1928#discussion_r580295465
##########
File path: hadoop-ozone/dist/src/main/compose/upgrade/test.sh
##########
@@ -14,60 +14,28 @@
# 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.
-
-COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-export COMPOSE_DIR
-
-: "${OZONE_REPLICATION_FACTOR:=3}"
-: "${OZONE_UPGRADE_FROM:="0.5.0"}"
-: "${OZONE_UPGRADE_TO:="1.0.0"}"
-: "${OZONE_VOLUME:="${COMPOSE_DIR}/data"}"
-
-export OZONE_VOLUME
-
-mkdir -p "${OZONE_VOLUME}"/{dn1,dn2,dn3,om,recon,s3g,scm}
-
-if [[ -n "${OZONE_VOLUME_OWNER}" ]]; then
- current_user=$(whoami)
- if [[ "${OZONE_VOLUME_OWNER}" != "${current_user}" ]]; then
- chown -R "${OZONE_VOLUME_OWNER}" "${OZONE_VOLUME}" \
- || sudo chown -R "${OZONE_VOLUME_OWNER}" "${OZONE_VOLUME}"
+set -x
Review comment:
Printing all the commands as they run seems like a chunk of extra output
that is not very helpful. Is there an advantage to this?
##########
File path: hadoop-ozone/dist/src/main/compose/upgrade/test.sh
##########
@@ -14,60 +14,28 @@
# 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.
-
-COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-export COMPOSE_DIR
-
-: "${OZONE_REPLICATION_FACTOR:=3}"
-: "${OZONE_UPGRADE_FROM:="0.5.0"}"
-: "${OZONE_UPGRADE_TO:="1.0.0"}"
-: "${OZONE_VOLUME:="${COMPOSE_DIR}/data"}"
-
-export OZONE_VOLUME
-
-mkdir -p "${OZONE_VOLUME}"/{dn1,dn2,dn3,om,recon,s3g,scm}
-
-if [[ -n "${OZONE_VOLUME_OWNER}" ]]; then
- current_user=$(whoami)
- if [[ "${OZONE_VOLUME_OWNER}" != "${current_user}" ]]; then
- chown -R "${OZONE_VOLUME_OWNER}" "${OZONE_VOLUME}" \
- || sudo chown -R "${OZONE_VOLUME_OWNER}" "${OZONE_VOLUME}"
+set -x
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )
+ALL_RESULT_DIR="$SCRIPT_DIR/result"
+mkdir -p "$ALL_RESULT_DIR"
+rm "$ALL_RESULT_DIR/*" || true
Review comment:
Glob expansion won't happen in double quotes.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]