Files
impala/bin/create_testdata.sh
Tim Armstrong f13dfcbddc Suppress maven info logging
Maven's INFO log level is very verbose and includes a lot of progress
information that is minimally useful.

Maven doesn't have an option to output only ERROR and WARNING log
messages. As a workaround, use grep to filter out the majority of the
output (only warnings, errors, tests, and success/failure).

Also add a header with relevant info about the maven command:
targets and working directory.

Change-Id: I828b870edc2fc80a6460e6ed594d507c46e69c82
Reviewed-on: http://gerrit.cloudera.org:8080/1752
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Internal Jenkins
2016-01-15 19:38:46 +00:00

36 lines
881 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
set -euo pipefail
trap 'echo Error in $0 at line $LINENO: $(cd "'$PWD'" && awk "NR == $LINENO" $0)' ERR
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
. "$bin"/impala-config.sh
# location of the generated data
DATALOC=$IMPALA_HOME/testdata/target
# regenerate the test data generator
cd $IMPALA_HOME/testdata
${IMPALA_HOME}/bin/mvn-quiet.sh clean
${IMPALA_HOME}/bin/mvn-quiet.sh package
# find jars
CP=""
JARS=`find target/*.jar 2> /dev/null || true`
for i in $JARS; do
if [ -n "$CP" ]; then
CP=${CP}:${i}
else
CP=${i}
fi
done
# run test data generator
echo $DATALOC
mkdir -p $DATALOC
"$JAVA" -cp $CP com.cloudera.impala.datagenerator.TestDataGenerator $DATALOC
"$JAVA" -cp $CP com.cloudera.impala.datagenerator.CsvToHBaseConverter
echo "SUCCESS, data generated into $DATALOC"