-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-15730][SQL] Respect the --hiveconf in the spark-sql command line #13542
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
Conversation
|
Test build #60127 has finished for PR 13542 at commit
|
|
Test build #60144 has finished for PR 13542 at commit
|
|
cc @yhuai |
| | --hiveconf ${ConfVars.METASTOREWAREHOUSE}=$warehousePath | ||
| | --hiveconf ${ConfVars.SCRATCHDIR}=$scratchDirPath | ||
| | --hiveconf conf1=conftest | ||
| | --hiveconf conf2=1 |
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.
@chenghao-intel Does --hiveconf ${ConfVars.METASTORECONNECTURLKEY}=$jdbcUrl work?
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, it works, that's intention, right?
But seems the below code in SparkSQLCliDriver will not work as we expected.
if (key != "javax.jdo.option.ConnectionURL") {
conf.set(key, value)
sessionState.getOverriddenConfigurations.put(key, value)
}Why do we have to ignore the connection url?
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.
@yhuai any concern for this?
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.
Do you know why those work but something like --hiveconf conf1=conftest does not?
|
Hi @chenghao-intel |
|
Thanks @jameszhouyi , I've removed the |
|
Hi Spark community , |
|
Can you provide more information on the root cause? Seems it is not clear why it does not work. |
|
also, can you try |
|
@yhuai I couldn't find any piece of code to copy the Probably that's the reason why --hiveconf doesn't work. |
|
Hi, |
|
I have opened https://github.com/apache/spark/pull/14058/files (it has one update). |
## What changes were proposed in this pull request? This PR makes spark-sql (backed by SparkSQLCLIDriver) respects confs set by hiveconf, which is what we do in previous versions. The change is that when we start SparkSQLCLIDriver, we explicitly set confs set through --hiveconf to SQLContext's conf (basically treating those confs as a SparkSQL conf). ## How was this patch tested? A new test in CliSuite. Closes #13542 Author: Cheng Hao <[email protected]> Author: Yin Huai <[email protected]> Closes #14058 from yhuai/hiveConfThriftServer. (cherry picked from commit 920cb5f) Signed-off-by: Reynold Xin <[email protected]>
What changes were proposed in this pull request?
We should respect the --hiveconf in the spark-sql command line, otherwise, the existing applications based on the spark 1.6 and earlier will broke, as the configurations specified via --hiveconf are missing
How was this patch tested?
I've added the unit test, but still need to be verified with real application.