Skip to content
Permalink
Browse files
Add --test option to copy the test jar (#279)
  • Loading branch information
milleruntime committed Mar 14, 2022
1 parent 8fd1afe commit 29e09c66002151f88cd24208b6e56da16ffb3ca1
Showing 3 changed files with 15 additions and 3 deletions.
@@ -55,6 +55,7 @@ EOF
exit 1
fi
cp "$accumulo_built_tarball" "$DOWNLOADS"/
[[ $1 == '--test' ]] && cp "$ACCUMULO_REPO/test/target/accumulo-test-2.1.0-SNAPSHOT.jar" "$DOWNLOADS"/
else
download_apache "accumulo/$ACCUMULO_VERSION" "$ACCUMULO_TARBALL" "$ACCUMULO_HASH"
fi
@@ -128,6 +129,7 @@ Possible components:
Options:
--no-deps Dependencies will be fetched unless this option is specified. Only works for fluo & accumulo components.
--test Copy the test jar built in accumulo to the downloads directory
EOF
exit 1
esac
@@ -18,6 +18,13 @@
# shellcheck source=bin/impl/util.sh
source "$UNO_HOME"/bin/impl/util.sh

function install_test_jar() {
local test_jar_source="$DOWNLOADS/accumulo-test-$ACCUMULO_VERSION.jar"
local test_jar_destination="$ACCUMULO_HOME/lib"
print_to_console "Installing Apache Accumulo test jar $test_jar_source to $test_jar_destination"
cp "$test_jar_source" "$test_jar_destination"
}

pkill -f accumulo.start

# stop if any command fails
@@ -35,6 +42,9 @@ mkdir -p "$ACCUMULO_LOG_DIR"

tar xzf "$DOWNLOADS/$ACCUMULO_TARBALL" -C "$INSTALL"

# Install test jar if available
[[ $1 == '--test' ]] && install_test_jar

conf=$ACCUMULO_HOME/conf

cp "$UNO_HOME"/conf/accumulo/common/* "$conf"
@@ -151,7 +151,7 @@ function download_apache() {

function print_cmd_usage() {
cat <<EOF
Usage: uno $1 <component> [--no-deps]
Usage: uno $1 <component> [--no-deps] [--test]
Possible components:
@@ -161,9 +161,9 @@ Possible components:
fluo-yarn $2 Apache Fluo YARN and its dependencies (Fluo, Accumulo, Hadoop, & ZooKeeper)
zookeeper $2 Apache ZooKeeper
Options:
Options (these only work for fluo and accumulo components):
--no-deps Dependencies will be setup unless this option is specified.
Only works for fluo & accumulo components.
--test Copy the test jar built in accumulo to downloads. Requires ACCUMULO_REPO
EOF
}

0 comments on commit 29e09c6

Please sign in to comment.