From d40eefb36499f2bf4a26d5ccd911092faec799e2 Mon Sep 17 00:00:00 2001 From: Souhaila Noor Date: Thu, 18 Nov 2021 12:06:07 -0600 Subject: [PATCH] added host:port as a command line input --- qa/scripts/ingestWorkload.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/qa/scripts/ingestWorkload.sh b/qa/scripts/ingestWorkload.sh index 2502dba2a..23d11dd32 100755 --- a/qa/scripts/ingestWorkload.sh +++ b/qa/scripts/ingestWorkload.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # To run: -# ./ingestWorkload.sh {Path for featurebase binary} {Path for directory with csv files} {initialize flag} +# ./ingestWorkload.sh {Path for featurebase binary} {Local host & port for featurebase} {Path for directory with csv files} {initialize flag} function delete_field { if (($INITIALIZE == 0)); @@ -34,6 +34,10 @@ function ingest_set_field { FEATUREBASE_PATH=$1 shift +# featurebase host & port +HOST=$1 +shift + # path for directory with csv directory files for all fields to be ingested CSV_DIR_PATH=$1 shift @@ -45,8 +49,6 @@ shift # get a list of csv files in the directory CSV_FILES=`ls $CSV_DIR_PATH/*.csv` -# featurebase host -HOST="localhost:10101" # assign index name INDEX="samsung" if (($INITIALIZE == 1)); @@ -62,24 +64,19 @@ for CSV_FILE in ${CSV_FILES[@]} if [[ "$FIELD" == *"age"* ]]; then MAX=100 - echo $CSV_FILE $MAX ingest_int_field elif [[ "$FIELD" == *"identifier"* ]]; then MAX=$((2**63 - 1)) # compute max value for 64bit - echo $CSV_FILE $MAX ingest_int_field elif [[ "$FIELD" == *"ip"* ]]; then MAX=$((2**31 - 1)) # compute max value for 32bit - echo $CSV_FILE $MAX ingest_int_field elif [[ "$FIELD" == *"time"* ]]; then - echo $CSV_FILE ingest_time_field else - echo $CSV_FILE ingest_set_field fi done