hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thejas M Nair (JIRA)" <>
Subject [jira] [Commented] (HIVE-4406) Missing "/" or "/<dbname>" in hs2 jdbc uri switches mode to embedded mode
Date Mon, 01 Jul 2013 20:24:20 GMT


Thejas M Nair commented on HIVE-4406:

[] Sorry about the delay in reviewing this.
This patch does not consider "hive2://;principal=hive/HiveServer2Host@YOUR-REALM.COM"
as an invalid path.
I think the better check is to check that the authority portion is not empty and host portion
is null .

To illustrate how the parsing happens for above jdbc uri -
      String ustr 
      = "hive2://;principal=hive/HiveServer2Host@YOUR-REALM.COM";
      URI uri = URI.create(ustr);
      System.out.println("uri " + uri);
      System.out.println("auth " + uri.getAuthority());
      System.out.println("uinfo " + uri.getUserInfo());
      System.out.println("host " + uri.getHost());
      System.out.println("path " + uri.getPath());
has the following output - 
uri hive2://;principal=hive/HiveServer2Host@YOUR-REALM.COM
uinfo null
host null
path /HiveServer2Host@YOUR-REALM.COM
> Missing "/" or "/<dbname>" in hs2 jdbc uri switches mode to embedded mode
> -------------------------------------------------------------------------
>                 Key: HIVE-4406
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Thejas M Nair
>            Assignee: Anandha L Ranganathan
>         Attachments: hive-4406.patch
> When the jdbc uri does not have a / or "/default" after the hostname:port, and the principal
is specified, it ends up launching HS2 in embedded mode.
> This is because the parsing of uri in such case does not end up extracting the hostname.
> eg . "jdbc:hive2://<host>:<port>;principal=<>." results HS2 embedded
mode getting used.
> "jdbc:hive2://<host>:<port>/;principal=<>" or "jdbc:hive2://<host>:<port>/default;principal=<>"
results in it connecting to the standalone hive server 2.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message