-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for additional DB connection conf parameters #1
Comments
The other thing is just create the URL that works. It seems like the only params that dbConnect takes are user and pwd. The rest has to go in the URL as |
I think user may also specify his password and user name thru the URL like this scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] If we assume that all DB connection conf parameters should be specified in the URL, that I think additional parameter for src_Hive and src_SparkSQL could be provided like this: my_db2 <- src_SparkSQL(
host = 'tools-1.hadoop.srv',
port = "10000",
conf = list(dbName = value1,
conf2 = value2,
conf3 = value3)
)
> conf
$dbName
[1] "default"
$conf2
[1] "true"
$conf3
[1] "false"
where such > gsub(pattern = "dbName=",
+ replacement = "",
+ x = paste0(names(unlist(conf)),
+ paste0("=",unlist(conf)),
+ collapse = ";")
+ ) -> conf
>
> conf
[1] "default;conf2=true;conf3=false" and then inside > host = 'tools-1.hadoop.srv'
> port = "10000"
> url = paste0("jdbc:hive2://", host, ":", port)
> url
[1] "jdbc:hive2://tools-1.hadoop.srv:10000"
> url2 = paste0("jdbc:hive2://", host, ":", port, "/", conf)
> url2
[1] "jdbc:hive2://tools-1.hadoop.srv:10000/default;conf2=true;conf3=false" Thisof course can be workaround with passing |
You can leave the API as is since you added |
This may be related |
Whoah, thanks :)! I'll Have a look at this during the week Marcin Kosinski Dnia 18.03.2016 o godz. 22:54 Antonio Piccolboni [email protected] napisał(a):
|
Looks like this is the solution. But the issue is still unresolved. It looks like we'll need to wait for the next version of spark. |
Great, I am watching the above issue so that we can react, as far as any presentations, I think it's off topic for this issue but don't let the perfect be the enemy of the good. You can always set up an ad hoc cluster without authentication. You don't have to have a demo at all costs. |
By the way, have you seen this |
continued from piccolbo#18 submitted by @MarcinKosinski
The text was updated successfully, but these errors were encountered: