IMPALA-3806: remove a few modern shell idioms to improve RHEL5 support Both `find -executable` and the Bash "&>>" operator are too new to be supported on RHEL5. Both have reasonable workarounds, so prefer them. Note that this may not be the exhaustive list of such "modern" conventions, but RHEL5 isn't working end-to-end, so we can't identify all of them in a single commit yet.
Testing: Before, the RHEL5 build would fail quite early here. Now, data load succeeds and most of the backend tests successfully run. Change-Id: I7438bed908d8026327923607238808122212d2d8 Reviewed-on: http://gerrit.cloudera.org:8080/3531 Reviewed-by: David Knupp <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/08e8de73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/08e8de73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/08e8de73 Branch: refs/heads/master Commit: 08e8de73b28deda1d0afba91bea3f6e5619b5c76 Parents: 7b9e9c6 Author: Michael Brown <[email protected]> Authored: Tue Jun 28 16:52:32 2016 -0700 Committer: Tim Armstrong <[email protected]> Committed: Tue Jul 5 13:37:26 2016 -0700 ---------------------------------------------------------------------- testdata/bin/create-load-data.sh | 2 +- testdata/cluster/admin | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/08e8de73/testdata/bin/create-load-data.sh ---------------------------------------------------------------------- diff --git a/testdata/bin/create-load-data.sh b/testdata/bin/create-load-data.sh index 2ee7d56..53cdefa 100755 --- a/testdata/bin/create-load-data.sh +++ b/testdata/bin/create-load-data.sh @@ -177,7 +177,7 @@ function load-aux-workloads { if ! impala-python -u ${IMPALA_HOME}/bin/load-data.py --workloads all\ --workload_dir=${IMPALA_AUX_WORKLOAD_DIR}\ --dataset_dir=${IMPALA_AUX_DATASET_DIR}\ - --exploration_strategy=core ${LOAD_DATA_ARGS} &>> $LOG_FILE; then + --exploration_strategy=core ${LOAD_DATA_ARGS} >> $LOG_FILE 2>&1; then echo Error loading aux workloads. The end of the log file is: tail -n 20 $LOG_FILE return 1 http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/08e8de73/testdata/cluster/admin ---------------------------------------------------------------------- diff --git a/testdata/cluster/admin b/testdata/cluster/admin index fb447f9..eacfd48 100755 --- a/testdata/cluster/admin +++ b/testdata/cluster/admin @@ -90,10 +90,10 @@ fi EASY_ACCESS_LOG_DIR="$IMPALA_CLUSTER_LOGS_DIR" MINIKDC_INIT=${IMPALA_HOME}/testdata/bin/minikdc.sh -if $IS_OSX; then +FIND_EXECUTABLE_FILTER="-executable" +if ! find /dev/null "${FIND_EXECUTABLE_FILTER}" 2> /dev/null; then + # OSX and RHEL5, among others, don't have -executable FIND_EXECUTABLE_FILTER="-perm +0111" -else - FIND_EXECUTABLE_FILTER="-executable" fi #
