-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1400 Helper scripts run custom JAR #1445
#1400 Helper scripts run custom JAR #1445
Conversation
@@ -26,7 +26,7 @@ SPARK_SUBMIT="$SPARK_HOME/bin/spark-submit" | |||
|
|||
HDP_VERSION="2.7.3" | |||
|
|||
SPARK_JOBS_JAR="enceladus-spark-jobs.jar" | |||
SPARK_JOBS_JAR="${SPARK_JOBS_JAR:="enceladus-spark-jobs.jar"}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, I like the solution and it will work. but then this doesn't seem like a plain environment script.
How about introducing SPARK_JOBS_JAR_OVERRIDE
or something that is then used in run_standardization.sh
like export JAR=${SPARK_JOBS_JAR_OVERRIDE:=$SPARK_JOBS_JAR}
Basically using your solution but in a lower place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then it would be modified in more places? How about something like export SPARK_JOBS_JAR=${SPARK_JOBS_JAR:=$SPARK_JOBS_JAR_OVERRIDE}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want evaluation and user overriding in ENV script. Yes, it would be in more places. 2 places vs 1. run_standardization.sh
and run_conformance.sh
. Or you can try and do it in run_enceladus.sh
.
Now that I am looking into run_enceladus.sh
I see
--jar)
JAR="$2"
shift 2 # past argument and value
;;
What does it do? Does it do the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so I think it's about modifying run_standardization.sh
and run_conformance.sh
to include this override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you already find out what the --jar
does?
scripts/bash/run_conformance.sh
Outdated
@@ -18,7 +18,7 @@ SRC_DIR=`dirname "$0"` | |||
source ${SRC_DIR}/enceladus_env.sh | |||
|
|||
export CLASS=${CONF_CLASS} | |||
export JAR=${SPARK_JOBS_JAR} | |||
export JAR=${SPARK_JOBS_JAR:=$SPARK_JOBS_JAR_OVERRIDE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for it to be an override you would have to do
export JAR=${SPARK_JOBS_JAR:=$SPARK_JOBS_JAR_OVERRIDE} | |
export JAR=${SPARK_JOBS_JAR_OVERRIDE:=$SPARK_JOBS_JAR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--jar
allows you to override the jar location from the command line. There is also --class
, but there is a bug in the script and it doest it wrong. You can fix --class
if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the user having to specify SPARK_JOBS_JAR_OVERRIDE
so it is a bit more explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment: #1400 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicked the button update branch so I can approve
scripts/bash/run_conformance.sh
Outdated
@@ -18,7 +18,7 @@ SRC_DIR=`dirname "$0"` | |||
source ${SRC_DIR}/enceladus_env.sh | |||
|
|||
export CLASS=${CONF_CLASS} | |||
export JAR=${SPARK_JOBS_JAR} | |||
export JAR=${SPARK_JOBS_JAR_OVERRIDE:-$SPARK_JOBS_JAR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this to run_enceladus.sh
so it's actually present in the code only once.
The separation is due to historical reasons, when Standardization and Conformance were in different jar files.
…custom-jar' into feature/1400-helper-scripts-run-custom-jar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ended up being an easy task ... 😄
Kudos, SonarCloud Quality Gate passed!
|
Closes #1400