> On Sept. 3, 2014, 6:56 a.m., Thejas Nair wrote:
> > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 142
> > <https://reviews.apache.org/r/25245/diff/1/?file=673807#file673807line142>
> >
> >     I think we can still make use of the java URI class for parameter 
> > parsing by just parsing the hostname portion first. Custom parsing of 
> > params in this mode can introduce bugs or inconsistencies.
> >     
> >     The JdbcConnectionParams can be expanded to give a list of hosts.
> >     The Utils.parseURL can first extract and substitute the multiple 
> > hostnames (if any), and then use the regular java URI parsing.
> >     We can have the to validate if the current discovery mode supports 
> > multiple hosts, after parsing.

Can't convert to URI directly, unless we resolve the authority part in the URI 
string to a valid value (from host1:port1,host2:port2,host3:port3 to 
host:port). For the resolution to happen, we need to determine from the URI 
string whether SERVICE_DISCOVERY_MODE = zooKeeper or not and then get a host 
from ZooKeeper. But I'll move the logic to Utils#parseURL. Let me know if you 
think otherwise.


> On Sept. 3, 2014, 6:56 a.m., Thejas Nair wrote:
> > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 110
> > <https://reviews.apache.org/r/25245/diff/1/?file=673807#file673807line110>
> >
> >     I think we are likely to have people wanting to implement other modes 
> > of dynamically picking the HS2 host. For example, you could simply have 
> > multiple HS2 hostnames in a URL (instead of zookeeper hosts). Or people 
> > might decide to store the hostnames in another place instead of zookeeper.
> >     
> >     So I think instead of making this param a boolean, it is better to have 
> > the value as "none" (default) or "zookeeper".
> >     
> >     Maybe change the param name also to "service.discovery.mode" ?

Actually, I see one more problem here. The jdbc url: 
jdbc:hive2://<host>:<port>/dbName;sess_var_list?hive_conf_list#hive_var_list 
contains hive_conf_list & hive_var_list which are used to set the corresponding 
values on the server side (for this connection) while opening a client session. 
As you have pointed out earlier, we haven't done a great job of keeping 
"session only" configs in the sess_var_list (e.g by specifying 
hive.server2.thrift.http.path, the client actually is trying to point to the 
corresponding path for the server, and not trying to set its value). I'll 
create a follow up jira to do that cleanup. And I agree, we can keep variable 
names short in sess_var_list and probably use a camelCase convention to keep 
the intent clear.


- Vaibhav


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25245/#review52116
-----------------------------------------------------------


On Sept. 2, 2014, 10:05 a.m., Vaibhav Gumashta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25245/
> -----------------------------------------------------------
> 
> (Updated Sept. 2, 2014, 10:05 a.m.)
> 
> 
> Review request for hive, Alan Gates, Navis Ryu, Szehon Ho, and Thejas Nair.
> 
> 
> Bugs: HIVE-7935
>     https://issues.apache.org/jira/browse/HIVE-7935
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> https://issues.apache.org/jira/browse/HIVE-7935
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 7f4afd9 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java cbcfec7 
>   jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java 
> PRE-CREATION 
>   
> ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
>  46044d0 
>   ql/src/java/org/apache/hadoop/hive/ql/util/ZooKeeperHiveHelper.java 
> PRE-CREATION 
>   
> ql/src/test/org/apache/hadoop/hive/ql/lockmgr/zookeeper/TestZookeeperLockManager.java
>  59294b1 
>   service/src/java/org/apache/hive/service/cli/CLIService.java 08ed2e7 
>   
> service/src/java/org/apache/hive/service/cli/operation/OperationManager.java 
> 21c33bc 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 
> bc0a02c 
>   service/src/java/org/apache/hive/service/cli/session/SessionManager.java 
> d573592 
>   
> service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java
>  37b05fc 
>   service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java 
> 027931e 
>   
> service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java 
> c380b69 
>   service/src/java/org/apache/hive/service/server/HiveServer2.java 0864dfb 
>   
> service/src/test/org/apache/hive/service/cli/session/TestSessionGlobalInitFile.java
>  66fc1fc 
> 
> Diff: https://reviews.apache.org/r/25245/diff/
> 
> 
> Testing
> -------
> 
> Manual testing + test cases.
> 
> 
> Thanks,
> 
> Vaibhav Gumashta
> 
>

Reply via email to