-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10952] Only add hive to classpath if HIVE_HOME is set. #8994
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
[SPARK-10952] Only add hive to classpath if HIVE_HOME is set. #8994
Conversation
|
Jenkins, this is ok to test. |
|
Test build #43277 has finished for PR 8994 at commit
|
build/sbt
Outdated
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.
Not a bash expert, but should this be using something like if [ -d "$HIVE_HOME" ]; to check that it's actually a directory and exists, similar to how we check for the existence of the assembly directory in
Line 51 in 5952bdb
| if [ -d "$ASSEMBLY_DIR" ]; then |
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 really don't know. I was thinking "If you set the variable we will try to use it" plus if isn't correct the wild card will expand to nothing anyways. The other option is to warn if HIVE_HOME is set but doesn't point to a directory. I'm not too convinced either way but the way it is now makes sense to me. Although the warning won't hurt.
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.
Yeah, I only commented because I'm actually somewhat wary of bash-isms and http://unix.stackexchange.com/a/32211/42294 came to mind.
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 think I'm good here because it is in quotes so it will always be an argument. However there is actually a problem if there is a leading - in the variable so I will update to prevent that.
|
Minor question aside, this LGTM. |
|
If you would prefer the change I can do it, just let me know. |
Currently if it isn't set it scans `/lib/*` and adds every dir to the classpath which makes the env too large and every command called afterwords fails.
37c02b0 to
72b88b2
Compare
|
Test build #43305 has finished for PR 8994 at commit
|
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.
It looks like these lines might be indented using using tabs instead of spaces; I'll just fix this myself on merge.
|
LGTM now, so I'm going to merge this to master and branch-1.5. |
Currently if it isn't set it scans `/lib/*` and adds every dir to the classpath which makes the env too large and every command called afterwords fails. Author: Kevin Cox <[email protected]> Closes #8994 from kevincox/kevincox-only-add-hive-to-classpath-if-var-is-set.
Currently if it isn't set it scans `/lib/*` and adds every dir to the classpath which makes the env too large and every command called afterwords fails. Author: Kevin Cox <[email protected]> Closes #8994 from kevincox/kevincox-only-add-hive-to-classpath-if-var-is-set.
Currently if it isn't set it scans
/lib/*and adds every dir to theclasspath which makes the env too large and every command called
afterwords fails.